intlayer-editor 5.8.0-canary.0 → 5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,338 +0,0 @@
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-CjFzhNUq.js","assets/typescript-DlfHMoPT.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-B2ZbN0F_.js","assets/html-derivative-ZQ8onl8Z.js","assets/sql-BLtJtn59.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-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DVs0tusA.js","assets/shellscript-Yzrsuije.js","assets/edge-CKszZCnI.js","assets/elixir-Cc7HHYVZ.js","assets/elm-DbKCFpqz.js","assets/erb-C7QrGF_t.js","assets/ruby-W1VRIm2Q.js","assets/haml-AZXGPtNI.js","assets/graphql-Caa12_AY.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-wwlo35G_.js","assets/markdown-B_HjzqPZ.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-JpbdA51a.js","assets/gdresource-CUnzuGD_.js","assets/gdshader-DkwncUOv.js","assets/gdscript-CU1B2r8a.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-D_o3P2UH.js","assets/handlebars-YebKLiTq.js","assets/http-C38VWM-o.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-BJmZiE_F.js","assets/jison-BCRtk9Os.js","assets/julia-353pQ8cl.js","assets/r-DiinP2Uv.js","assets/latex-DyVrc4Oz.js","assets/tex-B5i3u9ba.js","assets/liquid-DFk8BABL.js","assets/marko-DIP14Aik.js","assets/less-B1dDrJ26.js","assets/mdc-Cpja7t1H.js","assets/nginx-DknmC5AR.js","assets/nim-IFkVVqAN.js","assets/perl-g0D2lH3a.js","assets/php-Gk5eUrPQ.js","assets/pug-Ch9lOoSd.js","assets/qml-CHzV51_b.js","assets/razor-CNXmhs1n.js","assets/csharp-CHadp7IV.js","assets/rst-DKdxLoXm.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.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-BH5u7GGu.js","assets/svelte-Dt5jNKfG.js","assets/templ-Dh73Zvim.js","assets/go-Dn2_MT6a.js","assets/ts-tags-B9XN6NYQ.js","assets/twig-B_ULif71.js","assets/vue-BEetzCYT.js","assets/vue-html-BsD9fJC1.js","assets/vue-vine-CCdTUzyM.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- function NP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function nh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rg={exports:{}},Bl={};/**
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 FS;function OP(){if(FS)return Bl;FS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var l=null;if(s!==void 0&&(l=""+s),o.key!==void 0&&(l=""+o.key),"key"in o){s={};for(var u in o)u!=="key"&&(s[u]=o[u])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:l,ref:o!==void 0?o:null,props:s}}return Bl.Fragment=t,Bl.jsx=n,Bl.jsxs=n,Bl}var GS;function kP(){return GS||(GS=1,rg.exports=OP()),rg.exports}var y=kP(),ig={exports:{}},$e={};/**
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 KS;function DP(){if(KS)return $e;KS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,w={};function R(P,oe,B){this.props=P,this.context=oe,this.refs=w,this.updater=B||_}R.prototype.isReactComponent={},R.prototype.setState=function(P,oe){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,oe,"setState")},R.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function S(){}S.prototype=R.prototype;function x(P,oe,B){this.props=P,this.context=oe,this.refs=w,this.updater=B||_}var T=x.prototype=new S;T.constructor=x,A(T,R.prototype),T.isPureReactComponent=!0;var O=Array.isArray,C={H:null,A:null,T:null,S:null,V:null},D=Object.prototype.hasOwnProperty;function I(P,oe,B,W,se,he){return B=he.ref,{$$typeof:e,type:P,key:oe,ref:B!==void 0?B:null,props:he}}function M(P,oe){return I(P.type,oe,void 0,void 0,void 0,P.props)}function H(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function K(P){var oe={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(B){return oe[B]})}var Z=/\/+/g;function J(P,oe){return typeof P=="object"&&P!==null&&P.key!=null?K(""+P.key):oe.toString(36)}function ae(){}function Y(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(ae,ae):(P.status="pending",P.then(function(oe){P.status==="pending"&&(P.status="fulfilled",P.value=oe)},function(oe){P.status==="pending"&&(P.status="rejected",P.reason=oe)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function re(P,oe,B,W,se){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var ye=!1;if(P===null)ye=!0;else switch(he){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(P.$$typeof){case e:case t:ye=!0;break;case m:return ye=P._init,re(ye(P._payload),oe,B,W,se)}}if(ye)return se=se(P),ye=W===""?"."+J(P,0):W,O(se)?(B="",ye!=null&&(B=ye.replace(Z,"$&/")+"/"),re(se,oe,B,"",function(je){return je})):se!=null&&(H(se)&&(se=M(se,B+(se.key==null||P&&P.key===se.key?"":(""+se.key).replace(Z,"$&/")+"/")+ye)),oe.push(se)),1;ye=0;var ue=W===""?".":W+":";if(O(P))for(var Ee=0;Ee<P.length;Ee++)W=P[Ee],he=ue+J(W,Ee),ye+=re(W,oe,B,he,se);else if(Ee=v(P),typeof Ee=="function")for(P=Ee.call(P),Ee=0;!(W=P.next()).done;)W=W.value,he=ue+J(W,Ee++),ye+=re(W,oe,B,he,se);else if(he==="object"){if(typeof P.then=="function")return re(Y(P),oe,B,W,se);throw oe=String(P),Error("Objects are not valid as a React child (found: "+(oe==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":oe)+"). If you meant to render a collection of children, use an array instead.")}return ye}function j(P,oe,B){if(P==null)return P;var W=[],se=0;return re(P,W,"","",function(he){return oe.call(B,he,se++)}),W}function X(P){if(P._status===-1){var oe=P._result;oe=oe(),oe.then(function(B){(P._status===0||P._status===-1)&&(P._status=1,P._result=B)},function(B){(P._status===0||P._status===-1)&&(P._status=2,P._result=B)}),P._status===-1&&(P._status=0,P._result=oe)}if(P._status===1)return P._result.default;throw P._result}var F=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var oe=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(oe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function ve(){}return $e.Children={map:j,forEach:function(P,oe,B){j(P,function(){oe.apply(this,arguments)},B)},count:function(P){var oe=0;return j(P,function(){oe++}),oe},toArray:function(P){return j(P,function(oe){return oe})||[]},only:function(P){if(!H(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},$e.Component=R,$e.Fragment=n,$e.Profiler=o,$e.PureComponent=x,$e.StrictMode=r,$e.Suspense=d,$e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,$e.__COMPILER_RUNTIME={__proto__:null,c:function(P){return C.H.useMemoCache(P)}},$e.cache=function(P){return function(){return P.apply(null,arguments)}},$e.cloneElement=function(P,oe,B){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var W=A({},P.props),se=P.key,he=void 0;if(oe!=null)for(ye in oe.ref!==void 0&&(he=void 0),oe.key!==void 0&&(se=""+oe.key),oe)!D.call(oe,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&oe.ref===void 0||(W[ye]=oe[ye]);var ye=arguments.length-2;if(ye===1)W.children=B;else if(1<ye){for(var ue=Array(ye),Ee=0;Ee<ye;Ee++)ue[Ee]=arguments[Ee+2];W.children=ue}return I(P.type,se,void 0,void 0,he,W)},$e.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:s,_context:P},P},$e.createElement=function(P,oe,B){var W,se={},he=null;if(oe!=null)for(W in oe.key!==void 0&&(he=""+oe.key),oe)D.call(oe,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(se[W]=oe[W]);var ye=arguments.length-2;if(ye===1)se.children=B;else if(1<ye){for(var ue=Array(ye),Ee=0;Ee<ye;Ee++)ue[Ee]=arguments[Ee+2];se.children=ue}if(P&&P.defaultProps)for(W in ye=P.defaultProps,ye)se[W]===void 0&&(se[W]=ye[W]);return I(P,he,void 0,void 0,null,se)},$e.createRef=function(){return{current:null}},$e.forwardRef=function(P){return{$$typeof:u,render:P}},$e.isValidElement=H,$e.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:X}},$e.memo=function(P,oe){return{$$typeof:h,type:P,compare:oe===void 0?null:oe}},$e.startTransition=function(P){var oe=C.T,B={};C.T=B;try{var W=P(),se=C.S;se!==null&&se(B,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(ve,F)}catch(he){F(he)}finally{C.T=oe}},$e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},$e.use=function(P){return C.H.use(P)},$e.useActionState=function(P,oe,B){return C.H.useActionState(P,oe,B)},$e.useCallback=function(P,oe){return C.H.useCallback(P,oe)},$e.useContext=function(P){return C.H.useContext(P)},$e.useDebugValue=function(){},$e.useDeferredValue=function(P,oe){return C.H.useDeferredValue(P,oe)},$e.useEffect=function(P,oe,B){var W=C.H;if(typeof B=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return W.useEffect(P,oe)},$e.useId=function(){return C.H.useId()},$e.useImperativeHandle=function(P,oe,B){return C.H.useImperativeHandle(P,oe,B)},$e.useInsertionEffect=function(P,oe){return C.H.useInsertionEffect(P,oe)},$e.useLayoutEffect=function(P,oe){return C.H.useLayoutEffect(P,oe)},$e.useMemo=function(P,oe){return C.H.useMemo(P,oe)},$e.useOptimistic=function(P,oe){return C.H.useOptimistic(P,oe)},$e.useReducer=function(P,oe,B){return C.H.useReducer(P,oe,B)},$e.useRef=function(P){return C.H.useRef(P)},$e.useState=function(P){return C.H.useState(P)},$e.useSyncExternalStore=function(P,oe,B){return C.H.useSyncExternalStore(P,oe,B)},$e.useTransition=function(){return C.H.useTransition()},$e.version="19.1.1",$e}var qS;function Bc(){return qS||(qS=1,ig.exports=DP()),ig.exports}var E=Bc();const De=nh(E),d1=NP({__proto__:null,default:De},[E]);var og={exports:{}},$l={},ag={exports:{}},sg={};/**
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 ZS;function IP(){return ZS||(ZS=1,(function(e){function t(j,X){var F=j.length;j.push(X);e:for(;0<F;){var ve=F-1>>>1,P=j[ve];if(0<o(P,X))j[ve]=X,j[F]=P,F=ve;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var X=j[0],F=j.pop();if(F!==X){j[0]=F;e:for(var ve=0,P=j.length,oe=P>>>1;ve<oe;){var B=2*(ve+1)-1,W=j[B],se=B+1,he=j[se];if(0>o(W,F))se<P&&0>o(he,W)?(j[ve]=he,j[se]=F,ve=se):(j[ve]=W,j[B]=F,ve=B);else if(se<P&&0>o(he,F))j[ve]=he,j[se]=F,ve=se;else break e}}return X}function o(j,X){var F=j.sortIndex-X.sortIndex;return F!==0?F:j.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],h=[],m=1,g=null,v=3,_=!1,A=!1,w=!1,R=!1,S=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(j){for(var X=n(h);X!==null;){if(X.callback===null)r(h);else if(X.startTime<=j)r(h),X.sortIndex=X.expirationTime,t(d,X);else break;X=n(h)}}function C(j){if(w=!1,O(j),!A)if(n(d)!==null)A=!0,D||(D=!0,J());else{var X=n(h);X!==null&&re(C,X.startTime-j)}}var D=!1,I=-1,M=5,H=-1;function K(){return R?!0:!(e.unstable_now()-H<M)}function Z(){if(R=!1,D){var j=e.unstable_now();H=j;var X=!0;try{e:{A=!1,w&&(w=!1,x(I),I=-1),_=!0;var F=v;try{t:{for(O(j),g=n(d);g!==null&&!(g.expirationTime>j&&K());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var P=ve(g.expirationTime<=j);if(j=e.unstable_now(),typeof P=="function"){g.callback=P,O(j),X=!0;break t}g===n(d)&&r(d),O(j)}else r(d);g=n(d)}if(g!==null)X=!0;else{var oe=n(h);oe!==null&&re(C,oe.startTime-j),X=!1}}break e}finally{g=null,v=F,_=!1}X=void 0}}finally{X?J():D=!1}}}var J;if(typeof T=="function")J=function(){T(Z)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,Y=ae.port2;ae.port1.onmessage=Z,J=function(){Y.postMessage(null)}}else J=function(){S(Z,0)};function re(j,X){I=S(function(){j(e.unstable_now())},X)}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(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(j){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var F=v;v=X;try{return j()}finally{v=F}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(j,X){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var F=v;v=j;try{return X()}finally{v=F}},e.unstable_scheduleCallback=function(j,X,F){var ve=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ve+F:ve):F=ve,j){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=F+P,j={id:m++,callback:X,priorityLevel:j,startTime:F,expirationTime:P,sortIndex:-1},F>ve?(j.sortIndex=F,t(h,j),n(d)===null&&j===n(h)&&(w?(x(I),I=-1):w=!0,re(C,F-ve))):(j.sortIndex=P,t(d,j),A||_||(A=!0,D||(D=!0,J()))),j},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(j){var X=v;return function(){var F=v;v=X;try{return j.apply(this,arguments)}finally{v=F}}}})(sg)),sg}var YS;function LP(){return YS||(YS=1,ag.exports=IP()),ag.exports}var lg={exports:{}},hn={};/**
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 WS;function jP(){if(WS)return hn;WS=1;var e=Bc();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" 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},o=Symbol.for("react.portal");function s(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,hn.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(d,h,null,m)},hn.flushSync=function(d){var h=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=m,r.d.f()}},hn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},hn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},hn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=u(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:_}):m==="script"&&r.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},hn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=u(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},hn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=u(m,h.crossOrigin);r.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},hn.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=u(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},hn.requestFormReset=function(d){r.d.r(d)},hn.unstable_batchedUpdates=function(d,h){return d(h)},hn.useFormState=function(d,h,m){return l.H.useFormState(d,h,m)},hn.useFormStatus=function(){return l.H.useHostTransitionStatus()},hn.version="19.1.1",hn}var XS;function f1(){if(XS)return lg.exports;XS=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(),lg.exports=jP(),lg.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 QS;function PP(){if(QS)return $l;QS=1;var e=LP(),t=Bc(),n=f1();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var a=i,c=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(c=a.return),i=a.return;while(i)}return a.tag===3?c:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function u(i){if(s(i)!==i)throw Error(r(188))}function d(i){var a=i.alternate;if(!a){if(a=s(i),a===null)throw Error(r(188));return a!==i?null:i}for(var c=i,f=a;;){var p=c.return;if(p===null)break;var b=p.alternate;if(b===null){if(f=p.return,f!==null){c=f;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===c)return u(p),i;if(b===f)return u(p),a;b=b.sibling}throw Error(r(188))}if(c.return!==f.return)c=p,f=b;else{for(var N=!1,k=p.child;k;){if(k===c){N=!0,c=p,f=b;break}if(k===f){N=!0,f=p,c=b;break}k=k.sibling}if(!N){for(k=b.child;k;){if(k===c){N=!0,c=b,f=p;break}if(k===f){N=!0,f=b,c=p;break}k=k.sibling}if(!N)throw Error(r(189))}}if(c.alternate!==f)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:a}function h(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=h(i),a!==null)return a;i=i.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),x=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=Z&&i[Z]||i["@@iterator"],typeof i=="function"?i:null)}var ae=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===ae?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case A:return"Fragment";case R:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case D:return"SuspenseList";case H:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case _:return"Portal";case T:return(i.displayName||"Context")+".Provider";case x:return(i._context.displayName||"Context")+".Consumer";case O:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return a=i.displayName||null,a!==null?a:Y(i.type)||"Memo";case M:a=i._payload,i=i._init;try{return Y(i(a))}catch{}}return null}var re=Array.isArray,j=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},ve=[],P=-1;function oe(i){return{current:i}}function B(i){0>P||(i.current=ve[P],ve[P]=null,P--)}function W(i,a){P++,ve[P]=i.current,i.current=a}var se=oe(null),he=oe(null),ye=oe(null),ue=oe(null);function Ee(i,a){switch(W(ye,a),W(he,i),W(se,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?vS(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=vS(a),i=bS(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}B(se),W(se,i)}function je(){B(se),B(he),B(ye)}function Ue(i){i.memoizedState!==null&&W(ue,i);var a=se.current,c=bS(a,i.type);a!==c&&(W(he,i),W(se,c))}function Xe(i){he.current===i&&(B(se),B(he)),ue.current===i&&(B(ue),Pl._currentValue=F)}var nt=Object.prototype.hasOwnProperty,Wt=e.unstable_scheduleCallback,Sn=e.unstable_cancelCallback,Si=e.unstable_shouldYield,_o=e.unstable_requestPaint,un=e.unstable_now,e_=e.unstable_getCurrentPriorityLevel,Gs=e.unstable_ImmediatePriority,U=e.unstable_UserBlockingPriority,te=e.unstable_NormalPriority,ce=e.unstable_LowPriority,Ae=e.unstable_IdlePriority,_e=e.log,be=e.unstable_setDisableYieldValue,Ce=null,Be=null;function Qe(i){if(typeof _e=="function"&&be(i),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(Ce,i)}catch{}}var pt=Math.clz32?Math.clz32:Gh,fa=Math.log,xr=Math.LN2;function Gh(i){return i>>>=0,i===0?32:31-(fa(i)/xr|0)|0}var Ai=256,wi=4194304;function Zr(i){var a=i&42;if(a!==0)return a;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:return 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&4194048;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 Eo(i,a,c){var f=i.pendingLanes;if(f===0)return 0;var p=0,b=i.suspendedLanes,N=i.pingedLanes;i=i.warmLanes;var k=f&134217727;return k!==0?(f=k&~b,f!==0?p=Zr(f):(N&=k,N!==0?p=Zr(N):c||(c=k&~i,c!==0&&(p=Zr(c))))):(k=f&~b,k!==0?p=Zr(k):N!==0?p=Zr(N):c||(c=f&~i,c!==0&&(p=Zr(c)))),p===0?0:a!==0&&a!==p&&(a&b)===0&&(b=p&-p,c=a&-a,b>=c||b===32&&(c&4194048)!==0)?a:p}function xo(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function du(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32: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 a+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 t_(){var i=Ai;return Ai<<=1,(Ai&4194048)===0&&(Ai=256),i}function n_(){var i=wi;return wi<<=1,(wi&62914560)===0&&(wi=4194304),i}function Kh(i){for(var a=[],c=0;31>c;c++)a.push(i);return a}function Ks(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function yL(i,a,c,f,p,b){var N=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,z=i.expirationTimes,ee=i.hiddenUpdates;for(c=N&~c;0<c;){var le=31-pt(c),fe=1<<le;k[le]=0,z[le]=-1;var ne=ee[le];if(ne!==null)for(ee[le]=null,le=0;le<ne.length;le++){var ie=ne[le];ie!==null&&(ie.lane&=-536870913)}c&=~fe}f!==0&&r_(i,f,0),b!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=b&~(N&~a))}function r_(i,a,c){i.pendingLanes|=a,i.suspendedLanes&=~a;var f=31-pt(a);i.entangledLanes|=a,i.entanglements[f]=i.entanglements[f]|1073741824|c&4194090}function i_(i,a){var c=i.entangledLanes|=a;for(i=i.entanglements;c;){var f=31-pt(c),p=1<<f;p&a|i[f]&a&&(i[f]|=a),c&=~p}}function qh(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Zh(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function o_(){var i=X.p;return i!==0?i:(i=window.event,i===void 0?32:zS(i.type))}function vL(i,a){var c=X.p;try{return X.p=i,a()}finally{X.p=c}}var Ti=Math.random().toString(36).slice(2),dn="__reactFiber$"+Ti,An="__reactProps$"+Ti,ha="__reactContainer$"+Ti,Yh="__reactEvents$"+Ti,bL="__reactListeners$"+Ti,_L="__reactHandles$"+Ti,a_="__reactResources$"+Ti,qs="__reactMarker$"+Ti;function Wh(i){delete i[dn],delete i[An],delete i[Yh],delete i[bL],delete i[_L]}function ma(i){var a=i[dn];if(a)return a;for(var c=i.parentNode;c;){if(a=c[ha]||c[dn]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(i=SS(i);i!==null;){if(c=i[dn])return c;i=SS(i)}return a}i=c,c=i.parentNode}return null}function pa(i){if(i=i[dn]||i[ha]){var a=i.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return i}return null}function Zs(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function ga(i){var a=i[a_];return a||(a=i[a_]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Xt(i){i[qs]=!0}var s_=new Set,l_={};function So(i,a){ya(i,a),ya(i+"Capture",a)}function ya(i,a){for(l_[i]=a,i=0;i<a.length;i++)s_.add(a[i])}var EL=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]*$"),c_={},u_={};function xL(i){return nt.call(u_,i)?!0:nt.call(c_,i)?!1:EL.test(i)?u_[i]=!0:(c_[i]=!0,!1)}function fu(i,a,c){if(xL(a))if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var f=a.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+c)}}function hu(i,a,c){if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+c)}}function Yr(i,a,c,f){if(f===null)i.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(a,c,""+f)}}var Xh,d_;function va(i){if(Xh===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);Xh=a&&a[1]||"",d_=-1<c.stack.indexOf(`
43
- at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
44
- `+Xh+i+d_}var Qh=!1;function Jh(i,a){if(!i||Qh)return"";Qh=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(a){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ie){var ne=ie}Reflect.construct(i,[],fe)}else{try{fe.call()}catch(ie){ne=ie}i.call(fe.prototype)}}else{try{throw Error()}catch(ie){ne=ie}(fe=i())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ie){if(ie&&ne&&typeof ie.stack=="string")return[ie.stack,ne.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=f.DetermineComponentFrameRoot(),N=b[0],k=b[1];if(N&&k){var z=N.split(`
45
- `),ee=k.split(`
46
- `);for(p=f=0;f<z.length&&!z[f].includes("DetermineComponentFrameRoot");)f++;for(;p<ee.length&&!ee[p].includes("DetermineComponentFrameRoot");)p++;if(f===z.length||p===ee.length)for(f=z.length-1,p=ee.length-1;1<=f&&0<=p&&z[f]!==ee[p];)p--;for(;1<=f&&0<=p;f--,p--)if(z[f]!==ee[p]){if(f!==1||p!==1)do if(f--,p--,0>p||z[f]!==ee[p]){var le=`
47
- `+z[f].replace(" at new "," at ");return i.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",i.displayName)),le}while(1<=f&&0<=p);break}}}finally{Qh=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?va(c):""}function SL(i){switch(i.tag){case 26:case 27:case 5:return va(i.type);case 16:return va("Lazy");case 13:return va("Suspense");case 19:return va("SuspenseList");case 0:case 15:return Jh(i.type,!1);case 11:return Jh(i.type.render,!1);case 1:return Jh(i.type,!0);case 31:return va("Activity");default:return""}}function f_(i){try{var a="";do a+=SL(i),i=i.return;while(i);return a}catch(c){return`
48
- Error generating stack: `+c.message+`
49
- `+c.stack}}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 h_(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function AL(i){var a=h_(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,a),f=""+i[a];if(!i.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,b=c.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return p.call(this)},set:function(N){f=""+N,b.call(this,N)}}),Object.defineProperty(i,a,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(N){f=""+N},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function mu(i){i._valueTracker||(i._valueTracker=AL(i))}function m_(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var c=a.getValue(),f="";return i&&(f=h_(i)?i.checked?"true":"false":i.value),i=f,i!==c?(a.setValue(i),!0):!1}function pu(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 wL=/[\n"\\]/g;function qn(i){return i.replace(wL,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function em(i,a,c,f,p,b,N,k){i.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.type=N:i.removeAttribute("type"),a!=null?N==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+Kn(a)):i.value!==""+Kn(a)&&(i.value=""+Kn(a)):N!=="submit"&&N!=="reset"||i.removeAttribute("value"),a!=null?tm(i,N,Kn(a)):c!=null?tm(i,N,Kn(c)):f!=null&&i.removeAttribute("value"),p==null&&b!=null&&(i.defaultChecked=!!b),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 p_(i,a,c,f,p,b,N,k){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),a!=null||c!=null){if(!(b!=="submit"&&b!=="reset"||a!=null))return;c=c!=null?""+Kn(c):"",a=a!=null?""+Kn(a):c,k||a===i.value||(i.value=a),i.defaultValue=a}f=f??p,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=k?i.checked:!!f,i.defaultChecked=!!f,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(i.name=N)}function tm(i,a,c){a==="number"&&pu(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function ba(i,a,c,f){if(i=i.options,a){a={};for(var p=0;p<c.length;p++)a["$"+c[p]]=!0;for(c=0;c<i.length;c++)p=a.hasOwnProperty("$"+i[c].value),i[c].selected!==p&&(i[c].selected=p),p&&f&&(i[c].defaultSelected=!0)}else{for(c=""+Kn(c),a=null,p=0;p<i.length;p++){if(i[p].value===c){i[p].selected=!0,f&&(i[p].defaultSelected=!0);return}a!==null||i[p].disabled||(a=i[p])}a!==null&&(a.selected=!0)}}function g_(i,a,c){if(a!=null&&(a=""+Kn(a),a!==i.value&&(i.value=a),c==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=c!=null?""+Kn(c):""}function y_(i,a,c,f){if(a==null){if(f!=null){if(c!=null)throw Error(r(92));if(re(f)){if(1<f.length)throw Error(r(93));f=f[0]}c=f}c==null&&(c=""),a=c}c=Kn(a),i.defaultValue=c,f=i.textContent,f===c&&f!==""&&f!==null&&(i.value=f)}function _a(i,a){if(a){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=a;return}}i.textContent=a}var TL=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 v_(i,a,c){var f=a.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?f?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":f?i.setProperty(a,c):typeof c!="number"||c===0||TL.has(a)?a==="float"?i.cssFloat=c:i[a]=(""+c).trim():i[a]=c+"px"}function b_(i,a,c){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,c!=null){for(var f in c)!c.hasOwnProperty(f)||a!=null&&a.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var p in a)f=a[p],a.hasOwnProperty(p)&&c[p]!==f&&v_(i,p,f)}else for(var b in a)a.hasOwnProperty(b)&&v_(i,b,a[b])}function nm(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 RL=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"]]),CL=/^[\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 gu(i){return CL.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var rm=null;function im(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ea=null,xa=null;function __(i){var a=pa(i);if(a&&(i=a.stateNode)){var c=i[An]||null;e:switch(i=a.stateNode,a.type){case"input":if(em(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),a=c.name,c.type==="radio"&&a!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+qn(""+a)+'"][type="radio"]'),a=0;a<c.length;a++){var f=c[a];if(f!==i&&f.form===i.form){var p=f[An]||null;if(!p)throw Error(r(90));em(f,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<c.length;a++)f=c[a],f.form===i.form&&m_(f)}break e;case"textarea":g_(i,c.value,c.defaultValue);break e;case"select":a=c.value,a!=null&&ba(i,!!c.multiple,a,!1)}}}var om=!1;function E_(i,a,c){if(om)return i(a,c);om=!0;try{var f=i(a);return f}finally{if(om=!1,(Ea!==null||xa!==null)&&(td(),Ea&&(a=Ea,i=xa,xa=Ea=null,__(a),i)))for(a=0;a<i.length;a++)__(i[a])}}function Ys(i,a){var c=i.stateNode;if(c===null)return null;var f=c[An]||null;if(f===null)return null;c=f[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,a,typeof c));return c}var Wr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),am=!1;if(Wr)try{var Ws={};Object.defineProperty(Ws,"passive",{get:function(){am=!0}}),window.addEventListener("test",Ws,Ws),window.removeEventListener("test",Ws,Ws)}catch{am=!1}var Ri=null,sm=null,yu=null;function x_(){if(yu)return yu;var i,a=sm,c=a.length,f,p="value"in Ri?Ri.value:Ri.textContent,b=p.length;for(i=0;i<c&&a[i]===p[i];i++);var N=c-i;for(f=1;f<=N&&a[c-f]===p[b-f];f++);return yu=p.slice(i,1<f?1-f:void 0)}function vu(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function bu(){return!0}function S_(){return!1}function wn(i){function a(c,f,p,b,N){this._reactName=c,this._targetInst=p,this.type=f,this.nativeEvent=b,this.target=N,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(c=i[k],this[k]=c?c(b):b[k]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?bu:S_,this.isPropagationStopped=S_,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=bu)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=bu)},persist:function(){},isPersistent:bu}),a}var Ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_u=wn(Ao),Xs=m({},Ao,{view:0,detail:0}),NL=wn(Xs),lm,cm,Qs,Eu=m({},Xs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dm,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!==Qs&&(Qs&&i.type==="mousemove"?(lm=i.screenX-Qs.screenX,cm=i.screenY-Qs.screenY):cm=lm=0,Qs=i),lm)},movementY:function(i){return"movementY"in i?i.movementY:cm}}),A_=wn(Eu),OL=m({},Eu,{dataTransfer:0}),kL=wn(OL),DL=m({},Xs,{relatedTarget:0}),um=wn(DL),IL=m({},Ao,{animationName:0,elapsedTime:0,pseudoElement:0}),LL=wn(IL),jL=m({},Ao,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),PL=wn(jL),ML=m({},Ao,{data:0}),w_=wn(ML),zL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VL={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"},UL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BL(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=UL[i])?!!a[i]:!1}function dm(){return BL}var $L=m({},Xs,{key:function(i){if(i.key){var a=zL[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=vu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?VL[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dm,charCode:function(i){return i.type==="keypress"?vu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?vu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),HL=wn($L),FL=m({},Eu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),T_=wn(FL),GL=m({},Xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dm}),KL=wn(GL),qL=m({},Ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZL=wn(qL),YL=m({},Eu,{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}),WL=wn(YL),XL=m({},Ao,{newState:0,oldState:0}),QL=wn(XL),JL=[9,13,27,32],fm=Wr&&"CompositionEvent"in window,Js=null;Wr&&"documentMode"in document&&(Js=document.documentMode);var ej=Wr&&"TextEvent"in window&&!Js,R_=Wr&&(!fm||Js&&8<Js&&11>=Js),C_=" ",N_=!1;function O_(i,a){switch(i){case"keyup":return JL.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Sa=!1;function tj(i,a){switch(i){case"compositionend":return k_(a);case"keypress":return a.which!==32?null:(N_=!0,C_);case"textInput":return i=a.data,i===C_&&N_?null:i;default:return null}}function nj(i,a){if(Sa)return i==="compositionend"||!fm&&O_(i,a)?(i=x_(),yu=sm=Ri=null,Sa=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return R_&&a.locale!=="ko"?null:a.data;default:return null}}var rj={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 D_(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!rj[i.type]:a==="textarea"}function I_(i,a,c,f){Ea?xa?xa.push(f):xa=[f]:Ea=f,a=sd(a,"onChange"),0<a.length&&(c=new _u("onChange","change",null,c,f),i.push({event:c,listeners:a}))}var el=null,tl=null;function ij(i){hS(i,0)}function xu(i){var a=Zs(i);if(m_(a))return i}function L_(i,a){if(i==="change")return a}var j_=!1;if(Wr){var hm;if(Wr){var mm="oninput"in document;if(!mm){var P_=document.createElement("div");P_.setAttribute("oninput","return;"),mm=typeof P_.oninput=="function"}hm=mm}else hm=!1;j_=hm&&(!document.documentMode||9<document.documentMode)}function M_(){el&&(el.detachEvent("onpropertychange",z_),tl=el=null)}function z_(i){if(i.propertyName==="value"&&xu(tl)){var a=[];I_(a,tl,i,im(i)),E_(ij,a)}}function oj(i,a,c){i==="focusin"?(M_(),el=a,tl=c,el.attachEvent("onpropertychange",z_)):i==="focusout"&&M_()}function aj(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return xu(tl)}function sj(i,a){if(i==="click")return xu(a)}function lj(i,a){if(i==="input"||i==="change")return xu(a)}function cj(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var Dn=typeof Object.is=="function"?Object.is:cj;function nl(i,a){if(Dn(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var c=Object.keys(i),f=Object.keys(a);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var p=c[f];if(!nt.call(a,p)||!Dn(i[p],a[p]))return!1}return!0}function V_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function U_(i,a){var c=V_(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=a&&f>=a)return{node:c,offset:a-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=V_(c)}}function B_(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?B_(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function $_(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=pu(i.document);a instanceof i.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href=="string"}catch{c=!1}if(c)i=a.contentWindow;else break;a=pu(i.document)}return a}function pm(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var uj=Wr&&"documentMode"in document&&11>=document.documentMode,Aa=null,gm=null,rl=null,ym=!1;function H_(i,a,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;ym||Aa==null||Aa!==pu(f)||(f=Aa,"selectionStart"in f&&pm(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),rl&&nl(rl,f)||(rl=f,f=sd(gm,"onSelect"),0<f.length&&(a=new _u("onSelect","select",null,a,c),i.push({event:a,listeners:f}),a.target=Aa)))}function wo(i,a){var c={};return c[i.toLowerCase()]=a.toLowerCase(),c["Webkit"+i]="webkit"+a,c["Moz"+i]="moz"+a,c}var wa={animationend:wo("Animation","AnimationEnd"),animationiteration:wo("Animation","AnimationIteration"),animationstart:wo("Animation","AnimationStart"),transitionrun:wo("Transition","TransitionRun"),transitionstart:wo("Transition","TransitionStart"),transitioncancel:wo("Transition","TransitionCancel"),transitionend:wo("Transition","TransitionEnd")},vm={},F_={};Wr&&(F_=document.createElement("div").style,"AnimationEvent"in window||(delete wa.animationend.animation,delete wa.animationiteration.animation,delete wa.animationstart.animation),"TransitionEvent"in window||delete wa.transitionend.transition);function To(i){if(vm[i])return vm[i];if(!wa[i])return i;var a=wa[i],c;for(c in a)if(a.hasOwnProperty(c)&&c in F_)return vm[i]=a[c];return i}var G_=To("animationend"),K_=To("animationiteration"),q_=To("animationstart"),dj=To("transitionrun"),fj=To("transitionstart"),hj=To("transitioncancel"),Z_=To("transitionend"),Y_=new Map,bm="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 toggle touchMove waiting wheel".split(" ");bm.push("scrollEnd");function lr(i,a){Y_.set(i,a),So(a,[i])}var W_=new WeakMap;function Zn(i,a){if(typeof i=="object"&&i!==null){var c=W_.get(i);return c!==void 0?c:(a={value:i,source:a,stack:f_(a)},W_.set(i,a),a)}return{value:i,source:a,stack:f_(a)}}var Yn=[],Ta=0,_m=0;function Su(){for(var i=Ta,a=_m=Ta=0;a<i;){var c=Yn[a];Yn[a++]=null;var f=Yn[a];Yn[a++]=null;var p=Yn[a];Yn[a++]=null;var b=Yn[a];if(Yn[a++]=null,f!==null&&p!==null){var N=f.pending;N===null?p.next=p:(p.next=N.next,N.next=p),f.pending=p}b!==0&&X_(c,p,b)}}function Au(i,a,c,f){Yn[Ta++]=i,Yn[Ta++]=a,Yn[Ta++]=c,Yn[Ta++]=f,_m|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function Em(i,a,c,f){return Au(i,a,c,f),wu(i)}function Ra(i,a){return Au(i,null,null,a),wu(i)}function X_(i,a,c){i.lanes|=c;var f=i.alternate;f!==null&&(f.lanes|=c);for(var p=!1,b=i.return;b!==null;)b.childLanes|=c,f=b.alternate,f!==null&&(f.childLanes|=c),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(p=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,p&&a!==null&&(p=31-pt(c),i=b.hiddenUpdates,f=i[p],f===null?i[p]=[a]:f.push(a),a.lane=c|536870912),b):null}function wu(i){if(50<Cl)throw Cl=0,Rp=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var Ca={};function mj(i,a,c,f){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=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(i,a,c,f){return new mj(i,a,c,f)}function xm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Xr(i,a){var c=i.alternate;return c===null?(c=In(i.tag,a,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=a,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,a=i.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function Q_(i,a){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=a,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,a=c.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function Tu(i,a,c,f,p,b){var N=0;if(f=i,typeof i=="function")xm(i)&&(N=1);else if(typeof i=="string")N=gP(i,c,se.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case H:return i=In(31,c,a,p),i.elementType=H,i.lanes=b,i;case A:return Ro(c.children,p,b,a);case w:N=8,p|=24;break;case R:return i=In(12,c,a,p|2),i.elementType=R,i.lanes=b,i;case C:return i=In(13,c,a,p),i.elementType=C,i.lanes=b,i;case D:return i=In(19,c,a,p),i.elementType=D,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case S:case T:N=10;break e;case x:N=9;break e;case O:N=11;break e;case I:N=14;break e;case M:N=16,f=null;break e}N=29,c=Error(r(130,i===null?"null":typeof i,"")),f=null}return a=In(N,c,a,p),a.elementType=i,a.type=f,a.lanes=b,a}function Ro(i,a,c,f){return i=In(7,i,f,a),i.lanes=c,i}function Sm(i,a,c){return i=In(6,i,null,a),i.lanes=c,i}function Am(i,a,c){return a=In(4,i.children!==null?i.children:[],i.key,a),a.lanes=c,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var Na=[],Oa=0,Ru=null,Cu=0,Wn=[],Xn=0,Co=null,Qr=1,Jr="";function No(i,a){Na[Oa++]=Cu,Na[Oa++]=Ru,Ru=i,Cu=a}function J_(i,a,c){Wn[Xn++]=Qr,Wn[Xn++]=Jr,Wn[Xn++]=Co,Co=i;var f=Qr;i=Jr;var p=32-pt(f)-1;f&=~(1<<p),c+=1;var b=32-pt(a)+p;if(30<b){var N=p-p%5;b=(f&(1<<N)-1).toString(32),f>>=N,p-=N,Qr=1<<32-pt(a)+p|c<<p|f,Jr=b+i}else Qr=1<<b|c<<p|f,Jr=i}function wm(i){i.return!==null&&(No(i,1),J_(i,1,0))}function Tm(i){for(;i===Ru;)Ru=Na[--Oa],Na[Oa]=null,Cu=Na[--Oa],Na[Oa]=null;for(;i===Co;)Co=Wn[--Xn],Wn[Xn]=null,Jr=Wn[--Xn],Wn[Xn]=null,Qr=Wn[--Xn],Wn[Xn]=null}var vn=null,Ct=null,it=!1,Oo=null,Sr=!1,Rm=Error(r(519));function ko(i){var a=Error(r(418,""));throw al(Zn(a,i)),Rm}function eE(i){var a=i.stateNode,c=i.type,f=i.memoizedProps;switch(a[dn]=i,a[An]=f,c){case"dialog":We("cancel",a),We("close",a);break;case"iframe":case"object":case"embed":We("load",a);break;case"video":case"audio":for(c=0;c<Ol.length;c++)We(Ol[c],a);break;case"source":We("error",a);break;case"img":case"image":case"link":We("error",a),We("load",a);break;case"details":We("toggle",a);break;case"input":We("invalid",a),p_(a,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0),mu(a);break;case"select":We("invalid",a);break;case"textarea":We("invalid",a),y_(a,f.value,f.defaultValue,f.children),mu(a)}c=f.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||a.textContent===""+c||f.suppressHydrationWarning===!0||yS(a.textContent,c)?(f.popover!=null&&(We("beforetoggle",a),We("toggle",a)),f.onScroll!=null&&We("scroll",a),f.onScrollEnd!=null&&We("scrollend",a),f.onClick!=null&&(a.onclick=ld),a=!0):a=!1,a||ko(i)}function tE(i){for(vn=i.return;vn;)switch(vn.tag){case 5:case 13:Sr=!1;return;case 27:case 3:Sr=!0;return;default:vn=vn.return}}function il(i){if(i!==vn)return!1;if(!it)return tE(i),it=!0,!1;var a=i.tag,c;if((c=a!==3&&a!==27)&&((c=a===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Hp(i.type,i.memoizedProps)),c=!c),c&&Ct&&ko(i),tE(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,a=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(a===0){Ct=ur(i.nextSibling);break e}a--}else c!=="$"&&c!=="$!"&&c!=="$?"||a++;i=i.nextSibling}Ct=null}}else a===27?(a=Ct,Hi(i.type)?(i=qp,qp=null,Ct=i):Ct=a):Ct=vn?ur(i.stateNode.nextSibling):null;return!0}function ol(){Ct=vn=null,it=!1}function nE(){var i=Oo;return i!==null&&(Cn===null?Cn=i:Cn.push.apply(Cn,i),Oo=null),i}function al(i){Oo===null?Oo=[i]:Oo.push(i)}var Cm=oe(null),Do=null,ei=null;function Ci(i,a,c){W(Cm,a._currentValue),a._currentValue=c}function ti(i){i._currentValue=Cm.current,B(Cm)}function Nm(i,a,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,f!==null&&(f.childLanes|=a)):f!==null&&(f.childLanes&a)!==a&&(f.childLanes|=a),i===c)break;i=i.return}}function Om(i,a,c,f){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var b=p.dependencies;if(b!==null){var N=p.child;b=b.firstContext;e:for(;b!==null;){var k=b;b=p;for(var z=0;z<a.length;z++)if(k.context===a[z]){b.lanes|=c,k=b.alternate,k!==null&&(k.lanes|=c),Nm(b.return,c,i),f||(N=null);break e}b=k.next}}else if(p.tag===18){if(N=p.return,N===null)throw Error(r(341));N.lanes|=c,b=N.alternate,b!==null&&(b.lanes|=c),Nm(N,c,i),N=null}else N=p.child;if(N!==null)N.return=p;else for(N=p;N!==null;){if(N===i){N=null;break}if(p=N.sibling,p!==null){p.return=N.return,N=p;break}N=N.return}p=N}}function sl(i,a,c,f){i=null;for(var p=a,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var N=p.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var k=p.type;Dn(p.pendingProps.value,N.value)||(i!==null?i.push(k):i=[k])}}else if(p===ue.current){if(N=p.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(Pl):i=[Pl])}p=p.return}i!==null&&Om(a,i,c,f),a.flags|=262144}function Nu(i){for(i=i.firstContext;i!==null;){if(!Dn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Io(i){Do=i,ei=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function fn(i){return rE(Do,i)}function Ou(i,a){return Do===null&&Io(i),rE(i,a)}function rE(i,a){var c=a._currentValue;if(a={context:a,memoizedValue:c,next:null},ei===null){if(i===null)throw Error(r(308));ei=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else ei=ei.next=a;return c}var pj=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(c,f){i.push(f)}};this.abort=function(){a.aborted=!0,i.forEach(function(c){return c()})}},gj=e.unstable_scheduleCallback,yj=e.unstable_NormalPriority,Ft={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function km(){return{controller:new pj,data:new Map,refCount:0}}function ll(i){i.refCount--,i.refCount===0&&gj(yj,function(){i.controller.abort()})}var cl=null,Dm=0,ka=0,Da=null;function vj(i,a){if(cl===null){var c=cl=[];Dm=0,ka=Lp(),Da={status:"pending",value:void 0,then:function(f){c.push(f)}}}return Dm++,a.then(iE,iE),a}function iE(){if(--Dm===0&&cl!==null){Da!==null&&(Da.status="fulfilled");var i=cl;cl=null,ka=0,Da=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function bj(i,a){var c=[],f={status:"pending",value:null,reason:null,then:function(p){c.push(p)}};return i.then(function(){f.status="fulfilled",f.value=a;for(var p=0;p<c.length;p++)(0,c[p])(a)},function(p){for(f.status="rejected",f.reason=p,p=0;p<c.length;p++)(0,c[p])(void 0)}),f}var oE=j.S;j.S=function(i,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&vj(i,a),oE!==null&&oE(i,a)};var Lo=oe(null);function Im(){var i=Lo.current;return i!==null?i:gt.pooledCache}function ku(i,a){a===null?W(Lo,Lo.current):W(Lo,a.pool)}function aE(){var i=Im();return i===null?null:{parent:Ft._currentValue,pool:i}}var ul=Error(r(460)),sE=Error(r(474)),Du=Error(r(542)),Lm={then:function(){}};function lE(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Iu(){}function cE(i,a,c){switch(c=i[c],c===void 0?i.push(a):c!==a&&(a.then(Iu,Iu),a=c),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,dE(i),i;default:if(typeof a.status=="string")a.then(Iu,Iu);else{if(i=gt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(f){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=f}},function(f){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=f}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,dE(i),i}throw dl=a,ul}}var dl=null;function uE(){if(dl===null)throw Error(r(459));var i=dl;return dl=null,i}function dE(i){if(i===ul||i===Du)throw Error(r(483))}var Ni=!1;function jm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pm(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Oi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function ki(i,a,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(lt&2)!==0){var p=f.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),f.pending=a,a=wu(i),X_(i,null,c),a}return Au(i,f,a,c),wu(i)}function fl(i,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var f=a.lanes;f&=i.pendingLanes,c|=f,a.lanes=c,i_(i,c)}}function Mm(i,a){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var p=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var N={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};b===null?p=b=N:b=b.next=N,c=c.next}while(c!==null);b===null?p=b=a:b=b.next=a}else p=b=a;c={baseState:f.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:f.shared,callbacks:f.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=a:i.next=a,c.lastBaseUpdate=a}var zm=!1;function hl(){if(zm){var i=Da;if(i!==null)throw i}}function ml(i,a,c,f){zm=!1;var p=i.updateQueue;Ni=!1;var b=p.firstBaseUpdate,N=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var z=k,ee=z.next;z.next=null,N===null?b=ee:N.next=ee,N=z;var le=i.alternate;le!==null&&(le=le.updateQueue,k=le.lastBaseUpdate,k!==N&&(k===null?le.firstBaseUpdate=ee:k.next=ee,le.lastBaseUpdate=z))}if(b!==null){var fe=p.baseState;N=0,le=ee=z=null,k=b;do{var ne=k.lane&-536870913,ie=ne!==k.lane;if(ie?(et&ne)===ne:(f&ne)===ne){ne!==0&&ne===ka&&(zm=!0),le!==null&&(le=le.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Pe=i,Ie=k;ne=a;var ht=c;switch(Ie.tag){case 1:if(Pe=Ie.payload,typeof Pe=="function"){fe=Pe.call(ht,fe,ne);break e}fe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Ie.payload,ne=typeof Pe=="function"?Pe.call(ht,fe,ne):Pe,ne==null)break e;fe=m({},fe,ne);break e;case 2:Ni=!0}}ne=k.callback,ne!==null&&(i.flags|=64,ie&&(i.flags|=8192),ie=p.callbacks,ie===null?p.callbacks=[ne]:ie.push(ne))}else ie={lane:ne,tag:k.tag,payload:k.payload,callback:k.callback,next:null},le===null?(ee=le=ie,z=fe):le=le.next=ie,N|=ne;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ie=k,k=ie.next,ie.next=null,p.lastBaseUpdate=ie,p.shared.pending=null}}while(!0);le===null&&(z=fe),p.baseState=z,p.firstBaseUpdate=ee,p.lastBaseUpdate=le,b===null&&(p.shared.lanes=0),Vi|=N,i.lanes=N,i.memoizedState=fe}}function fE(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function hE(i,a){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)fE(c[i],a)}var Ia=oe(null),Lu=oe(0);function mE(i,a){i=li,W(Lu,i),W(Ia,a),li=i|a.baseLanes}function Vm(){W(Lu,li),W(Ia,Ia.current)}function Um(){li=Lu.current,B(Ia),B(Lu)}var Di=0,Ke=null,dt=null,Mt=null,ju=!1,La=!1,jo=!1,Pu=0,pl=0,ja=null,_j=0;function kt(){throw Error(r(321))}function Bm(i,a){if(a===null)return!1;for(var c=0;c<a.length&&c<i.length;c++)if(!Dn(i[c],a[c]))return!1;return!0}function $m(i,a,c,f,p,b){return Di=b,Ke=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,j.H=i===null||i.memoizedState===null?XE:QE,jo=!1,b=c(f,p),jo=!1,La&&(b=gE(a,c,f,p)),pE(i),b}function pE(i){j.H=$u;var a=dt!==null&&dt.next!==null;if(Di=0,Mt=dt=Ke=null,ju=!1,pl=0,ja=null,a)throw Error(r(300));i===null||Qt||(i=i.dependencies,i!==null&&Nu(i)&&(Qt=!0))}function gE(i,a,c,f){Ke=i;var p=0;do{if(La&&(ja=null),pl=0,La=!1,25<=p)throw Error(r(301));if(p+=1,Mt=dt=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}j.H=Rj,b=a(c,f)}while(La);return b}function Ej(){var i=j.H,a=i.useState()[0];return a=typeof a.then=="function"?gl(a):a,i=i.useState()[0],(dt!==null?dt.memoizedState:null)!==i&&(Ke.flags|=1024),a}function Hm(){var i=Pu!==0;return Pu=0,i}function Fm(i,a,c){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~c}function Gm(i){if(ju){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ju=!1}Di=0,Mt=dt=Ke=null,La=!1,pl=Pu=0,ja=null}function Tn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ke.memoizedState=Mt=i:Mt=Mt.next=i,Mt}function zt(){if(dt===null){var i=Ke.alternate;i=i!==null?i.memoizedState:null}else i=dt.next;var a=Mt===null?Ke.memoizedState:Mt.next;if(a!==null)Mt=a,dt=i;else{if(i===null)throw Ke.alternate===null?Error(r(467)):Error(r(310));dt=i,i={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Mt===null?Ke.memoizedState=Mt=i:Mt=Mt.next=i}return Mt}function Km(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gl(i){var a=pl;return pl+=1,ja===null&&(ja=[]),i=cE(ja,i,a),a=Ke,(Mt===null?a.memoizedState:Mt.next)===null&&(a=a.alternate,j.H=a===null||a.memoizedState===null?XE:QE),i}function Mu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return gl(i);if(i.$$typeof===T)return fn(i)}throw Error(r(438,String(i)))}function qm(i){var a=null,c=Ke.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var f=Ke.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(a={data:f.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),c===null&&(c=Km(),Ke.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(i),f=0;f<i;f++)c[f]=K;return a.index++,c}function ni(i,a){return typeof a=="function"?a(i):a}function zu(i){var a=zt();return Zm(a,dt,i)}function Zm(i,a,c){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=c;var p=i.baseQueue,b=f.pending;if(b!==null){if(p!==null){var N=p.next;p.next=b.next,b.next=N}a.baseQueue=p=b,f.pending=null}if(b=i.baseState,p===null)i.memoizedState=b;else{a=p.next;var k=N=null,z=null,ee=a,le=!1;do{var fe=ee.lane&-536870913;if(fe!==ee.lane?(et&fe)===fe:(Di&fe)===fe){var ne=ee.revertLane;if(ne===0)z!==null&&(z=z.next={lane:0,revertLane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),fe===ka&&(le=!0);else if((Di&ne)===ne){ee=ee.next,ne===ka&&(le=!0);continue}else fe={lane:0,revertLane:ee.revertLane,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},z===null?(k=z=fe,N=b):z=z.next=fe,Ke.lanes|=ne,Vi|=ne;fe=ee.action,jo&&c(b,fe),b=ee.hasEagerState?ee.eagerState:c(b,fe)}else ne={lane:fe,revertLane:ee.revertLane,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},z===null?(k=z=ne,N=b):z=z.next=ne,Ke.lanes|=fe,Vi|=fe;ee=ee.next}while(ee!==null&&ee!==a);if(z===null?N=b:z.next=k,!Dn(b,i.memoizedState)&&(Qt=!0,le&&(c=Da,c!==null)))throw c;i.memoizedState=b,i.baseState=N,i.baseQueue=z,f.lastRenderedState=b}return p===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function Ym(i){var a=zt(),c=a.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var f=c.dispatch,p=c.pending,b=a.memoizedState;if(p!==null){c.pending=null;var N=p=p.next;do b=i(b,N.action),N=N.next;while(N!==p);Dn(b,a.memoizedState)||(Qt=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),c.lastRenderedState=b}return[b,f]}function yE(i,a,c){var f=Ke,p=zt(),b=it;if(b){if(c===void 0)throw Error(r(407));c=c()}else c=a();var N=!Dn((dt||p).memoizedState,c);N&&(p.memoizedState=c,Qt=!0),p=p.queue;var k=_E.bind(null,f,p,i);if(yl(2048,8,k,[i]),p.getSnapshot!==a||N||Mt!==null&&Mt.memoizedState.tag&1){if(f.flags|=2048,Pa(9,Vu(),bE.bind(null,f,p,c,a),null),gt===null)throw Error(r(349));b||(Di&124)!==0||vE(f,a,c)}return c}function vE(i,a,c){i.flags|=16384,i={getSnapshot:a,value:c},a=Ke.updateQueue,a===null?(a=Km(),Ke.updateQueue=a,a.stores=[i]):(c=a.stores,c===null?a.stores=[i]:c.push(i))}function bE(i,a,c,f){a.value=c,a.getSnapshot=f,EE(a)&&xE(i)}function _E(i,a,c){return c(function(){EE(a)&&xE(i)})}function EE(i){var a=i.getSnapshot;i=i.value;try{var c=a();return!Dn(i,c)}catch{return!0}}function xE(i){var a=Ra(i,2);a!==null&&zn(a,i,2)}function Wm(i){var a=Tn();if(typeof i=="function"){var c=i;if(i=c(),jo){Qe(!0);try{c()}finally{Qe(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:i},a}function SE(i,a,c,f){return i.baseState=c,Zm(i,dt,typeof f=="function"?f:ni)}function xj(i,a,c,f,p){if(Bu(i))throw Error(r(485));if(i=a.action,i!==null){var b={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){b.listeners.push(N)}};j.T!==null?c(!0):b.isTransition=!1,f(b),c=a.pending,c===null?(b.next=a.pending=b,AE(a,b)):(b.next=c.next,a.pending=c.next=b)}}function AE(i,a){var c=a.action,f=a.payload,p=i.state;if(a.isTransition){var b=j.T,N={};j.T=N;try{var k=c(p,f),z=j.S;z!==null&&z(N,k),wE(i,a,k)}catch(ee){Xm(i,a,ee)}finally{j.T=b}}else try{b=c(p,f),wE(i,a,b)}catch(ee){Xm(i,a,ee)}}function wE(i,a,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(f){TE(i,a,f)},function(f){return Xm(i,a,f)}):TE(i,a,c)}function TE(i,a,c){a.status="fulfilled",a.value=c,RE(a),i.state=c,a=i.pending,a!==null&&(c=a.next,c===a?i.pending=null:(c=c.next,a.next=c,AE(i,c)))}function Xm(i,a,c){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do a.status="rejected",a.reason=c,RE(a),a=a.next;while(a!==f)}i.action=null}function RE(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function CE(i,a){return a}function NE(i,a){if(it){var c=gt.formState;if(c!==null){e:{var f=Ke;if(it){if(Ct){t:{for(var p=Ct,b=Sr;p.nodeType!==8;){if(!b){p=null;break t}if(p=ur(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){Ct=ur(p.nextSibling),f=p.data==="F!";break e}}ko(f)}f=!1}f&&(a=c[0])}}return c=Tn(),c.memoizedState=c.baseState=a,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:CE,lastRenderedState:a},c.queue=f,c=ZE.bind(null,Ke,f),f.dispatch=c,f=Wm(!1),b=np.bind(null,Ke,!1,f.queue),f=Tn(),p={state:a,dispatch:null,action:i,pending:null},f.queue=p,c=xj.bind(null,Ke,p,b,c),p.dispatch=c,f.memoizedState=i,[a,c,!1]}function OE(i){var a=zt();return kE(a,dt,i)}function kE(i,a,c){if(a=Zm(i,a,CE)[0],i=zu(ni)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var f=gl(a)}catch(N){throw N===ul?Du:N}else f=a;a=zt();var p=a.queue,b=p.dispatch;return c!==a.memoizedState&&(Ke.flags|=2048,Pa(9,Vu(),Sj.bind(null,p,c),null)),[f,b,i]}function Sj(i,a){i.action=a}function DE(i){var a=zt(),c=dt;if(c!==null)return kE(a,c,i);zt(),a=a.memoizedState,c=zt();var f=c.queue.dispatch;return c.memoizedState=i,[a,f,!1]}function Pa(i,a,c,f){return i={tag:i,create:c,deps:f,inst:a,next:null},a=Ke.updateQueue,a===null&&(a=Km(),Ke.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,a.lastEffect=i),i}function Vu(){return{destroy:void 0,resource:void 0}}function IE(){return zt().memoizedState}function Uu(i,a,c,f){var p=Tn();f=f===void 0?null:f,Ke.flags|=i,p.memoizedState=Pa(1|a,Vu(),c,f)}function yl(i,a,c,f){var p=zt();f=f===void 0?null:f;var b=p.memoizedState.inst;dt!==null&&f!==null&&Bm(f,dt.memoizedState.deps)?p.memoizedState=Pa(a,b,c,f):(Ke.flags|=i,p.memoizedState=Pa(1|a,b,c,f))}function LE(i,a){Uu(8390656,8,i,a)}function jE(i,a){yl(2048,8,i,a)}function PE(i,a){return yl(4,2,i,a)}function ME(i,a){return yl(4,4,i,a)}function zE(i,a){if(typeof a=="function"){i=i();var c=a(i);return function(){typeof c=="function"?c():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function VE(i,a,c){c=c!=null?c.concat([i]):null,yl(4,4,zE.bind(null,a,i),c)}function Qm(){}function UE(i,a){var c=zt();a=a===void 0?null:a;var f=c.memoizedState;return a!==null&&Bm(a,f[1])?f[0]:(c.memoizedState=[i,a],i)}function BE(i,a){var c=zt();a=a===void 0?null:a;var f=c.memoizedState;if(a!==null&&Bm(a,f[1]))return f[0];if(f=i(),jo){Qe(!0);try{i()}finally{Qe(!1)}}return c.memoizedState=[f,a],f}function Jm(i,a,c){return c===void 0||(Di&1073741824)!==0?i.memoizedState=a:(i.memoizedState=c,i=Fx(),Ke.lanes|=i,Vi|=i,c)}function $E(i,a,c,f){return Dn(c,a)?c:Ia.current!==null?(i=Jm(i,c,f),Dn(i,a)||(Qt=!0),i):(Di&42)===0?(Qt=!0,i.memoizedState=c):(i=Fx(),Ke.lanes|=i,Vi|=i,a)}function HE(i,a,c,f,p){var b=X.p;X.p=b!==0&&8>b?b:8;var N=j.T,k={};j.T=k,np(i,!1,a,c);try{var z=p(),ee=j.S;if(ee!==null&&ee(k,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var le=bj(z,f);vl(i,a,le,Mn(i))}else vl(i,a,f,Mn(i))}catch(fe){vl(i,a,{then:function(){},status:"rejected",reason:fe},Mn())}finally{X.p=b,j.T=N}}function Aj(){}function ep(i,a,c,f){if(i.tag!==5)throw Error(r(476));var p=FE(i).queue;HE(i,p,a,F,c===null?Aj:function(){return GE(i),c(f)})}function FE(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:F},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:c},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function GE(i){var a=FE(i).next.queue;vl(i,a,{},Mn())}function tp(){return fn(Pl)}function KE(){return zt().memoizedState}function qE(){return zt().memoizedState}function wj(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var c=Mn();i=Oi(c);var f=ki(a,i,c);f!==null&&(zn(f,a,c),fl(f,a,c)),a={cache:km()},i.payload=a;return}a=a.return}}function Tj(i,a,c){var f=Mn();c={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},Bu(i)?YE(a,c):(c=Em(i,a,c,f),c!==null&&(zn(c,i,f),WE(c,a,f)))}function ZE(i,a,c){var f=Mn();vl(i,a,c,f)}function vl(i,a,c,f){var p={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(Bu(i))YE(a,p);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var N=a.lastRenderedState,k=b(N,c);if(p.hasEagerState=!0,p.eagerState=k,Dn(k,N))return Au(i,a,p,0),gt===null&&Su(),!1}catch{}finally{}if(c=Em(i,a,p,f),c!==null)return zn(c,i,f),WE(c,a,f),!0}return!1}function np(i,a,c,f){if(f={lane:2,revertLane:Lp(),action:f,hasEagerState:!1,eagerState:null,next:null},Bu(i)){if(a)throw Error(r(479))}else a=Em(i,c,f,2),a!==null&&zn(a,i,2)}function Bu(i){var a=i.alternate;return i===Ke||a!==null&&a===Ke}function YE(i,a){La=ju=!0;var c=i.pending;c===null?a.next=a:(a.next=c.next,c.next=a),i.pending=a}function WE(i,a,c){if((c&4194048)!==0){var f=a.lanes;f&=i.pendingLanes,c|=f,a.lanes=c,i_(i,c)}}var $u={readContext:fn,use:Mu,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt},XE={readContext:fn,use:Mu,useCallback:function(i,a){return Tn().memoizedState=[i,a===void 0?null:a],i},useContext:fn,useEffect:LE,useImperativeHandle:function(i,a,c){c=c!=null?c.concat([i]):null,Uu(4194308,4,zE.bind(null,a,i),c)},useLayoutEffect:function(i,a){return Uu(4194308,4,i,a)},useInsertionEffect:function(i,a){Uu(4,2,i,a)},useMemo:function(i,a){var c=Tn();a=a===void 0?null:a;var f=i();if(jo){Qe(!0);try{i()}finally{Qe(!1)}}return c.memoizedState=[f,a],f},useReducer:function(i,a,c){var f=Tn();if(c!==void 0){var p=c(a);if(jo){Qe(!0);try{c(a)}finally{Qe(!1)}}}else p=a;return f.memoizedState=f.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},f.queue=i,i=i.dispatch=Tj.bind(null,Ke,i),[f.memoizedState,i]},useRef:function(i){var a=Tn();return i={current:i},a.memoizedState=i},useState:function(i){i=Wm(i);var a=i.queue,c=ZE.bind(null,Ke,a);return a.dispatch=c,[i.memoizedState,c]},useDebugValue:Qm,useDeferredValue:function(i,a){var c=Tn();return Jm(c,i,a)},useTransition:function(){var i=Wm(!1);return i=HE.bind(null,Ke,i.queue,!0,!1),Tn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,c){var f=Ke,p=Tn();if(it){if(c===void 0)throw Error(r(407));c=c()}else{if(c=a(),gt===null)throw Error(r(349));(et&124)!==0||vE(f,a,c)}p.memoizedState=c;var b={value:c,getSnapshot:a};return p.queue=b,LE(_E.bind(null,f,b,i),[i]),f.flags|=2048,Pa(9,Vu(),bE.bind(null,f,b,c,a),null),c},useId:function(){var i=Tn(),a=gt.identifierPrefix;if(it){var c=Jr,f=Qr;c=(f&~(1<<32-pt(f)-1)).toString(32)+c,a="«"+a+"R"+c,c=Pu++,0<c&&(a+="H"+c.toString(32)),a+="»"}else c=_j++,a="«"+a+"r"+c.toString(32)+"»";return i.memoizedState=a},useHostTransitionStatus:tp,useFormState:NE,useActionState:NE,useOptimistic:function(i){var a=Tn();a.memoizedState=a.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=np.bind(null,Ke,!0,c),c.dispatch=a,[i,a]},useMemoCache:qm,useCacheRefresh:function(){return Tn().memoizedState=wj.bind(null,Ke)}},QE={readContext:fn,use:Mu,useCallback:UE,useContext:fn,useEffect:jE,useImperativeHandle:VE,useInsertionEffect:PE,useLayoutEffect:ME,useMemo:BE,useReducer:zu,useRef:IE,useState:function(){return zu(ni)},useDebugValue:Qm,useDeferredValue:function(i,a){var c=zt();return $E(c,dt.memoizedState,i,a)},useTransition:function(){var i=zu(ni)[0],a=zt().memoizedState;return[typeof i=="boolean"?i:gl(i),a]},useSyncExternalStore:yE,useId:KE,useHostTransitionStatus:tp,useFormState:OE,useActionState:OE,useOptimistic:function(i,a){var c=zt();return SE(c,dt,i,a)},useMemoCache:qm,useCacheRefresh:qE},Rj={readContext:fn,use:Mu,useCallback:UE,useContext:fn,useEffect:jE,useImperativeHandle:VE,useInsertionEffect:PE,useLayoutEffect:ME,useMemo:BE,useReducer:Ym,useRef:IE,useState:function(){return Ym(ni)},useDebugValue:Qm,useDeferredValue:function(i,a){var c=zt();return dt===null?Jm(c,i,a):$E(c,dt.memoizedState,i,a)},useTransition:function(){var i=Ym(ni)[0],a=zt().memoizedState;return[typeof i=="boolean"?i:gl(i),a]},useSyncExternalStore:yE,useId:KE,useHostTransitionStatus:tp,useFormState:DE,useActionState:DE,useOptimistic:function(i,a){var c=zt();return dt!==null?SE(c,dt,i,a):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:qm,useCacheRefresh:qE},Ma=null,bl=0;function Hu(i){var a=bl;return bl+=1,Ma===null&&(Ma=[]),cE(Ma,i,a)}function _l(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function Fu(i,a){throw a.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function JE(i){var a=i._init;return a(i._payload)}function ex(i){function a(q,$){if(i){var Q=q.deletions;Q===null?(q.deletions=[$],q.flags|=16):Q.push($)}}function c(q,$){if(!i)return null;for(;$!==null;)a(q,$),$=$.sibling;return null}function f(q){for(var $=new Map;q!==null;)q.key!==null?$.set(q.key,q):$.set(q.index,q),q=q.sibling;return $}function p(q,$){return q=Xr(q,$),q.index=0,q.sibling=null,q}function b(q,$,Q){return q.index=Q,i?(Q=q.alternate,Q!==null?(Q=Q.index,Q<$?(q.flags|=67108866,$):Q):(q.flags|=67108866,$)):(q.flags|=1048576,$)}function N(q){return i&&q.alternate===null&&(q.flags|=67108866),q}function k(q,$,Q,de){return $===null||$.tag!==6?($=Sm(Q,q.mode,de),$.return=q,$):($=p($,Q),$.return=q,$)}function z(q,$,Q,de){var we=Q.type;return we===A?le(q,$,Q.props.children,de,Q.key):$!==null&&($.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===M&&JE(we)===$.type)?($=p($,Q.props),_l($,Q),$.return=q,$):($=Tu(Q.type,Q.key,Q.props,null,q.mode,de),_l($,Q),$.return=q,$)}function ee(q,$,Q,de){return $===null||$.tag!==4||$.stateNode.containerInfo!==Q.containerInfo||$.stateNode.implementation!==Q.implementation?($=Am(Q,q.mode,de),$.return=q,$):($=p($,Q.children||[]),$.return=q,$)}function le(q,$,Q,de,we){return $===null||$.tag!==7?($=Ro(Q,q.mode,de,we),$.return=q,$):($=p($,Q),$.return=q,$)}function fe(q,$,Q){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Sm(""+$,q.mode,Q),$.return=q,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return Q=Tu($.type,$.key,$.props,null,q.mode,Q),_l(Q,$),Q.return=q,Q;case _:return $=Am($,q.mode,Q),$.return=q,$;case M:var de=$._init;return $=de($._payload),fe(q,$,Q)}if(re($)||J($))return $=Ro($,q.mode,Q,null),$.return=q,$;if(typeof $.then=="function")return fe(q,Hu($),Q);if($.$$typeof===T)return fe(q,Ou(q,$),Q);Fu(q,$)}return null}function ne(q,$,Q,de){var we=$!==null?$.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return we!==null?null:k(q,$,""+Q,de);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===we?z(q,$,Q,de):null;case _:return Q.key===we?ee(q,$,Q,de):null;case M:return we=Q._init,Q=we(Q._payload),ne(q,$,Q,de)}if(re(Q)||J(Q))return we!==null?null:le(q,$,Q,de,null);if(typeof Q.then=="function")return ne(q,$,Hu(Q),de);if(Q.$$typeof===T)return ne(q,$,Ou(q,Q),de);Fu(q,Q)}return null}function ie(q,$,Q,de,we){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return q=q.get(Q)||null,k($,q,""+de,we);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case v:return q=q.get(de.key===null?Q:de.key)||null,z($,q,de,we);case _:return q=q.get(de.key===null?Q:de.key)||null,ee($,q,de,we);case M:var Ze=de._init;return de=Ze(de._payload),ie(q,$,Q,de,we)}if(re(de)||J(de))return q=q.get(Q)||null,le($,q,de,we,null);if(typeof de.then=="function")return ie(q,$,Q,Hu(de),we);if(de.$$typeof===T)return ie(q,$,Q,Ou($,de),we);Fu($,de)}return null}function Pe(q,$,Q,de){for(var we=null,Ze=null,Oe=$,Le=$=0,en=null;Oe!==null&&Le<Q.length;Le++){Oe.index>Le?(en=Oe,Oe=null):en=Oe.sibling;var rt=ne(q,Oe,Q[Le],de);if(rt===null){Oe===null&&(Oe=en);break}i&&Oe&&rt.alternate===null&&a(q,Oe),$=b(rt,$,Le),Ze===null?we=rt:Ze.sibling=rt,Ze=rt,Oe=en}if(Le===Q.length)return c(q,Oe),it&&No(q,Le),we;if(Oe===null){for(;Le<Q.length;Le++)Oe=fe(q,Q[Le],de),Oe!==null&&($=b(Oe,$,Le),Ze===null?we=Oe:Ze.sibling=Oe,Ze=Oe);return it&&No(q,Le),we}for(Oe=f(Oe);Le<Q.length;Le++)en=ie(Oe,q,Le,Q[Le],de),en!==null&&(i&&en.alternate!==null&&Oe.delete(en.key===null?Le:en.key),$=b(en,$,Le),Ze===null?we=en:Ze.sibling=en,Ze=en);return i&&Oe.forEach(function(Zi){return a(q,Zi)}),it&&No(q,Le),we}function Ie(q,$,Q,de){if(Q==null)throw Error(r(151));for(var we=null,Ze=null,Oe=$,Le=$=0,en=null,rt=Q.next();Oe!==null&&!rt.done;Le++,rt=Q.next()){Oe.index>Le?(en=Oe,Oe=null):en=Oe.sibling;var Zi=ne(q,Oe,rt.value,de);if(Zi===null){Oe===null&&(Oe=en);break}i&&Oe&&Zi.alternate===null&&a(q,Oe),$=b(Zi,$,Le),Ze===null?we=Zi:Ze.sibling=Zi,Ze=Zi,Oe=en}if(rt.done)return c(q,Oe),it&&No(q,Le),we;if(Oe===null){for(;!rt.done;Le++,rt=Q.next())rt=fe(q,rt.value,de),rt!==null&&($=b(rt,$,Le),Ze===null?we=rt:Ze.sibling=rt,Ze=rt);return it&&No(q,Le),we}for(Oe=f(Oe);!rt.done;Le++,rt=Q.next())rt=ie(Oe,q,Le,rt.value,de),rt!==null&&(i&&rt.alternate!==null&&Oe.delete(rt.key===null?Le:rt.key),$=b(rt,$,Le),Ze===null?we=rt:Ze.sibling=rt,Ze=rt);return i&&Oe.forEach(function(CP){return a(q,CP)}),it&&No(q,Le),we}function ht(q,$,Q,de){if(typeof Q=="object"&&Q!==null&&Q.type===A&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var we=Q.key;$!==null;){if($.key===we){if(we=Q.type,we===A){if($.tag===7){c(q,$.sibling),de=p($,Q.props.children),de.return=q,q=de;break e}}else if($.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===M&&JE(we)===$.type){c(q,$.sibling),de=p($,Q.props),_l(de,Q),de.return=q,q=de;break e}c(q,$);break}else a(q,$);$=$.sibling}Q.type===A?(de=Ro(Q.props.children,q.mode,de,Q.key),de.return=q,q=de):(de=Tu(Q.type,Q.key,Q.props,null,q.mode,de),_l(de,Q),de.return=q,q=de)}return N(q);case _:e:{for(we=Q.key;$!==null;){if($.key===we)if($.tag===4&&$.stateNode.containerInfo===Q.containerInfo&&$.stateNode.implementation===Q.implementation){c(q,$.sibling),de=p($,Q.children||[]),de.return=q,q=de;break e}else{c(q,$);break}else a(q,$);$=$.sibling}de=Am(Q,q.mode,de),de.return=q,q=de}return N(q);case M:return we=Q._init,Q=we(Q._payload),ht(q,$,Q,de)}if(re(Q))return Pe(q,$,Q,de);if(J(Q)){if(we=J(Q),typeof we!="function")throw Error(r(150));return Q=we.call(Q),Ie(q,$,Q,de)}if(typeof Q.then=="function")return ht(q,$,Hu(Q),de);if(Q.$$typeof===T)return ht(q,$,Ou(q,Q),de);Fu(q,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,$!==null&&$.tag===6?(c(q,$.sibling),de=p($,Q),de.return=q,q=de):(c(q,$),de=Sm(Q,q.mode,de),de.return=q,q=de),N(q)):c(q,$)}return function(q,$,Q,de){try{bl=0;var we=ht(q,$,Q,de);return Ma=null,we}catch(Oe){if(Oe===ul||Oe===Du)throw Oe;var Ze=In(29,Oe,null,q.mode);return Ze.lanes=de,Ze.return=q,Ze}finally{}}}var za=ex(!0),tx=ex(!1),Qn=oe(null),Ar=null;function Ii(i){var a=i.alternate;W(Gt,Gt.current&1),W(Qn,i),Ar===null&&(a===null||Ia.current!==null||a.memoizedState!==null)&&(Ar=i)}function nx(i){if(i.tag===22){if(W(Gt,Gt.current),W(Qn,i),Ar===null){var a=i.alternate;a!==null&&a.memoizedState!==null&&(Ar=i)}}else Li()}function Li(){W(Gt,Gt.current),W(Qn,Qn.current)}function ri(i){B(Qn),Ar===i&&(Ar=null),B(Gt)}var Gt=oe(0);function Gu(i){for(var a=i;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||Kp(c)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function rp(i,a,c,f){a=i.memoizedState,c=c(f,a),c=c==null?a:m({},a,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ip={enqueueSetState:function(i,a,c){i=i._reactInternals;var f=Mn(),p=Oi(f);p.payload=a,c!=null&&(p.callback=c),a=ki(i,p,f),a!==null&&(zn(a,i,f),fl(a,i,f))},enqueueReplaceState:function(i,a,c){i=i._reactInternals;var f=Mn(),p=Oi(f);p.tag=1,p.payload=a,c!=null&&(p.callback=c),a=ki(i,p,f),a!==null&&(zn(a,i,f),fl(a,i,f))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var c=Mn(),f=Oi(c);f.tag=2,a!=null&&(f.callback=a),a=ki(i,f,c),a!==null&&(zn(a,i,c),fl(a,i,c))}};function rx(i,a,c,f,p,b,N){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,N):a.prototype&&a.prototype.isPureReactComponent?!nl(c,f)||!nl(p,b):!0}function ix(i,a,c,f){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,f),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,f),a.state!==i&&ip.enqueueReplaceState(a,a.state,null)}function Po(i,a){var c=a;if("ref"in a){c={};for(var f in a)f!=="ref"&&(c[f]=a[f])}if(i=i.defaultProps){c===a&&(c=m({},c));for(var p in i)c[p]===void 0&&(c[p]=i[p])}return c}var Ku=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function ox(i){Ku(i)}function ax(i){console.error(i)}function sx(i){Ku(i)}function qu(i,a){try{var c=i.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(f){setTimeout(function(){throw f})}}function lx(i,a,c){try{var f=i.onCaughtError;f(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function op(i,a,c){return c=Oi(c),c.tag=3,c.payload={element:null},c.callback=function(){qu(i,a)},c}function cx(i){return i=Oi(i),i.tag=3,i}function ux(i,a,c,f){var p=c.type.getDerivedStateFromError;if(typeof p=="function"){var b=f.value;i.payload=function(){return p(b)},i.callback=function(){lx(a,c,f)}}var N=c.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(i.callback=function(){lx(a,c,f),typeof p!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var k=f.stack;this.componentDidCatch(f.value,{componentStack:k!==null?k:""})})}function Cj(i,a,c,f,p){if(c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(a=c.alternate,a!==null&&sl(a,c,p,!0),c=Qn.current,c!==null){switch(c.tag){case 13:return Ar===null?Np():c.alternate===null&&Nt===0&&(Nt=3),c.flags&=-257,c.flags|=65536,c.lanes=p,f===Lm?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([f]):a.add(f),kp(i,f,p)),!1;case 22:return c.flags|=65536,f===Lm?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([f])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([f]):c.add(f)),kp(i,f,p)),!1}throw Error(r(435,c.tag))}return kp(i,f,p),Np(),!1}if(it)return a=Qn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,f!==Rm&&(i=Error(r(422),{cause:f}),al(Zn(i,c)))):(f!==Rm&&(a=Error(r(423),{cause:f}),al(Zn(a,c))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,f=Zn(f,c),p=op(i.stateNode,f,p),Mm(i,p),Nt!==4&&(Nt=2)),!1;var b=Error(r(520),{cause:f});if(b=Zn(b,c),Rl===null?Rl=[b]:Rl.push(b),Nt!==4&&(Nt=2),a===null)return!0;f=Zn(f,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,i=p&-p,c.lanes|=i,i=op(c.stateNode,f,i),Mm(c,i),!1;case 1:if(a=c.type,b=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ui===null||!Ui.has(b))))return c.flags|=65536,p&=-p,c.lanes|=p,p=cx(p),ux(p,i,c,f),Mm(c,p),!1}c=c.return}while(c!==null);return!1}var dx=Error(r(461)),Qt=!1;function rn(i,a,c,f){a.child=i===null?tx(a,null,c,f):za(a,i.child,c,f)}function fx(i,a,c,f,p){c=c.render;var b=a.ref;if("ref"in f){var N={};for(var k in f)k!=="ref"&&(N[k]=f[k])}else N=f;return Io(a),f=$m(i,a,c,N,b,p),k=Hm(),i!==null&&!Qt?(Fm(i,a,p),ii(i,a,p)):(it&&k&&wm(a),a.flags|=1,rn(i,a,f,p),a.child)}function hx(i,a,c,f,p){if(i===null){var b=c.type;return typeof b=="function"&&!xm(b)&&b.defaultProps===void 0&&c.compare===null?(a.tag=15,a.type=b,mx(i,a,b,f,p)):(i=Tu(c.type,null,f,a,a.mode,p),i.ref=a.ref,i.return=a,a.child=i)}if(b=i.child,!hp(i,p)){var N=b.memoizedProps;if(c=c.compare,c=c!==null?c:nl,c(N,f)&&i.ref===a.ref)return ii(i,a,p)}return a.flags|=1,i=Xr(b,f),i.ref=a.ref,i.return=a,a.child=i}function mx(i,a,c,f,p){if(i!==null){var b=i.memoizedProps;if(nl(b,f)&&i.ref===a.ref)if(Qt=!1,a.pendingProps=f=b,hp(i,p))(i.flags&131072)!==0&&(Qt=!0);else return a.lanes=i.lanes,ii(i,a,p)}return ap(i,a,c,f,p)}function px(i,a,c){var f=a.pendingProps,p=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden"){if((a.flags&128)!==0){if(f=b!==null?b.baseLanes|c:c,i!==null){for(p=a.child=i.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;a.childLanes=b&~f}else a.childLanes=0,a.child=null;return gx(i,a,f,c)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&ku(a,b!==null?b.cachePool:null),b!==null?mE(a,b):Vm(),nx(a);else return a.lanes=a.childLanes=536870912,gx(i,a,b!==null?b.baseLanes|c:c,c)}else b!==null?(ku(a,b.cachePool),mE(a,b),Li(),a.memoizedState=null):(i!==null&&ku(a,null),Vm(),Li());return rn(i,a,p,c),a.child}function gx(i,a,c,f){var p=Im();return p=p===null?null:{parent:Ft._currentValue,pool:p},a.memoizedState={baseLanes:c,cachePool:p},i!==null&&ku(a,null),Vm(),nx(a),i!==null&&sl(i,a,f,!0),null}function Zu(i,a){var c=a.ref;if(c===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(a.flags|=4194816)}}function ap(i,a,c,f,p){return Io(a),c=$m(i,a,c,f,void 0,p),f=Hm(),i!==null&&!Qt?(Fm(i,a,p),ii(i,a,p)):(it&&f&&wm(a),a.flags|=1,rn(i,a,c,p),a.child)}function yx(i,a,c,f,p,b){return Io(a),a.updateQueue=null,c=gE(a,f,c,p),pE(i),f=Hm(),i!==null&&!Qt?(Fm(i,a,b),ii(i,a,b)):(it&&f&&wm(a),a.flags|=1,rn(i,a,c,b),a.child)}function vx(i,a,c,f,p){if(Io(a),a.stateNode===null){var b=Ca,N=c.contextType;typeof N=="object"&&N!==null&&(b=fn(N)),b=new c(f,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=ip,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=f,b.state=a.memoizedState,b.refs={},jm(a),N=c.contextType,b.context=typeof N=="object"&&N!==null?fn(N):Ca,b.state=a.memoizedState,N=c.getDerivedStateFromProps,typeof N=="function"&&(rp(a,c,N,f),b.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(N=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),N!==b.state&&ip.enqueueReplaceState(b,b.state,null),ml(a,f,b,p),hl(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),f=!0}else if(i===null){b=a.stateNode;var k=a.memoizedProps,z=Po(c,k);b.props=z;var ee=b.context,le=c.contextType;N=Ca,typeof le=="object"&&le!==null&&(N=fn(le));var fe=c.getDerivedStateFromProps;le=typeof fe=="function"||typeof b.getSnapshotBeforeUpdate=="function",k=a.pendingProps!==k,le||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k||ee!==N)&&ix(a,b,f,N),Ni=!1;var ne=a.memoizedState;b.state=ne,ml(a,f,b,p),hl(),ee=a.memoizedState,k||ne!==ee||Ni?(typeof fe=="function"&&(rp(a,c,fe,f),ee=a.memoizedState),(z=Ni||rx(a,c,z,f,ne,ee,N))?(le||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=f,a.memoizedState=ee),b.props=f,b.state=ee,b.context=N,f=z):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),f=!1)}else{b=a.stateNode,Pm(i,a),N=a.memoizedProps,le=Po(c,N),b.props=le,fe=a.pendingProps,ne=b.context,ee=c.contextType,z=Ca,typeof ee=="object"&&ee!==null&&(z=fn(ee)),k=c.getDerivedStateFromProps,(ee=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==fe||ne!==z)&&ix(a,b,f,z),Ni=!1,ne=a.memoizedState,b.state=ne,ml(a,f,b,p),hl();var ie=a.memoizedState;N!==fe||ne!==ie||Ni||i!==null&&i.dependencies!==null&&Nu(i.dependencies)?(typeof k=="function"&&(rp(a,c,k,f),ie=a.memoizedState),(le=Ni||rx(a,c,le,f,ne,ie,z)||i!==null&&i.dependencies!==null&&Nu(i.dependencies))?(ee||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,ie,z),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,ie,z)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(a.flags|=1024),a.memoizedProps=f,a.memoizedState=ie),b.props=f,b.state=ie,b.context=z,f=le):(typeof b.componentDidUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(a.flags|=1024),f=!1)}return b=f,Zu(i,a),f=(a.flags&128)!==0,b||f?(b=a.stateNode,c=f&&typeof c.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,i!==null&&f?(a.child=za(a,i.child,null,p),a.child=za(a,null,c,p)):rn(i,a,c,p),a.memoizedState=b.state,i=a.child):i=ii(i,a,p),i}function bx(i,a,c,f){return ol(),a.flags|=256,rn(i,a,c,f),a.child}var sp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lp(i){return{baseLanes:i,cachePool:aE()}}function cp(i,a,c){return i=i!==null?i.childLanes&~c:0,a&&(i|=Jn),i}function _x(i,a,c){var f=a.pendingProps,p=!1,b=(a.flags&128)!==0,N;if((N=b)||(N=i!==null&&i.memoizedState===null?!1:(Gt.current&2)!==0),N&&(p=!0,a.flags&=-129),N=(a.flags&32)!==0,a.flags&=-33,i===null){if(it){if(p?Ii(a):Li(),it){var k=Ct,z;if(z=k){e:{for(z=k,k=Sr;z.nodeType!==8;){if(!k){k=null;break e}if(z=ur(z.nextSibling),z===null){k=null;break e}}k=z}k!==null?(a.memoizedState={dehydrated:k,treeContext:Co!==null?{id:Qr,overflow:Jr}:null,retryLane:536870912,hydrationErrors:null},z=In(18,null,null,0),z.stateNode=k,z.return=a,a.child=z,vn=a,Ct=null,z=!0):z=!1}z||ko(a)}if(k=a.memoizedState,k!==null&&(k=k.dehydrated,k!==null))return Kp(k)?a.lanes=32:a.lanes=536870912,null;ri(a)}return k=f.children,f=f.fallback,p?(Li(),p=a.mode,k=Yu({mode:"hidden",children:k},p),f=Ro(f,p,c,null),k.return=a,f.return=a,k.sibling=f,a.child=k,p=a.child,p.memoizedState=lp(c),p.childLanes=cp(i,N,c),a.memoizedState=sp,f):(Ii(a),up(a,k))}if(z=i.memoizedState,z!==null&&(k=z.dehydrated,k!==null)){if(b)a.flags&256?(Ii(a),a.flags&=-257,a=dp(i,a,c)):a.memoizedState!==null?(Li(),a.child=i.child,a.flags|=128,a=null):(Li(),p=f.fallback,k=a.mode,f=Yu({mode:"visible",children:f.children},k),p=Ro(p,k,c,null),p.flags|=2,f.return=a,p.return=a,f.sibling=p,a.child=f,za(a,i.child,null,c),f=a.child,f.memoizedState=lp(c),f.childLanes=cp(i,N,c),a.memoizedState=sp,a=p);else if(Ii(a),Kp(k)){if(N=k.nextSibling&&k.nextSibling.dataset,N)var ee=N.dgst;N=ee,f=Error(r(419)),f.stack="",f.digest=N,al({value:f,source:null,stack:null}),a=dp(i,a,c)}else if(Qt||sl(i,a,c,!1),N=(c&i.childLanes)!==0,Qt||N){if(N=gt,N!==null&&(f=c&-c,f=(f&42)!==0?1:qh(f),f=(f&(N.suspendedLanes|c))!==0?0:f,f!==0&&f!==z.retryLane))throw z.retryLane=f,Ra(i,f),zn(N,i,f),dx;k.data==="$?"||Np(),a=dp(i,a,c)}else k.data==="$?"?(a.flags|=192,a.child=i.child,a=null):(i=z.treeContext,Ct=ur(k.nextSibling),vn=a,it=!0,Oo=null,Sr=!1,i!==null&&(Wn[Xn++]=Qr,Wn[Xn++]=Jr,Wn[Xn++]=Co,Qr=i.id,Jr=i.overflow,Co=a),a=up(a,f.children),a.flags|=4096);return a}return p?(Li(),p=f.fallback,k=a.mode,z=i.child,ee=z.sibling,f=Xr(z,{mode:"hidden",children:f.children}),f.subtreeFlags=z.subtreeFlags&65011712,ee!==null?p=Xr(ee,p):(p=Ro(p,k,c,null),p.flags|=2),p.return=a,f.return=a,f.sibling=p,a.child=f,f=p,p=a.child,k=i.child.memoizedState,k===null?k=lp(c):(z=k.cachePool,z!==null?(ee=Ft._currentValue,z=z.parent!==ee?{parent:ee,pool:ee}:z):z=aE(),k={baseLanes:k.baseLanes|c,cachePool:z}),p.memoizedState=k,p.childLanes=cp(i,N,c),a.memoizedState=sp,f):(Ii(a),c=i.child,i=c.sibling,c=Xr(c,{mode:"visible",children:f.children}),c.return=a,c.sibling=null,i!==null&&(N=a.deletions,N===null?(a.deletions=[i],a.flags|=16):N.push(i)),a.child=c,a.memoizedState=null,c)}function up(i,a){return a=Yu({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function Yu(i,a){return i=In(22,i,null,a),i.lanes=0,i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},i}function dp(i,a,c){return za(a,i.child,null,c),i=up(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function Ex(i,a,c){i.lanes|=a;var f=i.alternate;f!==null&&(f.lanes|=a),Nm(i.return,a,c)}function fp(i,a,c,f,p){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:p}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=c,b.tailMode=p)}function xx(i,a,c){var f=a.pendingProps,p=f.revealOrder,b=f.tail;if(rn(i,a,f.children,c),f=Gt.current,(f&2)!==0)f=f&1|2,a.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Ex(i,c,a);else if(i.tag===19)Ex(i,c,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}switch(W(Gt,f),p){case"forwards":for(c=a.child,p=null;c!==null;)i=c.alternate,i!==null&&Gu(i)===null&&(p=c),c=c.sibling;c=p,c===null?(p=a.child,a.child=null):(p=c.sibling,c.sibling=null),fp(a,!1,p,c,b);break;case"backwards":for(c=null,p=a.child,a.child=null;p!==null;){if(i=p.alternate,i!==null&&Gu(i)===null){a.child=p;break}i=p.sibling,p.sibling=c,c=p,p=i}fp(a,!0,c,null,b);break;case"together":fp(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function ii(i,a,c){if(i!==null&&(a.dependencies=i.dependencies),Vi|=a.lanes,(c&a.childLanes)===0)if(i!==null){if(sl(i,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,c=Xr(i,i.pendingProps),a.child=c,c.return=a;i.sibling!==null;)i=i.sibling,c=c.sibling=Xr(i,i.pendingProps),c.return=a;c.sibling=null}return a.child}function hp(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&Nu(i)))}function Nj(i,a,c){switch(a.tag){case 3:Ee(a,a.stateNode.containerInfo),Ci(a,Ft,i.memoizedState.cache),ol();break;case 27:case 5:Ue(a);break;case 4:Ee(a,a.stateNode.containerInfo);break;case 10:Ci(a,a.type,a.memoizedProps.value);break;case 13:var f=a.memoizedState;if(f!==null)return f.dehydrated!==null?(Ii(a),a.flags|=128,null):(c&a.child.childLanes)!==0?_x(i,a,c):(Ii(a),i=ii(i,a,c),i!==null?i.sibling:null);Ii(a);break;case 19:var p=(i.flags&128)!==0;if(f=(c&a.childLanes)!==0,f||(sl(i,a,c,!1),f=(c&a.childLanes)!==0),p){if(f)return xx(i,a,c);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),W(Gt,Gt.current),f)break;return null;case 22:case 23:return a.lanes=0,px(i,a,c);case 24:Ci(a,Ft,i.memoizedState.cache)}return ii(i,a,c)}function Sx(i,a,c){if(i!==null)if(i.memoizedProps!==a.pendingProps)Qt=!0;else{if(!hp(i,c)&&(a.flags&128)===0)return Qt=!1,Nj(i,a,c);Qt=(i.flags&131072)!==0}else Qt=!1,it&&(a.flags&1048576)!==0&&J_(a,Cu,a.index);switch(a.lanes=0,a.tag){case 16:e:{i=a.pendingProps;var f=a.elementType,p=f._init;if(f=p(f._payload),a.type=f,typeof f=="function")xm(f)?(i=Po(f,i),a.tag=1,a=vx(null,a,f,i,c)):(a.tag=0,a=ap(null,a,f,i,c));else{if(f!=null){if(p=f.$$typeof,p===O){a.tag=11,a=fx(null,a,f,i,c);break e}else if(p===I){a.tag=14,a=hx(null,a,f,i,c);break e}}throw a=Y(f)||f,Error(r(306,a,""))}}return a;case 0:return ap(i,a,a.type,a.pendingProps,c);case 1:return f=a.type,p=Po(f,a.pendingProps),vx(i,a,f,p,c);case 3:e:{if(Ee(a,a.stateNode.containerInfo),i===null)throw Error(r(387));f=a.pendingProps;var b=a.memoizedState;p=b.element,Pm(i,a),ml(a,f,null,c);var N=a.memoizedState;if(f=N.cache,Ci(a,Ft,f),f!==b.cache&&Om(a,[Ft],c,!0),hl(),f=N.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:N.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=bx(i,a,f,c);break e}else if(f!==p){p=Zn(Error(r(424)),a),al(p),a=bx(i,a,f,c);break e}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Ct=ur(i.firstChild),vn=a,it=!0,Oo=null,Sr=!0,c=tx(a,null,f,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(ol(),f===p){a=ii(i,a,c);break e}rn(i,a,f,c)}a=a.child}return a;case 26:return Zu(i,a),i===null?(c=RS(a.type,null,a.pendingProps,null))?a.memoizedState=c:it||(c=a.type,i=a.pendingProps,f=cd(ye.current).createElement(c),f[dn]=a,f[An]=i,an(f,c,i),Xt(f),a.stateNode=f):a.memoizedState=RS(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return Ue(a),i===null&&it&&(f=a.stateNode=AS(a.type,a.pendingProps,ye.current),vn=a,Sr=!0,p=Ct,Hi(a.type)?(qp=p,Ct=ur(f.firstChild)):Ct=p),rn(i,a,a.pendingProps.children,c),Zu(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&it&&((p=f=Ct)&&(f=rP(f,a.type,a.pendingProps,Sr),f!==null?(a.stateNode=f,vn=a,Ct=ur(f.firstChild),Sr=!1,p=!0):p=!1),p||ko(a)),Ue(a),p=a.type,b=a.pendingProps,N=i!==null?i.memoizedProps:null,f=b.children,Hp(p,b)?f=null:N!==null&&Hp(p,N)&&(a.flags|=32),a.memoizedState!==null&&(p=$m(i,a,Ej,null,null,c),Pl._currentValue=p),Zu(i,a),rn(i,a,f,c),a.child;case 6:return i===null&&it&&((i=c=Ct)&&(c=iP(c,a.pendingProps,Sr),c!==null?(a.stateNode=c,vn=a,Ct=null,i=!0):i=!1),i||ko(a)),null;case 13:return _x(i,a,c);case 4:return Ee(a,a.stateNode.containerInfo),f=a.pendingProps,i===null?a.child=za(a,null,f,c):rn(i,a,f,c),a.child;case 11:return fx(i,a,a.type,a.pendingProps,c);case 7:return rn(i,a,a.pendingProps,c),a.child;case 8:return rn(i,a,a.pendingProps.children,c),a.child;case 12:return rn(i,a,a.pendingProps.children,c),a.child;case 10:return f=a.pendingProps,Ci(a,a.type,f.value),rn(i,a,f.children,c),a.child;case 9:return p=a.type._context,f=a.pendingProps.children,Io(a),p=fn(p),f=f(p),a.flags|=1,rn(i,a,f,c),a.child;case 14:return hx(i,a,a.type,a.pendingProps,c);case 15:return mx(i,a,a.type,a.pendingProps,c);case 19:return xx(i,a,c);case 31:return f=a.pendingProps,c=a.mode,f={mode:f.mode,children:f.children},i===null?(c=Yu(f,c),c.ref=a.ref,a.child=c,c.return=a,a=c):(c=Xr(i.child,f),c.ref=a.ref,a.child=c,c.return=a,a=c),a;case 22:return px(i,a,c);case 24:return Io(a),f=fn(Ft),i===null?(p=Im(),p===null&&(p=gt,b=km(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=c),p=b),a.memoizedState={parent:f,cache:p},jm(a),Ci(a,Ft,p)):((i.lanes&c)!==0&&(Pm(i,a),ml(a,null,null,c),hl()),p=i.memoizedState,b=a.memoizedState,p.parent!==f?(p={parent:f,cache:f},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ci(a,Ft,f)):(f=b.cache,Ci(a,Ft,f),f!==p.cache&&Om(a,[Ft],c,!0))),rn(i,a,a.pendingProps.children,c),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function oi(i){i.flags|=4}function Ax(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!DS(a)){if(a=Qn.current,a!==null&&((et&4194048)===et?Ar!==null:(et&62914560)!==et&&(et&536870912)===0||a!==Ar))throw dl=Lm,sE;i.flags|=8192}}function Wu(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?n_():536870912,i.lanes|=a,$a|=a)}function El(i,a){if(!it)switch(i.tailMode){case"hidden":a=i.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function St(i){var a=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(a)for(var p=i.child;p!==null;)c|=p.lanes|p.childLanes,f|=p.subtreeFlags&65011712,f|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)c|=p.lanes|p.childLanes,f|=p.subtreeFlags,f|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=f,i.childLanes=c,a}function Oj(i,a,c){var f=a.pendingProps;switch(Tm(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(a),null;case 1:return St(a),null;case 3:return c=a.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),ti(Ft),je(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(il(a)?oi(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,nE())),St(a),null;case 26:return c=a.memoizedState,i===null?(oi(a),c!==null?(St(a),Ax(a,c)):(St(a),a.flags&=-16777217)):c?c!==i.memoizedState?(oi(a),St(a),Ax(a,c)):(St(a),a.flags&=-16777217):(i.memoizedProps!==f&&oi(a),St(a),a.flags&=-16777217),null;case 27:Xe(a),c=ye.current;var p=a.type;if(i!==null&&a.stateNode!=null)i.memoizedProps!==f&&oi(a);else{if(!f){if(a.stateNode===null)throw Error(r(166));return St(a),null}i=se.current,il(a)?eE(a):(i=AS(p,f,c),a.stateNode=i,oi(a))}return St(a),null;case 5:if(Xe(a),c=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==f&&oi(a);else{if(!f){if(a.stateNode===null)throw Error(r(166));return St(a),null}if(i=se.current,il(a))eE(a);else{switch(p=cd(ye.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 f.is=="string"?p.createElement("select",{is:f.is}):p.createElement("select"),f.multiple?i.multiple=!0:f.size&&(i.size=f.size);break;default:i=typeof f.is=="string"?p.createElement(c,{is:f.is}):p.createElement(c)}}i[dn]=a,i[An]=f;e:for(p=a.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===a)break e;for(;p.sibling===null;){if(p.return===null||p.return===a)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}a.stateNode=i;e:switch(an(i,c,f),c){case"button":case"input":case"select":case"textarea":i=!!f.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&oi(a)}}return St(a),a.flags&=-16777217,null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==f&&oi(a);else{if(typeof f!="string"&&a.stateNode===null)throw Error(r(166));if(i=ye.current,il(a)){if(i=a.stateNode,c=a.memoizedProps,f=null,p=vn,p!==null)switch(p.tag){case 27:case 5:f=p.memoizedProps}i[dn]=a,i=!!(i.nodeValue===c||f!==null&&f.suppressHydrationWarning===!0||yS(i.nodeValue,c)),i||ko(a)}else i=cd(i).createTextNode(f),i[dn]=a,a.stateNode=i}return St(a),null;case 13:if(f=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=il(a),f!==null&&f.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[dn]=a}else ol(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;St(a),p=!1}else p=nE(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(ri(a),a):(ri(a),null)}if(ri(a),(a.flags&128)!==0)return a.lanes=c,a;if(c=f!==null,i=i!==null&&i.memoizedState!==null,c){f=a.child,p=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(p=f.alternate.memoizedState.cachePool.pool);var b=null;f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(b=f.memoizedState.cachePool.pool),b!==p&&(f.flags|=2048)}return c!==i&&c&&(a.child.flags|=8192),Wu(a,a.updateQueue),St(a),null;case 4:return je(),i===null&&zp(a.stateNode.containerInfo),St(a),null;case 10:return ti(a.type),St(a),null;case 19:if(B(Gt),p=a.memoizedState,p===null)return St(a),null;if(f=(a.flags&128)!==0,b=p.rendering,b===null)if(f)El(p,!1);else{if(Nt!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(b=Gu(i),b!==null){for(a.flags|=128,El(p,!1),i=b.updateQueue,a.updateQueue=i,Wu(a,i),a.subtreeFlags=0,i=c,c=a.child;c!==null;)Q_(c,i),c=c.sibling;return W(Gt,Gt.current&1|2),a.child}i=i.sibling}p.tail!==null&&un()>Ju&&(a.flags|=128,f=!0,El(p,!1),a.lanes=4194304)}else{if(!f)if(i=Gu(b),i!==null){if(a.flags|=128,f=!0,i=i.updateQueue,a.updateQueue=i,Wu(a,i),El(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!it)return St(a),null}else 2*un()-p.renderingStartTime>Ju&&c!==536870912&&(a.flags|=128,f=!0,El(p,!1),a.lanes=4194304);p.isBackwards?(b.sibling=a.child,a.child=b):(i=p.last,i!==null?i.sibling=b:a.child=b,p.last=b)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=un(),a.sibling=null,i=Gt.current,W(Gt,f?i&1|2:i&1),a):(St(a),null);case 22:case 23:return ri(a),Um(),f=a.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(a.flags|=8192):f&&(a.flags|=8192),f?(c&536870912)!==0&&(a.flags&128)===0&&(St(a),a.subtreeFlags&6&&(a.flags|=8192)):St(a),c=a.updateQueue,c!==null&&Wu(a,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==c&&(a.flags|=2048),i!==null&&B(Lo),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),ti(Ft),St(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function kj(i,a){switch(Tm(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return ti(Ft),je(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return Xe(a),null;case 13:if(ri(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));ol()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return B(Gt),null;case 4:return je(),null;case 10:return ti(a.type),null;case 22:case 23:return ri(a),Um(),i!==null&&B(Lo),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return ti(Ft),null;case 25:return null;default:return null}}function wx(i,a){switch(Tm(a),a.tag){case 3:ti(Ft),je();break;case 26:case 27:case 5:Xe(a);break;case 4:je();break;case 13:ri(a);break;case 19:B(Gt);break;case 10:ti(a.type);break;case 22:case 23:ri(a),Um(),i!==null&&B(Lo);break;case 24:ti(Ft)}}function xl(i,a){try{var c=a.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var p=f.next;c=p;do{if((c.tag&i)===i){f=void 0;var b=c.create,N=c.inst;f=b(),N.destroy=f}c=c.next}while(c!==p)}}catch(k){mt(a,a.return,k)}}function ji(i,a,c){try{var f=a.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var b=p.next;f=b;do{if((f.tag&i)===i){var N=f.inst,k=N.destroy;if(k!==void 0){N.destroy=void 0,p=a;var z=c,ee=k;try{ee()}catch(le){mt(p,z,le)}}}f=f.next}while(f!==b)}}catch(le){mt(a,a.return,le)}}function Tx(i){var a=i.updateQueue;if(a!==null){var c=i.stateNode;try{hE(a,c)}catch(f){mt(i,i.return,f)}}}function Rx(i,a,c){c.props=Po(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(f){mt(i,a,f)}}function Sl(i,a){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof c=="function"?i.refCleanup=c(f):c.current=f}}catch(p){mt(i,a,p)}}function wr(i,a){var c=i.ref,f=i.refCleanup;if(c!==null)if(typeof f=="function")try{f()}catch(p){mt(i,a,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(p){mt(i,a,p)}else c.current=null}function Cx(i){var a=i.type,c=i.memoizedProps,f=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":c.autoFocus&&f.focus();break e;case"img":c.src?f.src=c.src:c.srcSet&&(f.srcset=c.srcSet)}}catch(p){mt(i,i.return,p)}}function mp(i,a,c){try{var f=i.stateNode;Qj(f,i.type,c,a),f[An]=a}catch(p){mt(i,i.return,p)}}function Nx(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Hi(i.type)||i.tag===4}function pp(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Nx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Hi(i.type)||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 gp(i,a,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,a?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,a):(a=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,a.appendChild(i),c=c._reactRootContainer,c!=null||a.onclick!==null||(a.onclick=ld));else if(f!==4&&(f===27&&Hi(i.type)&&(c=i.stateNode,a=null),i=i.child,i!==null))for(gp(i,a,c),i=i.sibling;i!==null;)gp(i,a,c),i=i.sibling}function Xu(i,a,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,a?c.insertBefore(i,a):c.appendChild(i);else if(f!==4&&(f===27&&Hi(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(Xu(i,a,c),i=i.sibling;i!==null;)Xu(i,a,c),i=i.sibling}function Ox(i){var a=i.stateNode,c=i.memoizedProps;try{for(var f=i.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);an(a,f,c),a[dn]=i,a[An]=c}catch(b){mt(i,i.return,b)}}var ai=!1,Dt=!1,yp=!1,kx=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function Dj(i,a){if(i=i.containerInfo,Bp=pd,i=$_(i),pm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var p=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var N=0,k=-1,z=-1,ee=0,le=0,fe=i,ne=null;t:for(;;){for(var ie;fe!==c||p!==0&&fe.nodeType!==3||(k=N+p),fe!==b||f!==0&&fe.nodeType!==3||(z=N+f),fe.nodeType===3&&(N+=fe.nodeValue.length),(ie=fe.firstChild)!==null;)ne=fe,fe=ie;for(;;){if(fe===i)break t;if(ne===c&&++ee===p&&(k=N),ne===b&&++le===f&&(z=N),(ie=fe.nextSibling)!==null)break;fe=ne,ne=fe.parentNode}fe=ie}c=k===-1||z===-1?null:{start:k,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for($p={focusedElem:i,selectionRange:c},pd=!1,Jt=a;Jt!==null;)if(a=Jt,i=a.child,(a.subtreeFlags&1024)!==0&&i!==null)i.return=a,Jt=i;else for(;Jt!==null;){switch(a=Jt,b=a.alternate,i=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,c=a,p=b.memoizedProps,b=b.memoizedState,f=c.stateNode;try{var Pe=Po(c.type,p,c.elementType===c.type);i=f.getSnapshotBeforeUpdate(Pe,b),f.__reactInternalSnapshotBeforeUpdate=i}catch(Ie){mt(c,c.return,Ie)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,c=i.nodeType,c===9)Gp(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Gp(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=a.sibling,i!==null){i.return=a.return,Jt=i;break}Jt=a.return}}function Dx(i,a,c){var f=c.flags;switch(c.tag){case 0:case 11:case 15:Pi(i,c),f&4&&xl(5,c);break;case 1:if(Pi(i,c),f&4)if(i=c.stateNode,a===null)try{i.componentDidMount()}catch(N){mt(c,c.return,N)}else{var p=Po(c.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(p,a,i.__reactInternalSnapshotBeforeUpdate)}catch(N){mt(c,c.return,N)}}f&64&&Tx(c),f&512&&Sl(c,c.return);break;case 3:if(Pi(i,c),f&64&&(i=c.updateQueue,i!==null)){if(a=null,c.child!==null)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{hE(i,a)}catch(N){mt(c,c.return,N)}}break;case 27:a===null&&f&4&&Ox(c);case 26:case 5:Pi(i,c),a===null&&f&4&&Cx(c),f&512&&Sl(c,c.return);break;case 12:Pi(i,c);break;case 13:Pi(i,c),f&4&&jx(i,c),f&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=Bj.bind(null,c),oP(i,c))));break;case 22:if(f=c.memoizedState!==null||ai,!f){a=a!==null&&a.memoizedState!==null||Dt,p=ai;var b=Dt;ai=f,(Dt=a)&&!b?Mi(i,c,(c.subtreeFlags&8772)!==0):Pi(i,c),ai=p,Dt=b}break;case 30:break;default:Pi(i,c)}}function Ix(i){var a=i.alternate;a!==null&&(i.alternate=null,Ix(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Wh(a)),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 bt=null,Rn=!1;function si(i,a,c){for(c=c.child;c!==null;)Lx(i,a,c),c=c.sibling}function Lx(i,a,c){if(Be&&typeof Be.onCommitFiberUnmount=="function")try{Be.onCommitFiberUnmount(Ce,c)}catch{}switch(c.tag){case 26:Dt||wr(c,a),si(i,a,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Dt||wr(c,a);var f=bt,p=Rn;Hi(c.type)&&(bt=c.stateNode,Rn=!1),si(i,a,c),Dl(c.stateNode),bt=f,Rn=p;break;case 5:Dt||wr(c,a);case 6:if(f=bt,p=Rn,bt=null,si(i,a,c),bt=f,Rn=p,bt!==null)if(Rn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(c.stateNode)}catch(b){mt(c,a,b)}else try{bt.removeChild(c.stateNode)}catch(b){mt(c,a,b)}break;case 18:bt!==null&&(Rn?(i=bt,xS(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),Ul(i)):xS(bt,c.stateNode));break;case 4:f=bt,p=Rn,bt=c.stateNode.containerInfo,Rn=!0,si(i,a,c),bt=f,Rn=p;break;case 0:case 11:case 14:case 15:Dt||ji(2,c,a),Dt||ji(4,c,a),si(i,a,c);break;case 1:Dt||(wr(c,a),f=c.stateNode,typeof f.componentWillUnmount=="function"&&Rx(c,a,f)),si(i,a,c);break;case 21:si(i,a,c);break;case 22:Dt=(f=Dt)||c.memoizedState!==null,si(i,a,c),Dt=f;break;default:si(i,a,c)}}function jx(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ul(i)}catch(c){mt(a,a.return,c)}}function Ij(i){switch(i.tag){case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new kx),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new kx),a;default:throw Error(r(435,i.tag))}}function vp(i,a){var c=Ij(i);a.forEach(function(f){var p=$j.bind(null,i,f);c.has(f)||(c.add(f),f.then(p,p))})}function Ln(i,a){var c=a.deletions;if(c!==null)for(var f=0;f<c.length;f++){var p=c[f],b=i,N=a,k=N;e:for(;k!==null;){switch(k.tag){case 27:if(Hi(k.type)){bt=k.stateNode,Rn=!1;break e}break;case 5:bt=k.stateNode,Rn=!1;break e;case 3:case 4:bt=k.stateNode.containerInfo,Rn=!0;break e}k=k.return}if(bt===null)throw Error(r(160));Lx(b,N,p),bt=null,Rn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)Px(a,i),a=a.sibling}var cr=null;function Px(i,a){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ln(a,i),jn(i),f&4&&(ji(3,i,i.return),xl(3,i),ji(5,i,i.return));break;case 1:Ln(a,i),jn(i),f&512&&(Dt||c===null||wr(c,c.return)),f&64&&ai&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?f:c.concat(f))));break;case 26:var p=cr;if(Ln(a,i),jn(i),f&512&&(Dt||c===null||wr(c,c.return)),f&4){var b=c!==null?c.memoizedState:null;if(f=i.memoizedState,c===null)if(f===null)if(i.stateNode===null){e:{f=i.type,c=i.memoizedProps,p=p.ownerDocument||p;t:switch(f){case"title":b=p.getElementsByTagName("title")[0],(!b||b[qs]||b[dn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(f),p.head.insertBefore(b,p.querySelector("head > title"))),an(b,f,c),b[dn]=i,Xt(b),f=b;break e;case"link":var N=OS("link","href",p).get(f+(c.href||""));if(N){for(var k=0;k<N.length;k++)if(b=N[k],b.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&b.getAttribute("rel")===(c.rel==null?null:c.rel)&&b.getAttribute("title")===(c.title==null?null:c.title)&&b.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){N.splice(k,1);break t}}b=p.createElement(f),an(b,f,c),p.head.appendChild(b);break;case"meta":if(N=OS("meta","content",p).get(f+(c.content||""))){for(k=0;k<N.length;k++)if(b=N[k],b.getAttribute("content")===(c.content==null?null:""+c.content)&&b.getAttribute("name")===(c.name==null?null:c.name)&&b.getAttribute("property")===(c.property==null?null:c.property)&&b.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&b.getAttribute("charset")===(c.charSet==null?null:c.charSet)){N.splice(k,1);break t}}b=p.createElement(f),an(b,f,c),p.head.appendChild(b);break;default:throw Error(r(468,f))}b[dn]=i,Xt(b),f=b}i.stateNode=f}else kS(p,i.type,i.stateNode);else i.stateNode=NS(p,f,i.memoizedProps);else b!==f?(b===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):b.count--,f===null?kS(p,i.type,i.stateNode):NS(p,f,i.memoizedProps)):f===null&&i.stateNode!==null&&mp(i,i.memoizedProps,c.memoizedProps)}break;case 27:Ln(a,i),jn(i),f&512&&(Dt||c===null||wr(c,c.return)),c!==null&&f&4&&mp(i,i.memoizedProps,c.memoizedProps);break;case 5:if(Ln(a,i),jn(i),f&512&&(Dt||c===null||wr(c,c.return)),i.flags&32){p=i.stateNode;try{_a(p,"")}catch(ie){mt(i,i.return,ie)}}f&4&&i.stateNode!=null&&(p=i.memoizedProps,mp(i,p,c!==null?c.memoizedProps:p)),f&1024&&(yp=!0);break;case 6:if(Ln(a,i),jn(i),f&4){if(i.stateNode===null)throw Error(r(162));f=i.memoizedProps,c=i.stateNode;try{c.nodeValue=f}catch(ie){mt(i,i.return,ie)}}break;case 3:if(fd=null,p=cr,cr=ud(a.containerInfo),Ln(a,i),cr=p,jn(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{Ul(a.containerInfo)}catch(ie){mt(i,i.return,ie)}yp&&(yp=!1,Mx(i));break;case 4:f=cr,cr=ud(i.stateNode.containerInfo),Ln(a,i),jn(i),cr=f;break;case 12:Ln(a,i),jn(i);break;case 13:Ln(a,i),jn(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Ap=un()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,vp(i,f)));break;case 22:p=i.memoizedState!==null;var z=c!==null&&c.memoizedState!==null,ee=ai,le=Dt;if(ai=ee||p,Dt=le||z,Ln(a,i),Dt=le,ai=ee,jn(i),f&8192)e:for(a=i.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(c===null||z||ai||Dt||Mo(i)),c=null,a=i;;){if(a.tag===5||a.tag===26){if(c===null){z=c=a;try{if(b=z.stateNode,p)N=b.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{k=z.stateNode;var fe=z.memoizedProps.style,ne=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;k.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(ie){mt(z,z.return,ie)}}}else if(a.tag===6){if(c===null){z=a;try{z.stateNode.nodeValue=p?"":z.memoizedProps}catch(ie){mt(z,z.return,ie)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;c===a&&(c=null),a=a.return}c===a&&(c=null),a.sibling.return=a.return,a=a.sibling}f&4&&(f=i.updateQueue,f!==null&&(c=f.retryQueue,c!==null&&(f.retryQueue=null,vp(i,c))));break;case 19:Ln(a,i),jn(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,vp(i,f)));break;case 30:break;case 21:break;default:Ln(a,i),jn(i)}}function jn(i){var a=i.flags;if(a&2){try{for(var c,f=i.return;f!==null;){if(Nx(f)){c=f;break}f=f.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var p=c.stateNode,b=pp(i);Xu(i,b,p);break;case 5:var N=c.stateNode;c.flags&32&&(_a(N,""),c.flags&=-33);var k=pp(i);Xu(i,k,N);break;case 3:case 4:var z=c.stateNode.containerInfo,ee=pp(i);gp(i,ee,z);break;default:throw Error(r(161))}}catch(le){mt(i,i.return,le)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function Mx(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;Mx(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function Pi(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Dx(i,a.alternate,a),a=a.sibling}function Mo(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:ji(4,a,a.return),Mo(a);break;case 1:wr(a,a.return);var c=a.stateNode;typeof c.componentWillUnmount=="function"&&Rx(a,a.return,c),Mo(a);break;case 27:Dl(a.stateNode);case 26:case 5:wr(a,a.return),Mo(a);break;case 22:a.memoizedState===null&&Mo(a);break;case 30:Mo(a);break;default:Mo(a)}i=i.sibling}}function Mi(i,a,c){for(c=c&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var f=a.alternate,p=i,b=a,N=b.flags;switch(b.tag){case 0:case 11:case 15:Mi(p,b,c),xl(4,b);break;case 1:if(Mi(p,b,c),f=b,p=f.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(ee){mt(f,f.return,ee)}if(f=b,p=f.updateQueue,p!==null){var k=f.stateNode;try{var z=p.shared.hiddenCallbacks;if(z!==null)for(p.shared.hiddenCallbacks=null,p=0;p<z.length;p++)fE(z[p],k)}catch(ee){mt(f,f.return,ee)}}c&&N&64&&Tx(b),Sl(b,b.return);break;case 27:Ox(b);case 26:case 5:Mi(p,b,c),c&&f===null&&N&4&&Cx(b),Sl(b,b.return);break;case 12:Mi(p,b,c);break;case 13:Mi(p,b,c),c&&N&4&&jx(p,b);break;case 22:b.memoizedState===null&&Mi(p,b,c),Sl(b,b.return);break;case 30:break;default:Mi(p,b,c)}a=a.sibling}}function bp(i,a){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&ll(c))}function _p(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&ll(i))}function Tr(i,a,c,f){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)zx(i,a,c,f),a=a.sibling}function zx(i,a,c,f){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Tr(i,a,c,f),p&2048&&xl(9,a);break;case 1:Tr(i,a,c,f);break;case 3:Tr(i,a,c,f),p&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&ll(i)));break;case 12:if(p&2048){Tr(i,a,c,f),i=a.stateNode;try{var b=a.memoizedProps,N=b.id,k=b.onPostCommit;typeof k=="function"&&k(N,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(z){mt(a,a.return,z)}}else Tr(i,a,c,f);break;case 13:Tr(i,a,c,f);break;case 23:break;case 22:b=a.stateNode,N=a.alternate,a.memoizedState!==null?b._visibility&2?Tr(i,a,c,f):Al(i,a):b._visibility&2?Tr(i,a,c,f):(b._visibility|=2,Va(i,a,c,f,(a.subtreeFlags&10256)!==0)),p&2048&&bp(N,a);break;case 24:Tr(i,a,c,f),p&2048&&_p(a.alternate,a);break;default:Tr(i,a,c,f)}}function Va(i,a,c,f,p){for(p=p&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var b=i,N=a,k=c,z=f,ee=N.flags;switch(N.tag){case 0:case 11:case 15:Va(b,N,k,z,p),xl(8,N);break;case 23:break;case 22:var le=N.stateNode;N.memoizedState!==null?le._visibility&2?Va(b,N,k,z,p):Al(b,N):(le._visibility|=2,Va(b,N,k,z,p)),p&&ee&2048&&bp(N.alternate,N);break;case 24:Va(b,N,k,z,p),p&&ee&2048&&_p(N.alternate,N);break;default:Va(b,N,k,z,p)}a=a.sibling}}function Al(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=i,f=a,p=f.flags;switch(f.tag){case 22:Al(c,f),p&2048&&bp(f.alternate,f);break;case 24:Al(c,f),p&2048&&_p(f.alternate,f);break;default:Al(c,f)}a=a.sibling}}var wl=8192;function Ua(i){if(i.subtreeFlags&wl)for(i=i.child;i!==null;)Vx(i),i=i.sibling}function Vx(i){switch(i.tag){case 26:Ua(i),i.flags&wl&&i.memoizedState!==null&&vP(cr,i.memoizedState,i.memoizedProps);break;case 5:Ua(i);break;case 3:case 4:var a=cr;cr=ud(i.stateNode.containerInfo),Ua(i),cr=a;break;case 22:i.memoizedState===null&&(a=i.alternate,a!==null&&a.memoizedState!==null?(a=wl,wl=16777216,Ua(i),wl=a):Ua(i));break;default:Ua(i)}}function Ux(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function Tl(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];Jt=f,$x(f,i)}Ux(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Bx(i),i=i.sibling}function Bx(i){switch(i.tag){case 0:case 11:case 15:Tl(i),i.flags&2048&&ji(9,i,i.return);break;case 3:Tl(i);break;case 12:Tl(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Qu(i)):Tl(i);break;default:Tl(i)}}function Qu(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];Jt=f,$x(f,i)}Ux(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:ji(8,a,a.return),Qu(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,Qu(a));break;default:Qu(a)}i=i.sibling}}function $x(i,a){for(;Jt!==null;){var c=Jt;switch(c.tag){case 0:case 11:case 15:ji(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var f=c.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:ll(c.memoizedState.cache)}if(f=c.child,f!==null)f.return=c,Jt=f;else e:for(c=i;Jt!==null;){f=Jt;var p=f.sibling,b=f.return;if(Ix(f),f===c){Jt=null;break e}if(p!==null){p.return=b,Jt=p;break e}Jt=b}}}var Lj={getCacheForType:function(i){var a=fn(Ft),c=a.data.get(i);return c===void 0&&(c=i(),a.data.set(i,c)),c}},jj=typeof WeakMap=="function"?WeakMap:Map,lt=0,gt=null,Ye=null,et=0,ct=0,Pn=null,zi=!1,Ba=!1,Ep=!1,li=0,Nt=0,Vi=0,zo=0,xp=0,Jn=0,$a=0,Rl=null,Cn=null,Sp=!1,Ap=0,Ju=1/0,ed=null,Ui=null,on=0,Bi=null,Ha=null,Fa=0,wp=0,Tp=null,Hx=null,Cl=0,Rp=null;function Mn(){if((lt&2)!==0&&et!==0)return et&-et;if(j.T!==null){var i=ka;return i!==0?i:Lp()}return o_()}function Fx(){Jn===0&&(Jn=(et&536870912)===0||it?t_():536870912);var i=Qn.current;return i!==null&&(i.flags|=32),Jn}function zn(i,a,c){(i===gt&&(ct===2||ct===9)||i.cancelPendingCommit!==null)&&(Ga(i,0),$i(i,et,Jn,!1)),Ks(i,c),((lt&2)===0||i!==gt)&&(i===gt&&((lt&2)===0&&(zo|=c),Nt===4&&$i(i,et,Jn,!1)),Rr(i))}function Gx(i,a,c){if((lt&6)!==0)throw Error(r(327));var f=!c&&(a&124)===0&&(a&i.expiredLanes)===0||xo(i,a),p=f?zj(i,a):Op(i,a,!0),b=f;do{if(p===0){Ba&&!f&&$i(i,a,0,!1);break}else{if(c=i.current.alternate,b&&!Pj(c)){p=Op(i,a,!1),b=!1;continue}if(p===2){if(b=a,i.errorRecoveryDisabledLanes&b)var N=0;else N=i.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){a=N;e:{var k=i;p=Rl;var z=k.current.memoizedState.isDehydrated;if(z&&(Ga(k,N).flags|=256),N=Op(k,N,!1),N!==2){if(Ep&&!z){k.errorRecoveryDisabledLanes|=b,zo|=b,p=4;break e}b=Cn,Cn=p,b!==null&&(Cn===null?Cn=b:Cn.push.apply(Cn,b))}p=N}if(b=!1,p!==2)continue}}if(p===1){Ga(i,0),$i(i,a,0,!0);break}e:{switch(f=i,b=p,b){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:$i(f,a,Jn,!zi);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(p=Ap+300-un(),10<p)){if($i(f,a,Jn,!zi),Eo(f,0,!0)!==0)break e;f.timeoutHandle=_S(Kx.bind(null,f,c,Cn,ed,Sp,a,Jn,zo,$a,zi,b,2,-0,0),p);break e}Kx(f,c,Cn,ed,Sp,a,Jn,zo,$a,zi,b,0,-0,0)}}break}while(!0);Rr(i)}function Kx(i,a,c,f,p,b,N,k,z,ee,le,fe,ne,ie){if(i.timeoutHandle=-1,fe=a.subtreeFlags,(fe&8192||(fe&16785408)===16785408)&&(jl={stylesheets:null,count:0,unsuspend:yP},Vx(a),fe=bP(),fe!==null)){i.cancelPendingCommit=fe(Jx.bind(null,i,a,b,c,f,p,N,k,z,le,1,ne,ie)),$i(i,b,N,!ee);return}Jx(i,a,b,c,f,p,N,k,z)}function Pj(i){for(var a=i;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var f=0;f<c.length;f++){var p=c[f],b=p.getSnapshot;p=p.value;try{if(!Dn(b(),p))return!1}catch{return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function $i(i,a,c,f){a&=~xp,a&=~zo,i.suspendedLanes|=a,i.pingedLanes&=~a,f&&(i.warmLanes|=a),f=i.expirationTimes;for(var p=a;0<p;){var b=31-pt(p),N=1<<b;f[b]=-1,p&=~N}c!==0&&r_(i,c,a)}function td(){return(lt&6)===0?(Nl(0),!1):!0}function Cp(){if(Ye!==null){if(ct===0)var i=Ye.return;else i=Ye,ei=Do=null,Gm(i),Ma=null,bl=0,i=Ye;for(;i!==null;)wx(i.alternate,i),i=i.return;Ye=null}}function Ga(i,a){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,eP(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),Cp(),gt=i,Ye=c=Xr(i.current,null),et=a,ct=0,Pn=null,zi=!1,Ba=xo(i,a),Ep=!1,$a=Jn=xp=zo=Vi=Nt=0,Cn=Rl=null,Sp=!1,(a&8)!==0&&(a|=a&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=a;0<f;){var p=31-pt(f),b=1<<p;a|=i[p],f&=~b}return li=a,Su(),c}function qx(i,a){Ke=null,j.H=$u,a===ul||a===Du?(a=uE(),ct=3):a===sE?(a=uE(),ct=4):ct=a===dx?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Pn=a,Ye===null&&(Nt=1,qu(i,Zn(a,i.current)))}function Zx(){var i=j.H;return j.H=$u,i===null?$u:i}function Yx(){var i=j.A;return j.A=Lj,i}function Np(){Nt=4,zi||(et&4194048)!==et&&Qn.current!==null||(Ba=!0),(Vi&134217727)===0&&(zo&134217727)===0||gt===null||$i(gt,et,Jn,!1)}function Op(i,a,c){var f=lt;lt|=2;var p=Zx(),b=Yx();(gt!==i||et!==a)&&(ed=null,Ga(i,a)),a=!1;var N=Nt;e:do try{if(ct!==0&&Ye!==null){var k=Ye,z=Pn;switch(ct){case 8:Cp(),N=6;break e;case 3:case 2:case 9:case 6:Qn.current===null&&(a=!0);var ee=ct;if(ct=0,Pn=null,Ka(i,k,z,ee),c&&Ba){N=0;break e}break;default:ee=ct,ct=0,Pn=null,Ka(i,k,z,ee)}}Mj(),N=Nt;break}catch(le){qx(i,le)}while(!0);return a&&i.shellSuspendCounter++,ei=Do=null,lt=f,j.H=p,j.A=b,Ye===null&&(gt=null,et=0,Su()),N}function Mj(){for(;Ye!==null;)Wx(Ye)}function zj(i,a){var c=lt;lt|=2;var f=Zx(),p=Yx();gt!==i||et!==a?(ed=null,Ju=un()+500,Ga(i,a)):Ba=xo(i,a);e:do try{if(ct!==0&&Ye!==null){a=Ye;var b=Pn;t:switch(ct){case 1:ct=0,Pn=null,Ka(i,a,b,1);break;case 2:case 9:if(lE(b)){ct=0,Pn=null,Xx(a);break}a=function(){ct!==2&&ct!==9||gt!==i||(ct=7),Rr(i)},b.then(a,a);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:lE(b)?(ct=0,Pn=null,Xx(a)):(ct=0,Pn=null,Ka(i,a,b,7));break;case 5:var N=null;switch(Ye.tag){case 26:N=Ye.memoizedState;case 5:case 27:var k=Ye;if(!N||DS(N)){ct=0,Pn=null;var z=k.sibling;if(z!==null)Ye=z;else{var ee=k.return;ee!==null?(Ye=ee,nd(ee)):Ye=null}break t}}ct=0,Pn=null,Ka(i,a,b,5);break;case 6:ct=0,Pn=null,Ka(i,a,b,6);break;case 8:Cp(),Nt=6;break e;default:throw Error(r(462))}}Vj();break}catch(le){qx(i,le)}while(!0);return ei=Do=null,j.H=f,j.A=p,lt=c,Ye!==null?0:(gt=null,et=0,Su(),Nt)}function Vj(){for(;Ye!==null&&!Si();)Wx(Ye)}function Wx(i){var a=Sx(i.alternate,i,li);i.memoizedProps=i.pendingProps,a===null?nd(i):Ye=a}function Xx(i){var a=i,c=a.alternate;switch(a.tag){case 15:case 0:a=yx(c,a,a.pendingProps,a.type,void 0,et);break;case 11:a=yx(c,a,a.pendingProps,a.type.render,a.ref,et);break;case 5:Gm(a);default:wx(c,a),a=Ye=Q_(a,li),a=Sx(c,a,li)}i.memoizedProps=i.pendingProps,a===null?nd(i):Ye=a}function Ka(i,a,c,f){ei=Do=null,Gm(a),Ma=null,bl=0;var p=a.return;try{if(Cj(i,p,a,c,et)){Nt=1,qu(i,Zn(c,i.current)),Ye=null;return}}catch(b){if(p!==null)throw Ye=p,b;Nt=1,qu(i,Zn(c,i.current)),Ye=null;return}a.flags&32768?(it||f===1?i=!0:Ba||(et&536870912)!==0?i=!1:(zi=i=!0,(f===2||f===9||f===3||f===6)&&(f=Qn.current,f!==null&&f.tag===13&&(f.flags|=16384))),Qx(a,i)):nd(a)}function nd(i){var a=i;do{if((a.flags&32768)!==0){Qx(a,zi);return}i=a.return;var c=Oj(a.alternate,a,li);if(c!==null){Ye=c;return}if(a=a.sibling,a!==null){Ye=a;return}Ye=a=i}while(a!==null);Nt===0&&(Nt=5)}function Qx(i,a){do{var c=kj(i.alternate,i);if(c!==null){c.flags&=32767,Ye=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(i=i.sibling,i!==null)){Ye=i;return}Ye=i=c}while(i!==null);Nt=6,Ye=null}function Jx(i,a,c,f,p,b,N,k,z){i.cancelPendingCommit=null;do rd();while(on!==0);if((lt&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(b=a.lanes|a.childLanes,b|=_m,yL(i,c,b,N,k,z),i===gt&&(Ye=gt=null,et=0),Ha=a,Bi=i,Fa=c,wp=b,Tp=p,Hx=f,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,Hj(te,function(){return iS(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||f){f=j.T,j.T=null,p=X.p,X.p=2,N=lt,lt|=4;try{Dj(i,a,c)}finally{lt=N,X.p=p,j.T=f}}on=1,eS(),tS(),nS()}}function eS(){if(on===1){on=0;var i=Bi,a=Ha,c=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||c){c=j.T,j.T=null;var f=X.p;X.p=2;var p=lt;lt|=4;try{Px(a,i);var b=$p,N=$_(i.containerInfo),k=b.focusedElem,z=b.selectionRange;if(N!==k&&k&&k.ownerDocument&&B_(k.ownerDocument.documentElement,k)){if(z!==null&&pm(k)){var ee=z.start,le=z.end;if(le===void 0&&(le=ee),"selectionStart"in k)k.selectionStart=ee,k.selectionEnd=Math.min(le,k.value.length);else{var fe=k.ownerDocument||document,ne=fe&&fe.defaultView||window;if(ne.getSelection){var ie=ne.getSelection(),Pe=k.textContent.length,Ie=Math.min(z.start,Pe),ht=z.end===void 0?Ie:Math.min(z.end,Pe);!ie.extend&&Ie>ht&&(N=ht,ht=Ie,Ie=N);var q=U_(k,Ie),$=U_(k,ht);if(q&&$&&(ie.rangeCount!==1||ie.anchorNode!==q.node||ie.anchorOffset!==q.offset||ie.focusNode!==$.node||ie.focusOffset!==$.offset)){var Q=fe.createRange();Q.setStart(q.node,q.offset),ie.removeAllRanges(),Ie>ht?(ie.addRange(Q),ie.extend($.node,$.offset)):(Q.setEnd($.node,$.offset),ie.addRange(Q))}}}}for(fe=[],ie=k;ie=ie.parentNode;)ie.nodeType===1&&fe.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<fe.length;k++){var de=fe[k];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}pd=!!Bp,$p=Bp=null}finally{lt=p,X.p=f,j.T=c}}i.current=a,on=2}}function tS(){if(on===2){on=0;var i=Bi,a=Ha,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=j.T,j.T=null;var f=X.p;X.p=2;var p=lt;lt|=4;try{Dx(i,a.alternate,a)}finally{lt=p,X.p=f,j.T=c}}on=3}}function nS(){if(on===4||on===3){on=0,_o();var i=Bi,a=Ha,c=Fa,f=Hx;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?on=5:(on=0,Ha=Bi=null,rS(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&(Ui=null),Zh(c),a=a.stateNode,Be&&typeof Be.onCommitFiberRoot=="function")try{Be.onCommitFiberRoot(Ce,a,void 0,(a.current.flags&128)===128)}catch{}if(f!==null){a=j.T,p=X.p,X.p=2,j.T=null;try{for(var b=i.onRecoverableError,N=0;N<f.length;N++){var k=f[N];b(k.value,{componentStack:k.stack})}}finally{j.T=a,X.p=p}}(Fa&3)!==0&&rd(),Rr(i),p=i.pendingLanes,(c&4194090)!==0&&(p&42)!==0?i===Rp?Cl++:(Cl=0,Rp=i):Cl=0,Nl(0)}}function rS(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,ll(a)))}function rd(i){return eS(),tS(),nS(),iS()}function iS(){if(on!==5)return!1;var i=Bi,a=wp;wp=0;var c=Zh(Fa),f=j.T,p=X.p;try{X.p=32>c?32:c,j.T=null,c=Tp,Tp=null;var b=Bi,N=Fa;if(on=0,Ha=Bi=null,Fa=0,(lt&6)!==0)throw Error(r(331));var k=lt;if(lt|=4,Bx(b.current),zx(b,b.current,N,c),lt=k,Nl(0,!1),Be&&typeof Be.onPostCommitFiberRoot=="function")try{Be.onPostCommitFiberRoot(Ce,b)}catch{}return!0}finally{X.p=p,j.T=f,rS(i,a)}}function oS(i,a,c){a=Zn(c,a),a=op(i.stateNode,a,2),i=ki(i,a,2),i!==null&&(Ks(i,2),Rr(i))}function mt(i,a,c){if(i.tag===3)oS(i,i,c);else for(;a!==null;){if(a.tag===3){oS(a,i,c);break}else if(a.tag===1){var f=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ui===null||!Ui.has(f))){i=Zn(c,i),c=cx(2),f=ki(a,c,2),f!==null&&(ux(c,f,a,i),Ks(f,2),Rr(f));break}}a=a.return}}function kp(i,a,c){var f=i.pingCache;if(f===null){f=i.pingCache=new jj;var p=new Set;f.set(a,p)}else p=f.get(a),p===void 0&&(p=new Set,f.set(a,p));p.has(c)||(Ep=!0,p.add(c),i=Uj.bind(null,i,a,c),a.then(i,i))}function Uj(i,a,c){var f=i.pingCache;f!==null&&f.delete(a),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,gt===i&&(et&c)===c&&(Nt===4||Nt===3&&(et&62914560)===et&&300>un()-Ap?(lt&2)===0&&Ga(i,0):xp|=c,$a===et&&($a=0)),Rr(i)}function aS(i,a){a===0&&(a=n_()),i=Ra(i,a),i!==null&&(Ks(i,a),Rr(i))}function Bj(i){var a=i.memoizedState,c=0;a!==null&&(c=a.retryLane),aS(i,c)}function $j(i,a){var c=0;switch(i.tag){case 13:var f=i.stateNode,p=i.memoizedState;p!==null&&(c=p.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(a),aS(i,c)}function Hj(i,a){return Wt(i,a)}var id=null,qa=null,Dp=!1,od=!1,Ip=!1,Vo=0;function Rr(i){i!==qa&&i.next===null&&(qa===null?id=qa=i:qa=qa.next=i),od=!0,Dp||(Dp=!0,Gj())}function Nl(i,a){if(!Ip&&od){Ip=!0;do for(var c=!1,f=id;f!==null;){if(i!==0){var p=f.pendingLanes;if(p===0)var b=0;else{var N=f.suspendedLanes,k=f.pingedLanes;b=(1<<31-pt(42|i)+1)-1,b&=p&~(N&~k),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(c=!0,uS(f,b))}else b=et,b=Eo(f,f===gt?b:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(b&3)===0||xo(f,b)||(c=!0,uS(f,b));f=f.next}while(c);Ip=!1}}function Fj(){sS()}function sS(){od=Dp=!1;var i=0;Vo!==0&&(Jj()&&(i=Vo),Vo=0);for(var a=un(),c=null,f=id;f!==null;){var p=f.next,b=lS(f,a);b===0?(f.next=null,c===null?id=p:c.next=p,p===null&&(qa=c)):(c=f,(i!==0||(b&3)!==0)&&(od=!0)),f=p}Nl(i)}function lS(i,a){for(var c=i.suspendedLanes,f=i.pingedLanes,p=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var N=31-pt(b),k=1<<N,z=p[N];z===-1?((k&c)===0||(k&f)!==0)&&(p[N]=du(k,a)):z<=a&&(i.expiredLanes|=k),b&=~k}if(a=gt,c=et,c=Eo(i,i===a?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,c===0||i===a&&(ct===2||ct===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&Sn(f),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||xo(i,c)){if(a=c&-c,a===i.callbackPriority)return a;switch(f!==null&&Sn(f),Zh(c)){case 2:case 8:c=U;break;case 32:c=te;break;case 268435456:c=Ae;break;default:c=te}return f=cS.bind(null,i),c=Wt(c,f),i.callbackPriority=a,i.callbackNode=c,a}return f!==null&&f!==null&&Sn(f),i.callbackPriority=2,i.callbackNode=null,2}function cS(i,a){if(on!==0&&on!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(rd()&&i.callbackNode!==c)return null;var f=et;return f=Eo(i,i===gt?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(Gx(i,f,a),lS(i,un()),i.callbackNode!=null&&i.callbackNode===c?cS.bind(null,i):null)}function uS(i,a){if(rd())return null;Gx(i,a,!0)}function Gj(){tP(function(){(lt&6)!==0?Wt(Gs,Fj):sS()})}function Lp(){return Vo===0&&(Vo=t_()),Vo}function dS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:gu(""+i)}function fS(i,a){var c=a.ownerDocument.createElement("input");return c.name=a.name,c.value=a.value,i.id&&c.setAttribute("form",i.id),a.parentNode.insertBefore(c,a),i=new FormData(i),c.parentNode.removeChild(c),i}function Kj(i,a,c,f,p){if(a==="submit"&&c&&c.stateNode===p){var b=dS((p[An]||null).action),N=f.submitter;N&&(a=(a=N[An]||null)?dS(a.formAction):N.getAttribute("formAction"),a!==null&&(b=a,N=null));var k=new _u("action","action",null,f,p);i.push({event:k,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Vo!==0){var z=N?fS(p,N):new FormData(p);ep(c,{pending:!0,data:z,method:p.method,action:b},null,z)}}else typeof b=="function"&&(k.preventDefault(),z=N?fS(p,N):new FormData(p),ep(c,{pending:!0,data:z,method:p.method,action:b},b,z))},currentTarget:p}]})}}for(var jp=0;jp<bm.length;jp++){var Pp=bm[jp],qj=Pp.toLowerCase(),Zj=Pp[0].toUpperCase()+Pp.slice(1);lr(qj,"on"+Zj)}lr(G_,"onAnimationEnd"),lr(K_,"onAnimationIteration"),lr(q_,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(dj,"onTransitionRun"),lr(fj,"onTransitionStart"),lr(hj,"onTransitionCancel"),lr(Z_,"onTransitionEnd"),ya("onMouseEnter",["mouseout","mouseover"]),ya("onMouseLeave",["mouseout","mouseover"]),ya("onPointerEnter",["pointerout","pointerover"]),ya("onPointerLeave",["pointerout","pointerover"]),So("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),So("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),So("onBeforeInput",["compositionend","keypress","textInput","paste"]),So("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),So("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),So("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ol="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(" "),Yj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ol));function hS(i,a){a=(a&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],p=f.event;f=f.listeners;e:{var b=void 0;if(a)for(var N=f.length-1;0<=N;N--){var k=f[N],z=k.instance,ee=k.currentTarget;if(k=k.listener,z!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=ee;try{b(p)}catch(le){Ku(le)}p.currentTarget=null,b=z}else for(N=0;N<f.length;N++){if(k=f[N],z=k.instance,ee=k.currentTarget,k=k.listener,z!==b&&p.isPropagationStopped())break e;b=k,p.currentTarget=ee;try{b(p)}catch(le){Ku(le)}p.currentTarget=null,b=z}}}}function We(i,a){var c=a[Yh];c===void 0&&(c=a[Yh]=new Set);var f=i+"__bubble";c.has(f)||(mS(a,i,2,!1),c.add(f))}function Mp(i,a,c){var f=0;a&&(f|=4),mS(c,i,f,a)}var ad="_reactListening"+Math.random().toString(36).slice(2);function zp(i){if(!i[ad]){i[ad]=!0,s_.forEach(function(c){c!=="selectionchange"&&(Yj.has(c)||Mp(c,!1,i),Mp(c,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[ad]||(a[ad]=!0,Mp("selectionchange",!1,a))}}function mS(i,a,c,f){switch(zS(a)){case 2:var p=xP;break;case 8:p=SP;break;default:p=Qp}c=p.bind(null,a,c,i),p=void 0,!am||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),f?p!==void 0?i.addEventListener(a,c,{capture:!0,passive:p}):i.addEventListener(a,c,!0):p!==void 0?i.addEventListener(a,c,{passive:p}):i.addEventListener(a,c,!1)}function Vp(i,a,c,f,p){var b=f;if((a&1)===0&&(a&2)===0&&f!==null)e:for(;;){if(f===null)return;var N=f.tag;if(N===3||N===4){var k=f.stateNode.containerInfo;if(k===p)break;if(N===4)for(N=f.return;N!==null;){var z=N.tag;if((z===3||z===4)&&N.stateNode.containerInfo===p)return;N=N.return}for(;k!==null;){if(N=ma(k),N===null)return;if(z=N.tag,z===5||z===6||z===26||z===27){f=b=N;continue e}k=k.parentNode}}f=f.return}E_(function(){var ee=b,le=im(c),fe=[];e:{var ne=Y_.get(i);if(ne!==void 0){var ie=_u,Pe=i;switch(i){case"keypress":if(vu(c)===0)break e;case"keydown":case"keyup":ie=HL;break;case"focusin":Pe="focus",ie=um;break;case"focusout":Pe="blur",ie=um;break;case"beforeblur":case"afterblur":ie=um;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":ie=A_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=kL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=KL;break;case G_:case K_:case q_:ie=LL;break;case Z_:ie=ZL;break;case"scroll":case"scrollend":ie=NL;break;case"wheel":ie=WL;break;case"copy":case"cut":case"paste":ie=PL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=T_;break;case"toggle":case"beforetoggle":ie=QL}var Ie=(a&4)!==0,ht=!Ie&&(i==="scroll"||i==="scrollend"),q=Ie?ne!==null?ne+"Capture":null:ne;Ie=[];for(var $=ee,Q;$!==null;){var de=$;if(Q=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||Q===null||q===null||(de=Ys($,q),de!=null&&Ie.push(kl($,de,Q))),ht)break;$=$.return}0<Ie.length&&(ne=new ie(ne,Pe,null,c,le),fe.push({event:ne,listeners:Ie}))}}if((a&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",ie=i==="mouseout"||i==="pointerout",ne&&c!==rm&&(Pe=c.relatedTarget||c.fromElement)&&(ma(Pe)||Pe[ha]))break e;if((ie||ne)&&(ne=le.window===le?le:(ne=le.ownerDocument)?ne.defaultView||ne.parentWindow:window,ie?(Pe=c.relatedTarget||c.toElement,ie=ee,Pe=Pe?ma(Pe):null,Pe!==null&&(ht=s(Pe),Ie=Pe.tag,Pe!==ht||Ie!==5&&Ie!==27&&Ie!==6)&&(Pe=null)):(ie=null,Pe=ee),ie!==Pe)){if(Ie=A_,de="onMouseLeave",q="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=T_,de="onPointerLeave",q="onPointerEnter",$="pointer"),ht=ie==null?ne:Zs(ie),Q=Pe==null?ne:Zs(Pe),ne=new Ie(de,$+"leave",ie,c,le),ne.target=ht,ne.relatedTarget=Q,de=null,ma(le)===ee&&(Ie=new Ie(q,$+"enter",Pe,c,le),Ie.target=Q,Ie.relatedTarget=ht,de=Ie),ht=de,ie&&Pe)t:{for(Ie=ie,q=Pe,$=0,Q=Ie;Q;Q=Za(Q))$++;for(Q=0,de=q;de;de=Za(de))Q++;for(;0<$-Q;)Ie=Za(Ie),$--;for(;0<Q-$;)q=Za(q),Q--;for(;$--;){if(Ie===q||q!==null&&Ie===q.alternate)break t;Ie=Za(Ie),q=Za(q)}Ie=null}else Ie=null;ie!==null&&pS(fe,ne,ie,Ie,!1),Pe!==null&&ht!==null&&pS(fe,ht,Pe,Ie,!0)}}e:{if(ne=ee?Zs(ee):window,ie=ne.nodeName&&ne.nodeName.toLowerCase(),ie==="select"||ie==="input"&&ne.type==="file")var we=L_;else if(D_(ne))if(j_)we=lj;else{we=aj;var Ze=oj}else ie=ne.nodeName,!ie||ie.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?ee&&nm(ee.elementType)&&(we=L_):we=sj;if(we&&(we=we(i,ee))){I_(fe,we,c,le);break e}Ze&&Ze(i,ne,ee),i==="focusout"&&ee&&ne.type==="number"&&ee.memoizedProps.value!=null&&tm(ne,"number",ne.value)}switch(Ze=ee?Zs(ee):window,i){case"focusin":(D_(Ze)||Ze.contentEditable==="true")&&(Aa=Ze,gm=ee,rl=null);break;case"focusout":rl=gm=Aa=null;break;case"mousedown":ym=!0;break;case"contextmenu":case"mouseup":case"dragend":ym=!1,H_(fe,c,le);break;case"selectionchange":if(uj)break;case"keydown":case"keyup":H_(fe,c,le)}var Oe;if(fm)e:{switch(i){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Sa?O_(i,c)&&(Le="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Le="onCompositionStart");Le&&(R_&&c.locale!=="ko"&&(Sa||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Sa&&(Oe=x_()):(Ri=le,sm="value"in Ri?Ri.value:Ri.textContent,Sa=!0)),Ze=sd(ee,Le),0<Ze.length&&(Le=new w_(Le,i,null,c,le),fe.push({event:Le,listeners:Ze}),Oe?Le.data=Oe:(Oe=k_(c),Oe!==null&&(Le.data=Oe)))),(Oe=ej?tj(i,c):nj(i,c))&&(Le=sd(ee,"onBeforeInput"),0<Le.length&&(Ze=new w_("onBeforeInput","beforeinput",null,c,le),fe.push({event:Ze,listeners:Le}),Ze.data=Oe)),Kj(fe,i,ee,c,le)}hS(fe,a)})}function kl(i,a,c){return{instance:i,listener:a,currentTarget:c}}function sd(i,a){for(var c=a+"Capture",f=[];i!==null;){var p=i,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=Ys(i,c),p!=null&&f.unshift(kl(i,p,b)),p=Ys(i,a),p!=null&&f.push(kl(i,p,b))),i.tag===3)return f;i=i.return}return[]}function Za(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function pS(i,a,c,f,p){for(var b=a._reactName,N=[];c!==null&&c!==f;){var k=c,z=k.alternate,ee=k.stateNode;if(k=k.tag,z!==null&&z===f)break;k!==5&&k!==26&&k!==27||ee===null||(z=ee,p?(ee=Ys(c,b),ee!=null&&N.unshift(kl(c,ee,z))):p||(ee=Ys(c,b),ee!=null&&N.push(kl(c,ee,z)))),c=c.return}N.length!==0&&i.push({event:a,listeners:N})}var Wj=/\r\n?/g,Xj=/\u0000|\uFFFD/g;function gS(i){return(typeof i=="string"?i:""+i).replace(Wj,`
50
- `).replace(Xj,"")}function yS(i,a){return a=gS(a),gS(i)===a}function ld(){}function ft(i,a,c,f,p,b){switch(c){case"children":typeof f=="string"?a==="body"||a==="textarea"&&f===""||_a(i,f):(typeof f=="number"||typeof f=="bigint")&&a!=="body"&&_a(i,""+f);break;case"className":hu(i,"class",f);break;case"tabIndex":hu(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":hu(i,c,f);break;case"style":b_(i,f,b);break;case"data":if(a!=="object"){hu(i,"data",f);break}case"src":case"href":if(f===""&&(a!=="a"||c!=="href")){i.removeAttribute(c);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=gu(""+f),i.setAttribute(c,f);break;case"action":case"formAction":if(typeof f=="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 b=="function"&&(c==="formAction"?(a!=="input"&&ft(i,a,"name",p.name,p,null),ft(i,a,"formEncType",p.formEncType,p,null),ft(i,a,"formMethod",p.formMethod,p,null),ft(i,a,"formTarget",p.formTarget,p,null)):(ft(i,a,"encType",p.encType,p,null),ft(i,a,"method",p.method,p,null),ft(i,a,"target",p.target,p,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=gu(""+f),i.setAttribute(c,f);break;case"onClick":f!=null&&(i.onclick=ld);break;case"onScroll":f!=null&&We("scroll",i);break;case"onScrollEnd":f!=null&&We("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}c=gu(""+f),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":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""+f):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":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":f===!0?i.setAttribute(c,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,f):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(c,f):i.removeAttribute(c);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(c):i.setAttribute(c,f);break;case"popover":We("beforetoggle",i),We("toggle",i),fu(i,"popover",f);break;case"xlinkActuate":Yr(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Yr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Yr(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Yr(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Yr(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Yr(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Yr(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Yr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Yr(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":fu(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=RL.get(c)||c,fu(i,c,f))}}function Up(i,a,c,f,p,b){switch(c){case"style":b_(i,f,b);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof f=="string"?_a(i,f):(typeof f=="number"||typeof f=="bigint")&&_a(i,""+f);break;case"onScroll":f!=null&&We("scroll",i);break;case"onScrollEnd":f!=null&&We("scrollend",i);break;case"onClick":f!=null&&(i.onclick=ld);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!l_.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(p=c.endsWith("Capture"),a=c.slice(2,p?c.length-7:void 0),b=i[An]||null,b=b!=null?b[c]:null,typeof b=="function"&&i.removeEventListener(a,b,p),typeof f=="function")){typeof b!="function"&&b!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(a,f,p);break e}c in i?i[c]=f:f===!0?i.setAttribute(c,""):fu(i,c,f)}}}function an(i,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",i),We("load",i);var f=!1,p=!1,b;for(b in c)if(c.hasOwnProperty(b)){var N=c[b];if(N!=null)switch(b){case"src":f=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:ft(i,a,b,N,c,null)}}p&&ft(i,a,"srcSet",c.srcSet,c,null),f&&ft(i,a,"src",c.src,c,null);return;case"input":We("invalid",i);var k=b=N=p=null,z=null,ee=null;for(f in c)if(c.hasOwnProperty(f)){var le=c[f];if(le!=null)switch(f){case"name":p=le;break;case"type":N=le;break;case"checked":z=le;break;case"defaultChecked":ee=le;break;case"value":b=le;break;case"defaultValue":k=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,a));break;default:ft(i,a,f,le,c,null)}}p_(i,b,k,z,ee,N,p,!1),mu(i);return;case"select":We("invalid",i),f=N=b=null;for(p in c)if(c.hasOwnProperty(p)&&(k=c[p],k!=null))switch(p){case"value":b=k;break;case"defaultValue":N=k;break;case"multiple":f=k;default:ft(i,a,p,k,c,null)}a=b,c=N,i.multiple=!!f,a!=null?ba(i,!!f,a,!1):c!=null&&ba(i,!!f,c,!0);return;case"textarea":We("invalid",i),b=p=f=null;for(N in c)if(c.hasOwnProperty(N)&&(k=c[N],k!=null))switch(N){case"value":f=k;break;case"defaultValue":p=k;break;case"children":b=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:ft(i,a,N,k,c,null)}y_(i,f,p,b),mu(i);return;case"option":for(z in c)if(c.hasOwnProperty(z)&&(f=c[z],f!=null))switch(z){case"selected":i.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:ft(i,a,z,f,c,null)}return;case"dialog":We("beforetoggle",i),We("toggle",i),We("cancel",i),We("close",i);break;case"iframe":case"object":We("load",i);break;case"video":case"audio":for(f=0;f<Ol.length;f++)We(Ol[f],i);break;case"image":We("error",i),We("load",i);break;case"details":We("toggle",i);break;case"embed":case"source":case"link":We("error",i),We("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(ee in c)if(c.hasOwnProperty(ee)&&(f=c[ee],f!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:ft(i,a,ee,f,c,null)}return;default:if(nm(a)){for(le in c)c.hasOwnProperty(le)&&(f=c[le],f!==void 0&&Up(i,a,le,f,c,void 0));return}}for(k in c)c.hasOwnProperty(k)&&(f=c[k],f!=null&&ft(i,a,k,f,c,null))}function Qj(i,a,c,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,N=null,k=null,z=null,ee=null,le=null;for(ie in c){var fe=c[ie];if(c.hasOwnProperty(ie)&&fe!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":z=fe;default:f.hasOwnProperty(ie)||ft(i,a,ie,null,f,fe)}}for(var ne in f){var ie=f[ne];if(fe=c[ne],f.hasOwnProperty(ne)&&(ie!=null||fe!=null))switch(ne){case"type":b=ie;break;case"name":p=ie;break;case"checked":ee=ie;break;case"defaultChecked":le=ie;break;case"value":N=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,a));break;default:ie!==fe&&ft(i,a,ne,ie,f,fe)}}em(i,N,k,z,ee,le,b,p);return;case"select":ie=N=k=ne=null;for(b in c)if(z=c[b],c.hasOwnProperty(b)&&z!=null)switch(b){case"value":break;case"multiple":ie=z;default:f.hasOwnProperty(b)||ft(i,a,b,null,f,z)}for(p in f)if(b=f[p],z=c[p],f.hasOwnProperty(p)&&(b!=null||z!=null))switch(p){case"value":ne=b;break;case"defaultValue":k=b;break;case"multiple":N=b;default:b!==z&&ft(i,a,p,b,f,z)}a=k,c=N,f=ie,ne!=null?ba(i,!!c,ne,!1):!!f!=!!c&&(a!=null?ba(i,!!c,a,!0):ba(i,!!c,c?[]:"",!1));return;case"textarea":ie=ne=null;for(k in c)if(p=c[k],c.hasOwnProperty(k)&&p!=null&&!f.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:ft(i,a,k,null,f,p)}for(N in f)if(p=f[N],b=c[N],f.hasOwnProperty(N)&&(p!=null||b!=null))switch(N){case"value":ne=p;break;case"defaultValue":ie=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==b&&ft(i,a,N,p,f,b)}g_(i,ne,ie);return;case"option":for(var Pe in c)if(ne=c[Pe],c.hasOwnProperty(Pe)&&ne!=null&&!f.hasOwnProperty(Pe))switch(Pe){case"selected":i.selected=!1;break;default:ft(i,a,Pe,null,f,ne)}for(z in f)if(ne=f[z],ie=c[z],f.hasOwnProperty(z)&&ne!==ie&&(ne!=null||ie!=null))switch(z){case"selected":i.selected=ne&&typeof ne!="function"&&typeof ne!="symbol";break;default:ft(i,a,z,ne,f,ie)}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 Ie in c)ne=c[Ie],c.hasOwnProperty(Ie)&&ne!=null&&!f.hasOwnProperty(Ie)&&ft(i,a,Ie,null,f,ne);for(ee in f)if(ne=f[ee],ie=c[ee],f.hasOwnProperty(ee)&&ne!==ie&&(ne!=null||ie!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,a));break;default:ft(i,a,ee,ne,f,ie)}return;default:if(nm(a)){for(var ht in c)ne=c[ht],c.hasOwnProperty(ht)&&ne!==void 0&&!f.hasOwnProperty(ht)&&Up(i,a,ht,void 0,f,ne);for(le in f)ne=f[le],ie=c[le],!f.hasOwnProperty(le)||ne===ie||ne===void 0&&ie===void 0||Up(i,a,le,ne,f,ie);return}}for(var q in c)ne=c[q],c.hasOwnProperty(q)&&ne!=null&&!f.hasOwnProperty(q)&&ft(i,a,q,null,f,ne);for(fe in f)ne=f[fe],ie=c[fe],!f.hasOwnProperty(fe)||ne===ie||ne==null&&ie==null||ft(i,a,fe,ne,f,ie)}var Bp=null,$p=null;function cd(i){return i.nodeType===9?i:i.ownerDocument}function vS(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 bS(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function Hp(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Fp=null;function Jj(){var i=window.event;return i&&i.type==="popstate"?i===Fp?!1:(Fp=i,!0):(Fp=null,!1)}var _S=typeof setTimeout=="function"?setTimeout:void 0,eP=typeof clearTimeout=="function"?clearTimeout:void 0,ES=typeof Promise=="function"?Promise:void 0,tP=typeof queueMicrotask=="function"?queueMicrotask:typeof ES<"u"?function(i){return ES.resolve(null).then(i).catch(nP)}:_S;function nP(i){setTimeout(function(){throw i})}function Hi(i){return i==="head"}function xS(i,a){var c=a,f=0,p=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c==="/$"){if(0<f&&8>f){c=f;var N=i.ownerDocument;if(c&1&&Dl(N.documentElement),c&2&&Dl(N.body),c&4)for(c=N.head,Dl(c),N=c.firstChild;N;){var k=N.nextSibling,z=N.nodeName;N[qs]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&N.rel.toLowerCase()==="stylesheet"||c.removeChild(N),N=k}}if(p===0){i.removeChild(b),Ul(a);return}p--}else c==="$"||c==="$?"||c==="$!"?p++:f=c.charCodeAt(0)-48;else f=0;c=b}while(c);Ul(a)}function Gp(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Gp(c),Wh(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function rP(i,a,c,f){for(;i.nodeType===1;){var p=c;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[qs])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?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(b=i.getAttribute("src"),(b!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=ur(i.nextSibling),i===null)break}return null}function iP(i,a,c){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=ur(i.nextSibling),i===null))return null;return i}function Kp(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState==="complete"}function oP(i,a){var c=i.ownerDocument;if(i.data!=="$?"||c.readyState==="complete")a();else{var f=function(){a(),c.removeEventListener("DOMContentLoaded",f)};c.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function ur(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return i}var qp=null;function SS(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(a===0)return i;a--}else c==="/$"&&a++}i=i.previousSibling}return null}function AS(i,a,c){switch(a=cd(c),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Dl(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Wh(i)}var er=new Map,wS=new Set;function ud(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ci=X.d;X.d={f:aP,r:sP,D:lP,C:cP,L:uP,m:dP,X:hP,S:fP,M:mP};function aP(){var i=ci.f(),a=td();return i||a}function sP(i){var a=pa(i);a!==null&&a.tag===5&&a.type==="form"?GE(a):ci.r(i)}var Ya=typeof document>"u"?null:document;function TS(i,a,c){var f=Ya;if(f&&typeof a=="string"&&a){var p=qn(a);p='link[rel="'+i+'"][href="'+p+'"]',typeof c=="string"&&(p+='[crossorigin="'+c+'"]'),wS.has(p)||(wS.add(p),i={rel:i,crossOrigin:c,href:a},f.querySelector(p)===null&&(a=f.createElement("link"),an(a,"link",i),Xt(a),f.head.appendChild(a)))}}function lP(i){ci.D(i),TS("dns-prefetch",i,null)}function cP(i,a){ci.C(i,a),TS("preconnect",i,a)}function uP(i,a,c){ci.L(i,a,c);var f=Ya;if(f&&i&&a){var p='link[rel="preload"][as="'+qn(a)+'"]';a==="image"&&c&&c.imageSrcSet?(p+='[imagesrcset="'+qn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(p+='[imagesizes="'+qn(c.imageSizes)+'"]')):p+='[href="'+qn(i)+'"]';var b=p;switch(a){case"style":b=Wa(i);break;case"script":b=Xa(i)}er.has(b)||(i=m({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:i,as:a},c),er.set(b,i),f.querySelector(p)!==null||a==="style"&&f.querySelector(Il(b))||a==="script"&&f.querySelector(Ll(b))||(a=f.createElement("link"),an(a,"link",i),Xt(a),f.head.appendChild(a)))}}function dP(i,a){ci.m(i,a);var c=Ya;if(c&&i){var f=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+qn(f)+'"][href="'+qn(i)+'"]',b=p;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Xa(i)}if(!er.has(b)&&(i=m({rel:"modulepreload",href:i},a),er.set(b,i),c.querySelector(p)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Ll(b)))return}f=c.createElement("link"),an(f,"link",i),Xt(f),c.head.appendChild(f)}}}function fP(i,a,c){ci.S(i,a,c);var f=Ya;if(f&&i){var p=ga(f).hoistableStyles,b=Wa(i);a=a||"default";var N=p.get(b);if(!N){var k={loading:0,preload:null};if(N=f.querySelector(Il(b)))k.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":a},c),(c=er.get(b))&&Zp(i,c);var z=N=f.createElement("link");Xt(z),an(z,"link",i),z._p=new Promise(function(ee,le){z.onload=ee,z.onerror=le}),z.addEventListener("load",function(){k.loading|=1}),z.addEventListener("error",function(){k.loading|=2}),k.loading|=4,dd(N,a,f)}N={type:"stylesheet",instance:N,count:1,state:k},p.set(b,N)}}}function hP(i,a){ci.X(i,a);var c=Ya;if(c&&i){var f=ga(c).hoistableScripts,p=Xa(i),b=f.get(p);b||(b=c.querySelector(Ll(p)),b||(i=m({src:i,async:!0},a),(a=er.get(p))&&Yp(i,a),b=c.createElement("script"),Xt(b),an(b,"link",i),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(p,b))}}function mP(i,a){ci.M(i,a);var c=Ya;if(c&&i){var f=ga(c).hoistableScripts,p=Xa(i),b=f.get(p);b||(b=c.querySelector(Ll(p)),b||(i=m({src:i,async:!0,type:"module"},a),(a=er.get(p))&&Yp(i,a),b=c.createElement("script"),Xt(b),an(b,"link",i),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(p,b))}}function RS(i,a,c,f){var p=(p=ye.current)?ud(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"?(a=Wa(c.href),c=ga(p).hoistableStyles,f=c.get(a),f||(f={type:"style",instance:null,count:0,state:null},c.set(a,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=Wa(c.href);var b=ga(p).hoistableStyles,N=b.get(i);if(N||(p=p.ownerDocument||p,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,N),(b=p.querySelector(Il(i)))&&!b._p&&(N.instance=b,N.state.loading=5),er.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},er.set(i,c),b||pP(p,i,c,N.state))),a&&f===null)throw Error(r(528,""));return N}if(a&&f!==null)throw Error(r(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Xa(c),c=ga(p).hoistableScripts,f=c.get(a),f||(f={type:"script",instance:null,count:0,state:null},c.set(a,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Wa(i){return'href="'+qn(i)+'"'}function Il(i){return'link[rel="stylesheet"]['+i+"]"}function CS(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function pP(i,a,c,f){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?f.loading=1:(a=i.createElement("link"),f.preload=a,a.addEventListener("load",function(){return f.loading|=1}),a.addEventListener("error",function(){return f.loading|=2}),an(a,"link",c),Xt(a),i.head.appendChild(a))}function Xa(i){return'[src="'+qn(i)+'"]'}function Ll(i){return"script[async]"+i}function NS(i,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var f=i.querySelector('style[data-href~="'+qn(c.href)+'"]');if(f)return a.instance=f,Xt(f),f;var p=m({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),Xt(f),an(f,"style",p),dd(f,c.precedence,i),a.instance=f;case"stylesheet":p=Wa(c.href);var b=i.querySelector(Il(p));if(b)return a.state.loading|=4,a.instance=b,Xt(b),b;f=CS(c),(p=er.get(p))&&Zp(f,p),b=(i.ownerDocument||i).createElement("link"),Xt(b);var N=b;return N._p=new Promise(function(k,z){N.onload=k,N.onerror=z}),an(b,"link",f),a.state.loading|=4,dd(b,c.precedence,i),a.instance=b;case"script":return b=Xa(c.src),(p=i.querySelector(Ll(b)))?(a.instance=p,Xt(p),p):(f=c,(p=er.get(b))&&(f=m({},c),Yp(f,p)),i=i.ownerDocument||i,p=i.createElement("script"),Xt(p),an(p,"link",f),i.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(f=a.instance,a.state.loading|=4,dd(f,c.precedence,i));return a.instance}function dd(i,a,c){for(var f=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=f.length?f[f.length-1]:null,b=p,N=0;N<f.length;N++){var k=f[N];if(k.dataset.precedence===a)b=k;else if(b!==p)break}b?b.parentNode.insertBefore(i,b.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(i,a.firstChild))}function Zp(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Yp(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var fd=null;function OS(i,a,c){if(fd===null){var f=new Map,p=fd=new Map;p.set(c,f)}else p=fd,f=p.get(c),f||(f=new Map,p.set(c,f));if(f.has(i))return f;for(f.set(i,null),c=c.getElementsByTagName(i),p=0;p<c.length;p++){var b=c[p];if(!(b[qs]||b[dn]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var N=b.getAttribute(a)||"";N=i+N;var k=f.get(N);k?k.push(b):f.set(N,[b])}}return f}function kS(i,a,c){i=i.ownerDocument||i,i.head.insertBefore(c,a==="title"?i.querySelector("head > title"):null)}function gP(i,a,c){if(c===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function DS(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var jl=null;function yP(){}function vP(i,a,c){if(jl===null)throw Error(r(475));var f=jl;if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Wa(c.href),b=i.querySelector(Il(p));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(f.count++,f=hd.bind(f),i.then(f,f)),a.state.loading|=4,a.instance=b,Xt(b);return}b=i.ownerDocument||i,c=CS(c),(p=er.get(p))&&Zp(c,p),b=b.createElement("link"),Xt(b);var N=b;N._p=new Promise(function(k,z){N.onload=k,N.onerror=z}),an(b,"link",c),a.instance=b}f.stylesheets===null&&(f.stylesheets=new Map),f.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(f.count++,a=hd.bind(f),i.addEventListener("load",a),i.addEventListener("error",a))}}function bP(){if(jl===null)throw Error(r(475));var i=jl;return i.stylesheets&&i.count===0&&Wp(i,i.stylesheets),0<i.count?function(a){var c=setTimeout(function(){if(i.stylesheets&&Wp(i,i.stylesheets),i.unsuspend){var f=i.unsuspend;i.unsuspend=null,f()}},6e4);return i.unsuspend=a,function(){i.unsuspend=null,clearTimeout(c)}}:null}function hd(){if(this.count--,this.count===0){if(this.stylesheets)Wp(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var md=null;function Wp(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,md=new Map,a.forEach(_P,i),md=null,hd.call(i))}function _P(i,a){if(!(a.state.loading&4)){var c=md.get(i);if(c)var f=c.get(null);else{c=new Map,md.set(i,c);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var N=p[b];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(c.set(N.dataset.precedence,N),f=N)}f&&c.set(null,f)}p=a.instance,N=p.getAttribute("data-precedence"),b=c.get(N)||f,b===f&&c.set(null,p),c.set(N,p),this.count++,f=hd.bind(this),p.addEventListener("load",f),p.addEventListener("error",f),b?b.parentNode.insertBefore(p,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),a.state.loading|=4}}var Pl={$$typeof:T,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function EP(i,a,c,f,p,b,N,k){this.tag=1,this.containerInfo=i,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=Kh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kh(0),this.hiddenUpdates=Kh(null),this.identifierPrefix=f,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function IS(i,a,c,f,p,b,N,k,z,ee,le,fe){return i=new EP(i,a,c,N,k,z,ee,fe),a=1,b===!0&&(a|=24),b=In(3,null,null,a),i.current=b,b.stateNode=i,a=km(),a.refCount++,i.pooledCache=a,a.refCount++,b.memoizedState={element:f,isDehydrated:c,cache:a},jm(b),i}function LS(i){return i?(i=Ca,i):Ca}function jS(i,a,c,f,p,b){p=LS(p),f.context===null?f.context=p:f.pendingContext=p,f=Oi(a),f.payload={element:c},b=b===void 0?null:b,b!==null&&(f.callback=b),c=ki(i,f,a),c!==null&&(zn(c,i,a),fl(c,i,a))}function PS(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<a?c:a}}function Xp(i,a){PS(i,a),(i=i.alternate)&&PS(i,a)}function MS(i){if(i.tag===13){var a=Ra(i,67108864);a!==null&&zn(a,i,67108864),Xp(i,67108864)}}var pd=!0;function xP(i,a,c,f){var p=j.T;j.T=null;var b=X.p;try{X.p=2,Qp(i,a,c,f)}finally{X.p=b,j.T=p}}function SP(i,a,c,f){var p=j.T;j.T=null;var b=X.p;try{X.p=8,Qp(i,a,c,f)}finally{X.p=b,j.T=p}}function Qp(i,a,c,f){if(pd){var p=Jp(f);if(p===null)Vp(i,a,f,gd,c),VS(i,f);else if(wP(p,i,a,c,f))f.stopPropagation();else if(VS(i,f),a&4&&-1<AP.indexOf(i)){for(;p!==null;){var b=pa(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var N=Zr(b.pendingLanes);if(N!==0){var k=b;for(k.pendingLanes|=2,k.entangledLanes|=2;N;){var z=1<<31-pt(N);k.entanglements[1]|=z,N&=~z}Rr(b),(lt&6)===0&&(Ju=un()+500,Nl(0))}}break;case 13:k=Ra(b,2),k!==null&&zn(k,b,2),td(),Xp(b,2)}if(b=Jp(f),b===null&&Vp(i,a,f,gd,c),b===p)break;p=b}p!==null&&f.stopPropagation()}else Vp(i,a,f,null,c)}}function Jp(i){return i=im(i),eg(i)}var gd=null;function eg(i){if(gd=null,i=ma(i),i!==null){var a=s(i);if(a===null)i=null;else{var c=a.tag;if(c===13){if(i=l(a),i!==null)return i;i=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return gd=i,null}function zS(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 Gs:return 2;case U:return 8;case te:case ce:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var tg=!1,Fi=null,Gi=null,Ki=null,Ml=new Map,zl=new Map,qi=[],AP="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 VS(i,a){switch(i){case"focusin":case"focusout":Fi=null;break;case"dragenter":case"dragleave":Gi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Ml.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":zl.delete(a.pointerId)}}function Vl(i,a,c,f,p,b){return i===null||i.nativeEvent!==b?(i={blockedOn:a,domEventName:c,eventSystemFlags:f,nativeEvent:b,targetContainers:[p]},a!==null&&(a=pa(a),a!==null&&MS(a)),i):(i.eventSystemFlags|=f,a=i.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),i)}function wP(i,a,c,f,p){switch(a){case"focusin":return Fi=Vl(Fi,i,a,c,f,p),!0;case"dragenter":return Gi=Vl(Gi,i,a,c,f,p),!0;case"mouseover":return Ki=Vl(Ki,i,a,c,f,p),!0;case"pointerover":var b=p.pointerId;return Ml.set(b,Vl(Ml.get(b)||null,i,a,c,f,p)),!0;case"gotpointercapture":return b=p.pointerId,zl.set(b,Vl(zl.get(b)||null,i,a,c,f,p)),!0}return!1}function US(i){var a=ma(i.target);if(a!==null){var c=s(a);if(c!==null){if(a=c.tag,a===13){if(a=l(c),a!==null){i.blockedOn=a,vL(i.priority,function(){if(c.tag===13){var f=Mn();f=qh(f);var p=Ra(c,f);p!==null&&zn(p,c,f),Xp(c,f)}});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function yd(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var c=Jp(i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);rm=f,c.target.dispatchEvent(f),rm=null}else return a=pa(c),a!==null&&MS(a),i.blockedOn=c,!1;a.shift()}return!0}function BS(i,a,c){yd(i)&&c.delete(a)}function TP(){tg=!1,Fi!==null&&yd(Fi)&&(Fi=null),Gi!==null&&yd(Gi)&&(Gi=null),Ki!==null&&yd(Ki)&&(Ki=null),Ml.forEach(BS),zl.forEach(BS)}function vd(i,a){i.blockedOn===a&&(i.blockedOn=null,tg||(tg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,TP)))}var bd=null;function $S(i){bd!==i&&(bd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bd===i&&(bd=null);for(var a=0;a<i.length;a+=3){var c=i[a],f=i[a+1],p=i[a+2];if(typeof f!="function"){if(eg(f||c)===null)continue;break}var b=pa(c);b!==null&&(i.splice(a,3),a-=3,ep(b,{pending:!0,data:p,method:c.method,action:f},f,p))}}))}function Ul(i){function a(z){return vd(z,i)}Fi!==null&&vd(Fi,i),Gi!==null&&vd(Gi,i),Ki!==null&&vd(Ki,i),Ml.forEach(a),zl.forEach(a);for(var c=0;c<qi.length;c++){var f=qi[c];f.blockedOn===i&&(f.blockedOn=null)}for(;0<qi.length&&(c=qi[0],c.blockedOn===null);)US(c),c.blockedOn===null&&qi.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(f=0;f<c.length;f+=3){var p=c[f],b=c[f+1],N=p[An]||null;if(typeof b=="function")N||$S(c);else if(N){var k=null;if(b&&b.hasAttribute("formAction")){if(p=b,N=b[An]||null)k=N.formAction;else if(eg(p)!==null)continue}else k=N.action;typeof k=="function"?c[f+1]=k:(c.splice(f,3),f-=3),$S(c)}}}function ng(i){this._internalRoot=i}_d.prototype.render=ng.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var c=a.current,f=Mn();jS(c,f,i,a,null,null)},_d.prototype.unmount=ng.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;jS(i.current,2,null,i,null,null),td(),a[ha]=null}};function _d(i){this._internalRoot=i}_d.prototype.unstable_scheduleHydration=function(i){if(i){var a=o_();i={blockedOn:null,target:i,priority:a};for(var c=0;c<qi.length&&a!==0&&a<qi[c].priority;c++);qi.splice(c,0,i),c===0&&US(i)}};var HS=t.version;if(HS!=="19.1.1")throw Error(r(527,HS,"19.1.1"));X.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(a),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var RP={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ed=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ed.isDisabled&&Ed.supportsFiber)try{Ce=Ed.inject(RP),Be=Ed}catch{}}return $l.createRoot=function(i,a){if(!o(i))throw Error(r(299));var c=!1,f="",p=ox,b=ax,N=sx,k=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(k=a.unstable_transitionCallbacks)),a=IS(i,1,!1,null,null,c,f,p,b,N,k,null),i[ha]=a.current,zp(i),new ng(a)},$l.hydrateRoot=function(i,a,c){if(!o(i))throw Error(r(299));var f=!1,p="",b=ox,N=ax,k=sx,z=null,ee=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(b=c.onUncaughtError),c.onCaughtError!==void 0&&(N=c.onCaughtError),c.onRecoverableError!==void 0&&(k=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(z=c.unstable_transitionCallbacks),c.formState!==void 0&&(ee=c.formState)),a=IS(i,1,!0,a,c??null,f,p,b,N,k,z,ee),a.context=LS(null),c=a.current,f=Mn(),f=qh(f),p=Oi(f),p.callback=null,ki(c,p,f),c=f,a.current.lanes=c,Ks(a,c),Rr(a),i[ha]=a.current,zp(i),new _d(a)},$l.version="19.1.1",$l}var JS;function MP(){if(JS)return og.exports;JS=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(),og.exports=PP(),og.exports}var zP=MP();const VP={locales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],requiredLocales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],strictMode:"strict",defaultLocale:"en"},UP={headerName:"x-intlayer-locale",cookieName:"INTLAYER_LOCALE",prefixDefault:!1,basePath:"",serverSetCookie:"always",noPrefix:!1,detectLocaleOnPrefetchNoPrefix:!1},BP={fileExtensions:[".content.ts",".content.js",".content.cjs",".content.cjx",".content.mjs",".content.mjx",".content.json",".content.tsx",".content.jsx"],baseDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor",excludedPath:["node_modules",".intlayer",".next",".nuxt",".expo","dist"],watch:!1,contentDir:["/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor"],dictionariesDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/dictionary",moduleAugmentationDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/types",dictionaryOutput:["intlayer"],unmergedDictionariesDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/unmerged_dictionary",dynamicDictionariesDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/dynamic_dictionary",i18nextResourcesDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/i18next_resources",reactIntlMessagesDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/intl_messages",typesDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/types",mainDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/main",configDir:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/config",watchedFilesPattern:["/**/*.content.ts","/**/*.content.js","/**/*.content.cjs","/**/*.content.cjx","/**/*.content.mjs","/**/*.content.mjx","/**/*.content.json","/**/*.content.tsx","/**/*.content.jsx"],watchedFilesPatternWithPath:["/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.ts","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.js","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.cjs","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.cjx","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.mjs","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.mjx","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.json","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.tsx","/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/**/*.content.jsx"],outputFilesPatternWithPath:"/Users/aymericpineau/Documents/intlayer/packages/intlayer-editor/.intlayer/dictionary/**/*.json"},$P={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},HP={mode:"default",prefix:"\x1B[90m[intlayer] \x1B[0m"},FP={},GP={optimize:!0,importMode:"static",traversePattern:["**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}","!**/node_modules/**"]},tt={internationalization:VP,middleware:UP,content:BP,editor:$P,log:HP,ai:FP,build:GP};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.BENGALI="bn",e.BENGALI_BANGLADESH="bn-BD",e.BENGALI_INDIA="bn-IN",e.BENGALI_MYANMAR="bn-MM",e.BURMESE="my",e.BURMESE_MYANMAR="my-MM",e.KHMER="km",e.KHMER_CAMBODIA="km-KH",e.LAO="lo",e.LAO_LAOS="lo-LA",e.YORUBA="yo",e.YORUBA_NIGERIA="yo-NG",e.AMHARIC="am",e.AMHARIC_ETHIOPIA="am-ET",e.NEPALI="ne",e))(V||{}),G=(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.Gender="gender",e.Unknown="unknown",e))(G||{});const h1=(e,t,n)=>({...n,nodeType:e,[e]:t}),eA=(e,t,n)=>{let r=e,o=null,s=[];if(t.length===0)return n;for(let l=0;l<t.length;l++){const u=t[l];if(o=r,(u.type===G.Object||u.type===G.Array)&&(s=[u.key],(!r[u.key]||typeof r[u.key]!="object")&&(r[u.key]={}),r=r[u.key]),(u.type===G.Translation||u.type===G.Enumeration)&&(s=[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===G.Enumeration||u.type===G.Condition)&&(s=[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===G.Markdown||u.type===G.Insertion)&&(s=[u.type],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]=""),r=r[u.type]),u.type===G.File&&(s=["content"],r=r.content),u.type&&(r=r),l===t.length-1&&o&&s.length>0){let d=o;for(const h of s.slice(0,-1))d=d[h];typeof n>"u"?delete d[s[s.length-1]]:d[s[s.length-1]]=n}}return e},Pr=(e,t)=>{let n=structuredClone(e);for(const r of t)r.type===G.Object||r.type===G.Array?n=n?.[r.key]:r.type===G.Translation||r.type===G.Condition||r.type===G.Enumeration?n=n?.[r.type][r.key]:(r.type===G.Markdown||r.type===G.Insertion||r.type===G.File)&&(n=n?.[r.type]);return n},m1=e=>{if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e?.nodeType=="string"){const t=e,n=t[t.nodeType];if(t.nodeType===G.Translation||t.nodeType===G.Enumeration||t.nodeType===G.Condition||t.nodeType===G.Insertion||t.nodeType===G.File){const r=Object.keys(n)[0];return n[r]}return t.nodeType===G.Nested?void 0:n}return!e||typeof e!="object"?e:Array.isArray(e)?e[0]:e},KP=(e,t,n)=>{let r=e,o=null,s=null;for(const l of n)o=r,(l.type===G.Object||l.type===G.Array)&&(s=l.key,r=r[l.key]),(l.type===G.Translation||l.type===G.Enumeration||l.type===G.Condition)&&(s=l.type,r=r[l.type][l.key]),(l.type===G.Markdown||l.type===G.ReactNode||l.type===G.Insertion||l.type===G.File)&&(s=l.type,r=r[l.type]);if(o&&s!==null)if(Array.isArray(o))o[s]=r;else{const l={};for(const u of Object.keys(o))u===s&&typeof t<"u"?l[t]=r:l[u]=o[u];Object.keys(o).forEach(u=>delete o[u]),Object.assign(o,l)}return e},qP=e=>typeof e=="object"&&typeof e?.key<"u"&&typeof e?.props<"u",Cs=e=>typeof e=="string"?G.Text:typeof e?.nodeType=="string"?e.nodeType:Array.isArray(e)?G.Array:qP(e)?G.ReactNode:typeof e=="number"?G.Number:typeof e=="boolean"?G.Boolean:e&&typeof e=="object"?G.Object:G.Unknown,Hl=(e,t,n)=>{const r=structuredClone(n);switch(e){case G.Translation:return{nodeType:G.Translation,[G.Translation]:Object.assign({},...t.map(o=>({[o]:structuredClone(r)??""})))};case G.Enumeration:return{nodeType:G.Enumeration,[G.Enumeration]:{1:r??""}};case G.Condition:return{nodeType:G.Condition,[G.Condition]:{true:r??"",false:r??""}};case G.Insertion:return{nodeType:G.Insertion,[G.Insertion]:{insertion:r??""}};case G.Nested:return{nodeType:G.Nested,[G.Nested]:{dictionaryKey:""}};case G.Markdown:return{nodeType:G.Markdown,[G.Markdown]:r??""};case G.File:return{nodeType:G.File,[G.File]:r??""};case G.Object:return{newKey:r??""};case G.Array:return[r??""];case G.Text:return r??"";case G.Number:return r??0;case G.Boolean:return r??!0;default:return r??""}},ir=e=>{if(typeof e=="string")return"";if(typeof e=="number")return 0;if(typeof e=="boolean")return!0;if(typeof e?.nodeType=="string"){const r=e,o=r[r.nodeType];return r.nodeType===G.Translation||r.nodeType===G.Enumeration||r.nodeType===G.Condition||r.nodeType===G.Insertion?ir(o):r.nodeType===G.Nested?"dictionary-key":r.nodeType===G.File?"file/path":r.nodeType===G.Markdown?ir(r):o}if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(ir);const t=Object.entries(e).map(([r,o])=>[r,ir(o)]);return Object.fromEntries(t)},ZP=(e,t)=>JSON.stringify([e,t]),YP=e=>{const t=new Map;function n(r,o){if(e.name==="DisplayNames"&&typeof Intl?.DisplayNames!="function")return r;const s=ZP(r??tt.internationalization.defaultLocale,o);let l=t.get(s);return l||(l=new e(r,o),t.set(s,l)),l}return n.prototype=e.prototype,n},WP=()=>new Proxy(Intl,{get:(e,t,n)=>{const r=Reflect.get(e,t,n);return typeof r=="function"&&/^[A-Z]/.test(String(t))?YP(r):r}}),XP=WP(),Qd=(e,t)=>{for(const r of t.plugins??[])if(r.canHandle(e))return r.transform(e,t,(o,s)=>Qd(o,s));if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map((r,o)=>{const s={...t,children:r,keyPath:[...t.keyPath,{type:G.Array,key:o}]};return Qd(r,s)});const n={};for(const r in e){const o={...t,children:e[r],keyPath:[...t.keyPath,{type:G.Object,key:r}]};n[r]=Qd(e[r],o)}return n},QP=(e,t)=>{const n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},JP=(e,t)=>{const n=Object.keys(e);for(const r of n){const o=!r.startsWith(">")&&!r.startsWith("<")&&!r.startsWith("=")&&parseFloat(r)===t||r.startsWith("=")&&parseFloat(r.slice(1))===t,s=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(o||s||l||u||d)return r}},eM=(e,t)=>{const n=JP(e,t)??"fallback";return e[n]},tM=(e,t)=>e.replace(/\{\{(.*?)\}\}/g,(n,r)=>(t[r]??"").toString()),nM="dictionary-edition-drawer",rM={openDictionaryEditor:{label:{nodeType:"translation",translation:{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:{nodeType:"translation",translation:{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:{nodeType:"translation",translation:{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:{nodeType:"translation",translation:{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"}},focusedDictionaryNotFound:{nodeType:"translation",translation:{en:"Focused dictionary not found",fr:"Dictionnaire focalisé non trouvé",es:"Diccionario enfocado no encontrado",de:"Ausgewähltes Wörterbuch nicht gefunden",ja:"フォーカスされた辞書が見つかりません",ko:"포커스가 있는 사전이 없습니다",zh:"没有聚焦的词典",it:"Nessun dizionario selezionato",pt:"Nenhum dicionário focalizado",hi:"कोई फोकस शब्दकोश नहीं है",ar:"لا يوجد قاموس مرتبط",ru:"Нет фокусированного словаря","en-GB":"Focused dictionary not found"}}},iM={key:nM,content:rM},oM="long-press-message",aM={message:{fields:["dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey","dictionaryKey"],nodeType:"insertion",insertion:{nodeType:"translation",translation:{en:'Long press to edit the "{{dictionaryKey}}" dictionary',fr:'Long press pour éditer le dictionnaire "{{dictionaryKey}}"',es:'Presiona largo para editar el diccionario "{{dictionaryKey}}"',de:'Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"',it:'Premi a lungo per modificare il dizionario "{{dictionaryKey}}"',pt:'Pressione longa para editar o dicionário "{{dictionaryKey}}"',ru:'Длительное нажатие для редактирования словаря "{{dictionaryKey}}"',ja:'長押しして編集 "{{dictionaryKey}}" 辞書',ko:'길게 눌러 편집 "{{dictionaryKey}}" 사전',zh:'长按编辑 "{{dictionaryKey}}" 字典',"en-GB":'Long press to edit the "{{dictionaryKey}}" dictionary',ar:'اضغط طويلاً للتعديل "{{dictionaryKey}}"',hi:'लंग प्रेस करें टू एडिट "{{dictionaryKey}}"'}}}},sM={key:oM,content:aM},lM="no-application-url-view",cM={title:{nodeType:"translation",translation:{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:{nodeType:"translation",translation:{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:{nodeType:"translation",translation:{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:{nodeType:"translation",translation:{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:"查看如何配置编辑器"}}}},uM={key:lM,content:cM},tA={"dictionary-edition-drawer":iM,"long-press-message":sM,"no-application-url-view":uM},p1=(e,t,n)=>{const r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return Zv(e.content,r,t)},dM=(e,t,n)=>{const r=tA[e];if(!r)throw new Error(`Dictionary ${e} not found`,tA);return p1(r,t,n)},fM=(e,t,n)=>{const r=dM(e,n?.locale,n?.plugins);if(typeof t=="string"){const o=t.split(".");let s=r;for(const l of o)if(s=s?.[l],s===void 0)return r;return s}return r},hM=(e,t,n=!0)=>{const{defaultLocale:r}=tt?.internationalization;let o=e[t??r];return n&&!o&&(o=e[r]),o},mM=(e,t=!0)=>({id:"translation-plugin",canHandle:n=>typeof n=="object"&&n?.nodeType===G.Translation,transform:(n,r,o)=>{const s=structuredClone(n[G.Translation]);for(const l in s){const u={...r,children:s[l],keyPath:[...r.keyPath,{type:G.Translation,key:l}]};s[l]=o(s[l],u)}return hM(s,e,t)}}),pM={id:"enumeration-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===G.Enumeration,transform:(e,t,n)=>{const r=structuredClone(e[G.Enumeration]);for(const o in r){const s=r[o],l={...t,children:s,keyPath:[...t.keyPath,{type:G.Enumeration,key:o}]};r[o]=n(s,l)}return o=>eM(r,o)}},gM={id:"condition-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===G.Condition,transform:(e,t,n)=>{const r=structuredClone(e[G.Condition]);for(const o in r){const s=r[o],l={...t,children:s,keyPath:[...t.keyPath,{type:G.Condition,key:o}]};r[o]=n(s,l)}return o=>QP(r,o)}},yM={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===G.Insertion,transform:(e,t,n)=>{const r=[...t.keyPath,{type:G.Insertion}],o=e[G.Insertion];return n(o,{...t,children:o,keyPath:r,plugins:[{id:"insertion-string-plugin",canHandle:l=>typeof l=="string",transform:(l,u,d)=>{const h=d(l,{...u,children:l,plugins:[...(t.plugins??[]).filter(m=>m.id!=="intlayer-node-plugin")]});return m=>{const g=tM(h,m);return d(g,{...u,plugins:t.plugins,children:g})}}},...t.plugins??[]]})}},vM={id:"nested-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===G.Nested,transform:(e,t)=>fM(e.nested.dictionaryKey,e.nested.path,t)},bM={id:"file-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===G.File,transform:(e,t,n)=>n(e.content,{...t,children:e.content})},Zv=(e,t,n=tt?.internationalization.defaultLocale)=>{const r=[yM,mM(n),pM,gM,vM,bM,...t.plugins??[]];return Qd(e,{...t,plugins:r})},nA={method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"},_M=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),xd=e=>e.reduce((t,n)=>{const r=t??{},o=_M(n??{});return typeof r=="object"&&typeof o=="object"?{...r,...o}:o??r},{}),ke=async(e,...t)=>{const{signal:n}=new AbortController;let r="",o;const s=t.map(({body:_,params:A,headers:w,...R})=>R),l=xd([nA,...s]),u=xd([nA.headers,...t.map(_=>_.headers)]),d=xd(t.map(_=>_.params)),h=l.method;if(h!=="GET"&&h!=="HEAD"){const _=xd(t.map(A=>A.body));u?.["Content-Type"]==="application/x-www-form-urlencoded"?o=new URLSearchParams(_).toString():o=JSON.stringify(_)}Object.entries(d).length>0&&(r=`?${new URLSearchParams(d).toString()}`);const m={...l,headers:u,body:o,signal:n},g=`${e}${r}`,v=await fetch(g,m);if(!v.ok){const _=await v.json();throw new Error(JSON.stringify(_.error)??"An error occurred")}return await v.json()},EM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/dictionary`;return{getDictionaries:async(g,v={})=>await ke(r,e,v,{params:g}),getDictionariesKeys:async(g={})=>await ke(`${r}/keys`,e,g),getDictionary:async(g,v,_={})=>await ke(`${r}/${g}`,e,_,{params:v?{version:v.toString()}:void 0}),pushDictionaries:async(g,v={})=>await ke(`${r}`,e,v,{method:"PATCH",body:{dictionaries:g}}),addDictionary:async(g,v={})=>await ke(`${r}`,e,v,{method:"POST",body:g}),updateDictionary:async(g,v,_={})=>await ke(`${r}/${g}`,e,_,{method:"PUT",body:v}),deleteDictionary:async(g,v={})=>await ke(`${r}/${g}`,e,v,{method:"DELETE"})}},g1=e=>{const t=e?.editor?.backendURL??tt.editor?.backendURL,{clientId:n,clientSecret:r}=e?.editor??{};if(!t)throw new Error("Backend URL is not defined in the Intlayer configuration.");return{getOAuth2AccessToken:async(s={})=>await ke(`${t}/oauth2/token`,{},s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{grant_type:"client_credentials",client_id:n,client_secret:r}})}},xM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/ai`;return{customQuery:async(v,_={})=>await ke(r,e,_,{method:"POST",body:v}),translateJSON:async(v,_={})=>await ke(`${r}/translate/json`,e,_,{method:"POST",body:v}),auditContentDeclaration:async(v,_={})=>await ke(`${r}/audit/dictionary`,e,_,{method:"POST",body:v}),auditContentDeclarationField:async(v,_={})=>await ke(`${r}/audit/dictionary/field`,e,_,{method:"POST",body:v}),auditContentDeclarationMetadata:async(v,_={})=>await ke(`${r}/audit/dictionary/metadata`,e,_,{method:"POST",body:v}),auditTag:async(v,_={})=>await ke(`${r}/audit/tag`,e,_,{method:"POST",body:v}),askDocQuestion:async(v,_={})=>{if(!v)return;const{onMessage:A,onDone:w,...R}=v,S=new AbortController;try{const x=await fetch(`${r}/ask`,{method:"POST",headers:{"Content-Type":"application/json",...e.headers,..._.headers},body:JSON.stringify({...R,...e.body,..._.body}),signal:S.signal,credentials:"include"});if(!x.ok){let D="An error occurred";try{const I=await x.json();D=JSON.stringify(I.error)??"An error occurred"}catch{try{const I=await x.text();I&&(D=I)}catch{}}throw new Error(D)}const T=x.body?.getReader();if(!T)throw new Error("No reader available");const O=new TextDecoder;let C="";for(;;){const{done:D,value:I}=await T.read();if(D)break;C+=O.decode(I,{stream:!0});const M=C.split(`
51
- `);C=M.pop()??"";for(const H of M)if(H.startsWith("data: "))try{const K=JSON.parse(H.slice(6));K.chunk&&A?.(K.chunk),K.done&&K.response&&w?.(K.response)}catch(K){console.error("Failed to parse SSE data:",K)}}}catch(x){throw console.error("Error in askDocQuestion:",x),x}},autocomplete:async(v,_={})=>await ke(`${r}/autocomplete`,e,_,{method:"POST",body:v})}},SM=(e={},t)=>{const n=t?.editor?.editorURL??tt.editor?.editorURL;if(!n)throw new Error("Editor URL is not defined in the Intlayer configuration.");const r=`${n}/api`;return{getDictionaries:async(u={})=>(await ke(`${r}/dictionary`,e,u)).data,getConfiguration:async(u={})=>(await ke(`${r}/config`,e,u)).data,writeDictionary:async(u,d={})=>await ke(`${r}/dictionary`,e,d,{method:"POST",body:{dictionary:u}})}},AM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/newsletter`;return{subscribeToNewsletter:async(u,d={})=>await ke(`${r}/subscribe`,e,d,{method:"POST",body:u}),unsubscribeFromNewsletter:async(u,d={})=>await ke(`${r}/unsubscribe`,e,d,{method:"POST",body:u}),getNewsletterStatus:async(u={})=>await ke(`${r}/status`,e,u,{method:"GET"})}},wM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration--.");const r=`${n}/api/organization`;return{getOrganizations:async(_,A={})=>await ke(r,e,A,{params:_}),getOrganization:async(_,A={})=>await ke(`${r}/${String(_)}`,e,A),addOrganization:async(_,A={})=>await ke(r,e,A,{method:"POST",body:_}),addOrganizationMember:async(_,A={})=>ke(`${r}/member`,e,A,{method:"POST",body:_}),updateOrganization:async(_,A={})=>ke(r,e,A,{method:"PUT",body:_}),updateOrganizationMembers:async(_,A={})=>ke(`${r}/members`,e,A,{method:"PUT",body:_}),deleteOrganization:async(_={})=>await ke(r,e,_,{method:"DELETE"}),selectOrganization:async(_,A={})=>await ke(`${r}/${String(_)}`,e,A,{method:"PUT"}),unselectOrganization:async(_={})=>await ke(`${r}/logout`,e,_,{method:"POST"})}},TM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/project`;return{getProjects:async(w,R={})=>await ke(r,e,R,{params:w}),addProject:async(w,R={})=>await ke(`${r}`,e,R,{method:"POST",body:w}),updateProject:async(w,R={})=>await ke(`${r}`,e,R,{method:"PUT",body:w}),updateProjectMembers:async(w,R={})=>await ke(`${r}/members`,e,R,{method:"PUT",body:w}),pushProjectConfiguration:async(w,R={})=>await ke(`${r}/configuration`,e,R,{method:"PUT",body:w}),deleteProject:async(w={})=>await ke(`${r}`,e,w,{method:"DELETE"}),selectProject:async(w,R={})=>await ke(`${r}/${String(w)}`,e,R,{method:"PUT"}),unselectProject:async(w={})=>await ke(`${r}/logout`,e,w,{method:"POST"}),addNewAccessKey:async(w,R={})=>await ke(`${r}/access_key`,e,R,{method:"POST",body:w}),deleteAccessKey:async(w,R={})=>await ke(`${r}/access_key`,e,R,{method:"DELETE",body:{clientId:w}}),refreshAccessKey:async(w,R={})=>await ke(`${r}/access_key`,e,R,{method:"PATCH",body:{clientId:w}})}},RM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/search`;return{searchDoc:async(s,l={})=>await ke(`${r}/doc`,e,l,{method:"GET",params:s})}},CM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/stripe`;return{getPricing:async(u,d={})=>await ke(`${r}/pricing`,e,d,{method:"POST",body:u}),getSubscription:async(u,d={})=>await ke(`${r}/create-subscription`,e,d,{method:"POST",body:u}),cancelSubscription:async(u={})=>await ke(`${r}/cancel-subscription`,e,u,{method:"POST"})}},NM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/tag`;return{getTags:async(d,h={})=>await ke(r,e,h,{params:d}),addTag:async(d,h={})=>await ke(`${r}`,e,h,{method:"POST",body:d}),updateTag:async(d,h,m={})=>await ke(`${r}/${d}`,e,m,{method:"PUT",body:h}),deleteTag:async(d,h={})=>await ke(`${r}/${d}`,e,h,{method:"DELETE"})}},OM=(e={},t)=>{const n=t?.editor?.backendURL??tt.editor?.backendURL;if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/user`;return{createUser:async(v,_={})=>await ke(`${r}/`,e,_,{method:"POST",body:v}),getUsers:async(v,_={})=>await ke(r,e,_,{params:v}),getUserById:async(v,_={})=>await ke(`${r}/${v}`,e,_),getUserByAccount:async(v,_,A={})=>await ke(`${r}/account/${_}/${v}`,e,A),getUserByEmail:async(v,_={})=>await ke(`${r}/email/${v}`,e,_),updateUser:async(v,_={})=>await ke(`${r}`,e,_,{method:"PUT",body:v}),deleteUser:async(v,_={})=>await ke(`${r}/${v}`,e,_,{method:"DELETE"}),getVerifyEmailStatusURL:v=>`${r}/verify-email-status/${String(v)}`}},kM=(e={},t)=>({organization:wM(e,t),project:TM(e,t),user:OM(e,t),oAuth:g1(t),dictionary:EM(e,t),stripe:CM(e,t),ai:xM(e,t),tag:NM(e,t),search:RM(e,t),editor:SM(e,t),newsletter:AM(e,t)}),DM=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"}},y1=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),Jd=(e,t=e)=>new XP.DisplayNames(t,{type:"language"}).of(e)??"Unknown locale",IM=(e,t=tt.internationalization.locales)=>{const n=y1(e);let r=e;e.endsWith("/")&&(r=e.slice(0,-1));const o=n?new URL(r):new URL(r,"http://example.com"),s=o.pathname;s.startsWith("/")||(o.pathname=`/${s}`);const l=s.split("/"),u=l[1];if(t.includes(u)){l.splice(1,1);const d=l.join("/")??"/";o.pathname=d}return n?o.toString():o.toString().replace("http://example.com","")},LM=(e,t=tt.internationalization.locales,n=tt.internationalization.defaultLocale,r=tt.middleware.prefixDefault)=>{const o=IM(e,t),s=y1(o),l=s?new URL(o):new URL(o,"http://example.com");let u=l.pathname;u.startsWith("/")||(u=`/${u}`);const d=s?`${l.protocol}//${l.host}`:"";return t.reduce((m,g)=>{const v=g.toString()===n.toString();let A=r||!v?`/${g}${u}`:u;A.length>1&&A.endsWith("/")&&(A=A.slice(0,-1));const w=s?`${d}${A}${l.search}${l.hash}`:`${A}${l.search}${l.hash}`;return m[g]=w,m},{})},jM=(e,t,n=tt.internationalization.locales,r=tt.internationalization.defaultLocale,o=tt.middleware.prefixDefault)=>LM(e,n,r,o)[t],PM=(e,t=tt.internationalization.locales,n=tt.internationalization.defaultLocale)=>{const r=[e].flat(),o=s=>s.trim().toLowerCase();try{for(const s of r){const l=o(s),u=t.find(m=>o(m)===l);if(u)return u;const[d]=l.split("-"),h=t.find(m=>o(m).split("-")[0]===d);if(h)return h}}catch{}return n},Sd=e=>{const t=/{{\s*(\w+)\s*}}/g,n=[...e.matchAll(t)];return n.length===0?[]:n.map(r=>r[1])},MM=e=>{const t=()=>{if(typeof e=="string")return Sd(e);let n;if(typeof e=="function"?n=e():typeof e.then=="function"&&(n=async()=>Sd(await e)),typeof n=="string")return Sd(n);try{return Sd(JSON.stringify(e))}catch{return[]}};return h1(G.Insertion,e,{fields:t()})},zM=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(s=>{const l=s.trim();return l.startsWith('"')&&l.endsWith('"')||!isNaN(Number(l))?l:`"${l}"`}).join(", ")}]`),JSON.parse(t)},v1=e=>{try{const t=e.split(/\r?\n/),n=t.find(u=>u.trim()!=="");if(!n||n.trim()!=="---")return{};const r={};let o=!1,s=null,l=[];for(let u=0;u<t.length;u++){const d=t[u];if(d.trim()==="---")if(o){s&&l.length>0&&(r[s]=l);break}else{o=!0;continue}if(o){const m=d.match(/^\s*-\s+(.+)$/);if(m&&s){l.push(m[1].trim());continue}s&&l.length>0&&(r[s]=l,s=null,l=[]);const g=d.match(/^([^:]+)\s*:\s*(.*)$/);if(g){const v=g[1].trim(),_=g[2].trim();if(_==="")s=v,l=[];else try{r[v]=zM(_)}catch{r[v]=_}}}}return r}catch{return{}}},me=e=>h1(G.Translation,e),$c=(e,t)=>e.every((n,r)=>t[r]&&t[r].key===n.key&&t[r].type===n.type),VM=(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 o=n.pathname.replace(/\/$/,""),s=r.pathname.replace(/\/$/,"");return!(o!==""&&s!==""&&o!==s)}catch(n){return console.error("Invalid URL(s)",n),!1}},UM=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 En=(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_HOVERED_CONTENT_CHANGED="INTLAYER_HOVERED_CONTENT_CHANGED",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))(En||{});const sn=[];for(let e=0;e<256;++e)sn.push((e+256).toString(16).slice(1));function BM(e,t=0){return(sn[e[t+0]]+sn[e[t+1]]+sn[e[t+2]]+sn[e[t+3]]+"-"+sn[e[t+4]]+sn[e[t+5]]+"-"+sn[e[t+6]]+sn[e[t+7]]+"-"+sn[e[t+8]]+sn[e[t+9]]+"-"+sn[e[t+10]]+sn[e[t+11]]+sn[e[t+12]]+sn[e[t+13]]+sn[e[t+14]]+sn[e[t+15]]).toLowerCase()}let cg;const $M=new Uint8Array(16);function HM(){if(!cg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");cg=crypto.getRandomValues.bind(crypto)}return cg($M)}const FM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),rA={randomUUID:FM};function GM(e,t,n){if(rA.randomUUID&&!e)return rA.randomUUID();e=e||{};const r=e.random??e.rng?.()??HM();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,BM(r)}const{editor:ug}=tt,b1=E.createContext({postMessage:()=>null,allowedOrigins:[ug?.applicationURL,ug?.editorURL,ug?.cmsURL],senderId:""}),iA=({children:e,allowedOrigins:t,postMessage:n})=>{const r=E.useRef(GM()),o=E.useMemo(()=>({postMessage:n,allowedOrigins:t,senderId:r.current}),[n,t,r.current]);return y.jsx(b1.Provider,{value:o,children:e})},Yv=()=>E.useContext(b1),bs=(e,t,n)=>{const{allowedOrigins:r,postMessage:o,senderId:s}=Yv();return E.useEffect(()=>{if(t){const u=d=>{const{type:h,data:m,senderId:g}=d.data;h===e&&g!==s&&(typeof r>"u"||r?.some(v=>VM(v,d.origin))||r?.includes("*"))&&t(m)};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)}},[r,o,s,n]),u=>{o({type:e,data:u,senderId:s})}},KM=(e,t)=>typeof e=="function"?e(t):e,no=(e,t,n)=>{const{postMessage:r,senderId:o}=Yv(),{emit:s,receive:l}=n??{emit:!0,receive:!0},u=(_,A)=>{const w=KM(_,A);return s&&typeof r=="function"&&typeof w<"u"&&r({type:`${e}/post`,data:w,senderId:o}),w},d=()=>{typeof r=="function"&&r({type:`${e}/post`,data:h,senderId:o})},[h,m]=E.useState(()=>u(t)),g=_=>m(A=>u(_,A));bs(`${e}/post`,l?_=>{m(_)}:void 0);const v=(_,A)=>{s&&typeof r=="function"&&A!==o&&(typeof h>"u"||r({type:`${e}/post`,data:h,senderId:o}))};return bs(`${e}/get`,s?v:void 0,h),E.useEffect(()=>{l&&typeof r=="function"&&typeof h>"u"&&r({type:`${e}/get`,senderId:o})},[]),[h,g,d]},_1=E.createContext(void 0),qM=({children:e,configuration:t})=>y.jsx(_1.Provider,{value:t,children:e}),Hr=()=>E.useContext(_1),E1=E.createContext(void 0),x1=E.createContext(void 0),ZM=({children:e})=>{const[t,n]=no(En.INTLAYER_LOCALE_DICTIONARIES_CHANGED,void 0),r=E.useMemo(()=>({localeDictionaries:t??{}}),[t]),o=E.useMemo(()=>({setLocaleDictionaries:n,setLocaleDictionary:s=>{n(l=>({...l,[s.key]:s}))}}),[n]);return y.jsx(E1.Provider,{value:r,children:y.jsx(x1.Provider,{value:o,children:e})})},rh=()=>E.useContext(x1),S1=()=>{const e=rh(),t=E.useContext(E1);if(!t)throw new Error("useDictionariesRecordStates must be used within a DictionariesRecordProvider");return{...t,...e}},A1=E.createContext(void 0),YM=e=>bs(`${En.INTLAYER_EDITED_CONTENT_CHANGED}/get`,e),w1=E.createContext(void 0),oA=(e,t)=>typeof e=="function"?e(t):e,WM=({children:e})=>{const{localeDictionaries:t}=S1(),[n,r]=no(En.INTLAYER_EDITED_CONTENT_CHANGED),o=_=>{let A=oA(_);return r(w=>(A=oA(_,w?.[A.key]),{...w,[A.key]:A})),A},s=(_,A)=>{r(w=>({...w,[_]:{...w?.[_],content:A}}))},l=(_,A,w=[],R=!0)=>{r(S=>{const x=t[_]?.content,T=structuredClone(S?.[_]?.content??x);let O=w;if(!R){let D=0;const I=w.slice(0,-1),M=w[w.length-1];let H=M.key;for(;typeof Pr(T,O)<"u";)D++,H=D===0?M.key:`${M.key} (${D})`,O=[...I,{...M,key:H}]}const C=eA(T,O,A);return{...S,[_]:{...S?.[_],content:C}}})},u=(_,A,w=[])=>{r(R=>{const S=t[_]?.content,x=structuredClone(R?.[_]?.content??S),T=KP(x,A,w);return{...R,[_]:{...R?.[_],content:T}}})},d=(_,A)=>{r(w=>{const R=t[_]?.content,S=structuredClone(w?.[_]?.content??R),x=Pr(R,A),T=eA(S,A,x);return{...w,[_]:{...w?.[_],content:T}}})},h=_=>{r(A=>{const w={...A};return delete w[_],w})},m=_=>{r(A=>Object.entries(A).reduce((R,[S,x])=>S===_?R:{...R,[S]:x},{}))},g=()=>{r({})},v=(_,A)=>{const w=n?.[_]?.content??{};return Pr(w,A)};return y.jsx(A1.Provider,{value:{editedContent:n},children:y.jsx(w1.Provider,{value:{setEditedContentState:r,setEditedDictionary:o,setEditedContent:s,addEditedContent:l,renameEditedContent:u,removeEditedContent:d,restoreEditedContent:h,clearEditedDictionaryContent:m,clearEditedContent:g,getEditedContentValue:v},children:e})})},Ns=()=>E.useContext(w1),xn=()=>{const e=E.useContext(A1),t=Ns();return{...e,...t}},T1=E.createContext({enabled:!1}),XM=e=>no(En.INTLAYER_EDITOR_ENABLED,!1,e),QM=e=>bs(`${En.INTLAYER_EDITOR_ENABLED}/post`,e),R1=e=>bs(`${En.INTLAYER_EDITOR_ENABLED}/get`,e),JM=({children:e})=>{const[t]=XM({emit:!1,receive:!0});return y.jsx(T1.Provider,{value:{enabled:t},children:e})},C1=()=>E.useContext(T1),N1=E.createContext(void 0),O1=E.createContext(void 0),ez=({children:e})=>{const[t,n]=no(En.INTLAYER_FOCUSED_CONTENT_CHANGED,null),r=o=>{n(s=>s&&{...s,keyPath:o})};return y.jsx(N1.Provider,{value:{focusedContent:t},children:y.jsx(O1.Provider,{value:{setFocusedContent:n,setFocusedContentKeyPath:r},children:e})})},Wv=()=>{const e=E.useContext(O1);if(e===void 0)throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");return e},co=()=>{const e=Wv(),t=E.useContext(N1);if(t===void 0)throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");return{...t,...e}},aA=({children:e})=>{const t=YM();return E.useEffect(()=>{t()},[]),y.jsx(ZM,{children:y.jsx(WM,{children:y.jsx(ez,{children:e})})})},tz=({children:e,fallback:t})=>{const n=R1(),{enabled:r}=C1();return E.useEffect(()=>{r||n()},[r]),r?e:t},nz=({children:e,fallback:t})=>{const[n,r]=E.useState(!1);return E.useEffect(()=>{r(window.self!==window.top)},[]),n?e:t},rz=({children:e,configuration:t,...n})=>y.jsx(JM,{children:y.jsx(qM,{configuration:t,children:n.mode==="editor"?y.jsx(iA,{...n,children:y.jsx(aA,{children:e})}):y.jsx(nz,{fallback:e,children:y.jsx(iA,{...n,children:y.jsx(tz,{fallback:e,children:y.jsx(aA,{children:e})})})})})}),iz=(e,t)=>no(En.INTLAYER_URL_CHANGE,e,t),oz=()=>bs(En.INTLAYER_IFRAME_CLICKED,UM);/*! js-cookie v3.0.5 | MIT */function Ad(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 az={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 Ty(e,t){function n(o,s,l){if(!(typeof document>"u")){l=Ad({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),o=encodeURIComponent(o).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=o+"="+e.write(s,o)+u}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],l={},u=0;u<s.length;u++){var d=s[u].split("="),h=d.slice(1).join("=");try{var m=decodeURIComponent(d[0]);if(l[m]=e.read(h,m),o===m)break}catch{}}return o?l[o]:l}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",Ad({},s,{expires:-1}))},withAttributes:function(o){return Ty(this.converter,Ad({},this.attributes,o))},withConverter:function(o){return Ty(Ad({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var k1=Ty(az,{path:"/"});const{cookieName:D1}=tt.middleware,sz={path:"/",expires:void 0,domain:void 0,secure:!1,sameSite:"strict"},Xv=k1.get(D1),I1=e=>{k1.set(D1,e,sz)},lz=()=>({localeCookie:Xv,setLocaleCookie:I1}),ih=E.createContext({locale:Xv??tt?.internationalization?.defaultLocale,setLocale:()=>null,disableEditor:!1}),cz=()=>E.useContext(ih),uz=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:o})=>{const{internationalization:s}=tt??{},{defaultLocale:l,locales:u}=s??{},d=e??Xv??t??l,[h,m]=no(En.INTLAYER_CURRENT_LOCALE,d),v=r??(A=>{if(h.toString()!==A.toString()){if(!u?.map(String).includes(A)){console.error(`Locale ${A} is not available`);return}m(A),I1(A)}}),_=PM(e??h);return y.jsx(ih.Provider,{value:{locale:_,setLocale:v,disableEditor:o},children:n})},_f=({children:e,value:t,additionalProps:n})=>{const r=E.isValidElement(e)?e:y.jsx(y.Fragment,{children:e});return new Proxy(r,{get(o,s,l){return s==="value"?t:n&&Object.keys(n).includes(s)?n[s]:Reflect.get(o,s,l)}})},Qv=({onLocaleChange:e}={})=>{const{defaultLocale:t,locales:n}=tt?.internationalization??{},{locale:r,setLocale:o}=E.useContext(ih),{setLocaleCookie:s}=lz(),l=E.useCallback(u=>{if(!n?.map(String).includes(u)){console.error(`Locale ${u} is not available`);return}o(u),s(u),e?.(u)},[n,e,s,o]);return{locale:r,defaultLocale:t,availableLocales:n,setLocale:l}},dz=250,fz=({children:e,onPress:t,onHover:n,onUnhover:r,onClickOutside:o,pressDuration:s=dz,isSelecting:l,...u})=>{const d=E.useRef(null),[h,m]=E.useState(!1),[g,v]=E.useState(l),_=E.useRef(null),A=typeof e=="string",w=()=>{v(!0),t()},R=()=>{_.current=setTimeout(()=>{w()},s)},S=()=>{_.current&&(clearTimeout(_.current),_.current=null)},x=()=>{S(),R()},T=()=>{m(!0),n?.()},O=()=>{r?.(),m(!1),S()},C=E.useCallback(M=>{d.current&&!d.current.contains(M.target)&&(v(!1),o?.())},[o]);E.useEffect(()=>(document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}),[C]);const D=M=>{g&&(M.preventDefault(),M.stopPropagation())},I=()=>{v(!1)};return y.jsx("span",{style:{display:A?"inline":"inline-block",cursor:"pointer",userSelect:"none",borderRadius:"0.375rem",outlineWidth:"2px",outlineOffset:"4px",outlineStyle:"solid",outlineColor:l||g||h?"inherit":"transparent",transition:"all 100ms 50ms ease-in-out"},role:"button",tabIndex:0,onKeyUp:()=>null,onClick:D,onMouseDown:x,onMouseUp:O,onMouseLeave:O,onTouchStart:x,onTouchEnd:O,onTouchCancel:O,onBlur:I,onMouseEnter:T,ref:d,...u,children:e})},hz=({children:e,dictionaryKey:t,keyPath:n})=>{const{focusedContent:r,setFocusedContent:o}=co(),{postMessage:s,senderId:l}=Yv(),u=E.useCallback(()=>o({dictionaryKey:t,keyPath:n}),[t,n]),d=E.useCallback(()=>s({type:`${En.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,data:{dictionaryKey:t,keyPath:n},senderId:l}),[t,n]),h=E.useCallback(()=>s({type:`${En.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,data:null,senderId:l}),[l]),m=E.useMemo(()=>(r?.dictionaryKey===t&&(r?.keyPath?.length??0)>0&&$c(r?.keyPath??[],n))??!1,[r,n,t]);return y.jsx(fz,{onPress:u,onHover:d,onUnhover:h,isSelecting:m,children:e})},Ef=({children:e,...t})=>{const{enabled:n}=C1(),{disableEditor:r}=cz();return n&&!r?y.jsx(hz,{...t,children:e}):e},Jv=({dictionaryKey:e,keyPath:t,children:n})=>{const r=Ns();return r?r.getEditedContentValue(e,t)??n:n},mz=e=>{const t=Jv(e);if(typeof t=="object"){const n=Zv(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},pz=E.createContext({renderMarkdown:e=>e}),gz=()=>E.useContext(pz),yz=({dictionaryKey:e,keyPath:t,children:n,locale:r})=>{const{renderMarkdown:o}=gz(),s=Jv({dictionaryKey:e,keyPath:t,children:n});if(typeof s!="string"){const l=Zv(s,{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)}`),o(n)):o(l)}return o(s)},vz=({dictionaryKey:e,keyPath:t,children:n,metadataKeyPath:r})=>{const o=Jv({dictionaryKey:e,keyPath:t,children:n}),s=v1(o);return Pr(s,r)},L1=e=>{if(typeof e=="string")return e;const n=(s=>{if(s?.props&&typeof s.props.children=="object"){const l=[],{children:u}=s.props;return Object.keys(u??{}).forEach(d=>{l.push(L1((u??{})[d]))}),{...s,props:{...s.props,children:l}}}return{...s,props:{...s.props,children:s.props?.children??[]}}})(e),{type:r,props:o}=n;return E.createElement(r??"span",o,...o.children)},bz={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:t,...n})=>_f({...n,value:n.children,children:E.createElement(Ef,{...n,key:n.children},y.jsx(mz,{...n,children:n.children}))})},_z={id:"react-node-plugin",canHandle:e=>typeof e=="object"&&typeof e.props<"u"&&typeof e.key<"u",transform:(e,{plugins:t,...n})=>_f({...n,value:"[[react-element]]",children:y.jsx(Ef,{...n,children:L1(e)})})},Ez={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,t,n)=>{const{plugins:r,...o}=t,s=v1(e),u=n(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:d=>typeof d=="string"||typeof d=="number"||typeof d=="boolean"||!d,transform:(d,h)=>_f({...h,value:d,children:y.jsx(Ef,{...o,children:y.jsx(vz,{...o,metadataKeyPath:h.keyPath,children:e})})})}],dictionaryKey:o.dictionaryKey,keyPath:[]});return _f({...t,value:e,children:y.jsx(Ef,{...o,children:y.jsx(yz,{...o,children:e})}),additionalProps:{metadata:u}})}},xz={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===G.Markdown,transform:(e,t,n)=>{const r=[...t.keyPath,{type:G.Markdown}],o=e[G.Markdown];return n(o,{...t,children:o,keyPath:r,plugins:[Ez,...t.plugins??[]]})}},Sz=(e,t,n)=>p1(e,t,[bz,_z,xz]),Pt=(e,t)=>{const{locale:n}=E.useContext(ih);return E.useMemo(()=>Sz(e,n),[e,n,t])};/**
52
- * react-router v7.8.0
53
- *
54
- * Copyright (c) Remix Software Inc.
55
- *
56
- * This source code is licensed under the MIT license found in the
57
- * LICENSE.md file in the root directory of this source tree.
58
- *
59
- * @license MIT
60
- */var sA="popstate";function Az(e={}){function t(r,o){let{pathname:s,search:l,hash:u}=r.location;return Ry("",{pathname:s,search:l,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Ac(o)}return Tz(t,n,null,e)}function wt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wz(){return Math.random().toString(36).substring(2,10)}function lA(e,t){return{usr:e.state,key:e.key,idx:t}}function Ry(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Os(t):t,state:n,key:t&&t.key||r||wz()}}function Ac({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 Os(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 Tz(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:s=!1}=r,l=o.history,u="POP",d=null,h=m();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function m(){return(l.state||{idx:null}).idx}function g(){u="POP";let R=m(),S=R==null?null:R-h;h=R,d&&d({action:u,location:w.location,delta:S})}function v(R,S){u="PUSH";let x=Ry(w.location,R,S);h=m()+1;let T=lA(x,h),O=w.createHref(x);try{l.pushState(T,"",O)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(O)}s&&d&&d({action:u,location:w.location,delta:1})}function _(R,S){u="REPLACE";let x=Ry(w.location,R,S);h=m();let T=lA(x,h),O=w.createHref(x);l.replaceState(T,"",O),s&&d&&d({action:u,location:w.location,delta:0})}function A(R){return Rz(R)}let w={get action(){return u},get location(){return e(o,l)},listen(R){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(sA,g),d=R,()=>{o.removeEventListener(sA,g),d=null}},createHref(R){return t(o,R)},createURL:A,encodeLocation(R){let S=A(R);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:v,replace:_,go(R){return l.go(R)}};return w}function Rz(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),wt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ac(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function j1(e,t,n="/"){return Cz(e,t,n,!1)}function Cz(e,t,n,r){let o=typeof t=="string"?Os(t):t,s=pi(o.pathname||"/",n);if(s==null)return null;let l=P1(e);Nz(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let h=Uz(s);u=zz(l[d],h,r)}return u}function P1(e,t=[],n=[],r=""){let o=(s,l,u)=>{let d={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};d.relativePath.startsWith("/")&&(wt(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 h=mi([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&(wt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),P1(s.children,t,m,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:Pz(h,s.index),routesMeta:m})};return e.forEach((s,l)=>{if(s.path===""||!s.path?.includes("?"))o(s,l);else for(let u of M1(s.path))o(s,l,u)}),t}function M1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let l=M1(r.join("/")),u=[];return u.push(...l.map(d=>d===""?s:[s,d].join("/"))),o&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function Nz(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Mz(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Oz=/^:[\w-]+$/,kz=3,Dz=2,Iz=1,Lz=10,jz=-2,cA=e=>e==="*";function Pz(e,t){let n=e.split("/"),r=n.length;return n.some(cA)&&(r+=jz),t&&(r+=Dz),n.filter(o=>!cA(o)).reduce((o,s)=>o+(Oz.test(s)?kz:s===""?Iz:Lz),r)}function Mz(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function zz(e,t,n=!1){let{routesMeta:r}=e,o={},s="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],h=u===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",g=xf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),v=d.route;if(!g&&h&&n&&!r[r.length-1].route.index&&(g=xf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(o,g.params),l.push({params:o,pathname:mi([s,g.pathname]),pathnameBase:Fz(mi([s,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(s=mi([s,g.pathnameBase]))}return l}function xf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Vz(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],l=s.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:g},v)=>{if(m==="*"){let A=u[v]||"";l=s.slice(0,s.length-A.length).replace(/(.)\/+$/,"$1")}const _=u[v];return g&&!_?h[m]=void 0:h[m]=(_||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:l,pattern:e}}function Vz(e,t=!1,n=!0){Br(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=[],o="^"+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:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Uz(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Br(!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 pi(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 Bz(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Os(e):e;return{pathname:n?n.startsWith("/")?n:$z(n,t):t,search:Gz(r),hash:Kz(o)}}function $z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function dg(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 Hz(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function z1(e){let t=Hz(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function V1(e,t,n,r=!1){let o;typeof e=="string"?o=Os(e):(o={...e},wt(!o.pathname||!o.pathname.includes("?"),dg("?","pathname","search",o)),wt(!o.pathname||!o.pathname.includes("#"),dg("#","pathname","hash",o)),wt(!o.search||!o.search.includes("#"),dg("#","search","hash",o)));let s=e===""||o.pathname==="",l=s?"/":o.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let v=l.split("/");for(;v[0]==="..";)v.shift(),g-=1;o.pathname=v.join("/")}u=g>=0?t[g]:"/"}let d=Bz(o,u),h=l&&l!=="/"&&l.endsWith("/"),m=(s||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var mi=e=>e.join("/").replace(/\/\/+/g,"/"),Fz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Gz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Kz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qz(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var U1=["POST","PUT","PATCH","DELETE"];new Set(U1);var Zz=["GET",...U1];new Set(Zz);var ks=E.createContext(null);ks.displayName="DataRouter";var oh=E.createContext(null);oh.displayName="DataRouterState";E.createContext(!1);var B1=E.createContext({isTransitioning:!1});B1.displayName="ViewTransition";var Yz=E.createContext(new Map);Yz.displayName="Fetchers";var Wz=E.createContext(null);Wz.displayName="Await";var Fr=E.createContext(null);Fr.displayName="Navigation";var Hc=E.createContext(null);Hc.displayName="Location";var Ei=E.createContext({outlet:null,matches:[],isDataRoute:!1});Ei.displayName="Route";var eb=E.createContext(null);eb.displayName="RouteError";function Xz(e,{relative:t}={}){wt(Fc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(Fr),{hash:o,pathname:s,search:l}=Gc(e,{relative:t}),u=s;return n!=="/"&&(u=s==="/"?n:mi([n,s])),r.createHref({pathname:u,search:l,hash:o})}function Fc(){return E.useContext(Hc)!=null}function uo(){return wt(Fc(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Hc).location}var $1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function H1(e){E.useContext(Fr).static||E.useLayoutEffect(e)}function Qz(){let{isDataRoute:e}=E.useContext(Ei);return e?dV():Jz()}function Jz(){wt(Fc(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(ks),{basename:t,navigator:n}=E.useContext(Fr),{matches:r}=E.useContext(Ei),{pathname:o}=uo(),s=JSON.stringify(z1(r)),l=E.useRef(!1);return H1(()=>{l.current=!0}),E.useCallback((d,h={})=>{if(Br(l.current,$1),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=V1(d,JSON.parse(s),o,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:mi([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,o,e])}E.createContext(null);function Gc(e,{relative:t}={}){let{matches:n}=E.useContext(Ei),{pathname:r}=uo(),o=JSON.stringify(z1(n));return E.useMemo(()=>V1(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function eV(e,t){return F1(e,t)}function F1(e,t,n,r){wt(Fc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=E.useContext(Fr),{matches:s}=E.useContext(Ei),l=s[s.length-1],u=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",m=l&&l.route;{let S=m&&m.path||"";G1(d,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) 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.
61
-
62
- Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let g=uo(),v;if(t){let S=typeof t=="string"?Os(t):t;wt(h==="/"||S.pathname?.startsWith(h),`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 "${h}" but pathname "${S.pathname}" was given in the \`location\` prop.`),v=S}else v=g;let _=v.pathname||"/",A=_;if(h!=="/"){let S=h.replace(/^\//,"").split("/");A="/"+_.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=j1(e,{pathname:A});Br(m||w!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Br(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.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 R=oV(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},u,S.params),pathname:mi([h,o.encodeLocation?o.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:mi([h,o.encodeLocation?o.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),s,n,r);return t&&R?E.createElement(Hc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},R):R}function tV(){let e=uV(),t=qz(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)",o={padding:"0.5rem",backgroundColor:r},s={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:s},"ErrorBoundary")," or"," ",E.createElement("code",{style:s},"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:o},n):null,l)}var nV=E.createElement(tV,null),rV=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(Ei.Provider,{value:this.props.routeContext},E.createElement(eb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function iV({routeContext:e,match:t,children:n}){let r=E.useContext(ks);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Ei.Provider,{value:e},n)}function oV(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 o=e,s=n?.errors;if(s!=null){let d=o.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);wt(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:m,errors:g}=n,v=h.route.loader&&!m.hasOwnProperty(h.route.id)&&(!g||g[h.route.id]===void 0);if(h.route.lazy||v){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,m)=>{let g,v=!1,_=null,A=null;n&&(g=s&&h.route.id?s[h.route.id]:void 0,_=h.route.errorElement||nV,l&&(u<0&&m===0?(G1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,A=null):u===m&&(v=!0,A=h.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,m+1)),R=()=>{let S;return g?S=_:v?S=A:h.route.Component?S=E.createElement(h.route.Component,null):h.route.element?S=h.route.element:S=d,E.createElement(iV,{match:h,routeContext:{outlet:d,matches:w,isDataRoute:n!=null},children:S})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?E.createElement(rV,{location:n.location,revalidation:n.revalidation,component:_,error:g,children:R(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):R()},null)}function tb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aV(e){let t=E.useContext(ks);return wt(t,tb(e)),t}function sV(e){let t=E.useContext(oh);return wt(t,tb(e)),t}function lV(e){let t=E.useContext(Ei);return wt(t,tb(e)),t}function nb(e){let t=lV(e),n=t.matches[t.matches.length-1];return wt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function cV(){return nb("useRouteId")}function uV(){let e=E.useContext(eb),t=sV("useRouteError"),n=nb("useRouteError");return e!==void 0?e:t.errors?.[n]}function dV(){let{router:e}=aV("useNavigate"),t=nb("useNavigate"),n=E.useRef(!1);return H1(()=>{n.current=!0}),E.useCallback(async(o,s={})=>{Br(n.current,$1),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...s}))},[e,t])}var uA={};function G1(e,t,n){!t&&!uA[e]&&(uA[e]=!0,Br(!1,n))}E.memo(fV);function fV({routes:e,future:t,state:n}){return F1(e,void 0,n,t)}function K1(e){wt(!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 hV({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:s=!1}){wt(!Fc(),"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:o,static:s,future:{}}),[l,o,s]);typeof n=="string"&&(n=Os(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:v="default"}=n,_=E.useMemo(()=>{let A=pi(d,l);return A==null?null:{location:{pathname:A,search:h,hash:m,state:g,key:v},navigationType:r}},[l,d,h,m,g,v,r]);return Br(_!=null,`<Router basename="${l}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:E.createElement(Fr.Provider,{value:u},E.createElement(Hc.Provider,{children:t,value:_}))}function mV({children:e,location:t}){return eV(Cy(e),t)}function Cy(e,t=[]){let n=[];return E.Children.forEach(e,(r,o)=>{if(!E.isValidElement(r))return;let s=[...t,o];if(r.type===E.Fragment){n.push.apply(n,Cy(r.props.children,s));return}wt(r.type===K1,`[${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>`),wt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||s.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,s)),n.push(l)}),n}var ef="get",tf="application/x-www-form-urlencoded";function ah(e){return e!=null&&typeof e.tagName=="string"}function pV(e){return ah(e)&&e.tagName.toLowerCase()==="button"}function gV(e){return ah(e)&&e.tagName.toLowerCase()==="form"}function yV(e){return ah(e)&&e.tagName.toLowerCase()==="input"}function vV(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bV(e,t){return e.button===0&&(!t||t==="_self")&&!vV(e)}var wd=null;function _V(){if(wd===null)try{new FormData(document.createElement("form"),0),wd=!1}catch{wd=!0}return wd}var EV=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fg(e){return e!=null&&!EV.has(e)?(Br(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tf}"`),null):e}function xV(e,t){let n,r,o,s,l;if(gV(e)){let u=e.getAttribute("action");r=u?pi(u,t):null,n=e.getAttribute("method")||ef,o=fg(e.getAttribute("enctype"))||tf,s=new FormData(e)}else if(pV(e)||yV(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?pi(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||ef,o=fg(e.getAttribute("formenctype"))||fg(u.getAttribute("enctype"))||tf,s=new FormData(u,e),!_V()){let{name:h,type:m,value:g}=e;if(m==="image"){let v=h?`${h}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else h&&s.append(h,g)}}else{if(ah(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ef,r=null,o=tf,l=e}return s&&o==="text/plain"&&(l=s,s=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function SV(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&pi(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function AV(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 wV(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 TV(e,t,n){let r=await Promise.all(e.map(async o=>{let s=t.routes[o.route.id];if(s){let l=await AV(s,n);return l.links?l.links():[]}return[]}));return OV(r.flat(1).filter(wV).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function dA(e,t,n,r,o,s){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,u=(d,h)=>n[h].pathname!==d.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==d.params["*"];return s==="assets"?t.filter((d,h)=>l(d,h)||u(d,h)):s==="data"?t.filter((d,h)=>{let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,h)||u(d,h))return!0;if(d.route.shouldRevalidate){let g=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function RV(e,t,{includeHydrateFallback:n}={}){return CV(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function CV(e){return[...new Set(e)]}function NV(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function OV(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let s=JSON.stringify(NV(o));return n.has(s)||(n.add(s),r.push({key:s,link:o})),r},[])}function q1(){let e=E.useContext(ks);return rb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function kV(){let e=E.useContext(oh);return rb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ib=E.createContext(void 0);ib.displayName="FrameworkContext";function Z1(){let e=E.useContext(ib);return rb(e,"You must render this element inside a <HydratedRouter> element"),e}function DV(e,t){let n=E.useContext(ib),[r,o]=E.useState(!1),[s,l]=E.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:g}=t,v=E.useRef(null);E.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=S=>{S.forEach(x=>{l(x.isIntersecting)})},R=new IntersectionObserver(w,{threshold:.5});return v.current&&R.observe(v.current),()=>{R.disconnect()}}},[e]),E.useEffect(()=>{if(r){let w=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(w)}}},[r]);let _=()=>{o(!0)},A=()=>{o(!1),l(!1)};return n?e!=="intent"?[s,v,{}]:[s,v,{onFocus:Fl(u,_),onBlur:Fl(d,A),onMouseEnter:Fl(h,_),onMouseLeave:Fl(m,A),onTouchStart:Fl(g,_)}]:[!1,v,{}]}function Fl(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function IV({page:e,...t}){let{router:n}=q1(),r=E.useMemo(()=>j1(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?E.createElement(jV,{page:e,matches:r,...t}):null}function LV(e){let{manifest:t,routeModules:n}=Z1(),[r,o]=E.useState([]);return E.useEffect(()=>{let s=!1;return TV(e,t,n).then(l=>{s||o(l)}),()=>{s=!0}},[e,t,n]),r}function jV({page:e,matches:t,...n}){let r=uo(),{manifest:o,routeModules:s}=Z1(),{basename:l}=q1(),{loaderData:u,matches:d}=kV(),h=E.useMemo(()=>dA(e,t,d,o,r,"data"),[e,t,d,o,r]),m=E.useMemo(()=>dA(e,t,d,o,r,"assets"),[e,t,d,o,r]),g=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let A=new Set,w=!1;if(t.forEach(S=>{let x=o.routes[S.route.id];!x||!x.hasLoader||(!h.some(T=>T.route.id===S.route.id)&&S.route.id in u&&s[S.route.id]?.shouldRevalidate||x.hasClientLoader?w=!0:A.add(S.route.id))}),A.size===0)return[];let R=SV(e,l,"data");return w&&A.size>0&&R.searchParams.set("_routes",t.filter(S=>A.has(S.route.id)).map(S=>S.route.id).join(",")),[R.pathname+R.search]},[l,u,r,o,h,t,e,s]),v=E.useMemo(()=>RV(m,o),[m,o]),_=LV(m);return E.createElement(E.Fragment,null,g.map(A=>E.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...n})),v.map(A=>E.createElement("link",{key:A,rel:"modulepreload",href:A,...n})),_.map(({key:A,link:w})=>E.createElement("link",{key:A,nonce:n.nonce,...w})))}function PV(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Y1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Y1&&(window.__reactRouterVersion="7.8.0")}catch{}function MV({basename:e,children:t,window:n}){let r=E.useRef();r.current==null&&(r.current=Az({window:n,v5Compat:!0}));let o=r.current,[s,l]=E.useState({action:o.action,location:o.location}),u=E.useCallback(d=>{E.startTransition(()=>l(d))},[l]);return E.useLayoutEffect(()=>o.listen(u),[o,u]),E.createElement(hV,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o})}var W1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X1=E.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:s,replace:l,state:u,target:d,to:h,preventScrollReset:m,viewTransition:g,...v},_){let{basename:A}=E.useContext(Fr),w=typeof h=="string"&&W1.test(h),R,S=!1;if(typeof h=="string"&&w&&(R=h,Y1))try{let H=new URL(window.location.href),K=h.startsWith("//")?new URL(H.protocol+h):new URL(h),Z=pi(K.pathname,A);K.origin===H.origin&&Z!=null?h=Z+K.search+K.hash:S=!0}catch{Br(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Xz(h,{relative:o}),[T,O,C]=DV(r,v),D=BV(h,{replace:l,state:u,target:d,preventScrollReset:m,relative:o,viewTransition:g});function I(H){t&&t(H),H.defaultPrevented||D(H)}let M=E.createElement("a",{...v,...C,href:R||x,onClick:S||s?t:I,ref:PV(_,O),target:d,"data-discover":!w&&n==="render"?"true":void 0});return T&&!w?E.createElement(E.Fragment,null,M,E.createElement(IV,{page:x})):M});X1.displayName="Link";var zV=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:s,to:l,viewTransition:u,children:d,...h},m){let g=Gc(l,{relative:h.relative}),v=uo(),_=E.useContext(oh),{navigator:A,basename:w}=E.useContext(Fr),R=_!=null&&KV(g)&&u===!0,S=A.encodeLocation?A.encodeLocation(g).pathname:g.pathname,x=v.pathname,T=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;n||(x=x.toLowerCase(),T=T?T.toLowerCase():null,S=S.toLowerCase()),T&&w&&(T=pi(T,w)||T);const O=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let C=x===S||!o&&x.startsWith(S)&&x.charAt(O)==="/",D=T!=null&&(T===S||!o&&T.startsWith(S)&&T.charAt(S.length)==="/"),I={isActive:C,isPending:D,isTransitioning:R},M=C?t:void 0,H;typeof r=="function"?H=r(I):H=[r,C?"active":null,D?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let K=typeof s=="function"?s(I):s;return E.createElement(X1,{...h,"aria-current":M,className:H,ref:m,style:K,to:l,viewTransition:u},typeof d=="function"?d(I):d)});zV.displayName="NavLink";var VV=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:s,method:l=ef,action:u,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:g,...v},_)=>{let A=FV(),w=GV(u,{relative:h}),R=l.toLowerCase()==="get"?"get":"post",S=typeof u=="string"&&W1.test(u),x=T=>{if(d&&d(T),T.defaultPrevented)return;T.preventDefault();let O=T.nativeEvent.submitter,C=O?.getAttribute("formmethod")||l;A(O||T.currentTarget,{fetcherKey:t,method:C,navigate:n,replace:o,state:s,relative:h,preventScrollReset:m,viewTransition:g})};return E.createElement("form",{ref:_,method:R,action:w,onSubmit:r?d:x,...v,"data-discover":!S&&e==="render"?"true":void 0})});VV.displayName="Form";function UV(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Q1(e){let t=E.useContext(ks);return wt(t,UV(e)),t}function BV(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:s,viewTransition:l}={}){let u=Qz(),d=uo(),h=Gc(e,{relative:s});return E.useCallback(m=>{if(bV(m,t)){m.preventDefault();let g=n!==void 0?n:Ac(d)===Ac(h);u(e,{replace:g,state:r,preventScrollReset:o,relative:s,viewTransition:l})}},[d,u,h,n,r,t,e,o,s,l])}var $V=0,HV=()=>`__${String(++$V)}__`;function FV(){let{router:e}=Q1("useSubmit"),{basename:t}=E.useContext(Fr),n=cV();return E.useCallback(async(r,o={})=>{let{action:s,method:l,encType:u,formData:d,body:h}=xV(r,t);if(o.navigate===!1){let m=o.fetcherKey||HV();await e.fetch(m,n,o.action||s,{preventScrollReset:o.preventScrollReset,formData:d,body:h,formMethod:o.method||l,formEncType:o.encType||u,flushSync:o.flushSync})}else await e.navigate(o.action||s,{preventScrollReset:o.preventScrollReset,formData:d,body:h,formMethod:o.method||l,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function GV(e,{relative:t}={}){let{basename:n}=E.useContext(Fr),r=E.useContext(Ei);wt(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...Gc(e||".",{relative:t})},l=uo();if(e==null){s.search=l.search;let u=new URLSearchParams(s.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(g=>g).forEach(g=>u.append("index",g));let m=u.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:mi([n,s.pathname])),Ac(s)}function KV(e,{relative:t}={}){let n=E.useContext(B1);wt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Q1("useViewTransitionState"),o=Gc(e,{relative:t});if(!n.isTransitioning)return!1;let s=pi(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=pi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return xf(o.pathname,l)!=null||xf(o.pathname,s)!=null}var sa=f1();const qV=nh(sa);/**
63
- * @license lucide-react v0.539.0 - ISC
64
- *
65
- * This source code is licensed under the ISC license.
66
- * See the LICENSE file in the root directory of this source tree.
67
- */const ZV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),fA=e=>{const t=YV(e);return t.charAt(0).toUpperCase()+t.slice(1)},J1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),WV=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
68
- * @license lucide-react v0.539.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */var XV={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"};/**
73
- * @license lucide-react v0.539.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */const QV=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:l,...u},d)=>E.createElement("svg",{ref:d,...XV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:J1("lucide",o),...!s&&!WV(u)&&{"aria-hidden":"true"},...u},[...l.map(([h,m])=>E.createElement(h,m)),...Array.isArray(s)?s:[s]]));/**
78
- * @license lucide-react v0.539.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */const vt=(e,t)=>{const n=E.forwardRef(({className:r,...o},s)=>E.createElement(QV,{ref:s,iconNode:t,className:J1(`lucide-${ZV(fA(e))}`,`lucide-${e}`,r),...o}));return n.displayName=fA(e),n};/**
83
- * @license lucide-react v0.539.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */const JV=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],eU=vt("arrow-left",JV);/**
88
- * @license lucide-react v0.539.0 - ISC
89
- *
90
- * This source code is licensed under the ISC license.
91
- * See the LICENSE file in the root directory of this source tree.
92
- */const tU=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],nU=vt("arrow-up-from-line",tU);/**
93
- * @license lucide-react v0.539.0 - ISC
94
- *
95
- * This source code is licensed under the ISC license.
96
- * See the LICENSE file in the root directory of this source tree.
97
- */const rU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ds=vt("check",rU);/**
98
- * @license lucide-react v0.539.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */const iU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],eC=vt("chevron-down",iU);/**
103
- * @license lucide-react v0.539.0 - ISC
104
- *
105
- * This source code is licensed under the ISC license.
106
- * See the LICENSE file in the root directory of this source tree.
107
- */const oU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],aU=vt("chevron-left",oU);/**
108
- * @license lucide-react v0.539.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const sU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Sf=vt("chevron-right",sU);/**
113
- * @license lucide-react v0.539.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */const lU=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],cU=vt("chevron-up",lU);/**
118
- * @license lucide-react v0.539.0 - ISC
119
- *
120
- * This source code is licensed under the ISC license.
121
- * See the LICENSE file in the root directory of this source tree.
122
- */const uU=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],dU=vt("chevrons-up-down",uU);/**
123
- * @license lucide-react v0.539.0 - ISC
124
- *
125
- * This source code is licensed under the ISC license.
126
- * See the LICENSE file in the root directory of this source tree.
127
- */const fU=[["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"}]],hU=vt("copy-check",fU);/**
128
- * @license lucide-react v0.539.0 - ISC
129
- *
130
- * This source code is licensed under the ISC license.
131
- * See the LICENSE file in the root directory of this source tree.
132
- */const mU=[["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"}]],pU=vt("copy",mU);/**
133
- * @license lucide-react v0.539.0 - ISC
134
- *
135
- * This source code is licensed under the ISC license.
136
- * See the LICENSE file in the root directory of this source tree.
137
- */const gU=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],yU=vt("download",gU);/**
138
- * @license lucide-react v0.539.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- */const vU=[["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"}]],bU=vt("external-link",vU);/**
143
- * @license lucide-react v0.539.0 - ISC
144
- *
145
- * This source code is licensed under the ISC license.
146
- * See the LICENSE file in the root directory of this source tree.
147
- */const _U=[["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"}]],EU=vt("eye-off",_U);/**
148
- * @license lucide-react v0.539.0 - ISC
149
- *
150
- * This source code is licensed under the ISC license.
151
- * See the LICENSE file in the root directory of this source tree.
152
- */const xU=[["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"}]],SU=vt("eye",xU);/**
153
- * @license lucide-react v0.539.0 - ISC
154
- *
155
- * This source code is licensed under the ISC license.
156
- * See the LICENSE file in the root directory of this source tree.
157
- */const AU=[["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"}]],wU=vt("globe",AU);/**
158
- * @license lucide-react v0.539.0 - ISC
159
- *
160
- * This source code is licensed under the ISC license.
161
- * See the LICENSE file in the root directory of this source tree.
162
- */const TU=[["path",{d:"M11 19H5v-6",key:"8awifj"}],["path",{d:"M13 5h6v6",key:"7voy1q"}],["path",{d:"M19 5 5 19",key:"wwaj1z"}]],RU=vt("move-diagonal",TU);/**
163
- * @license lucide-react v0.539.0 - ISC
164
- *
165
- * This source code is licensed under the ISC license.
166
- * See the LICENSE file in the root directory of this source tree.
167
- */const CU=[["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"}]],NU=vt("move-vertical",CU);/**
168
- * @license lucide-react v0.539.0 - ISC
169
- *
170
- * This source code is licensed under the ISC license.
171
- * See the LICENSE file in the root directory of this source tree.
172
- */const OU=[["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"}]],tC=vt("pencil",OU);/**
173
- * @license lucide-react v0.539.0 - ISC
174
- *
175
- * This source code is licensed under the ISC license.
176
- * See the LICENSE file in the root directory of this source tree.
177
- */const kU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sh=vt("plus",kU);/**
178
- * @license lucide-react v0.539.0 - ISC
179
- *
180
- * This source code is licensed under the ISC license.
181
- * See the LICENSE file in the root directory of this source tree.
182
- */const DU=[["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"}]],IU=vt("rotate-ccw",DU);/**
183
- * @license lucide-react v0.539.0 - ISC
184
- *
185
- * This source code is licensed under the ISC license.
186
- * See the LICENSE file in the root directory of this source tree.
187
- */const LU=[["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"}]],hA=vt("save",LU);/**
188
- * @license lucide-react v0.539.0 - ISC
189
- *
190
- * This source code is licensed under the ISC license.
191
- * See the LICENSE file in the root directory of this source tree.
192
- */const jU=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],PU=vt("search",jU);/**
193
- * @license lucide-react v0.539.0 - ISC
194
- *
195
- * This source code is licensed under the ISC license.
196
- * See the LICENSE file in the root directory of this source tree.
197
- */const MU=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],lh=vt("trash",MU);/**
198
- * @license lucide-react v0.539.0 - ISC
199
- *
200
- * This source code is licensed under the ISC license.
201
- * See the LICENSE file in the root directory of this source tree.
202
- */const zU=[["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"}]],nC=vt("wand-sparkles",zU);/**
203
- * @license lucide-react v0.539.0 - ISC
204
- *
205
- * This source code is licensed under the ISC license.
206
- * See the LICENSE file in the root directory of this source tree.
207
- */const VU=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],la=vt("x",VU);function rC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=rC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ch(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rC(e))&&(r&&(r+=" "),r+=t);return r}const ob="-",UU=e=>{const t=$U(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(ob);return u[0]===""&&u.length!==1&&u.shift(),iC(u,t)||BU(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},iC=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?iC(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(ob);return t.validators.find(({validator:l})=>l(s))?.classGroupId},mA=/^\[(.+)\]$/,BU=e=>{if(mA.test(e)){const t=mA.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},$U=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ny(n[o],r,o,t);return r},Ny=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:pA(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(HU(o)){Ny(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,l])=>{Ny(l,pA(t,s),n,r)})})},pA=(e,t)=>{let n=e;return t.split(ob).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},HU=e=>e.isThemeGetter,FU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return o(s,l),l},set(s,l){n.has(s)?n.set(s,l):o(s,l)}}},Oy="!",ky=":",GU=ky.length,KU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let l=0,u=0,d=0,h;for(let A=0;A<o.length;A++){let w=o[A];if(l===0&&u===0){if(w===ky){s.push(o.slice(d,A)),d=A+GU;continue}if(w==="/"){h=A;continue}}w==="["?l++:w==="]"?l--:w==="("?u++:w===")"&&u--}const m=s.length===0?o:o.substring(d),g=qU(m),v=g!==m,_=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:_}};if(t){const o=t+ky,s=r;r=l=>l.startsWith(o)?s(l.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},qU=e=>e.endsWith(Oy)?e.substring(0,e.length-1):e.startsWith(Oy)?e.substring(1):e,ZU=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(l=>{l[0]==="["||t[l]?(o.push(...s.sort(),l),s=[]):s.push(l)}),o.push(...s.sort()),o}},YU=e=>({cache:FU(e.cacheSize),parseClassName:KU(e),sortModifiers:ZU(e),...UU(e)}),WU=/\s+/,XU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],u=e.trim().split(WU);let d="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{isExternal:g,modifiers:v,hasImportantModifier:_,baseClassName:A,maybePostfixModifierPosition:w}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let R=!!w,S=r(R?A.substring(0,w):A);if(!S){if(!R){d=m+(d.length>0?" "+d:d);continue}if(S=r(A),!S){d=m+(d.length>0?" "+d:d);continue}R=!1}const x=s(v).join(":"),T=_?x+Oy:x,O=T+S;if(l.includes(O))continue;l.push(O);const C=o(S,R);for(let D=0;D<C.length;++D){const I=C[D];l.push(T+I)}d=m+(d.length>0?" "+d:d)}return d};function QU(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=oC(t))&&(r&&(r+=" "),r+=n);return r}const oC=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=oC(e[r]))&&(n&&(n+=" "),n+=t);return n};function JU(e,...t){let n,r,o,s=l;function l(d){const h=t.reduce((m,g)=>g(m),e());return n=YU(h),r=n.cache.get,o=n.cache.set,s=u,u(d)}function u(d){const h=r(d);if(h)return h;const m=XU(d,n);return o(d,m),m}return function(){return s(QU.apply(null,arguments))}}const Kt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},aC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eB=/^\d+\/\d+$/,tB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nB=/\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$/,rB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qa=e=>eB.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Yi=e=>!!e&&Number.isInteger(Number(e)),hg=e=>e.endsWith("%")&&qe(e.slice(0,-1)),ui=e=>tB.test(e),aB=()=>!0,sB=e=>nB.test(e)&&!rB.test(e),lC=()=>!1,lB=e=>iB.test(e),cB=e=>oB.test(e),uB=e=>!Te(e)&&!Re(e),dB=e=>Is(e,dC,lC),Te=e=>aC.test(e),Uo=e=>Is(e,fC,sB),mg=e=>Is(e,gB,qe),gA=e=>Is(e,cC,lC),fB=e=>Is(e,uC,cB),Td=e=>Is(e,hC,lB),Re=e=>sC.test(e),Gl=e=>Ls(e,fC),hB=e=>Ls(e,yB),yA=e=>Ls(e,cC),mB=e=>Ls(e,dC),pB=e=>Ls(e,uC),Rd=e=>Ls(e,hC,!0),Is=(e,t,n)=>{const r=aC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ls=(e,t,n=!1)=>{const r=sC.exec(e);return r?r[1]?t(r[1]):n:!1},cC=e=>e==="position"||e==="percentage",uC=e=>e==="image"||e==="url",dC=e=>e==="length"||e==="size"||e==="bg-size",fC=e=>e==="length",gB=e=>e==="number",yB=e=>e==="family-name",hC=e=>e==="shadow",vB=()=>{const e=Kt("color"),t=Kt("font"),n=Kt("text"),r=Kt("font-weight"),o=Kt("tracking"),s=Kt("leading"),l=Kt("breakpoint"),u=Kt("container"),d=Kt("spacing"),h=Kt("radius"),m=Kt("shadow"),g=Kt("inset-shadow"),v=Kt("text-shadow"),_=Kt("drop-shadow"),A=Kt("blur"),w=Kt("perspective"),R=Kt("aspect"),S=Kt("ease"),x=Kt("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...O(),Re,Te],D=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],M=()=>[Re,Te,d],H=()=>[Qa,"full","auto",...M()],K=()=>[Yi,"none","subgrid",Re,Te],Z=()=>["auto",{span:["full",Yi,Re,Te]},Yi,Re,Te],J=()=>[Yi,"auto",Re,Te],ae=()=>["auto","min","max","fr",Re,Te],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...M()],X=()=>[Qa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],F=()=>[e,Re,Te],ve=()=>[...O(),yA,gA,{position:[Re,Te]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],oe=()=>["auto","cover","contain",mB,dB,{size:[Re,Te]}],B=()=>[hg,Gl,Uo],W=()=>["","none","full",h,Re,Te],se=()=>["",qe,Gl,Uo],he=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[qe,hg,yA,gA],Ee=()=>["","none",A,Re,Te],je=()=>["none",qe,Re,Te],Ue=()=>["none",qe,Re,Te],Xe=()=>[qe,Re,Te],nt=()=>[Qa,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ui],breakpoint:[ui],color:[aB],container:[ui],"drop-shadow":[ui],ease:["in","out","in-out"],font:[uB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ui],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ui],shadow:[ui],spacing:["px",qe],text:[ui],"text-shadow":[ui],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qa,Te,Re,R]}],container:["container"],columns:[{columns:[qe,Te,Re,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:C()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Yi,"auto",Re,Te]}],basis:[{basis:[Qa,"full","auto",u,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Qa,"auto","initial","none",Te]}],grow:[{grow:["",qe,Re,Te]}],shrink:[{shrink:["",qe,Re,Te]}],order:[{order:[Yi,"first","last","none",Re,Te]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],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:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,Gl,Uo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Re,mg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hg,Te]}],"font-family":[{font:[hB,Te,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:[o,Re,Te]}],"line-clamp":[{"line-clamp":[qe,"none",Re,mg]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",Re,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Re,Uo]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[qe,"auto",Re,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Te]}],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",Re,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yi,Re,Te],radial:["",Re,Te],conic:[Yi,Re,Te]},pB,fB]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Re,Te]}],"outline-w":[{outline:["",qe,Gl,Uo]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",m,Rd,Td]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",g,Rd,Td]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[qe,Uo]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",v,Rd,Td]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[qe,Re,Te]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"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":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Re,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Te]}],filter:[{filter:["","none",Re,Te]}],blur:[{blur:Ee()}],brightness:[{brightness:[qe,Re,Te]}],contrast:[{contrast:[qe,Re,Te]}],"drop-shadow":[{"drop-shadow":["","none",_,Rd,Td]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",qe,Re,Te]}],"hue-rotate":[{"hue-rotate":[qe,Re,Te]}],invert:[{invert:["",qe,Re,Te]}],saturate:[{saturate:[qe,Re,Te]}],sepia:[{sepia:["",qe,Re,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Te]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Re,Te]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Re,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Re,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Re,Te]}],"backdrop-invert":[{"backdrop-invert":["",qe,Re,Te]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Re,Te]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Re,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Re,Te]}],"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",Re,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Re,Te]}],ease:[{ease:["linear","initial",S,Re,Te]}],delay:[{delay:[qe,Re,Te]}],animate:[{animate:["none",x,Re,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Re,Te]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:Ue()}],"scale-x":[{"scale-x":Ue()}],"scale-y":[{"scale-y":Ue()}],"scale-z":[{"scale-z":Ue()}],"scale-3d":["scale-3d"],skew:[{skew:Xe()}],"skew-x":[{"skew-x":Xe()}],"skew-y":[{"skew-y":Xe()}],transform:[{transform:[Re,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nt()}],"translate-x":[{"translate-x":nt()}],"translate-y":[{"translate-y":nt()}],"translate-z":[{"translate-z":nt()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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",Re,Te]}],"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",Re,Te]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[qe,Gl,Uo,mg]}],stroke:[{stroke:["none",...F()]}],"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"]}},mC=JU(vB),Se=(...e)=>mC(ch(e)),vA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bA=ch,sr=(e,t)=>n=>{var r;if(t?.variants==null)return bA(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(h=>{const m=n?.[h],g=s?.[h];if(m===null)return null;const v=vA(m)||vA(g);return o[h][v]}),u=n&&Object.entries(n).reduce((h,m)=>{let[g,v]=m;return v===void 0||(h[g]=v),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,m)=>{let{class:g,className:v,..._}=m;return Object.entries(_).every(A=>{let[w,R]=A;return Array.isArray(R)?R.includes({...s,...u}[w]):{...s,...u}[w]===R})?[...h,g,v]:h},[]);return bA(e,l,d,n?.class,n?.className)},bB=({className:e,strokeWidth:t=4})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"44",viewBox:"0 0 44 44",stroke:"currentColor",className:Se("size-full",e),children:y.jsxs("g",{fill:"none",fillRule:"evenodd",strokeWidth:t,children:[y.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[y.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"}),y.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"})]}),y.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[y.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"}),y.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"})]})]})}),_s=({children:e,isLoading:t=!0,className:n,...r})=>y.jsx(y.Fragment,{children:t?y.jsx("div",{className:Se("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:y.jsx(bB,{className:"size-10 max-h-full max-w-full"})}):e??y.jsx(y.Fragment,{})});var Fn=(e=>(e.SM="sm",e.MD="md",e.LG="lg",e.XL="xl",e.ICON_SM="icon-sm",e.ICON_MD="icon-md",e.ICON_LG="icon-lg",e.ICON_XL="icon-xl",e))(Fn||{});const pg=sr("",{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"}});var at=(e=>(e.DEFAULT="default",e.NONE="none",e.OUTLINE="outline",e.LINK="link",e.INVISIBLE_LINK="invisible-link",e.HOVERABLE="hoverable",e.INPUT="input",e))(at||{}),ot=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.DESTRUCTIVE="destructive",e.NEUTRAL="neutral",e.LIGHT="light",e.DARK="dark",e.TEXT="text",e.TEXT_INVERSE="text-inverse",e.ERROR="error",e.SUCCESS="success",e.CUSTOM="custom",e))(ot||{}),Es=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Es||{});const _B=sr("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:"custom",textAlign:"center",isFullWidth:!1,hasIconRight:!1,hasIconLeft:!1}}),st=({variant:e,size:t,color:n,children:r,Icon:o,IconRight:s,iconClassName:l,isLoading:u,isActive:d,isFullWidth:h=!1,textAlign:m,disabled:g,label:v,className:_,type:A="button",...w})=>{const R=e==="link"||e==="invisible-link";return y.jsxs("button",{disabled:u||g,"aria-current":d?"page":void 0,"aria-label":v,"aria-busy":u,role:R?"link":void 0,type:A,className:_B({variant:e,size:t,color:n,isFullWidth:h,textAlign:m??(s?"left":"center"),hasIconLeft:typeof r<"u"&&(typeof o<"u"||typeof u<"u"),hasIconRight:typeof r<"u"&&typeof s<"u",className:_}),...w,children:[o&&!u&&y.jsx(o,{className:pg({size:t,className:l,position:"left"})}),y.jsx(_s,{className:pg({size:t,className:l,position:"left"}),isLoading:u??!1}),y.jsx("span",{children:r}),s&&y.jsx(s,{className:pg({size:t,className:l,position:"right"})})]})},ab=({children:e,isHidden:t,className:n="",isOverable:r=!1,isFocusable:o=!1,minHeight:s=0,...l})=>y.jsx("div",{"aria-hidden":o?t:void 0,tabIndex:o?0:void 0,role:o?"button":"none",className:Se("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",o&&"focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto",n),...l,children:y.jsx("div",{style:{minHeight:`${s}px`},className:Se(r&&"group-hover/height-smoother:visible",o&&"group-focus/height-smoother:visible",n),children:e})}),pC=({children:e,header:t,isOpen:n=!1,onClick:r,...o})=>{const[s,l]=E.useState(n),u=s==null?void 0:!s;return E.useEffect(()=>{n!=null&&l(n)},[n]),y.jsxs("div",{className:"w-full",children:[y.jsx(st,{variant:at.HOVERABLE,color:ot.TEXT,onClick:d=>{l(h=>!h),r?.(d)},isFullWidth:!0,className:"flex items-center justify-between gap-2",IconRight:eC,iconClassName:Se("transform transition-transform duration-500 ease-in-out",s?"rotate-0":"-rotate-180"),...o,children:t}),y.jsx(ab,{tabIndex:u!==!1?void 0:-1,isHidden:u,children:e})]})};var gC=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.DESTRUCTIVE="destructive",e.NEUTRAL="neutral",e.LIGHT="light",e.DARK="dark",e.TEXT="text",e.CUSTOM="custom",e))(gC||{});const EB=sr("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"}}),xB=({className:e,variant:t,color:n,...r})=>y.jsx("div",{className:Se(EB({variant:t,color:n}),e),...r});var yC=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.DESTRUCTIVE="destructive",e.NEUTRAL="neutral",e.LIGHT="light",e.DARK="dark",e.TEXT="text",e.TEXT_INVERSE="text-inverse",e.ERROR="error",e.SUCCESS="success",e.CUSTOM="custom",e))(yC||{});const SB=sr("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"}}),AB=({href:e,isExternalLink:t})=>{const n=typeof e=="string"&&e.trim()!=="";return t===!0||typeof t>"u"&&n&&/^https?:\/\//.test(e)},sb=e=>{const{variant:t="default",color:n="primary",children:r,label:o,className:s,isActive:l,underlined:u,locale:d,isExternalLink:h,href:m,...g}=e,{internationalization:v}=tt,_=AB(e),A=typeof r=="string",w=_?"noopener noreferrer nofollow":void 0,R=_?"_blank":"_self",S=d?d===v.defaultLocale?"x-default":d:void 0,x=d&&m&&!_?jM(m,d):m;return y.jsxs("a",{href:x,hrefLang:S,"aria-label":o,rel:w,target:R,"aria-current":l?"page":void 0,className:Se(SB({variant:t,color:n,underlined:u,className:s})),...g,children:[t==="button"?y.jsx("span",{children:r}):r,_&&A&&y.jsx(bU,{className:"ml-2 inline-block size-4"})]})},vC={key:"breadcrumb",content:{linkLabel:me({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:"Перейти на"})}},wB=({href:e,lang:t,children:n,onClick:r,color:o,position:s,locale:l,...u})=>{const{linkLabel:d}=Pt(vC);return y.jsxs(y.Fragment,{children:[y.jsx(sb,{href:e,locale:l,color:o,onClick:r,itemProp:"item",isExternalLink:!1,itemScope:!0,itemType:"https://schema.org/WebPage",...u,label:`${d} ${n}`,itemID:e,children:y.jsx("span",{itemProp:"name",children:n})}),y.jsx("meta",{itemProp:"position",content:s.toString()})]})},TB=({children:e,onClick:t,color:n,position:r,...o})=>{const{linkLabel:s}=Pt(vC);return y.jsxs(y.Fragment,{children:[y.jsx(st,{onClick:t,variant:at.LINK,label:`${s} ${e}`,color:n,itemProp:"item",...o,children:y.jsx("span",{itemProp:"name",children:e})}),y.jsx("meta",{itemProp:"position",content:r.toString()})]})},RB=({children:e,position:t,...n})=>y.jsxs("span",{itemProp:"item",children:[y.jsx("span",{itemProp:"name",...n,children:e}),y.jsx("meta",{itemProp:"position",content:t.toString()})]}),CB=({links:e,className:t,color:n=yC.TEXT,locale:r,elementType:o="page",...s})=>y.jsx("nav",{"aria-label":"breadcrumb",children:y.jsx("ol",{className:Se("flex flex-row flex-wrap items-center gap-2 text-sm",t),itemScope:!0,itemType:"http://schema.org/BreadcrumbList",...s,children:e.map((l,u)=>{const d=u===e.length-1,h=typeof l=="object"&&typeof l.href=="string",m=typeof l=="object"&&typeof l.onClick=="function",v=u===e.length-1?o:void 0,_=l.text??l;let A=y.jsx(RB,{position:u+1,"aria-current":v,children:_},_);h?A=y.jsx(wB,{href:l.href,color:n,position:u+1,locale:r,"aria-current":v,children:_},_):m&&(A=y.jsx(TB,{onClick:l.onClick,color:n,position:u+1,"aria-current":v,children:_},_));const w=y.jsx("li",{itemProp:"itemListElement",itemScope:!0,itemType:"https://schema.org/ListItem",children:A},_);return d?w:y.jsxs(E.Fragment,{children:[w,y.jsx(Sf,{size:10})]},_)})})});function Je(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function _A(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jo(...e){return t=>{let n=!1;const r=e.map(o=>{const s=_A(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():_A(e[o],null)}}}}function Tt(...e){return E.useCallback(Jo(...e),e)}function NB(e,t){const n=E.createContext(t),r=s=>{const{children:l,...u}=s,d=E.useMemo(()=>u,Object.values(u));return y.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(s){const l=E.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Kc(e,t=[]){let n=[];function r(s,l){const u=E.createContext(l),d=n.length;n=[...n,l];const h=g=>{const{scope:v,children:_,...A}=g,w=v?.[e]?.[d]||u,R=E.useMemo(()=>A,Object.values(A));return y.jsx(w.Provider,{value:R,children:_})};h.displayName=s+"Provider";function m(g,v){const _=v?.[e]?.[d]||u,A=E.useContext(_);if(A)return A;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${s}\``)}return[h,m]}const o=()=>{const s=n.map(l=>E.createContext(l));return function(u){const d=u?.[e]||s;return E.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[r,OB(o,...t)]}function OB(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const g=d(s)[`__scope${h}`];return{...u,...g}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var cn=globalThis?.document?E.useLayoutEffect:()=>{},kB=d1[" useId ".trim().toString()]||(()=>{}),DB=0;function or(e){const[t,n]=E.useState(kB());return cn(()=>{n(r=>r??String(DB++))},[e]),t?`radix-${t}`:""}var IB=d1[" useInsertionEffect ".trim().toString()]||cn;function Af({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=LB({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:o;{const m=E.useRef(e!==void 0);E.useEffect(()=>{const g=m.current;g!==u&&console.warn(`${r} is changing from ${g?"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 h=E.useCallback(m=>{if(u){const g=jB(m)?m(e):m;g!==e&&l.current?.(g)}else s(m)},[u,e,s,l]);return[d,h]}function LB({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),o=E.useRef(n),s=E.useRef(t);return IB(()=>{s.current=t},[t]),E.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function jB(e){return typeof e=="function"}function xs(e){const t=MB(e),n=E.forwardRef((r,o)=>{const{children:s,...l}=r,u=E.Children.toArray(s),d=u.find(VB);if(d){const h=d.props.children,m=u.map(g=>g===d?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:g);return y.jsx(t,{...l,ref:o,children:E.isValidElement(h)?E.cloneElement(h,void 0,m):null})}return y.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var PB=xs("Slot");function MB(e){const t=E.forwardRef((n,r)=>{const{children:o,...s}=n;if(E.isValidElement(o)){const l=BB(o),u=UB(s,o.props);return o.type!==E.Fragment&&(u.ref=r?Jo(r,l):l),E.cloneElement(o,u)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zB=Symbol("radix.slottable");function VB(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zB}function UB(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...u)=>{const d=s(...u);return o(...u),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function BB(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $B=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ge=$B.reduce((e,t)=>{const n=xs(`Primitive.${t}`),r=E.forwardRef((o,s)=>{const{asChild:l,...u}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(d,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bC(e,t){e&&sa.flushSync(()=>e.dispatchEvent(t))}function yr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>t.current?.(...n),[])}function HB(e,t=globalThis?.document){const n=yr(e);E.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var FB="DismissableLayer",Dy="dismissableLayer.update",GB="dismissableLayer.pointerDownOutside",KB="dismissableLayer.focusOutside",EA,_C=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uh=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...d}=e,h=E.useContext(_C),[m,g]=E.useState(null),v=m?.ownerDocument??globalThis?.document,[,_]=E.useState({}),A=Tt(t,I=>g(I)),w=Array.from(h.layers),[R]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),S=w.indexOf(R),x=m?w.indexOf(m):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,O=x>=S,C=ZB(I=>{const M=I.target,H=[...h.branches].some(K=>K.contains(M));!O||H||(o?.(I),l?.(I),I.defaultPrevented||u?.())},v),D=YB(I=>{const M=I.target;[...h.branches].some(K=>K.contains(M))||(s?.(I),l?.(I),I.defaultPrevented||u?.())},v);return HB(I=>{x===h.layers.size-1&&(r?.(I),!I.defaultPrevented&&u&&(I.preventDefault(),u()))},v),E.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(EA=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),xA(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=EA)}},[m,v,n,h]),E.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),xA())},[m,h]),E.useEffect(()=>{const I=()=>_({});return document.addEventListener(Dy,I),()=>document.removeEventListener(Dy,I)},[]),y.jsx(Ge.div,{...d,ref:A,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:Je(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Je(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Je(e.onPointerDownCapture,C.onPointerDownCapture)})});uh.displayName=FB;var qB="DismissableLayerBranch",EC=E.forwardRef((e,t)=>{const n=E.useContext(_C),r=E.useRef(null),o=Tt(t,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),y.jsx(Ge.div,{...e,ref:o})});EC.displayName=qB;function ZB(e,t=globalThis?.document){const n=yr(e),r=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let d=function(){xC(GB,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function YB(e,t=globalThis?.document){const n=yr(e),r=E.useRef(!1);return E.useEffect(()=>{const o=s=>{s.target&&!r.current&&xC(KB,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xA(){const e=new CustomEvent(Dy);document.dispatchEvent(e)}function xC(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bC(o,s):o.dispatchEvent(s)}var WB=uh,XB=EC,gg="focusScope.autoFocusOnMount",yg="focusScope.autoFocusOnUnmount",SA={bubbles:!1,cancelable:!0},QB="FocusScope",lb=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[u,d]=E.useState(null),h=yr(o),m=yr(s),g=E.useRef(null),v=Tt(t,w=>d(w)),_=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let w=function(T){if(_.paused||!u)return;const O=T.target;u.contains(O)?g.current=O:Qi(g.current,{select:!0})},R=function(T){if(_.paused||!u)return;const O=T.relatedTarget;O!==null&&(u.contains(O)||Qi(g.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const C of T)C.removedNodes.length>0&&Qi(u)};document.addEventListener("focusin",w),document.addEventListener("focusout",R);const x=new MutationObserver(S);return u&&x.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",R),x.disconnect()}}},[r,u,_.paused]),E.useEffect(()=>{if(u){wA.add(_);const w=document.activeElement;if(!u.contains(w)){const S=new CustomEvent(gg,SA);u.addEventListener(gg,h),u.dispatchEvent(S),S.defaultPrevented||(JB(i2(SC(u)),{select:!0}),document.activeElement===w&&Qi(u))}return()=>{u.removeEventListener(gg,h),setTimeout(()=>{const S=new CustomEvent(yg,SA);u.addEventListener(yg,m),u.dispatchEvent(S),S.defaultPrevented||Qi(w??document.body,{select:!0}),u.removeEventListener(yg,m),wA.remove(_)},0)}}},[u,h,m,_]);const A=E.useCallback(w=>{if(!n&&!r||_.paused)return;const R=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(R&&S){const x=w.currentTarget,[T,O]=e2(x);T&&O?!w.shiftKey&&S===O?(w.preventDefault(),n&&Qi(T,{select:!0})):w.shiftKey&&S===T&&(w.preventDefault(),n&&Qi(O,{select:!0})):S===x&&w.preventDefault()}},[n,r,_.paused]);return y.jsx(Ge.div,{tabIndex:-1,...l,ref:v,onKeyDown:A})});lb.displayName=QB;function JB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Qi(r,{select:t}),document.activeElement!==n)return}function e2(e){const t=SC(e),n=AA(t,e),r=AA(t.reverse(),e);return[n,r]}function SC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function AA(e,t){for(const n of e)if(!t2(n,{upTo:t}))return n}function t2(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 n2(e){return e instanceof HTMLInputElement&&"select"in e}function Qi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&n2(e)&&t&&e.select()}}var wA=r2();function r2(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=TA(e,t),e.unshift(t)},remove(t){e=TA(e,t),e[0]?.resume()}}}function TA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function i2(e){return e.filter(t=>t.tagName!=="A")}var o2="Portal",dh=E.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=E.useState(!1);cn(()=>s(!0),[]);const l=n||o&&globalThis?.document?.body;return l?qV.createPortal(y.jsx(Ge.div,{...r,ref:t}),l):null});dh.displayName=o2;function a2(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var qc=e=>{const{present:t,children:n}=e,r=s2(t),o=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=Tt(r.ref,l2(o));return typeof n=="function"||r.isPresent?E.cloneElement(o,{ref:s}):null};qc.displayName="Presence";function s2(e){const[t,n]=E.useState(),r=E.useRef(null),o=E.useRef(e),s=E.useRef("none"),l=e?"mounted":"unmounted",[u,d]=a2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=Cd(r.current);s.current=u==="mounted"?h:"none"},[u]),cn(()=>{const h=r.current,m=o.current;if(m!==e){const v=s.current,_=Cd(h);e?d("MOUNT"):_==="none"||h?.display==="none"?d("UNMOUNT"):d(m&&v!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),cn(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=_=>{const w=Cd(r.current).includes(CSS.escape(_.animationName));if(_.target===t&&w&&(d("ANIMATION_END"),!o.current)){const R=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=R)})}},v=_=>{_.target===t&&(s.current=Cd(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:E.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function Cd(e){return e?.animationName||"none"}function l2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vg=0;function AC(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??RA()),document.body.insertAdjacentElement("beforeend",e[1]??RA()),vg++,()=>{vg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vg--}},[])}function RA(){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 Dr=function(){return Dr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Dr.apply(this,arguments)};function wC(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function c2(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var nf="right-scroll-bar-position",rf="width-before-scroll-bar",u2="with-scroll-bars-hidden",d2="--removed-body-scroll-bar-size";function bg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function f2(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var h2=typeof window<"u"?E.useLayoutEffect:E.useEffect,CA=new WeakMap;function m2(e,t){var n=f2(null,function(r){return e.forEach(function(o){return bg(o,r)})});return h2(function(){var r=CA.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(u){s.has(u)||bg(u,null)}),s.forEach(function(u){o.has(u)||bg(u,l)})}CA.set(n,e)},[e]),n}function p2(e){return e}function g2(e,t){t===void 0&&(t=p2);var n=[],r=!1,o={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(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(s),l=n}var d=function(){var m=l;l=[],m.forEach(s)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(m){l.push(m),h()},filter:function(m){return l=l.filter(m),n}}}};return o}function y2(e){e===void 0&&(e={});var t=g2(null);return t.options=Dr({async:!0,ssr:!1},e),t}var TC=function(e){var t=e.sideCar,n=wC(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,Dr({},n))};TC.isSideCarExport=!0;function v2(e,t){return e.useMedium(t),TC}var RC=y2(),_g=function(){},fh=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:_g,onWheelCapture:_g,onTouchMoveCapture:_g}),o=r[0],s=r[1],l=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,_=e.noRelative,A=e.noIsolation,w=e.inert,R=e.allowPinchZoom,S=e.as,x=S===void 0?"div":S,T=e.gapMode,O=wC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,D=m2([n,t]),I=Dr(Dr({},O),o);return E.createElement(E.Fragment,null,m&&E.createElement(C,{sideCar:RC,removeScrollBar:h,shards:g,noRelative:_,noIsolation:A,inert:w,setCallbacks:s,allowPinchZoom:!!R,lockRef:n,gapMode:T}),l?E.cloneElement(E.Children.only(u),Dr(Dr({},I),{ref:D})):E.createElement(x,Dr({},I,{className:d,ref:D}),u))});fh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fh.classNames={fullWidth:rf,zeroRight:nf};var b2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=b2();return t&&e.setAttribute("nonce",t),e}function E2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function x2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var S2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_2())&&(E2(t,n),x2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},A2=function(){var e=S2();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},CC=function(){var e=A2(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},w2={left:0,top:0,right:0,gap:0},Eg=function(e){return parseInt(e||"",10)||0},T2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Eg(n),Eg(r),Eg(o)]},R2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return w2;var t=T2(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])}},C2=CC(),ms="data-scroll-locked",N2=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
208
- .`.concat(u2,` {
209
- overflow: hidden `).concat(r,`;
210
- padding-right: `).concat(u,"px ").concat(r,`;
211
- }
212
- body[`).concat(ms,`] {
213
- overflow: hidden `).concat(r,`;
214
- overscroll-behavior: contain;
215
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
216
- padding-left: `.concat(o,`px;
217
- padding-top: `).concat(s,`px;
218
- padding-right: `).concat(l,`px;
219
- margin-left:0;
220
- margin-top:0;
221
- margin-right: `).concat(u,"px ").concat(r,`;
222
- `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
223
- }
224
-
225
- .`).concat(nf,` {
226
- right: `).concat(u,"px ").concat(r,`;
227
- }
228
-
229
- .`).concat(rf,` {
230
- margin-right: `).concat(u,"px ").concat(r,`;
231
- }
232
-
233
- .`).concat(nf," .").concat(nf,` {
234
- right: 0 `).concat(r,`;
235
- }
236
-
237
- .`).concat(rf," .").concat(rf,` {
238
- margin-right: 0 `).concat(r,`;
239
- }
240
-
241
- body[`).concat(ms,`] {
242
- `).concat(d2,": ").concat(u,`px;
243
- }
244
- `)},NA=function(){var e=parseInt(document.body.getAttribute(ms)||"0",10);return isFinite(e)?e:0},O2=function(){E.useEffect(function(){return document.body.setAttribute(ms,(NA()+1).toString()),function(){var e=NA()-1;e<=0?document.body.removeAttribute(ms):document.body.setAttribute(ms,e.toString())}},[])},k2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;O2();var s=E.useMemo(function(){return R2(o)},[o]);return E.createElement(C2,{styles:N2(s,!t,o,n?"":"!important")})},Iy=!1;if(typeof window<"u")try{var Nd=Object.defineProperty({},"passive",{get:function(){return Iy=!0,!0}});window.addEventListener("test",Nd,Nd),window.removeEventListener("test",Nd,Nd)}catch{Iy=!1}var Ja=Iy?{passive:!1}:!1,D2=function(e){return e.tagName==="TEXTAREA"},NC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!D2(e)&&n[t]==="visible")},I2=function(e){return NC(e,"overflowY")},L2=function(e){return NC(e,"overflowX")},OA=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=OC(e,r);if(o){var s=kC(e,r),l=s[1],u=s[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},j2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},P2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},OC=function(e,t){return e==="v"?I2(t):L2(t)},kC=function(e,t){return e==="v"?j2(t):P2(t)},M2=function(e,t){return e==="h"&&t==="rtl"?-1:1},z2=function(e,t,n,r,o){var s=M2(e,window.getComputedStyle(t).direction),l=s*r,u=n.target,d=t.contains(u),h=!1,m=l>0,g=0,v=0;do{if(!u)break;var _=kC(e,u),A=_[0],w=_[1],R=_[2],S=w-R-s*A;(A||S)&&OC(e,u)&&(g+=S,v+=A);var x=u.parentNode;u=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Od=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kA=function(e){return[e.deltaX,e.deltaY]},DA=function(e){return e&&"current"in e?e.current:e},V2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},U2=function(e){return`
245
- .block-interactivity-`.concat(e,` {pointer-events: none;}
246
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
247
- `)},B2=0,es=[];function $2(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),o=E.useState(B2++)[0],s=E.useState(CC)[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(o));var w=c2([e.lockRef.current],(e.shards||[]).map(DA),!0).filter(Boolean);return w.forEach(function(R){return R.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=E.useCallback(function(w,R){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!l.current.allowPinchZoom;var S=Od(w),x=n.current,T="deltaX"in w?w.deltaX:x[0]-S[0],O="deltaY"in w?w.deltaY:x[1]-S[1],C,D=w.target,I=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in w&&I==="h"&&D.type==="range")return!1;var M=OA(I,D);if(!M)return!0;if(M?C=I:(C=I==="v"?"h":"v",M=OA(I,D)),!M)return!1;if(!r.current&&"changedTouches"in w&&(T||O)&&(r.current=C),!C)return!0;var H=r.current||C;return z2(H,R,w,H==="h"?T:O)},[]),d=E.useCallback(function(w){var R=w;if(!(!es.length||es[es.length-1]!==s)){var S="deltaY"in R?kA(R):Od(R),x=t.current.filter(function(C){return C.name===R.type&&(C.target===R.target||R.target===C.shadowParent)&&V2(C.delta,S)})[0];if(x&&x.should){R.cancelable&&R.preventDefault();return}if(!x){var T=(l.current.shards||[]).map(DA).filter(Boolean).filter(function(C){return C.contains(R.target)}),O=T.length>0?u(R,T[0]):!l.current.noIsolation;O&&R.cancelable&&R.preventDefault()}}},[]),h=E.useCallback(function(w,R,S,x){var T={name:w,delta:R,target:S,should:x,shadowParent:H2(S)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),m=E.useCallback(function(w){n.current=Od(w),r.current=void 0},[]),g=E.useCallback(function(w){h(w.type,kA(w),w.target,u(w,e.lockRef.current))},[]),v=E.useCallback(function(w){h(w.type,Od(w),w.target,u(w,e.lockRef.current))},[]);E.useEffect(function(){return es.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Ja),document.addEventListener("touchmove",d,Ja),document.addEventListener("touchstart",m,Ja),function(){es=es.filter(function(w){return w!==s}),document.removeEventListener("wheel",d,Ja),document.removeEventListener("touchmove",d,Ja),document.removeEventListener("touchstart",m,Ja)}},[]);var _=e.removeScrollBar,A=e.inert;return E.createElement(E.Fragment,null,A?E.createElement(s,{styles:U2(o)}):null,_?E.createElement(k2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const F2=v2(RC,$2);var cb=E.forwardRef(function(e,t){return E.createElement(fh,Dr({},e,{ref:t,sideCar:F2}))});cb.classNames=fh.classNames;var G2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ts=new WeakMap,kd=new WeakMap,Dd={},xg=0,DC=function(e){return e&&(e.host||DC(e.parentNode))},K2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=DC(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})},q2=function(e,t,n,r){var o=K2(t,Array.isArray(e)?e:[e]);Dd[n]||(Dd[n]=new WeakMap);var s=Dd[n],l=[],u=new Set,d=new Set(o),h=function(g){!g||u.has(g)||(u.add(g),h(g.parentNode))};o.forEach(h);var m=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(v){if(u.has(v))m(v);else try{var _=v.getAttribute(r),A=_!==null&&_!=="false",w=(ts.get(v)||0)+1,R=(s.get(v)||0)+1;ts.set(v,w),s.set(v,R),l.push(v),w===1&&A&&kd.set(v,!0),R===1&&v.setAttribute(n,"true"),A||v.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",v,S)}})};return m(t),u.clear(),xg++,function(){l.forEach(function(g){var v=ts.get(g)-1,_=s.get(g)-1;ts.set(g,v),s.set(g,_),v||(kd.has(g)||g.removeAttribute(r),kd.delete(g)),_||g.removeAttribute(n)}),xg--,xg||(ts=new WeakMap,ts=new WeakMap,kd=new WeakMap,Dd={})}},IC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=G2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),q2(r,o,n,"aria-hidden")):function(){return null}},hh="Dialog",[LC,hie]=Kc(hh),[Z2,_r]=LC(hh),jC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,u=E.useRef(null),d=E.useRef(null),[h,m]=Af({prop:r,defaultProp:o??!1,onChange:s,caller:hh});return y.jsx(Z2,{scope:t,triggerRef:u,contentRef:d,contentId:or(),titleId:or(),descriptionId:or(),open:h,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(g=>!g),[m]),modal:l,children:n})};jC.displayName=hh;var PC="DialogTrigger",Y2=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_r(PC,n),s=Tt(t,o.triggerRef);return y.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fb(o.open),...r,ref:s,onClick:Je(e.onClick,o.onOpenToggle)})});Y2.displayName=PC;var ub="DialogPortal",[W2,MC]=LC(ub,{forceMount:void 0}),zC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=_r(ub,t);return y.jsx(W2,{scope:t,forceMount:n,children:E.Children.map(r,l=>y.jsx(qc,{present:n||s.open,children:y.jsx(dh,{asChild:!0,container:o,children:l})}))})};zC.displayName=ub;var wf="DialogOverlay",VC=E.forwardRef((e,t)=>{const n=MC(wf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_r(wf,e.__scopeDialog);return s.modal?y.jsx(qc,{present:r||s.open,children:y.jsx(Q2,{...o,ref:t})}):null});VC.displayName=wf;var X2=xs("DialogOverlay.RemoveScroll"),Q2=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_r(wf,n);return y.jsx(cb,{as:X2,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(Ge.div,{"data-state":fb(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ea="DialogContent",UC=E.forwardRef((e,t)=>{const n=MC(ea,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=_r(ea,e.__scopeDialog);return y.jsx(qc,{present:r||s.open,children:s.modal?y.jsx(J2,{...o,ref:t}):y.jsx(e$,{...o,ref:t})})});UC.displayName=ea;var J2=E.forwardRef((e,t)=>{const n=_r(ea,e.__scopeDialog),r=E.useRef(null),o=Tt(t,n.contentRef,r);return E.useEffect(()=>{const s=r.current;if(s)return IC(s)},[]),y.jsx(BC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Je(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&s.preventDefault()}),onFocusOutside:Je(e.onFocusOutside,s=>s.preventDefault())})}),e$=E.forwardRef((e,t)=>{const n=_r(ea,e.__scopeDialog),r=E.useRef(!1),o=E.useRef(!1);return y.jsx(BC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;n.triggerRef.current?.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),BC=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,u=_r(ea,n),d=E.useRef(null),h=Tt(t,d);return AC(),y.jsxs(y.Fragment,{children:[y.jsx(lb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:y.jsx(uh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":fb(u.open),...l,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(i$,{titleId:u.titleId}),y.jsx(a$,{contentRef:d,descriptionId:u.descriptionId})]})]})}),db="DialogTitle",t$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_r(db,n);return y.jsx(Ge.h2,{id:o.titleId,...r,ref:t})});t$.displayName=db;var $C="DialogDescription",n$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_r($C,n);return y.jsx(Ge.p,{id:o.descriptionId,...r,ref:t})});n$.displayName=$C;var HC="DialogClose",r$=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_r(HC,n);return y.jsx(Ge.button,{type:"button",...r,ref:t,onClick:Je(e.onClick,()=>o.onOpenChange(!1))})});r$.displayName=HC;function fb(e){return e?"open":"closed"}var FC="DialogTitleWarning",[mie,GC]=NB(FC,{contentName:ea,titleName:db,docsSlug:"dialog"}),i$=({titleId:e})=>{const t=GC(FC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
248
-
249
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
250
-
251
- 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},o$="DialogDescriptionWarning",a$=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${GC(o$).contentName}}.`;return E.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},s$=jC,l$=zC,c$=VC,u$=UC,IA=1,d$=.9,f$=.8,h$=.17,Sg=.1,Ag=.999,m$=.9999,p$=.99,g$=/[\\\/_+.#"@\[\(\{&]/,y$=/[\\\/_+.#"@\[\(\{&]/g,v$=/[\s-]/,KC=/[\s-]/g;function Ly(e,t,n,r,o,s,l){if(s===t.length)return o===e.length?IA:p$;var u=`${o},${s}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(s),h=n.indexOf(d,o),m=0,g,v,_,A;h>=0;)g=Ly(e,t,n,r,h+1,s+1,l),g>m&&(h===o?g*=IA:g$.test(e.charAt(h-1))?(g*=f$,_=e.slice(o,h-1).match(y$),_&&o>0&&(g*=Math.pow(Ag,_.length))):v$.test(e.charAt(h-1))?(g*=d$,A=e.slice(o,h-1).match(KC),A&&o>0&&(g*=Math.pow(Ag,A.length))):(g*=h$,o>0&&(g*=Math.pow(Ag,h-o))),e.charAt(h)!==t.charAt(s)&&(g*=m$)),(g<Sg&&n.charAt(h-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(h-1)!==r.charAt(s))&&(v=Ly(e,t,n,r,h+1,s+2,l),v*Sg>g&&(g=v*Sg)),g>m&&(m=g),h=n.indexOf(d,h+1);return l[u]=m,m}function LA(e){return e.toLowerCase().replace(KC," ")}function b$(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Ly(e,t,LA(e),LA(t),0,0,{})}var Kl='[cmdk-group=""]',wg='[cmdk-group-items=""]',_$='[cmdk-group-heading=""]',qC='[cmdk-item=""]',jA=`${qC}:not([aria-disabled="true"])`,jy="cmdk-item-select",rs="data-value",E$=(e,t,n)=>b$(e,t,n),ZC=E.createContext(void 0),Zc=()=>E.useContext(ZC),YC=E.createContext(void 0),hb=()=>E.useContext(YC),WC=E.createContext(void 0),XC=E.forwardRef((e,t)=>{let n=is(()=>{var B,W;return{search:"",value:(W=(B=e.value)!=null?B:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=is(()=>new Set),o=is(()=>new Map),s=is(()=>new Map),l=is(()=>new Set),u=QC(e),{label:d,children:h,value:m,onValueChange:g,filter:v,shouldFilter:_,loop:A,disablePointerSelection:w=!1,vimBindings:R=!0,...S}=e,x=or(),T=or(),O=or(),C=E.useRef(null),D=D$();ta(()=>{if(m!==void 0){let B=m.trim();n.current.value=B,I.emit()}},[m]),ta(()=>{D(6,ae)},[]);let I=E.useMemo(()=>({subscribe:B=>(l.current.add(B),()=>l.current.delete(B)),snapshot:()=>n.current,setState:(B,W,se)=>{var he,ye,ue,Ee;if(!Object.is(n.current[B],W)){if(n.current[B]=W,B==="search")J(),K(),D(1,Z);else if(B==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let je=document.getElementById(O);je?je.focus():(he=document.getElementById(x))==null||he.focus()}if(D(7,()=>{var je;n.current.selectedItemId=(je=Y())==null?void 0:je.id,I.emit()}),se||D(5,ae),((ye=u.current)==null?void 0:ye.value)!==void 0){let je=W??"";(Ee=(ue=u.current).onValueChange)==null||Ee.call(ue,je);return}}I.emit()}},emit:()=>{l.current.forEach(B=>B())}}),[]),M=E.useMemo(()=>({value:(B,W,se)=>{var he;W!==((he=s.current.get(B))==null?void 0:he.value)&&(s.current.set(B,{value:W,keywords:se}),n.current.filtered.items.set(B,H(W,se)),D(2,()=>{K(),I.emit()}))},item:(B,W)=>(r.current.add(B),W&&(o.current.has(W)?o.current.get(W).add(B):o.current.set(W,new Set([B]))),D(3,()=>{J(),K(),n.current.value||Z(),I.emit()}),()=>{s.current.delete(B),r.current.delete(B),n.current.filtered.items.delete(B);let se=Y();D(4,()=>{J(),se?.getAttribute("id")===B&&Z(),I.emit()})}),group:B=>(o.current.has(B)||o.current.set(B,new Set),()=>{s.current.delete(B),o.current.delete(B)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:x,inputId:O,labelId:T,listInnerRef:C}),[]);function H(B,W){var se,he;let ye=(he=(se=u.current)==null?void 0:se.filter)!=null?he:E$;return B?ye(B,n.current.search,W):0}function K(){if(!n.current.search||u.current.shouldFilter===!1)return;let B=n.current.filtered.items,W=[];n.current.filtered.groups.forEach(he=>{let ye=o.current.get(he),ue=0;ye.forEach(Ee=>{let je=B.get(Ee);ue=Math.max(je,ue)}),W.push([he,ue])});let se=C.current;re().sort((he,ye)=>{var ue,Ee;let je=he.getAttribute("id"),Ue=ye.getAttribute("id");return((ue=B.get(Ue))!=null?ue:0)-((Ee=B.get(je))!=null?Ee:0)}).forEach(he=>{let ye=he.closest(wg);ye?ye.appendChild(he.parentElement===ye?he:he.closest(`${wg} > *`)):se.appendChild(he.parentElement===se?he:he.closest(`${wg} > *`))}),W.sort((he,ye)=>ye[1]-he[1]).forEach(he=>{var ye;let ue=(ye=C.current)==null?void 0:ye.querySelector(`${Kl}[${rs}="${encodeURIComponent(he[0])}"]`);ue?.parentElement.appendChild(ue)})}function Z(){let B=re().find(se=>se.getAttribute("aria-disabled")!=="true"),W=B?.getAttribute(rs);I.setState("value",W||void 0)}function J(){var B,W,se,he;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ye=0;for(let ue of r.current){let Ee=(W=(B=s.current.get(ue))==null?void 0:B.value)!=null?W:"",je=(he=(se=s.current.get(ue))==null?void 0:se.keywords)!=null?he:[],Ue=H(Ee,je);n.current.filtered.items.set(ue,Ue),Ue>0&&ye++}for(let[ue,Ee]of o.current)for(let je of Ee)if(n.current.filtered.items.get(je)>0){n.current.filtered.groups.add(ue);break}n.current.filtered.count=ye}function ae(){var B,W,se;let he=Y();he&&(((B=he.parentElement)==null?void 0:B.firstChild)===he&&((se=(W=he.closest(Kl))==null?void 0:W.querySelector(_$))==null||se.scrollIntoView({block:"nearest"})),he.scrollIntoView({block:"nearest"}))}function Y(){var B;return(B=C.current)==null?void 0:B.querySelector(`${qC}[aria-selected="true"]`)}function re(){var B;return Array.from(((B=C.current)==null?void 0:B.querySelectorAll(jA))||[])}function j(B){let W=re()[B];W&&I.setState("value",W.getAttribute(rs))}function X(B){var W;let se=Y(),he=re(),ye=he.findIndex(Ee=>Ee===se),ue=he[ye+B];(W=u.current)!=null&&W.loop&&(ue=ye+B<0?he[he.length-1]:ye+B===he.length?he[0]:he[ye+B]),ue&&I.setState("value",ue.getAttribute(rs))}function F(B){let W=Y(),se=W?.closest(Kl),he;for(;se&&!he;)se=B>0?O$(se,Kl):k$(se,Kl),he=se?.querySelector(jA);he?I.setState("value",he.getAttribute(rs)):X(B)}let ve=()=>j(re().length-1),P=B=>{B.preventDefault(),B.metaKey?ve():B.altKey?F(1):X(1)},oe=B=>{B.preventDefault(),B.metaKey?j(0):B.altKey?F(-1):X(-1)};return E.createElement(Ge.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:B=>{var W;(W=S.onKeyDown)==null||W.call(S,B);let se=B.nativeEvent.isComposing||B.keyCode===229;if(!(B.defaultPrevented||se))switch(B.key){case"n":case"j":{R&&B.ctrlKey&&P(B);break}case"ArrowDown":{P(B);break}case"p":case"k":{R&&B.ctrlKey&&oe(B);break}case"ArrowUp":{oe(B);break}case"Home":{B.preventDefault(),j(0);break}case"End":{B.preventDefault(),ve();break}case"Enter":{B.preventDefault();let he=Y();if(he){let ye=new Event(jy);he.dispatchEvent(ye)}}}}},E.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:L$},d),mh(e,B=>E.createElement(YC.Provider,{value:I},E.createElement(ZC.Provider,{value:M},B))))}),x$=E.forwardRef((e,t)=>{var n,r;let o=or(),s=E.useRef(null),l=E.useContext(WC),u=Zc(),d=QC(e),h=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l?.forceMount;ta(()=>{if(!h)return u.item(o,l?.id)},[h]);let m=JC(o,s,[e.value,e.children,s],e.keywords),g=hb(),v=ro(D=>D.value&&D.value===m.current),_=ro(D=>h||u.filter()===!1?!0:D.search?D.filtered.items.get(o)>0:!0);E.useEffect(()=>{let D=s.current;if(!(!D||e.disabled))return D.addEventListener(jy,A),()=>D.removeEventListener(jy,A)},[_,e.onSelect,e.disabled]);function A(){var D,I;w(),(I=(D=d.current).onSelect)==null||I.call(D,m.current)}function w(){g.setState("value",m.current,!0)}if(!_)return null;let{disabled:R,value:S,onSelect:x,forceMount:T,keywords:O,...C}=e;return E.createElement(Ge.div,{ref:Jo(s,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!v,"data-disabled":!!R,"data-selected":!!v,onPointerMove:R||u.getDisablePointerSelection()?void 0:w,onClick:R?void 0:A},e.children)}),S$=E.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,l=or(),u=E.useRef(null),d=E.useRef(null),h=or(),m=Zc(),g=ro(_=>o||m.filter()===!1?!0:_.search?_.filtered.groups.has(l):!0);ta(()=>m.group(l),[]),JC(l,u,[e.value,e.heading,d]);let v=E.useMemo(()=>({id:l,forceMount:o}),[o]);return E.createElement(Ge.div,{ref:Jo(u,t),...s,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&E.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:h},n),mh(e,_=>E.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?h:void 0},E.createElement(WC.Provider,{value:v},_))))}),A$=E.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=E.useRef(null),s=ro(l=>!l.search);return!n&&!s?null:E.createElement(Ge.div,{ref:Jo(o,t),...r,"cmdk-separator":"",role:"separator"})}),w$=E.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=hb(),l=ro(h=>h.search),u=ro(h=>h.selectedItemId),d=Zc();return E.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),E.createElement(Ge.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:o?e.value:l,onChange:h=>{o||s.setState("search",h.target.value),n?.(h.target.value)}})}),T$=E.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=E.useRef(null),l=E.useRef(null),u=ro(h=>h.selectedItemId),d=Zc();return E.useEffect(()=>{if(l.current&&s.current){let h=l.current,m=s.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let _=h.offsetHeight;m.style.setProperty("--cmdk-list-height",_.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),E.createElement(Ge.div,{ref:Jo(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:d.listId},mh(e,h=>E.createElement("div",{ref:Jo(l,d.listInnerRef),"cmdk-list-sizer":""},h)))}),R$=E.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:l,...u}=e;return E.createElement(s$,{open:n,onOpenChange:r},E.createElement(l$,{container:l},E.createElement(c$,{"cmdk-overlay":"",className:o}),E.createElement(u$,{"aria-label":e.label,"cmdk-dialog":"",className:s},E.createElement(XC,{ref:t,...u}))))}),C$=E.forwardRef((e,t)=>ro(n=>n.filtered.count===0)?E.createElement(Ge.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),N$=E.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return E.createElement(Ge.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},mh(e,l=>E.createElement("div",{"aria-hidden":!0},l)))}),Yc=Object.assign(XC,{List:T$,Item:x$,Input:w$,Group:S$,Separator:A$,Dialog:R$,Empty:C$,Loading:N$});function O$(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function k$(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function QC(e){let t=E.useRef(e);return ta(()=>{t.current=e}),t}var ta=typeof window>"u"?E.useEffect:E.useLayoutEffect;function is(e){let t=E.useRef();return t.current===void 0&&(t.current=e()),t}function ro(e){let t=hb(),n=()=>e(t.snapshot());return E.useSyncExternalStore(t.subscribe,n,n)}function JC(e,t,n,r=[]){let o=E.useRef(),s=Zc();return ta(()=>{var l;let u=(()=>{var h;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():o.current}})(),d=r.map(h=>h.trim());s.value(e,u,d),(l=t.current)==null||l.setAttribute(rs,u),o.current=u}),o}var D$=()=>{let[e,t]=E.useState(),n=is(()=>new Map);return ta(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function I$(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function mh({asChild:e,children:t},n){return e&&E.isValidElement(t)?E.cloneElement(I$(t),{ref:t.ref},n(t.props.children)):n(t)}var L$={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const eN=({className:e,...t})=>y.jsx(Yc,{className:Se("flex size-full flex-col overflow-hidden rounded-md",e),...t}),j$=({className:e,...t})=>y.jsxs("div",{className:"flex w-full items-center","cmdk-input-wrapper":"",children:[y.jsx(PU,{className:"mr-2 size-4 shrink-0 opacity-50"}),y.jsx(Yc.Input,{className:Se("placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),P$=({className:e,...t})=>y.jsx(Yc.List,{className:Se("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),M$=e=>y.jsx(Yc.Empty,{className:"py-6 text-center text-sm",...e}),z$=({className:e,...t})=>y.jsx(Yc.Item,{className:Se("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}),Tf={...eN,Input:j$,List:P$,Empty:M$,Item:z$},V$=sr("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/95",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"}}),Er=({children:e,roundedSize:t,padding:n,transparency:r,separator:o,className:s,border:l,borderColor:u,background:d,...h})=>y.jsx("div",{className:Se(V$({roundedSize:t,transparency:r,padding:n,separator:o,border:typeof l=="boolean"?l?"with":"none":void 0,background:d,borderColor:u,className:s})),...h,children:e}),U$={key:"copy-button",content:{label:me({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:"Копировать содержимое"})}},tN=({content:e,...t})=>{const[n,r]=E.useState(!1),{label:o}=Pt(U$),s=async()=>{try{await navigator.clipboard.writeText(e),r(!0)}catch(l){console.error("Failed to copy text: ",l)}};return E.useEffect(()=>{const l=setTimeout(()=>{r(!1)},1e3);return()=>clearTimeout(l)},[n]),y.jsx(st,{Icon:n?hU:pU,onClick:s,variant:at.HOVERABLE,color:ot.TEXT,size:Fn.ICON_SM,...t,label:t.label??o.value})},nN=E.createContext({});function B$(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const mb=typeof window<"u",$$=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 gi=(e,t,n)=>n>t?t:n<e?e:n;let vb=()=>{};const yi={},rN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function iN(e){return typeof e=="object"&&e!==null}const oN=e=>/^0[^.\s]+$/u.test(e);function bb(e){let t;return()=>(t===void 0&&(t=e()),t)}const ar=e=>e,H$=(e,t)=>n=>t(e(n)),Wc=(...e)=>e.reduce(H$),wc=(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 o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Mr=e=>e*1e3,zr=e=>e/1e3;function aN(e,t){return t?e*(1e3/t):0}const sN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,F$=1e-7,G$=12;function K$(e,t,n,r,o){let s,l,u=0;do l=t+(n-t)/2,s=sN(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>F$&&++u<G$);return l}function Xc(e,t,n,r){if(e===t&&n===r)return ar;const o=s=>K$(s,0,1,e,n);return s=>s===0||s===1?s:sN(o(s),t,r)}const lN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cN=e=>t=>1-e(1-t),uN=Xc(.33,1.53,.69,.99),Eb=cN(uN),dN=lN(Eb),fN=e=>(e*=2)<1?.5*Eb(e):.5*(2-Math.pow(2,-10*(e-1))),xb=e=>1-Math.sin(Math.acos(e)),hN=cN(xb),mN=lN(xb),q$=Xc(.42,0,1,1),Z$=Xc(0,0,.58,1),pN=Xc(.42,0,.58,1),Y$=e=>Array.isArray(e)&&typeof e[0]!="number",gN=e=>Array.isArray(e)&&typeof e[0]=="number",W$={linear:ar,easeIn:q$,easeInOut:pN,easeOut:Z$,circIn:xb,circInOut:mN,circOut:hN,backIn:Eb,backInOut:dN,backOut:uN,anticipate:fN},X$=e=>typeof e=="string",PA=e=>{if(gN(e)){vb(e.length===4);const[t,n,r,o]=e;return Xc(t,n,r,o)}else if(X$(e))return W$[e];return e},Id=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Q$(e,t){let n=new Set,r=new Set,o=!1,s=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(h.schedule(m),e()),m(u)}const h={schedule:(m,g=!1,v=!1)=>{const A=v&&o?n:r;return g&&l.add(m),A.has(m)||A.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(d),n.clear(),o=!1,s&&(s=!1,h.process(m))}};return h}const J$=40;function yN(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=Id.reduce((T,O)=>(T[O]=Q$(s),T),{}),{setup:u,read:d,resolveKeyframes:h,preUpdate:m,update:g,preRender:v,render:_,postRender:A}=l,w=()=>{const T=yi.useManualTiming?o.timestamp:performance.now();n=!1,yi.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(T-o.timestamp,J$),1)),o.timestamp=T,o.isProcessing=!0,u.process(o),d.process(o),h.process(o),m.process(o),g.process(o),v.process(o),_.process(o),A.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(w))},R=()=>{n=!0,r=!0,o.isProcessing||e(w)};return{schedule:Id.reduce((T,O)=>{const C=l[O];return T[O]=(D,I=!1,M=!1)=>(n||R(),C.schedule(D,I,M)),T},{}),cancel:T=>{for(let O=0;O<Id.length;O++)l[Id[O]].cancel(T)},state:o,steps:l}}const{schedule:_t,cancel:io,state:ln,steps:Tg}=yN(typeof requestAnimationFrame<"u"?requestAnimationFrame:ar,!0);let of;function eH(){of=void 0}const On={now:()=>(of===void 0&&On.set(ln.isProcessing||yi.useManualTiming?ln.timestamp:performance.now()),of),set:e=>{of=e,queueMicrotask(eH)}},vN=e=>t=>typeof t=="string"&&t.startsWith(e),Sb=vN("--"),tH=vN("var(--"),Ab=e=>tH(e)?nH.test(e.split("/*")[0].trim()):!1,nH=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,js={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Tc={...js,transform:e=>gi(0,1,e)},Ld={...js,default:1},uc=e=>Math.round(e*1e5)/1e5,wb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rH(e){return e==null}const iH=/^(?:#[\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"&&iH.test(n)&&n.startsWith(e)||t&&!rH(n)&&Object.prototype.hasOwnProperty.call(n,t)),bN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,l,u]=r.match(wb);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},oH=e=>gi(0,255,e),Rg={...js,transform:e=>Math.round(oH(e))},qo={test:Tb("rgb","red"),parse:bN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rg.transform(e)+", "+Rg.transform(t)+", "+Rg.transform(n)+", "+uc(Tc.transform(r))+")"};function aH(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Py={test:Tb("#"),parse:aH,transform:qo.transform},Qc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ji=Qc("deg"),Vr=Qc("%"),Me=Qc("px"),sH=Qc("vh"),lH=Qc("vw"),MA={...Vr,parse:e=>Vr.parse(e)/100,transform:e=>Vr.transform(e*100)},ss={test:Tb("hsl","hue"),parse:bN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Vr.transform(uc(t))+", "+Vr.transform(uc(n))+", "+uc(Tc.transform(r))+")"},Bt={test:e=>qo.test(e)||Py.test(e)||ss.test(e),parse:e=>qo.test(e)?qo.parse(e):ss.test(e)?ss.parse(e):Py.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qo.transform(e):ss.transform(e),getAnimatableNone:e=>{const t=Bt.parse(e);return t.alpha=0,Bt.transform(t)}},cH=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uH(e){return isNaN(e)&&typeof e=="string"&&(e.match(wb)?.length||0)+(e.match(cH)?.length||0)>0}const _N="number",EN="color",dH="var",fH="var(",zA="${}",hH=/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 Rc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const u=t.replace(hH,d=>(Bt.test(d)?(r.color.push(s),o.push(EN),n.push(Bt.parse(d))):d.startsWith(fH)?(r.var.push(s),o.push(dH),n.push(d)):(r.number.push(s),o.push(_N),n.push(parseFloat(d))),++s,zA)).split(zA);return{values:n,split:u,indexes:r,types:o}}function xN(e){return Rc(e).values}function SN(e){const{split:t,types:n}=Rc(e),r=t.length;return o=>{let s="";for(let l=0;l<r;l++)if(s+=t[l],o[l]!==void 0){const u=n[l];u===_N?s+=uc(o[l]):u===EN?s+=Bt.transform(o[l]):s+=o[l]}return s}}const mH=e=>typeof e=="number"?0:Bt.test(e)?Bt.getAnimatableNone(e):e;function pH(e){const t=xN(e);return SN(e)(t.map(mH))}const oo={test:uH,parse:xN,createTransformer:SN,getAnimatableNone:pH};function Cg(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 gH({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;o=Cg(d,u,e+1/3),s=Cg(d,u,e),l=Cg(d,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}function Rf(e,t){return n=>n>0?t:e}const At=(e,t,n)=>e+(t-e)*n,Ng=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},yH=[Py,qo,ss],vH=e=>yH.find(t=>t.test(e));function VA(e){const t=vH(e);if(!t)return!1;let n=t.parse(e);return t===ss&&(n=gH(n)),n}const UA=(e,t)=>{const n=VA(e),r=VA(t);if(!n||!r)return Rf(e,t);const o={...n};return s=>(o.red=Ng(n.red,r.red,s),o.green=Ng(n.green,r.green,s),o.blue=Ng(n.blue,r.blue,s),o.alpha=At(n.alpha,r.alpha,s),qo.transform(o))},My=new Set(["none","hidden"]);function bH(e,t){return My.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _H(e,t){return n=>At(e,t,n)}function Rb(e){return typeof e=="number"?_H:typeof e=="string"?Ab(e)?Rf:Bt.test(e)?UA:SH:Array.isArray(e)?AN:typeof e=="object"?Bt.test(e)?UA:EH:Rf}function AN(e,t){const n=[...e],r=n.length,o=e.map((s,l)=>Rb(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}}function EH(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Rb(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function xH(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],l=e.indexes[s][r[s]],u=e.values[l]??0;n[o]=u,r[s]++}return n}const SH=(e,t)=>{const n=oo.createTransformer(t),r=Rc(e),o=Rc(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?My.has(e)&&!o.values.length||My.has(t)&&!r.values.length?bH(e,t):Wc(AN(xH(r,o),o.values),n):Rf(e,t)};function wN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?At(e,t,n):Rb(e)(e,t)}const AH=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>_t.update(t,n),stop:()=>io(t),now:()=>ln.isProcessing?ln.timestamp:On.now()}},TN=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Cf=2e4;function Cb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Cf;)t+=n,r=e.next(t);return t>=Cf?1/0:t}function wH(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Cb(r),Cf);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:zr(o)}}const TH=5;function RN(e,t,n){const r=Math.max(t-TH,0);return aN(n-e(r),t-r)}const Ot={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},Og=.001;function RH({duration:e=Ot.duration,bounce:t=Ot.bounce,velocity:n=Ot.velocity,mass:r=Ot.mass}){let o,s,l=1-t;l=gi(Ot.minDamping,Ot.maxDamping,l),e=gi(Ot.minDuration,Ot.maxDuration,zr(e)),l<1?(o=h=>{const m=h*l,g=m*e,v=m-n,_=zy(h,l),A=Math.exp(-g);return Og-v/_*A},s=h=>{const g=h*l*e,v=g*n+n,_=Math.pow(l,2)*Math.pow(h,2)*e,A=Math.exp(-g),w=zy(Math.pow(h,2),l);return(-o(h)+Og>0?-1:1)*((v-_)*A)/w}):(o=h=>{const m=Math.exp(-h*e),g=(h-n)*e+1;return-Og+m*g},s=h=>{const m=Math.exp(-h*e),g=(n-h)*(e*e);return m*g});const u=5/e,d=NH(o,s,u);if(e=Mr(e),isNaN(d))return{stiffness:Ot.stiffness,damping:Ot.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:l*2*Math.sqrt(r*h),duration:e}}}const CH=12;function NH(e,t,n){let r=n;for(let o=1;o<CH;o++)r=r-e(r)/t(r);return r}function zy(e,t){return e*Math.sqrt(1-t*t)}const OH=["duration","bounce"],kH=["stiffness","damping","mass"];function BA(e,t){return t.some(n=>e[n]!==void 0)}function DH(e){let t={velocity:Ot.velocity,stiffness:Ot.stiffness,damping:Ot.damping,mass:Ot.mass,isResolvedFromDuration:!1,...e};if(!BA(e,kH)&&BA(e,OH))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*gi(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ot.mass,stiffness:o,damping:s}}else{const n=RH(e);t={...t,...n,mass:Ot.mass},t.isResolvedFromDuration=!0}return t}function Nf(e=Ot.visualDuration,t=Ot.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:s},{stiffness:d,damping:h,mass:m,duration:g,velocity:v,isResolvedFromDuration:_}=DH({...n,velocity:-zr(n.velocity||0)}),A=v||0,w=h/(2*Math.sqrt(d*m)),R=l-s,S=zr(Math.sqrt(d/m)),x=Math.abs(R)<5;r||(r=x?Ot.restSpeed.granular:Ot.restSpeed.default),o||(o=x?Ot.restDelta.granular:Ot.restDelta.default);let T;if(w<1){const C=zy(S,w);T=D=>{const I=Math.exp(-w*S*D);return l-I*((A+w*S*R)/C*Math.sin(C*D)+R*Math.cos(C*D))}}else if(w===1)T=C=>l-Math.exp(-S*C)*(R+(A+S*R)*C);else{const C=S*Math.sqrt(w*w-1);T=D=>{const I=Math.exp(-w*S*D),M=Math.min(C*D,300);return l-I*((A+w*S*R)*Math.sinh(M)+C*R*Math.cosh(M))/C}}const O={calculatedDuration:_&&g||null,next:C=>{const D=T(C);if(_)u.done=C>=g;else{let I=C===0?A:0;w<1&&(I=C===0?Mr(A):RN(T,C,D));const M=Math.abs(I)<=r,H=Math.abs(l-D)<=o;u.done=M&&H}return u.value=u.done?l:D,u},toString:()=>{const C=Math.min(Cb(O),Cf),D=TN(I=>O.next(C*I).value,C,30);return C+"ms "+D},toTransition:()=>{}};return O}Nf.applyToOptions=e=>{const t=wH(e,100,Nf);return e.ease=t.ease,e.duration=Mr(t.duration),e.type="keyframes",e};function Vy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:u,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],v={done:!1,value:g},_=M=>u!==void 0&&M<u||d!==void 0&&M>d,A=M=>u===void 0?d:d===void 0||Math.abs(u-M)<Math.abs(d-M)?u:d;let w=n*t;const R=g+w,S=l===void 0?R:l(R);S!==R&&(w=S-g);const x=M=>-w*Math.exp(-M/r),T=M=>S+x(M),O=M=>{const H=x(M),K=T(M);v.done=Math.abs(H)<=h,v.value=v.done?S:K};let C,D;const I=M=>{_(v.value)&&(C=M,D=Nf({keyframes:[v.value,A(v.value)],velocity:RN(T,M,v.value),damping:o,stiffness:s,restDelta:h,restSpeed:m}))};return I(0),{calculatedDuration:null,next:M=>{let H=!1;return!D&&C===void 0&&(H=!0,O(M),I(M)),C!==void 0&&M>=C?D.next(M-C):(!H&&O(M),v)}}}function IH(e,t,n){const r=[],o=n||yi.mix||wN,s=e.length-1;for(let l=0;l<s;l++){let u=o(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||ar:t;u=Wc(d,u)}r.push(u)}return r}function LH(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(vb(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=IH(t,r,o),d=u.length,h=m=>{if(l&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const v=wc(e[g],e[g+1],m);return u[g](v)};return n?m=>h(gi(e[0],e[s-1],m)):h}function jH(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=wc(0,t,r);e.push(At(n,1,o))}}function PH(e){const t=[0];return jH(t,e.length-1),t}function MH(e,t){return e.map(n=>n*t)}function zH(e,t){return e.map(()=>t||pN).splice(0,e.length-1)}function dc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Y$(r)?r.map(PA):PA(r),s={done:!1,value:t[0]},l=MH(n&&n.length===t.length?n:PH(t),e),u=LH(l,t,{ease:Array.isArray(o)?o:zH(t,o)});return{calculatedDuration:e,next:d=>(s.value=u(d),s.done=d>=e,s)}}const VH=e=>e!==null;function Nb(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(VH),u=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!u||r===void 0?s[u]:r}const UH={decay:Vy,inertia:Vy,tween:dc,keyframes:dc,spring:Nf};function CN(e){typeof e.type=="string"&&(e.type=UH[e.type])}class Ob{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 BH=e=>e/100;class kb extends Ob{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==On.now()&&this.tick(On.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;CN(t);const{type:n=dc,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:l=0}=t;let{keyframes:u}=t;const d=n||dc;d!==dc&&typeof u[0]!="number"&&(this.mixKeyframes=Wc(BH,wN(u[0],u[1])),u=[0,100]);const h=d({...t,keyframes:u});s==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=Cb(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=h}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:o,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:m,repeat:g,repeatType:v,repeatDelay:_,type:A,onUpdate:w,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-h*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?S<0:S>o;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let T=this.currentTime,O=r;if(g){const M=Math.min(this.currentTime,o)/u;let H=Math.floor(M),K=M%1;!K&&M>=1&&(K=1),K===1&&H--,H=Math.min(H,g+1),!!(H%2)&&(v==="reverse"?(K=1-K,_&&(K-=_/u)):v==="mirror"&&(O=l)),T=gi(0,1,K)*u}const C=x?{done:!1,value:m[0]}:O.next(T);s&&(C.value=s(C.value));let{done:D}=C;!x&&d!==null&&(D=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return I&&A!==Vy&&(C.value=Nb(m,this.options,R,this.speed)),w&&w(C.value),I&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return zr(this.calculatedDuration)}get time(){return zr(this.currentTime)}set time(t){t=Mr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(On.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=zr(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=AH,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();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(On.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function $H(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Zo=e=>e*180/Math.PI,Uy=e=>{const t=Zo(Math.atan2(e[1],e[0]));return By(t)},HH={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Uy,rotateZ:Uy,skewX:e=>Zo(Math.atan(e[1])),skewY:e=>Zo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},By=e=>(e=e%360,e<0&&(e+=360),e),$A=Uy,HA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),FA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),FH={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:HA,scaleY:FA,scale:e=>(HA(e)+FA(e))/2,rotateX:e=>By(Zo(Math.atan2(e[6],e[5]))),rotateY:e=>By(Zo(Math.atan2(-e[2],e[0]))),rotateZ:$A,rotate:$A,skewX:e=>Zo(Math.atan(e[4])),skewY:e=>Zo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $y(e){return e.includes("scale")?1:0}function Hy(e,t){if(!e||e==="none")return $y(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=FH,o=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=HH,o=u}if(!o)return $y(t);const s=r[t],l=o[1].split(",").map(KH);return typeof s=="function"?s(l):l[s]}const GH=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hy(n,t)};function KH(e){return parseFloat(e.trim())}const Ps=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ms=new Set(Ps),GA=e=>e===js||e===Me,qH=new Set(["x","y","z"]),ZH=Ps.filter(e=>!qH.has(e));function YH(e){const t=[];return ZH.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Xo={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})=>Hy(t,"x"),y:(e,{transform:t})=>Hy(t,"y")};Xo.translateX=Xo.x;Xo.translateY=Xo.y;const Qo=new Set;let Fy=!1,Gy=!1,Ky=!1;function NN(){if(Gy){const e=Array.from(Qo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=YH(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,l])=>{r.getValue(s)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Gy=!1,Fy=!1,Qo.forEach(e=>e.complete(Ky)),Qo.clear()}function ON(){Qo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gy=!0)})}function WH(){Ky=!0,ON(),NN(),Ky=!1}class Db{constructor(t,n,r,o,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Qo.add(this),Fy||(Fy=!0,_t.read(ON),_t.resolveKeyframes(NN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),l=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),o&&s===void 0&&o.set(t[0])}$H(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Qo.delete(this)}cancel(){this.state==="scheduled"&&(Qo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const XH=e=>e.startsWith("--");function QH(e,t,n){XH(t)?e.style.setProperty(t,n):e.style[t]=n}const JH=bb(()=>window.ScrollTimeline!==void 0),e3={};function t3(e,t){const n=bb(e);return()=>e3[t]??n()}const kN=t3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ac=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,KA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ac([0,.65,.55,1]),circOut:ac([.55,0,1,.45]),backIn:ac([.31,.01,.66,-.59]),backOut:ac([.33,1.53,.69,.99])};function DN(e,t){if(e)return typeof e=="function"?kN()?TN(e,t):"ease-out":gN(e)?ac(e):Array.isArray(e)?e.map(n=>DN(n,t)||KA.easeOut):KA[e]}function n3(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:l="loop",ease:u="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const g=DN(u,o);Array.isArray(g)&&(m.easing=g);const v={delay:r,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function IN(e){return typeof e=="function"&&"applyToOptions"in e}function r3({type:e,...t}){return IN(e)&&kN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class i3 extends Ob{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=t,vb(typeof t.type!="string");const h=r3(t);this.animation=n3(n,r,o,h,s),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=Nb(o,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):QH(n,r,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return zr(Number(t))}get time(){return zr(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Mr(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}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&JH()?(this.animation.timeline=t,ar):n(this)}}const LN={anticipate:fN,backInOut:dN,circInOut:mN};function o3(e){return e in LN}function a3(e){typeof e.ease=="string"&&o3(e.ease)&&(e.ease=LN[e.ease])}const qA=10;class s3 extends i3{constructor(t){a3(t),CN(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new kb({...l,autoplay:!1}),d=Mr(this.finishedTime??this.time);n.setWithVelocity(u.sample(d-qA).value,u.sample(d).value,qA),u.stop()}}const ZA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(oo.test(e)||e==="0")&&!e.startsWith("url("));function l3(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 c3(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],l=ZA(o,t),u=ZA(s,t);return!l||!u?!1:l3(e)||(n==="spring"||IN(n))&&r}function qy(e){e.duration=0,e.type}const u3=new Set(["opacity","clipPath","filter","transform"]),d3=bb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function f3(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return d3()&&n&&u3.has(n)&&(n!=="transform"||!h)&&!d&&!r&&o!=="mirror"&&s!==0&&l!=="inertia"}const h3=40;class m3 extends Ob{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:l="loop",keyframes:u,name:d,motionValue:h,element:m,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=On.now();const v={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:l,name:d,motionValue:h,element:m,...g},_=m?.KeyframeResolver||Db;this.keyframeResolver=new _(u,(A,w,R)=>this.onKeyframesResolved(A,w,v,!R),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:l,velocity:u,delay:d,isHandoff:h,onUpdate:m}=r;this.resolvedAt=On.now(),c3(t,s,l,u)||((yi.instantAnimations||!d)&&m?.(Nb(t,r,n)),t[0]=t[t.length-1],qy(r),r.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>h3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},_=!h&&f3(v)?new s3({...v,element:v.motionValue.owner.current}):new kb(v);_.finished.then(()=>this.notifyFinished()).catch(ar),this.pendingTimeline&&(this.stopTimeline=_.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=_}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),WH()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const p3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function g3(e){const t=p3.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function jN(e,t,n=1){const[r,o]=g3(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return rN(l)?parseFloat(l):l}return Ab(o)?jN(o,t,n+1):o}function Ib(e,t){return e?.[t]??e?.default??e}const PN=new Set(["width","height","top","left","right","bottom",...Ps]),y3={test:e=>e==="auto",parse:e=>e},MN=e=>t=>t.test(e),zN=[js,Me,Vr,Ji,lH,sH,y3],YA=e=>zN.find(MN(e));function v3(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||oN(e):!0}const b3=new Set(["brightness","contrast","saturate","opacity"]);function _3(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 o=n.replace(r,"");let s=b3.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const E3=/\b([a-z-]*)\(.*?\)/gu,Zy={...oo,getAnimatableNone:e=>{const t=e.match(E3);return t?t.map(_3).join(" "):e}},WA={...js,transform:Math.round},x3={rotate:Ji,rotateX:Ji,rotateY:Ji,rotateZ:Ji,scale:Ld,scaleX:Ld,scaleY:Ld,scaleZ:Ld,skew:Ji,skewX:Ji,skewY:Ji,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:Tc,originX:MA,originY:MA,originZ:Me},Lb={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,radius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,top:Me,right:Me,bottom:Me,left:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,backgroundPositionX:Me,backgroundPositionY:Me,...x3,zIndex:WA,fillOpacity:Tc,strokeOpacity:Tc,numOctaves:WA},S3={...Lb,color:Bt,backgroundColor:Bt,outlineColor:Bt,fill:Bt,stroke:Bt,borderColor:Bt,borderTopColor:Bt,borderRightColor:Bt,borderBottomColor:Bt,borderLeftColor:Bt,filter:Zy,WebkitFilter:Zy},VN=e=>S3[e];function UN(e,t){let n=VN(e);return n!==Zy&&(n=oo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const A3=new Set(["auto","none","0"]);function w3(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!A3.has(s)&&Rc(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=UN(n,o)}class T3 extends Db{constructor(t,n,r,o,s){super(t,n,r,o,s,!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 h=t[d];if(typeof h=="string"&&(h=h.trim(),Ab(h))){const m=jN(h,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!PN.has(r)||t.length!==2)return;const[o,s]=t,l=YA(o),u=YA(s);if(l!==u)if(GA(l)&&GA(u))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Xo[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||v3(t[o]))&&r.push(o);r.length&&w3(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=Xo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,l=r[s];r[s]=Xo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([u,d])=>{t.getValue(u).set(d)}),this.resolveNoneKeyframes()}}function R3(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const BN=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function C3(e){return iN(e)&&"offsetHeight"in e}const XA=30,N3=e=>!isNaN(parseFloat(e));class O3{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=On.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=N3(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(),_t.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.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=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>XA)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,XA);return aN(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ss(e,t){return new O3(e,t)}const{schedule:jb}=yN(queueMicrotask,!1),fr={x:!1,y:!1};function $N(){return fr.x||fr.y}function k3(e){return e==="x"||e==="y"?fr[e]?null:(fr[e]=!0,()=>{fr[e]=!1}):fr.x||fr.y?null:(fr.x=fr.y=!0,()=>{fr.x=fr.y=!1})}function HN(e,t){const n=R3(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function QA(e){return!(e.pointerType==="touch"||$N())}function D3(e,t,n={}){const[r,o,s]=HN(e,n),l=u=>{if(!QA(u))return;const{target:d}=u,h=t(d,u);if(typeof h!="function"||!d)return;const m=g=>{QA(g)&&(h(g),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,o)};return r.forEach(u=>{u.addEventListener("pointerenter",l,o)}),s}const FN=(e,t)=>t?e===t?!0:FN(e,t.parentElement):!1,Pb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,I3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function L3(e){return I3.has(e.tagName)||e.tabIndex!==-1}const af=new WeakSet;function JA(e){return t=>{t.key==="Enter"&&e(t)}}function kg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const j3=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=JA(()=>{if(af.has(n))return;kg(n,"down");const o=JA(()=>{kg(n,"up")}),s=()=>kg(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ew(e){return Pb(e)&&!$N()}function P3(e,t,n={}){const[r,o,s]=HN(e,n),l=u=>{const d=u.currentTarget;if(!ew(u))return;af.add(d);const h=t(d,u),m=(_,A)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),af.has(d)&&af.delete(d),ew(_)&&typeof h=="function"&&h(_,{success:A})},g=_=>{m(_,d===window||d===document||n.useGlobalTarget||FN(d,_.target))},v=_=>{m(_,!1)};window.addEventListener("pointerup",g,o),window.addEventListener("pointercancel",v,o)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,o),C3(u)&&(u.addEventListener("focus",h=>j3(h,o)),!L3(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),s}function GN(e){return iN(e)&&"ownerSVGElement"in e}function M3(e){return GN(e)&&e.tagName==="svg"}const yn=e=>!!(e&&e.getVelocity),z3=[...zN,Bt,oo],V3=e=>z3.find(MN(e)),KN=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function U3(e=!0){const t=E.useContext(pb);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=E.useId();E.useEffect(()=>{if(e)return o(s)},[e]);const l=E.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,l]:[!0]}const Mb=E.createContext({strict:!1}),tw={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"]},As={};for(const e in tw)As[e]={isEnabled:t=>tw[e].some(n=>!!t[n])};function Yy(e){for(const t in e)As[t]={...As[t],...e[t]}}function B3({children:e,features:t,strict:n=!1}){const[,r]=E.useState(!Dg(t)),o=E.useRef(void 0);if(!Dg(t)){const{renderer:s,...l}=t;o.current=s,Yy(l)}return E.useEffect(()=>{Dg(t)&&t().then(({renderer:s,...l})=>{Yy(l),o.current=s,r(!0)})},[]),y.jsx(Mb.Provider,{value:{renderer:o.current,strict:n},children:e})}function Dg(e){return typeof e=="function"}const $3=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 Of(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$3.has(e)}let qN=e=>!Of(e);function H3(e){typeof e=="function"&&(qN=t=>t.startsWith("on")?!Of(t):e(t))}try{H3(require("@emotion/is-prop-valid").default)}catch{}function F3(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(qN(o)||n===!0&&Of(o)||!t&&!Of(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const ph=E.createContext({});function gh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Cc(e){return typeof e=="string"||Array.isArray(e)}const zb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vb=["initial",...zb];function yh(e){return gh(e.animate)||Vb.some(t=>Cc(e[t]))}function ZN(e){return!!(yh(e)||e.variants)}function G3(e,t){if(yh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Cc(n)?n:void 0,animate:Cc(r)?r:void 0}}return e.inherit!==!1?t:{}}function K3(e){const{initial:t,animate:n}=G3(e,E.useContext(ph));return E.useMemo(()=>({initial:t,animate:n}),[nw(t),nw(n)])}function nw(e){return Array.isArray(e)?e.join(" "):e}const Nc={};function q3(e){for(const t in e)Nc[t]=e[t],Sb(t)&&(Nc[t].isCSSVariable=!0)}function YN(e,{layout:t,layoutId:n}){return Ms.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Nc[e]||e==="opacity")}const Z3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Y3=Ps.length;function W3(e,t,n){let r="",o=!0;for(let s=0;s<Y3;s++){const l=Ps[s],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 h=BN(u,Lb[l]);if(!d){o=!1;const m=Z3[l]||l;r+=`${m}(${h}) `}n&&(t[l]=h)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Ub(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let l=!1,u=!1;for(const d in t){const h=t[d];if(Ms.has(d)){l=!0;continue}else if(Sb(d)){o[d]=h;continue}else{const m=BN(h,Lb[d]);d.startsWith("origin")?(u=!0,s[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=W3(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:m=0}=s;r.transformOrigin=`${d} ${h} ${m}`}}const Bb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function WN(e,t,n){for(const r in t)!yn(t[r])&&!YN(r,n)&&(e[r]=t[r])}function X3({transformTemplate:e},t){return E.useMemo(()=>{const n=Bb();return Ub(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Q3(e,t){const n=e.style||{},r={};return WN(r,n,e),Object.assign(r,X3(e,t)),r}function J3(e,t){const n={},r=Q3(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 eF={offset:"stroke-dashoffset",array:"stroke-dasharray"},tF={offset:"strokeDashoffset",array:"strokeDasharray"};function nF(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?eF:tF;e[s.offset]=Me.transform(-r);const l=Me.transform(t),u=Me.transform(n);e[s.array]=`${l} ${u}`}function XN(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...u},d,h,m){if(Ub(e,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete g.transformBox),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),o!==void 0&&nF(g,o,s,l,!1)}const QN=()=>({...Bb(),attrs:{}}),JN=e=>typeof e=="string"&&e.toLowerCase()==="svg";function rF(e,t,n,r){const o=E.useMemo(()=>{const s=QN();return XN(s,t,JN(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};WN(s,e.style,e),o.style={...s,...o.style}}return o}const iF=["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 $b(e){return typeof e!="string"||e.includes("-")?!1:!!(iF.indexOf(e)>-1||/[A-Z]/u.test(e))}function oF(e,t,n,{latestValues:r},o,s=!1){const u=($b(e)?rF:J3)(t,r,o,e),d=F3(t,typeof e=="string",s),h=e!==E.Fragment?{...d,...u,ref:n}:{},{children:m}=t,g=E.useMemo(()=>yn(m)?m.get():m,[m]);return E.createElement(e,{...h,children:g})}function rw(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hb(e,t,n,r){if(typeof t=="function"){const[o,s]=rw(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=rw(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function sf(e){return yn(e)?e.get():e}function aF({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:sF(n,r,o,e),renderState:t()}}function sF(e,t,n,r){const o={},s=r(e,{});for(const v in s)o[v]=sf(s[v]);let{initial:l,animate:u}=e;const d=yh(e),h=ZN(e);t&&h&&!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 g=m?u:l;if(g&&typeof g!="boolean"&&!gh(g)){const v=Array.isArray(g)?g:[g];for(let _=0;_<v.length;_++){const A=Hb(e,v[_]);if(A){const{transitionEnd:w,transition:R,...S}=A;for(const x in S){let T=S[x];if(Array.isArray(T)){const O=m?T.length-1:0;T=T[O]}T!==null&&(o[x]=T)}for(const x in w)o[x]=w[x]}}}return o}const eO=e=>(t,n)=>{const r=E.useContext(ph),o=E.useContext(pb),s=()=>aF(e,t,r,o);return n?s():B$(s)};function Fb(e,t,n){const{style:r}=e,o={};for(const s in r)(yn(r[s])||t.style&&yn(t.style[s])||YN(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}const lF=eO({scrapeMotionValuesFromProps:Fb,createRenderState:Bb});function tO(e,t,n){const r=Fb(e,t,n);for(const o in e)if(yn(e[o])||yn(t[o])){const s=Ps.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const cF=eO({scrapeMotionValuesFromProps:tO,createRenderState:QN}),uF=Symbol.for("motionComponentSymbol");function ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dF(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):ls(n)&&(n.current=r))},[t])}const Gb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fF="framerAppearId",nO="data-"+Gb(fF),rO=E.createContext({});function hF(e,t,n,r,o){const{visualElement:s}=E.useContext(ph),l=E.useContext(Mb),u=E.useContext(pb),d=E.useContext(KN).reducedMotion,h=E.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const m=h.current,g=E.useContext(rO);m&&!m.projection&&o&&(m.type==="html"||m.type==="svg")&&mF(h.current,n,o,g);const v=E.useRef(!1);E.useInsertionEffect(()=>{m&&v.current&&m.update(n,u)});const _=n[nO],A=E.useRef(!!_&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return $$(()=>{m&&(v.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),A.current&&m.animationState&&m.animationState.animateChanges())}),E.useEffect(()=>{m&&(!A.current&&m.animationState&&m.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),A.current=!1),m.enteringChildren=void 0)}),m}function mF(e,t,n,r){const{layoutId:o,layout:s,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:iO(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||u&&ls(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h})}function iO(e){if(e)return e.options.allowProjection!==!1?e.projection:iO(e.parent)}function Ig(e,{forwardMotionProps:t=!1}={},n,r){n&&Yy(n);const o=$b(e)?cF:lF;function s(u,d){let h;const m={...E.useContext(KN),...u,layoutId:pF(u)},{isStatic:g}=m,v=K3(u),_=o(u,g);if(!g&&mb){gF();const A=yF(m);h=A.MeasureLayout,v.visualElement=hF(e,_,m,r,A.ProjectionNode)}return y.jsxs(ph.Provider,{value:v,children:[h&&v.visualElement?y.jsx(h,{visualElement:v.visualElement,...m}):null,oF(e,u,dF(_,v.visualElement,d),_,g,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=E.forwardRef(s);return l[uF]=e,l}function pF({layoutId:e}){const t=E.useContext(nN).id;return t&&e!==void 0?t+"-"+e:e}function gF(e,t){E.useContext(Mb).strict}function yF(e){const{drag:t,layout:n}=As;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function vF(e,t){if(typeof Proxy>"u")return Ig;const n=new Map,r=(s,l)=>Ig(s,l,e,t),o=(s,l)=>r(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?r:(n.has(l)||n.set(l,Ig(l,void 0,e,t)),n.get(l))})}function oO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bF({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _F(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Lg(e){return e===void 0||e===1}function Wy({scale:e,scaleX:t,scaleY:n}){return!Lg(e)||!Lg(t)||!Lg(n)}function Ho(e){return Wy(e)||aO(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function aO(e){return iw(e.x)||iw(e.y)}function iw(e){return e&&e!=="0%"}function kf(e,t,n){const r=e-n,o=t*r;return n+o}function ow(e,t,n,r,o){return o!==void 0&&(e=kf(e,o,r)),kf(e,n,r)+t}function Xy(e,t=0,n=1,r,o){e.min=ow(e.min,t,n,r,o),e.max=ow(e.max,t,n,r,o)}function sO(e,{x:t,y:n}){Xy(e.x,t.translate,t.scale,t.originPoint),Xy(e.y,n.translate,n.scale,n.originPoint)}const aw=.999999999999,sw=1.0000000000001;function EF(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let u=0;u<o;u++){s=n[u],l=s.projectionDelta;const{visualElement:d}=s.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&us(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,sO(e,l)),r&&Ho(s.latestValues)&&us(e,s.latestValues))}t.x<sw&&t.x>aw&&(t.x=1),t.y<sw&&t.y>aw&&(t.y=1)}function cs(e,t){e.min=e.min+t,e.max=e.max+t}function lw(e,t,n,r,o=.5){const s=At(e.min,e.max,o);Xy(e,t,n,s,r)}function us(e,t){lw(e.x,t.x,t.scaleX,t.scale,t.originX),lw(e.y,t.y,t.scaleY,t.scale,t.originY)}function lO(e,t){return oO(_F(e.getBoundingClientRect(),t))}function xF(e,t,n){const r=lO(e,n),{scroll:o}=t;return o&&(cs(r.x,o.offset.x),cs(r.y,o.offset.y)),r}const cw=()=>({translate:0,scale:1,origin:0,originPoint:0}),ds=()=>({x:cw(),y:cw()}),uw=()=>({min:0,max:0}),It=()=>({x:uw(),y:uw()}),Qy={current:null},cO={current:!1};function SF(){if(cO.current=!0,!!mb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Qy.current=e.matches;e.addEventListener("change",t),t()}else Qy.current=!1}const AF=new WeakMap;function wF(e,t,n){for(const r in t){const o=t[r],s=n[r];if(yn(o))e.addValue(r,o);else if(yn(s))e.addValue(r,Ss(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(r);e.addValue(r,Ss(l!==void 0?l:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const dw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class TF{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,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 v=On.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,_t.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=yh(n),this.isVariantNode=ZN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in g){const _=g[v];d[v]!==void 0&&yn(_)&&_.set(d[v])}}mount(t){this.current=t,AF.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)),cO.current||SF(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qy.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),io(this.notifyUpdate),io(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ms.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&_t.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),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 As){const n=As[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):It()}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<dw.length;r++){const o=dw[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,l=t[s];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=wF(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=Ss(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"&&(rN(r)||oN(r))?r=parseFloat(r):!V3(r)&&oo.test(n)&&(r=UN(t,n)),this.setBaseTarget(t,yn(r)?r.get():r)),yn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Hb(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!yn(o)?o: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)}scheduleRenderMicrotask(){jb.render(this.render)}}class uO extends TF{constructor(){super(...arguments),this.KeyframeResolver=T3}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;yn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function dO(e,{style:t,vars:n},r,o){const s=e.style;let l;for(l in t)s[l]=t[l];o?.applyProjectionStyles(s,r);for(l in n)s.setProperty(l,n[l])}function RF(e){return window.getComputedStyle(e)}class CF extends uO{constructor(){super(...arguments),this.type="html",this.renderInstance=dO}readValueFromInstance(t,n){if(Ms.has(n))return this.projection?.isProjecting?$y(n):GH(t,n);{const r=RF(t),o=(Sb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return lO(t,n)}build(t,n,r){Ub(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fb(t,n,r)}}const fO=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 NF(e,t,n,r){dO(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(fO.has(o)?o:Gb(o),t.attrs[o])}class OF extends uO{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ms.has(n)){const r=VN(n);return r&&r.default||0}return n=fO.has(n)?n:Gb(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return tO(t,n,r)}build(t,n,r){XN(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){NF(t,n,r,o)}mount(t){this.isSVGTag=JN(t.tagName),super.mount(t)}}const hO=(e,t)=>$b(e)?new OF(t):new CF(t,{allowProjection:e!==E.Fragment});function ps(e,t,n){const r=e.getProps();return Hb(r,t,n!==void 0?n:r.custom,e)}const Jy=e=>Array.isArray(e);function kF(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ss(n))}function DF(e){return Jy(e)?e[e.length-1]||0:e}function IF(e,t){const n=ps(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const l in s){const u=DF(s[l]);kF(e,l,u)}}function LF(e){return!!(yn(e)&&e.add)}function ev(e,t){const n=e.getValue("willChange");if(LF(n))return n.add(t);if(!n&&yi.WillChange){const r=new yi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function mO(e){return e.props[nO]}const jF=e=>e!==null;function PF(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(jF),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const MF={type:"spring",stiffness:500,damping:25,restSpeed:10},zF=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),VF={type:"keyframes",duration:.8},UF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BF=(e,{keyframes:t})=>t.length>2?VF:Ms.has(e)?e.startsWith("scale")?zF(t[1]):MF:UF;function $F({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:u,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const Kb=(e,t,n,r={},o,s)=>l=>{const u=Ib(r,e)||{},d=u.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Mr(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-h,onUpdate:v=>{t.set(v),u.onUpdate&&u.onUpdate(v)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:s?void 0:o};$F(u)||Object.assign(m,BF(e,m)),m.duration&&(m.duration=Mr(m.duration)),m.repeatDelay&&(m.repeatDelay=Mr(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(qy(m),m.delay===0&&(g=!0)),(yi.instantAnimations||yi.skipAnimations)&&(g=!0,qy(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,g&&!s&&t.get()!==void 0){const v=PF(m.keyframes,u);if(v!==void 0){_t.update(()=>{m.onUpdate(v),m.onComplete()});return}}return u.isSync?new kb(m):new m3(m)};function HF({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pO(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(s=r);const d=[],h=o&&e.animationState&&e.animationState.getState()[o];for(const m in u){const g=e.getValue(m,e.latestValues[m]??null),v=u[m];if(v===void 0||h&&HF(h,m))continue;const _={delay:n,...Ib(s||{},m)},A=g.get();if(A!==void 0&&!g.isAnimating&&!Array.isArray(v)&&v===A&&!_.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const S=mO(e);if(S){const x=window.MotionHandoffAnimation(S,m,_t);x!==null&&(_.startTime=x,w=!0)}}ev(e,m),g.start(Kb(m,g,v,e.shouldReduceMotion&&PN.has(m)?{type:!1}:_,e,w));const R=g.animation;R&&d.push(R)}return l&&Promise.all(d).then(()=>{_t.update(()=>{l&&IF(e,l)})}),d}function gO(e,t,n,r=0,o=1){const s=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),l=e.size,u=(l-1)*r;return typeof n=="function"?n(s,l):o===1?s*r:u-s*r}function tv(e,t,n={}){const r=ps(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(pO(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=o;return FF(e,t,d,h,m,g,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[d,h]=u==="beforeChildren"?[s,l]:[l,s];return d().then(()=>h())}else return Promise.all([s(),l(n.delay)])}function FF(e,t,n=0,r=0,o=0,s=1,l){const u=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),u.push(tv(d,t,{...l,delay:n+(typeof r=="function"?0:r)+gO(e.variantChildren,d,r,o,s)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(u)}function GF(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>tv(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=tv(e,t,n);else{const o=typeof t=="function"?ps(e,t,n.custom):t;r=Promise.all(pO(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function yO(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 KF=Vb.length;function vO(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?vO(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<KF;n++){const r=Vb[n],o=e.props[r];(Cc(o)||o===!1)&&(t[r]=o)}return t}const qF=[...zb].reverse(),ZF=zb.length;function YF(e){return t=>Promise.all(t.map(({animation:n,options:r})=>GF(e,n,r)))}function WF(e){let t=YF(e),n=fw(),r=!0;const o=d=>(h,m)=>{const g=ps(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:v,transitionEnd:_,...A}=g;h={...h,...A,..._}}return h};function s(d){t=d(e)}function l(d){const{props:h}=e,m=vO(e.parent)||{},g=[],v=new Set;let _={},A=1/0;for(let R=0;R<ZF;R++){const S=qF[R],x=n[S],T=h[S]!==void 0?h[S]:m[S],O=Cc(T),C=S===d?x.isActive:null;C===!1&&(A=R);let D=T===m[S]&&T!==h[S]&&O;if(D&&r&&e.manuallyAnimateOnMount&&(D=!1),x.protectedKeys={..._},!x.isActive&&C===null||!T&&!x.prevProp||gh(T)||typeof T=="boolean")continue;const I=XF(x.prevProp,T);let M=I||S===d&&x.isActive&&!D&&O||R>A&&O,H=!1;const K=Array.isArray(T)?T:[T];let Z=K.reduce(o(S),{});C===!1&&(Z={});const{prevResolvedValues:J={}}=x,ae={...J,...Z},Y=X=>{M=!0,v.has(X)&&(H=!0,v.delete(X)),x.needsAnimating[X]=!0;const F=e.getValue(X);F&&(F.liveStyle=!1)};for(const X in ae){const F=Z[X],ve=J[X];if(_.hasOwnProperty(X))continue;let P=!1;Jy(F)&&Jy(ve)?P=!yO(F,ve):P=F!==ve,P?F!=null?Y(X):v.add(X):F!==void 0&&v.has(X)?Y(X):x.protectedKeys[X]=!0}x.prevProp=T,x.prevResolvedValues=Z,x.isActive&&(_={..._,...Z}),r&&e.blockInitialAnimation&&(M=!1);const re=D&&I;M&&(!re||H)&&g.push(...K.map(X=>{const F={type:S};if(typeof X=="string"&&r&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:ve}=e,P=ps(ve,X);if(ve.enteringChildren&&P){const{delayChildren:oe}=P.transition||{};F.delay=gO(ve.enteringChildren,e,oe)}}return{animation:X,options:F}}))}if(v.size){const R={};if(typeof h.initial!="boolean"){const S=ps(e,Array.isArray(h.initial)?h.initial[0]:h.initial);S&&S.transition&&(R.transition=S.transition)}v.forEach(S=>{const x=e.getBaseTarget(S),T=e.getValue(S);T&&(T.liveStyle=!0),R[S]=x??null}),g.push({animation:R})}let w=!!g.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(g):Promise.resolve()}function u(d,h){if(n[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(d,h)),n[d].isActive=h;const m=l(d);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n,reset:()=>{n=fw(),r=!0}}}function XF(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yO(t,e):!1}function Bo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fw(){return{animate:Bo(!0),whileInView:Bo(),whileHover:Bo(),whileTap:Bo(),whileDrag:Bo(),whileFocus:Bo(),exit:Bo()}}class fo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class QF extends fo{constructor(t){super(t),t.animationState||(t.animationState=WF(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gh(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(){this.node.animationState.reset(),this.unmountControls?.()}}let JF=0;class e4 extends fo{constructor(){super(...arguments),this.id=JF++}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 o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 bO={animation:{Feature:QF},exit:{Feature:e4}};function Oc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Jc(e){return{point:{x:e.pageX,y:e.pageY}}}const t4=e=>t=>Pb(t)&&e(t,Jc(t));function fc(e,t,n,r){return Oc(e,t,t4(n),r)}const _O=1e-4,n4=1-_O,r4=1+_O,EO=.01,i4=0-EO,o4=0+EO;function _n(e){return e.max-e.min}function a4(e,t,n){return Math.abs(e-t)<=n}function hw(e,t,n,r=.5){e.origin=r,e.originPoint=At(t.min,t.max,e.origin),e.scale=_n(n)/_n(t),e.translate=At(n.min,n.max,e.origin)-e.originPoint,(e.scale>=n4&&e.scale<=r4||isNaN(e.scale))&&(e.scale=1),(e.translate>=i4&&e.translate<=o4||isNaN(e.translate))&&(e.translate=0)}function hc(e,t,n,r){hw(e.x,t.x,n.x,r?r.originX:void 0),hw(e.y,t.y,n.y,r?r.originY:void 0)}function mw(e,t,n){e.min=n.min+t.min,e.max=e.min+_n(t)}function s4(e,t,n){mw(e.x,t.x,n.x),mw(e.y,t.y,n.y)}function pw(e,t,n){e.min=t.min-n.min,e.max=e.min+_n(t)}function mc(e,t,n){pw(e.x,t.x,n.x),pw(e.y,t.y,n.y)}function rr(e){return[e("x"),e("y")]}const xO=({current:e})=>e?e.ownerDocument.defaultView:null,gw=(e,t)=>Math.abs(e-t);function l4(e,t){const n=gw(e.x,t.x),r=gw(e.y,t.y);return Math.sqrt(n**2+r**2)}class SO{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Pg(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,A=l4(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!A)return;const{point:w}=v,{timestamp:R}=ln;this.history.push({...w,timestamp:R});const{onStart:S,onMove:x}=this.handlers;_||(S&&S(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,v)},this.handlePointerMove=(v,_)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=jg(_,this.transformPagePoint),_t.update(this.updatePoint,!0)},this.handlePointerUp=(v,_)=>{this.end();const{onEnd:A,onSessionEnd:w,resumeAnimation:R}=this.handlers;if(this.dragSnapToOrigin&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Pg(v.type==="pointercancel"?this.lastMoveEventInfo:jg(_,this.transformPagePoint),this.history);this.startEvent&&A&&A(v,S),w&&w(v,S)},!Pb(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=o||window;const u=Jc(t),d=jg(u,this.transformPagePoint),{point:h}=d,{timestamp:m}=ln;this.history=[{...h,timestamp:m}];const{onSessionStart:g}=n;g&&g(t,Pg(d,this.history)),this.removeListeners=Wc(fc(this.contextWindow,"pointermove",this.handlePointerMove),fc(this.contextWindow,"pointerup",this.handlePointerUp),fc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),io(this.updatePoint)}}function jg(e,t){return t?{point:t(e.point)}:e}function yw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pg({point:e},t){return{point:e,delta:yw(e,AO(t)),offset:yw(e,c4(t)),velocity:u4(t,.1)}}function c4(e){return e[0]}function AO(e){return e[e.length-1]}function u4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=AO(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mr(t)));)n--;if(!r)return{x:0,y:0};const s=zr(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function d4(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?At(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?At(n,e,r.max):Math.min(e,n)),e}function vw(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 f4(e,{top:t,left:n,bottom:r,right:o}){return{x:vw(e.x,n,o),y:vw(e.y,t,r)}}function bw(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 h4(e,t){return{x:bw(e.x,t.x),y:bw(e.y,t.y)}}function m4(e,t){let n=.5;const r=_n(e),o=_n(t);return o>r?n=wc(t.min,t.max-r,e.min):r>o&&(n=wc(e.min,e.max-o,t.min)),gi(0,1,n)}function p4(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 nv=.35;function g4(e=nv){return e===!1?e=0:e===!0&&(e=nv),{x:_w(e,"left","right"),y:_w(e,"top","bottom")}}function _w(e,t,n){return{min:Ew(e,t),max:Ew(e,n)}}function Ew(e,t){return typeof e=="number"?e:e[t]||0}const y4=new WeakMap;class v4{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=It(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=g=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Jc(g).point)},l=(g,v)=>{const{drag:_,dragPropagation:A,onDragStart:w}=this.getProps();if(_&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=k3(_),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rr(S=>{let x=this.getAxisMotionValue(S).get()||0;if(Vr.test(x)){const{projection:T}=this.visualElement;if(T&&T.layout){const O=T.layout.layoutBox[S];O&&(x=_n(O)*(parseFloat(x)/100))}}this.originPoint[S]=x}),w&&_t.postRender(()=>w(g,v)),ev(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},u=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:_,dragDirectionLock:A,onDirectionLock:w,onDrag:R}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:S}=v;if(A&&this.currentDirection===null){this.currentDirection=b4(S),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",v.point,S),this.updateAxis("y",v.point,S),this.visualElement.render(),R&&R(g,v)},d=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>rr(g=>this.getAnimationState(g)==="paused"&&this.getAxisMotionValue(g).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new SO(t,{onSessionStart:s,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:xO(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&_t.postRender(()=>u(r,o))}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:o}=this.getProps();if(!r||!jd(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=d4(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&ls(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=f4(r.layoutBox,t):this.constraints=!1,this.elastic=g4(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=p4(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ls(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=xF(r,o.root,this.visualElement.getTransformPagePoint());let l=h4(o.layout.layoutBox,s);if(n){const u=n(bF(l));this.hasMutatedConstraints=!!u,u&&(l=oO(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},h=rr(m=>{if(!jd(m,n,this.currentDirection))return;let g=d&&d[m]||{};l&&(g={min:0,max:0});const v=o?200:1e6,_=o?40:1e7,A={type:"inertia",velocity:r?t[m]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...s,...g};return this.startAxisValueAnimation(m,A)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ev(this.visualElement,t),r.start(Kb(t,r,0,n,this.visualElement,!1))}stopAnimation(){rr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rr(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rr(n=>{const{drag:r}=this.getProps();if(!jd(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n];s.set(t[n]-At(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ls(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};rr(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();o[l]=m4({min:d,max:d},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rr(l=>{if(!jd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];u.set(At(d,h,o[l]))})}addListeners(){if(!this.visualElement.current)return;y4.set(this.visualElement,this);const t=this.visualElement.current,n=fc(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();ls(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_t.read(r);const l=Oc(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(rr(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=d[m].translate,g.set(g.get()+d[m].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=nv,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function jd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function b4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class _4 extends fo{constructor(t){super(t),this.removeGroupControls=ar,this.removeListeners=ar,this.controls=new v4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ar}unmount(){this.removeGroupControls(),this.removeListeners()}}const xw=e=>(t,n)=>{e&&_t.postRender(()=>e(t,n))};class E4 extends fo{constructor(){super(...arguments),this.removePointerDownListener=ar}onPointerDown(t){this.session=new SO(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xO(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:xw(t),onStart:xw(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&_t.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=fc(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 lf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Sw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ql={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=Sw(e,t.target.x),r=Sw(e,t.target.y);return`${n}% ${r}%`}},x4={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=oo.parse(e);if(o.length>5)return r;const s=oo.createTransformer(e),l=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;o[0+l]/=u,o[1+l]/=d;const h=At(u,d,.5);return typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h),s(o)}};let Mg=!1;class S4 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;q3(A4),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Mg&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),lf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,Mg=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||_t.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Mg=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wO(e){const[t,n]=U3(),r=E.useContext(nN);return y.jsx(S4,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(rO),isPresent:t,safeToRemove:n})}const A4={borderRadius:{...ql,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ql,borderTopRightRadius:ql,borderBottomLeftRadius:ql,borderBottomRightRadius:ql,boxShadow:x4};function w4(e,t,n){const r=yn(e)?e:Ss(e);return r.start(Kb("",r,t,n)),r.animation}const T4=(e,t)=>e.depth-t.depth;class R4{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(T4),this.isDirty=!1,this.children.forEach(t)}}function C4(e,t){const n=On.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(io(r),e(s-t))};return _t.setup(r,!0),()=>io(r)}const TO=["TopLeft","TopRight","BottomLeft","BottomRight"],N4=TO.length,Aw=e=>typeof e=="string"?parseFloat(e):e,ww=e=>typeof e=="number"||Me.test(e);function O4(e,t,n,r,o,s){o?(e.opacity=At(0,n.opacity??1,k4(r)),e.opacityExit=At(t.opacity??1,0,D4(r))):s&&(e.opacity=At(t.opacity??1,n.opacity??1,r));for(let l=0;l<N4;l++){const u=`border${TO[l]}Radius`;let d=Tw(t,u),h=Tw(n,u);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||ww(d)===ww(h)?(e[u]=Math.max(At(Aw(d),Aw(h),r),0),(Vr.test(h)||Vr.test(d))&&(e[u]+="%")):e[u]=h}(t.rotate||n.rotate)&&(e.rotate=At(t.rotate||0,n.rotate||0,r))}function Tw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const k4=RO(0,.5,hN),D4=RO(.5,.95,ar);function RO(e,t,n){return r=>r<e?0:r>t?1:n(wc(e,t,r))}function Rw(e,t){e.min=t.min,e.max=t.max}function tr(e,t){Rw(e.x,t.x),Rw(e.y,t.y)}function Cw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Nw(e,t,n,r,o){return e-=t,e=kf(e,1/n,r),o!==void 0&&(e=kf(e,1/o,r)),e}function I4(e,t=0,n=1,r=.5,o,s=e,l=e){if(Vr.test(t)&&(t=parseFloat(t),t=At(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=At(s.min,s.max,r);e===s&&(u-=t),e.min=Nw(e.min,t,n,u,o),e.max=Nw(e.max,t,n,u,o)}function Ow(e,t,[n,r,o],s,l){I4(e,t[n],t[r],t[o],t.scale,s,l)}const L4=["x","scaleX","originX"],j4=["y","scaleY","originY"];function kw(e,t,n,r){Ow(e.x,t,L4,n?n.x:void 0,r?r.x:void 0),Ow(e.y,t,j4,n?n.y:void 0,r?r.y:void 0)}function Dw(e){return e.translate===0&&e.scale===1}function CO(e){return Dw(e.x)&&Dw(e.y)}function Iw(e,t){return e.min===t.min&&e.max===t.max}function P4(e,t){return Iw(e.x,t.x)&&Iw(e.y,t.y)}function Lw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function NO(e,t){return Lw(e.x,t.x)&&Lw(e.y,t.y)}function jw(e){return _n(e.x)/_n(e.y)}function Pw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class M4{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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;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:o}=t.options;o===!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 z4(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,l=n?.z||0;if((o||s||l)&&(r=`translate3d(${o}px, ${s}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,rotateX:g,rotateY:v,skewX:_,skewY:A}=n;h&&(r=`perspective(${h}px) ${r}`),m&&(r+=`rotate(${m}deg) `),g&&(r+=`rotateX(${g}deg) `),v&&(r+=`rotateY(${v}deg) `),_&&(r+=`skewX(${_}deg) `),A&&(r+=`skewY(${A}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"],V4=1e3;let U4=0;function Vg(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function OO(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mO(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",_t,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&OO(r)}function kO({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},u=t?.()){this.id=U4++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.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(H4),this.nodes.forEach(q4),this.nodes.forEach(Z4),this.nodes.forEach(F4)},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 R4)}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=GN(l)&&!M3(l),this.instance=l;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.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,g=0;const v=()=>this.root.updateBlockedByResize=!1;_t.read(()=>{g=window.innerWidth}),e(l,()=>{const _=window.innerWidth;_!==g&&(g=_,this.root.updateBlockedByResize=!0,m&&m(),m=C4(v,250),lf.hasAnimatedSinceResize&&(lf.hasAnimatedSinceResize=!1,this.nodes.forEach(Vw)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||h.getDefaultTransition()||J4,{onLayoutAnimationStart:w,onLayoutAnimationComplete:R}=h.getProps(),S=!this.targetLayout||!NO(this.targetLayout,_),x=!g&&v;if(this.options.layoutRoot||this.resumeFrom||x||g&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...Ib(A,"layout"),onPlay:w,onComplete:R};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,x)}else g||Vw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}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(),io(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(Y4),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&&OO(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Mw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(K4),this.nodes.forEach(B4),this.nodes.forEach($4)):this.nodes.forEach(zw),this.clearAllSnapshots();const u=On.now();ln.delta=gi(0,1e3/60,u-ln.timestamp),ln.timestamp=u,ln.isProcessing=!0,Tg.update.process(ln),Tg.preRender.process(ln),Tg.render.process(ln),ln.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(G4),this.sharedNodes.forEach(W4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_t.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_t.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_n(this.snapshot.measuredBox.x)&&!_n(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=It(),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(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!CO(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;l&&this.instance&&(u||Ho(this.latestValues)||m)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),eG(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return It();const u=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(tG))){const{scroll:h}=this.root;h&&(cs(u.x,h.offset.x),cs(u.y,h.offset.y))}return u}removeElementScroll(l){const u=It();if(tr(u,l),this.scroll?.wasRoot)return u;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:g}=h;h!==this.root&&m&&g.layoutScroll&&(m.wasRoot&&tr(u,l),cs(u.x,m.offset.x),cs(u.y,m.offset.y))}return u}applyTransform(l,u=!1){const d=It();tr(d,l);for(let h=0;h<this.path.length;h++){const m=this.path[h];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&us(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Ho(m.latestValues)&&us(d,m.latestValues)}return Ho(this.latestValues)&&us(d,this.latestValues),d}removeTransform(l){const u=It();tr(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!Ho(h.latestValues))continue;Wy(h.latestValues)&&h.updateSnapshot();const m=It(),g=h.measurePageBox();tr(m,g),kw(u,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return Ho(this.latestValues)&&kw(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!==ln.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){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||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:g}=this.options;if(!(!this.layout||!(m||g))){if(this.resolvedRelativeTargetAt=ln.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=It(),this.relativeTargetOrigin=It(),mc(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=It(),this.targetWithTransforms=It()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tr(this.target,this.layout.layoutBox),sO(this.target,this.targetDelta)):tr(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=It(),this.relativeTargetOrigin=It(),mc(this.relativeTargetOrigin,this.target,v.target),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Wy(this.parent.latestValues)||aO(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===ln.timestamp&&(d=!1),d)return;const{layout:h,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||!(h||m))return;tr(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;EF(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=It());const{target:_}=l;if(!_){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Cw(this.prevProjectionDelta.x,this.projectionDelta.x),Cw(this.prevProjectionDelta.y,this.projectionDelta.y)),hc(this.projectionDelta,this.layoutCorrected,_,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!Pw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",_))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ds(),this.projectionDelta=ds(),this.projectionDeltaWithTransform=ds()}setAnimationOrigin(l,u=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},g=ds();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const v=It(),_=d?d.source:void 0,A=this.layout?this.layout.source:void 0,w=_!==A,R=this.getStack(),S=!R||R.members.length<=1,x=!!(w&&!S&&this.options.crossfade===!0&&!this.path.some(Q4));this.animationProgress=0;let T;this.mixTargetDelta=O=>{const C=O/1e3;Uw(g.x,l.x,C),Uw(g.y,l.y,C),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mc(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),X4(this.relativeTarget,this.relativeTargetOrigin,v,C),T&&P4(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=It()),tr(T,this.relativeTarget)),w&&(this.animationValues=m,O4(m,h,this.latestValues,C,x,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(io(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_t.update(()=>{lf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ss(0)),this.currentAnimation=w4(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},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(V4),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:h,latestValues:m}=l;if(!(!u||!d||!h)){if(this!==l&&this.layout&&h&&DO(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||It();const g=_n(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+g;const v=_n(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+v}tr(u,d),us(u,m),hc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new M4),this.sharedNodes.get(l).add(u);const h=u.options.initialPromotionConfig;u.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.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 h=this.getStack();h&&h.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 h={};d.z&&Vg("z",l,h,this.animationValues);for(let m=0;m<zg.length;m++)Vg(`rotate${zg[m]}`,l,h,this.animationValues),Vg(`skew${zg[m]}`,l,h,this.animationValues);l.render();for(const m in h)l.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);l.scheduleRender()}applyProjectionStyles(l,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=sf(u?.pointerEvents)||"",l.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=sf(u?.pointerEvents)||""),this.hasProjected&&!Ho(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let g=z4(this.projectionDeltaWithTransform,this.treeScale,m);d&&(g=d(m,g)),l.transform=g;const{x:v,y:_}=this.projectionDelta;l.transformOrigin=`${v.origin*100}% ${_.origin*100}% 0`,h.animationValues?l.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const A in Nc){if(m[A]===void 0)continue;const{correct:w,applyTo:R,isCSSVariable:S}=Nc[A],x=g==="none"?m[A]:w(m[A],h);if(R){const T=R.length;for(let O=0;O<T;O++)l[R[O]]=x}else S?this.options.visualElement.renderState.vars[A]=x:l[A]=x}this.options.layoutId&&(l.pointerEvents=h===this?sf(u?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(Mw),this.root.sharedNodes.clear()}}}function B4(e){e.updateLayout()}function $4(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?rr(m=>{const g=s?t.measuredBox[m]:t.layoutBox[m],v=_n(g);g.min=n[m].min,g.max=g.min+v}):DO(o,t.layoutBox,n)&&rr(m=>{const g=s?t.measuredBox[m]:t.layoutBox[m],v=_n(n[m]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const l=ds();hc(l,n,t.layoutBox);const u=ds();s?hc(u,e.applyTransform(r,!0),t.measuredBox):hc(u,n,t.layoutBox);const d=!CO(l);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:v}=m;if(g&&v){const _=It();mc(_,t.layoutBox,g.layoutBox);const A=It();mc(A,n,v.layoutBox),NO(_,A)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=A,e.relativeTargetOrigin=_,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function H4(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 F4(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function G4(e){e.clearSnapshot()}function Mw(e){e.clearMeasurements()}function zw(e){e.isLayoutDirty=!1}function K4(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function q4(e){e.resolveTargetDelta()}function Z4(e){e.calcProjection()}function Y4(e){e.resetSkewAndRotation()}function W4(e){e.removeLeadSnapshot()}function Uw(e,t,n){e.translate=At(t.translate,0,n),e.scale=At(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bw(e,t,n,r){e.min=At(t.min,n.min,r),e.max=At(t.max,n.max,r)}function X4(e,t,n,r){Bw(e.x,t.x,n.x,r),Bw(e.y,t.y,n.y,r)}function Q4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const J4={duration:.45,ease:[.4,0,.1,1]},$w=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hw=$w("applewebkit/")&&!$w("chrome/")?Math.round:ar;function Fw(e){e.min=Hw(e.min),e.max=Hw(e.max)}function eG(e){Fw(e.x),Fw(e.y)}function DO(e,t,n){return e==="position"||e==="preserve-aspect"&&!a4(jw(t),jw(n),.2)}function tG(e){return e!==e.root&&e.scroll?.wasRoot}const nG=kO({attachResizeListener:(e,t)=>Oc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ug={current:void 0},IO=kO({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ug.current){const e=new nG({});e.mount(window),e.setOptions({layoutScroll:!0}),Ug.current=e}return Ug.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),rG={pan:{Feature:E4},drag:{Feature:_4,ProjectionNode:IO,MeasureLayout:wO}};function Gw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&_t.postRender(()=>s(t,Jc(t)))}class iG extends fo{mount(){const{current:t}=this.node;t&&(this.unmount=D3(t,(n,r)=>(Gw(this.node,r,"Start"),o=>Gw(this.node,o,"End"))))}unmount(){}}class oG extends fo{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=Wc(Oc(this.node.current,"focus",()=>this.onFocus()),Oc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Kw(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 o="onTap"+(n==="End"?"":n),s=r[o];s&&_t.postRender(()=>s(t,Jc(t)))}class aG extends fo{mount(){const{current:t}=this.node;t&&(this.unmount=P3(t,(n,r)=>(Kw(this.node,r,"Start"),(o,{success:s})=>Kw(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rv=new WeakMap,Bg=new WeakMap,sG=e=>{const t=rv.get(e.target);t&&t(e)},lG=e=>{e.forEach(sG)};function cG({root:e,...t}){const n=e||document;Bg.has(n)||Bg.set(n,{});const r=Bg.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(lG,{root:e,...t})),r[o]}function uG(e,t,n){const r=cG(t);return rv.set(e,n),r.observe(e),()=>{rv.delete(e),r.unobserve(e)}}const dG={some:0,all:1};class fG extends fo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:dG[o]},u=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),v=h?m:g;v&&v(d)};return uG(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(hG(t,n))&&this.startObserver()}unmount(){}}function hG({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const LO={inView:{Feature:fG},tap:{Feature:aG},focus:{Feature:oG},hover:{Feature:iG}},mG={layout:{ProjectionNode:IO,MeasureLayout:wO}},pG={...bO,...LO,...rG,...mG},jO=vF(pG,hO),gG={renderer:hO,...bO,...LO};var yG={};const cf=Object.create(null),Zl=e=>yG||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?cf:globalThis),$o=new Proxy(cf,{get(e,t){return Zl()[t]??cf[t]},has(e,t){const n=Zl();return t in n||t in cf},set(e,t,n){const r=Zl(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Zl(!0);return delete n[t],!0},ownKeys(){const e=Zl(!0);return Object.keys(e)}});function PO(e){const t=e+"CollectionProvider",[n,r]=Kc(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=w=>{const{scope:R,children:S}=w,x=De.useRef(null),T=De.useRef(new Map).current;return y.jsx(o,{scope:R,itemMap:T,collectionRef:x,children:S})};l.displayName=t;const u=e+"CollectionSlot",d=xs(u),h=De.forwardRef((w,R)=>{const{scope:S,children:x}=w,T=s(u,S),O=Tt(R,T.collectionRef);return y.jsx(d,{ref:O,children:x})});h.displayName=u;const m=e+"CollectionItemSlot",g="data-radix-collection-item",v=xs(m),_=De.forwardRef((w,R)=>{const{scope:S,children:x,...T}=w,O=De.useRef(null),C=Tt(R,O),D=s(m,S);return De.useEffect(()=>(D.itemMap.set(O,{ref:O,...T}),()=>void D.itemMap.delete(O))),y.jsx(v,{[g]:"",ref:C,children:x})});_.displayName=m;function A(w){const R=s(e+"CollectionConsumer",w);return De.useCallback(()=>{const x=R.collectionRef.current;if(!x)return[];const T=Array.from(x.querySelectorAll(`[${g}]`));return Array.from(R.itemMap.values()).sort((D,I)=>T.indexOf(D.ref.current)-T.indexOf(I.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:l,Slot:h,ItemSlot:_},A,r]}var MO=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"}),vG="VisuallyHidden",qb=E.forwardRef((e,t)=>y.jsx(Ge.span,{...e,ref:t,style:{...MO,...e.style}}));qb.displayName=vG;var Zb="ToastProvider",[Yb,bG,_G]=PO("Toast"),[zO,EG]=Kc("Toast",[_G]),[xG,vh]=zO(Zb),Wb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:l}=e,[u,d]=E.useState(null),[h,m]=E.useState(0),g=E.useRef(!1),v=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zb}\`. Expected non-empty \`string\`.`),y.jsx(Yb.Provider,{scope:t,children:y.jsx(xG,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:h,viewport:u,onViewportChange:d,onToastAdd:E.useCallback(()=>m(_=>_+1),[]),onToastRemove:E.useCallback(()=>m(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:v,children:l})})};Wb.displayName=Zb;var VO="ToastViewport",SG=["F8"],iv="toast.viewportPause",ov="toast.viewportResume",Xb=E.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=SG,label:o="Notifications ({hotkey})",...s}=e,l=vh(VO,n),u=bG(n),d=E.useRef(null),h=E.useRef(null),m=E.useRef(null),g=E.useRef(null),v=Tt(t,g,l.onViewportChange),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=l.toastCount>0;E.useEffect(()=>{const R=S=>{r.length!==0&&r.every(T=>S[T]||S.code===T)&&g.current?.focus()};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[r]),E.useEffect(()=>{const R=d.current,S=g.current;if(A&&R&&S){const x=()=>{if(!l.isClosePausedRef.current){const D=new CustomEvent(iv);S.dispatchEvent(D),l.isClosePausedRef.current=!0}},T=()=>{if(l.isClosePausedRef.current){const D=new CustomEvent(ov);S.dispatchEvent(D),l.isClosePausedRef.current=!1}},O=D=>{!R.contains(D.relatedTarget)&&T()},C=()=>{R.contains(document.activeElement)||T()};return R.addEventListener("focusin",x),R.addEventListener("focusout",O),R.addEventListener("pointermove",x),R.addEventListener("pointerleave",C),window.addEventListener("blur",x),window.addEventListener("focus",T),()=>{R.removeEventListener("focusin",x),R.removeEventListener("focusout",O),R.removeEventListener("pointermove",x),R.removeEventListener("pointerleave",C),window.removeEventListener("blur",x),window.removeEventListener("focus",T)}}},[A,l.isClosePausedRef]);const w=E.useCallback(({tabbingDirection:R})=>{const x=u().map(T=>{const O=T.ref.current,C=[O,...PG(O)];return R==="forwards"?C:C.reverse()});return(R==="forwards"?x.reverse():x).flat()},[u]);return E.useEffect(()=>{const R=g.current;if(R){const S=x=>{const T=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!T){const C=document.activeElement,D=x.shiftKey;if(x.target===R&&D){h.current?.focus();return}const H=w({tabbingDirection:D?"backwards":"forwards"}),K=H.findIndex(Z=>Z===C);$g(H.slice(K+1))?x.preventDefault():D?h.current?.focus():m.current?.focus()}};return R.addEventListener("keydown",S),()=>R.removeEventListener("keydown",S)}},[u,w]),y.jsxs(XB,{ref:d,role:"region","aria-label":o.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:A?void 0:"none"},children:[A&&y.jsx(av,{ref:h,onFocusFromOutsideViewport:()=>{const R=w({tabbingDirection:"forwards"});$g(R)}}),y.jsx(Yb.Slot,{scope:n,children:y.jsx(Ge.ol,{tabIndex:-1,...s,ref:v})}),A&&y.jsx(av,{ref:m,onFocusFromOutsideViewport:()=>{const R=w({tabbingDirection:"backwards"});$g(R)}})]})});Xb.displayName=VO;var UO="ToastFocusProxy",av=E.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=vh(UO,n);return y.jsx(qb,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:l=>{const u=l.relatedTarget;!s.viewport?.contains(u)&&r()}})});av.displayName=UO;var eu="Toast",AG="toast.swipeStart",wG="toast.swipeMove",TG="toast.swipeCancel",RG="toast.swipeEnd",Qb=E.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...l}=e,[u,d]=Af({prop:r,defaultProp:o??!0,onChange:s,caller:eu});return y.jsx(qc,{present:n||u,children:y.jsx(OG,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:yr(e.onPause),onResume:yr(e.onResume),onSwipeStart:Je(e.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Je(e.onSwipeMove,h=>{const{x:m,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Je(e.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Je(e.onSwipeEnd,h=>{const{x:m,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),d(!1)})})})});Qb.displayName=eu;var[CG,NG]=zO(eu,{onClose(){}}),OG=E.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:h,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:v,onSwipeEnd:_,...A}=e,w=vh(eu,n),[R,S]=E.useState(null),x=Tt(t,Y=>S(Y)),T=E.useRef(null),O=E.useRef(null),C=o||w.duration,D=E.useRef(0),I=E.useRef(C),M=E.useRef(0),{onToastAdd:H,onToastRemove:K}=w,Z=yr(()=>{R?.contains(document.activeElement)&&w.viewport?.focus(),l()}),J=E.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(M.current),D.current=new Date().getTime(),M.current=window.setTimeout(Z,Y))},[Z]);E.useEffect(()=>{const Y=w.viewport;if(Y){const re=()=>{J(I.current),h?.()},j=()=>{const X=new Date().getTime()-D.current;I.current=I.current-X,window.clearTimeout(M.current),d?.()};return Y.addEventListener(iv,j),Y.addEventListener(ov,re),()=>{Y.removeEventListener(iv,j),Y.removeEventListener(ov,re)}}},[w.viewport,C,d,h,J]),E.useEffect(()=>{s&&!w.isClosePausedRef.current&&J(C)},[s,C,w.isClosePausedRef,J]),E.useEffect(()=>(H(),()=>K()),[H,K]);const ae=E.useMemo(()=>R?FO(R):null,[R]);return w.viewport?y.jsxs(y.Fragment,{children:[ae&&y.jsx(kG,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:ae}),y.jsx(CG,{scope:n,onClose:Z,children:sa.createPortal(y.jsx(Yb.ItemSlot,{scope:n,children:y.jsx(WB,{asChild:!0,onEscapeKeyDown:Je(u,()=>{w.isFocusedToastEscapeKeyDownRef.current||Z(),w.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(Ge.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":w.swipeDirection,...A,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Je(e.onKeyDown,Y=>{Y.key==="Escape"&&(u?.(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(w.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:Je(e.onPointerDown,Y=>{Y.button===0&&(T.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:Je(e.onPointerMove,Y=>{if(!T.current)return;const re=Y.clientX-T.current.x,j=Y.clientY-T.current.y,X=!!O.current,F=["left","right"].includes(w.swipeDirection),ve=["left","up"].includes(w.swipeDirection)?Math.min:Math.max,P=F?ve(0,re):0,oe=F?0:ve(0,j),B=Y.pointerType==="touch"?10:2,W={x:P,y:oe},se={originalEvent:Y,delta:W};X?(O.current=W,Pd(wG,g,se,{discrete:!1})):qw(W,w.swipeDirection,B)?(O.current=W,Pd(AG,m,se,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(re)>B||Math.abs(j)>B)&&(T.current=null)}),onPointerUp:Je(e.onPointerUp,Y=>{const re=O.current,j=Y.target;if(j.hasPointerCapture(Y.pointerId)&&j.releasePointerCapture(Y.pointerId),O.current=null,T.current=null,re){const X=Y.currentTarget,F={originalEvent:Y,delta:re};qw(re,w.swipeDirection,w.swipeThreshold)?Pd(RG,_,F,{discrete:!0}):Pd(TG,v,F,{discrete:!0}),X.addEventListener("click",ve=>ve.preventDefault(),{once:!0})}})})})}),w.viewport)})]}):null}),kG=e=>{const{__scopeToast:t,children:n,...r}=e,o=vh(eu,t),[s,l]=E.useState(!1),[u,d]=E.useState(!1);return LG(()=>l(!0)),E.useEffect(()=>{const h=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(h)},[]),u?null:y.jsx(dh,{asChild:!0,children:y.jsx(qb,{...r,children:s&&y.jsxs(y.Fragment,{children:[o.label," ",n]})})})},DG="ToastTitle",Jb=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(Ge.div,{...r,ref:t})});Jb.displayName=DG;var IG="ToastDescription",e0=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(Ge.div,{...r,ref:t})});e0.displayName=IG;var BO="ToastAction",t0=E.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?y.jsx(HO,{altText:n,asChild:!0,children:y.jsx(bh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${BO}\`. Expected non-empty \`string\`.`),null)});t0.displayName=BO;var $O="ToastClose",bh=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=NG($O,n);return y.jsx(HO,{asChild:!0,children:y.jsx(Ge.button,{type:"button",...r,ref:t,onClick:Je(e.onClick,o.onClose)})})});bh.displayName=$O;var HO=E.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return y.jsx(Ge.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function FO(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),jG(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...FO(r))}}),t}function Pd(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bC(o,s):o.dispatchEvent(s)}var qw=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function LG(e=()=>{}){const t=yr(e);cn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function jG(e){return e.nodeType===e.ELEMENT_NODE}function PG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $g(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var MG=Wb,GO=Xb,KO=Qb,qO=Jb,ZO=e0,zG=t0,YO=bh;const VG=Object.freeze(Object.defineProperty({__proto__:null,Action:zG,Close:YO,Description:ZO,Provider:MG,Root:KO,Title:qO,Toast:Qb,ToastAction:t0,ToastClose:bh,ToastDescription:e0,ToastProvider:Wb,ToastTitle:Jb,ToastViewport:Xb,Viewport:GO,createToastScope:EG},Symbol.toStringTag,{value:"Module"})),UG=VG,BG=({className:e,...t})=>y.jsx(GO,{className:Se("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}),$G=sr("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"}}),HG=({className:e,variant:t,...n})=>y.jsx(KO,{className:Se($G({variant:t}),e),...n}),FG=({className:e,...t})=>y.jsx(YO,{className:Se("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:y.jsx(la,{className:"size-5"})}),GG=({className:e,...t})=>y.jsx(qO,{className:Se("text-sm font-semibold [&+div]:text-xs",e),...t}),KG=({className:e,...t})=>y.jsx(ZO,{className:Se("text-sm opacity-90",e),...t}),os=()=>({isFetched:!1,fetchedDateTime:null,isLoading:!1,isInvalidated:!1,error:null,isSuccess:!1,data:null,errorCount:0,isEnabled:!0}),Hg=(e,t)=>t.filter(n=>e.includes(n.split("/")[0])),qG=(e,t)=>{switch(t.type){case"SET_QUERY_STATE":{const{key:n,value:r}=t;return{...e,states:{...e.states,[n]:{...e.states[n]??os(),...r}}}}case"MAKE_QUERY_IN_ERROR":{const{key:n,error:r}=t;return{...e,states:{...e.states,[n]:{...e.states[n]??os(),error:r,isFetched:!0,isSuccess:!1,errorCount:(e.states[n]?.errorCount??0)+1,isLoading:!1,isInvalidated:!1}}}}case"SET_QUERIES_STATE":{const{keys:n,value:r}=t,o=[n].flat(),s=Object.keys(e.states),l=Hg(o,s);if(l.length===0)return e;const u=structuredClone(e.states);return l.forEach(d=>{u[d]={...e.states[d]??os(),...r}}),{...e,states:u}}case"RESET_KEY_STATE":{const{keys:n}=t,r=[n].flat();if(r.length===0)return e;const o=Object.keys(e.states),s=Hg(r,o);if(s.length===0)return e;const l={...e.states};return s.forEach(u=>{l[u]=os()}),{...e,states:l}}case"RESET_STATE":{const n=[t.excludeKeys].flat(),r=Object.keys(e.states),o=Hg(n,r),s={};return r.forEach(l=>{s[l]=o.includes(l)?e.states[l]:os()}),{...e,states:s}}default:return e}},WO=E.createContext(null),ZG=({children:e})=>{const[t,n]=E.useReducer(qG,{states:{}}),r=h=>t.states[h]??os(),o=(h,m)=>{n({type:"SET_QUERY_STATE",key:h,value:m})},s=(h,m)=>{n({type:"SET_QUERIES_STATE",keys:h,value:m})},l=(h,m)=>{n({type:"MAKE_QUERY_IN_ERROR",key:h,error:m})},u=h=>{n({type:"RESET_KEY_STATE",keys:h})},d=h=>{n({type:"RESET_STATE",excludeKeys:h})};return y.jsx(WO.Provider,{value:{getStates:r,setQueryState:o,setQueriesState:s,makeQueryInError:l,resetKeyState:u,resetState:d},children:e})},YG=()=>{const e=E.useContext(WO);if(!e)throw new Error("useAsyncState must be used within an AsyncStateProvider");return e};var Fg,Zw;function WG(){if(Zw)return Fg;Zw=1;var e=function(x){return t(x)&&!n(x)};function t(S){return!!S&&typeof S=="object"}function n(S){var x=Object.prototype.toString.call(S);return x==="[object RegExp]"||x==="[object Date]"||s(S)}var r=typeof Symbol=="function"&&Symbol.for,o=r?Symbol.for("react.element"):60103;function s(S){return S.$$typeof===o}function l(S){return Array.isArray(S)?[]:{}}function u(S,x){return x.clone!==!1&&x.isMergeableObject(S)?w(l(S),S,x):S}function d(S,x,T){return S.concat(x).map(function(O){return u(O,T)})}function h(S,x){if(!x.customMerge)return w;var T=x.customMerge(S);return typeof T=="function"?T:w}function m(S){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(S).filter(function(x){return Object.propertyIsEnumerable.call(S,x)}):[]}function g(S){return Object.keys(S).concat(m(S))}function v(S,x){try{return x in S}catch{return!1}}function _(S,x){return v(S,x)&&!(Object.hasOwnProperty.call(S,x)&&Object.propertyIsEnumerable.call(S,x))}function A(S,x,T){var O={};return T.isMergeableObject(S)&&g(S).forEach(function(C){O[C]=u(S[C],T)}),g(x).forEach(function(C){_(S,C)||(v(S,C)&&T.isMergeableObject(x[C])?O[C]=h(C,T)(S[C],x[C],T):O[C]=u(x[C],T))}),O}function w(S,x,T){T=T||{},T.arrayMerge=T.arrayMerge||d,T.isMergeableObject=T.isMergeableObject||e,T.cloneUnlessOtherwiseSpecified=u;var O=Array.isArray(x),C=Array.isArray(S),D=O===C;return D?O?T.arrayMerge(S,x,T):A(S,x,T):u(x,T)}w.all=function(x,T){if(!Array.isArray(x))throw new Error("first argument should be an array");return x.reduce(function(O,C){return w(O,C,T)},{})};var R=w;return Fg=R,Fg}var XG=WG();const QG=nh(XG),XO=e=>{const[t,n]=E.useState(e);return E.useEffect(()=>{n(e??window.document.body)},[e]),t},JG={},Yw=e=>{let t;const n=new Set,r=(m,g)=>{const v=typeof m=="function"?m(t):m;if(!Object.is(v,t)){const _=t;t=g??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(A=>A(t,_))}},o=()=>t,d={setState:r,getState:o,getInitialState:()=>h,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(JG?"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()}},h=t=e(r,o,d);return d},e6=e=>e?Yw(e):Yw;var Gg={exports:{}},Kg={},qg={exports:{}},Zg={};/**
252
- * @license React
253
- * use-sync-external-store-shim.production.js
254
- *
255
- * Copyright (c) Meta Platforms, Inc. and affiliates.
256
- *
257
- * This source code is licensed under the MIT license found in the
258
- * LICENSE file in the root directory of this source tree.
259
- */var Ww;function t6(){if(Ww)return Zg;Ww=1;var e=Bc();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function u(g,v){var _=v(),A=r({inst:{value:_,getSnapshot:v}}),w=A[0].inst,R=A[1];return s(function(){w.value=_,w.getSnapshot=v,d(w)&&R({inst:w})},[g,_,v]),o(function(){return d(w)&&R({inst:w}),g(function(){d(w)&&R({inst:w})})},[g]),l(_),_}function d(g){var v=g.getSnapshot;g=g.value;try{var _=v();return!n(g,_)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Zg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Zg}var Xw;function n6(){return Xw||(Xw=1,qg.exports=t6()),qg.exports}/**
260
- * @license React
261
- * use-sync-external-store-shim/with-selector.production.js
262
- *
263
- * Copyright (c) Meta Platforms, Inc. and affiliates.
264
- *
265
- * This source code is licensed under the MIT license found in the
266
- * LICENSE file in the root directory of this source tree.
267
- */var Qw;function r6(){if(Qw)return Kg;Qw=1;var e=Bc(),t=n6();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Kg.useSyncExternalStoreWithSelector=function(h,m,g,v,_){var A=s(null);if(A.current===null){var w={hasValue:!1,value:null};A.current=w}else w=A.current;A=u(function(){function S(D){if(!x){if(x=!0,T=D,D=v(D),_!==void 0&&w.hasValue){var I=w.value;if(_(I,D))return O=I}return O=D}if(I=O,r(T,D))return I;var M=v(D);return _!==void 0&&_(I,M)?(T=D,I):(T=D,O=M)}var x=!1,T,O,C=g===void 0?null:g;return[function(){return S(m())},C===null?void 0:function(){return S(C())}]},[m,g,v,_]);var R=o(h,A[0],A[1]);return l(function(){w.hasValue=!0,w.value=R},[R]),d(R),R},Kg}var Jw;function i6(){return Jw||(Jw=1,Gg.exports=r6()),Gg.exports}var o6=i6();const a6=nh(o6),QO={},{useDebugValue:s6}=De,{useSyncExternalStoreWithSelector:l6}=a6;let eT=!1;const c6=e=>e;function u6(e,t=c6,n){(QO?"production":void 0)!=="production"&&n&&!eT&&(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"),eT=!0);const r=l6(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return s6(r),r}const tT=e=>{(QO?"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"?e6(e):e,n=(r,o)=>u6(t,r,o);return Object.assign(n,t),n},JO=e=>e?tT(e):tT,d6=JO((e,t)=>({scrollBlockers:[],addBlockage:(n,r)=>e(o=>{const s=o.scrollBlockers,l=s.find(u=>u.element===r);if(l){const d=l.blockers.includes(n)?l.blockers:[...l.blockers,n];return{scrollBlockers:s.map(h=>h.element===r?{...h,blockers:d}:h)}}return r.style.overflowY="hidden",r.style.overflowX="hidden",{scrollBlockers:[...s,{element:r,blockers:[n]}]}}),removeBlockage:(n,r)=>e(o=>{const s=o.scrollBlockers,l=s.find(u=>u.element===r);return l?l.blockers.length>1?{scrollBlockers:s.map(u=>u.element===r?{...u,blockers:u.blockers.filter(d=>d!==n)}:u)}:(r.style.overflowY="auto",{scrollBlockers:s.filter(u=>u.element!==r)}):{scrollBlockers:s}}),isElementScrollBlocked:n=>t().scrollBlockers.some(r=>r.element===n)}));function f6(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,o]of e)if(!Object.is(o,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:h6}=De;function ek(e){const t=h6();return n=>{const r=e(n);return f6(t.current,r)?t.current:t.current=r}}const tk=e=>{const{disableScroll:t=!1,element:n,key:r="unnamed_blocker"}=e??{},{isElementScrollBlocked:o,addBlockage:s,removeBlockage:l}=d6(ek(h=>({isElementScrollBlocked:h.isElementScrollBlocked,addBlockage:h.addBlockage,removeBlockage:h.removeBlockage}))),u=XO(n);return E.useEffect(()=>{const h=n??window.document.body;t?s(r,h):l(r,h)},[s,t,n,r,l]),{isScrollBlocked:u?o(u):!1}},n0="relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8",m6="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",p6=({className:e,...t})=>y.jsx("h1",{className:Se("mt-5 text-2xl font-bold",e),...t}),g6=({className:e,...t})=>y.jsx("h2",{className:Se("mt-16 mb-2 text-2xl font-bold",n0,e),...t}),y6=({className:e,...t})=>y.jsx("h3",{className:Se("mt-5 mb-2 text-xl font-bold",n0,e),...t}),v6=({className:e,...t})=>y.jsx("h4",{className:Se("mt-3 text-lg font-bold",n0,e),...t}),b6=e=>String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase(),_6=e=>{const r=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},E6=(e,t)=>{const n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,o=window.getComputedStyle(e,":after"),s=n+parseInt(o.getPropertyValue("left"),10),l=s+parseInt(o.width,10),u=r+parseInt(o.getPropertyValue("top"),10),d=u+parseInt(o.height,10),h=t.clientX,m=t.clientY;return h>=s&&h<=l&&m>=u&&m<=d},r0=({H:e,children:t,className:n,isClickable:r,...o})=>{const s=typeof t=="string"?b6(t):void 0,l=u=>{const{id:d}=u.currentTarget;if(E6(u.currentTarget,u)&&typeof d=="string"){const g=`${window.location.href.split("#")[0]}#${d}`;navigator.clipboard.writeText(g),_6(d)}};return y.jsx(e,{id:s,onClick:r?l:void 0,"aria-label":r?`Click to scroll to section ${s} and copy the link to the clipboard`:void 0,className:Se(r&&m6,n),...o,children:t})},x6=({isClickable:e,...t})=>y.jsx(p6,{...t}),S6=({isClickable:e=!1,...t})=>y.jsx(r0,{H:g6,isClickable:e,...t}),i0=({isClickable:e=!1,...t})=>y.jsx(r0,{H:y6,isClickable:e,...t}),A6=({isClickable:e=!1,...t})=>y.jsx(r0,{H:v6,isClickable:e,...t});var o0=(e=>(e.SM="sm",e.MD="md",e.LG="lg",e.XL="xl",e.UNSET="unset",e))(o0||{});const w6=sr("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"}}),T6=jO.create(Er),a0=({children:e,isOpen:t,container:n,disableScroll:r=!1,onClose:o,hasCloseButton:s=!1,title:l,size:u="md",className:d,...h})=>{const m=XO(n);if(tk({key:"modal",disableScroll:t&&r}),!m)return y.jsx(y.Fragment,{});const g=typeof l=="string";return sa.createPortal(y.jsx(jO.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:v=>{v.stopPropagation(),o?.()},"aria-hidden":!t,children:y.jsx("div",{className:"flex justify-center p-4",children:y.jsxs(T6,{onClick:v=>v.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:w6({size:u,className:d}),role:"dialog","aria-modal":!0,roundedSize:"2xl",...h,children:[y.jsxs("div",{className:Se("cursor-default px-4",s&&g?"flex items-center justify-center":s?"flex items-center justify-end":g?"items-center":"hidden"),children:[g&&y.jsx(i0,{className:"ml-4 flex items-center justify-center text-lg font-bold",children:l}),s&&y.jsx(st,{variant:at.HOVERABLE,color:ot.TEXT,label:"Close modal",className:"ml-auto",onClick:v=>{v.stopPropagation(),o?.()},Icon:la,size:Fn.ICON_MD})]}),y.jsx("div",{className:"flex flex-1 flex-col items-center overflow-auto",children:e})]})})}),m)},R6=1,C6=900*1e3;let Yg=0;const N6=()=>(Yg=(Yg+1)%Number.MAX_SAFE_INTEGER,Yg.toString()),Wg=new Map,nT=e=>{if(Wg.has(e))return;const t=setTimeout(()=>{Wg.delete(e),pc({type:"REMOVE_TOAST",toastId:e})},C6);Wg.set(e,t)},O6=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,R6)};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?nT(n):e.toasts.forEach(r=>{nT(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)}}},uf=[];let df={toasts:[]};const pc=e=>{df=O6(df,e),uf.forEach(t=>{t(df)})},k6=({...e})=>{const t=N6(),n=o=>pc({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>pc({type:"DISMISS_TOAST",toastId:t});return pc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}},nk=()=>{const[e,t]=E.useState(df);return E.useEffect(()=>(uf.push(t),()=>{const n=uf.indexOf(t);n>-1&&uf.splice(n,1)}),[e]),{...e,toast:k6,dismiss:n=>pc({type:"DISMISS_TOAST",toastId:n})}},Md=new Map,D6=!1,I6=!1,L6=!0,j6=!1,P6=1,M6=!1,z6=300*1e3,V6=300*1e3,sv=e=>e?Array.isArray(e)?e:[e]:[],rT=(e,t)=>sv(t).length>0?`${e}/${JSON.stringify(t)}`:e,_h=(e,t,n)=>{const r=n?.retryLimit??P6,o=n?.autoFetch??j6,s=n?.retryTime??V6,l=n?.cache??D6,u=n?.store??I6,d=n?.enable??L6,h=n?.revalidation??M6,m=n?.revalidateTime??z6,g=n?.updateQueries??[],v=n?.invalidateQueries??[],_=n?.onSuccess,A=n?.onError,w=sv(n?.args??[]),{getStates:R,setQueryState:S,setQueriesState:x,makeQueryInError:T}=YG(),O=E.useRef(w),C=E.useRef(null),D=rT(e,O.current),{isFetched:I,fetchedDateTime:M,isLoading:H,isEnabled:K,error:Z,isSuccess:J,isInvalidated:ae,data:Y,errorCount:re}=R(D),j=(async(...B)=>{const W=rT(e,B);C.current&&C.current.abort();const se=new AbortController;if(C.current=se,Md.has(W))return Md.get(W);const he=(async()=>{S(W,{isLoading:!0});let ye=null;try{const ue=t(...B);if(!ue||typeof ue.then!="function")throw new Error("asyncFunction must return a Promise");const Ee=await ue;ye=Ee,S(W,{data:Ee,errorCount:0,isLoading:!1,isFetched:!0,fetchedDateTime:new Date,isSuccess:!0,isInvalidated:!1,error:null}),_?.(Ee),v.length>0&&x(v,{isInvalidated:!0}),g.length>0&&x(g,{data:Ee}),u&&localStorage.setItem(W,JSON.stringify(Ee))}catch(ue){const Ee=ue instanceof Error?ue.message:String(ue);T(W,Ee),A?.(Ee)}finally{Md.delete(W)}return ye})();return Md.set(W,he),await he}),X=(async(...B)=>{if(!(!K||!d))return B&&(O.current=sv(B)),await j(...O.current)}),F=(async(...B)=>!K||!d||H?void 0:!ae&&J&&l&&Y?Y:await X(...B));E.useEffect(()=>{d!==K&&S(D,{isEnabled:K})},[d,K,D]),E.useEffect(()=>{if(!K||!d||!u||ae||I||Y)return;const B=localStorage.getItem(D);try{B&&S(D,{data:JSON.parse(B)})}catch(W){console.error(W)}},[u,D,I,ae,K,d,Y]),E.useEffect(()=>{o&&(!K||!d||I&&!ae||H||j(...O.current))},[o,K,d,I,ae,H,j]),E.useEffect(()=>{const B=re>0&&r>0,W=re>r;if(!K||!d||!B||W||H||J)return;const se=setTimeout(()=>{j(...O.current)},s);return()=>clearTimeout(se)},[K,re,r,d,s,J,H,j]),E.useEffect(()=>{if(!h||m<=0||!K||!d||H||!J||!M)return;const B=setTimeout(()=>{j(...O.current)},m);return()=>clearTimeout(B)},[h,m,J,M,H,K,d,j]);const ve=B=>{S(D,{data:B})},P=()=>{C.current&&C.current.abort()},oe={isFetched:I,isInvalidated:ae,error:Z,data:Y,errorCount:re,isSuccess:J,isEnabled:K,isDisabled:!K,isLoading:H,isWaitingData:H&&!I&&!Y,isRevalidating:H&&I,[e]:F,revalidate:X,setData:ve,abort:P};return E.useEffect(()=>()=>{C.current&&C.current.abort()},[]),oe},U6=e=>{const t=Hr(),n=e??t??tt,r=g1(n),{data:o}=_h("getOAuth2AccessToken",r.getOAuth2AccessToken,{cache:!0,autoFetch:!0,enable:!!(n.editor.clientId&&n.editor.clientSecret)});return{oAuth2AccessToken:o?.data}};var B6=Object.defineProperty,$6=Object.defineProperties,H6=Object.getOwnPropertyDescriptors,iT=Object.getOwnPropertySymbols,F6=Object.prototype.hasOwnProperty,G6=Object.prototype.propertyIsEnumerable,oT=(e,t,n)=>t in e?B6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mr=(e,t)=>{for(var n in t||(t={}))F6.call(t,n)&&oT(e,n,t[n]);if(iT)for(var n of iT(t))G6.call(t,n)&&oT(e,n,t[n]);return e},kr=(e,t)=>$6(e,H6(t)),K6=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},q6=async(e,t)=>{var n,r,o,s,l,u;let d=t||{};const h={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:h};for(const m of t?.plugins||[]){if(m.init){const g=await((n=m.init)==null?void 0:n.call(m,e.toString(),t));d=g.options||d,e=g.url}h.onRequest.push((r=m.hooks)==null?void 0:r.onRequest),h.onResponse.push((o=m.hooks)==null?void 0:o.onResponse),h.onSuccess.push((s=m.hooks)==null?void 0:s.onSuccess),h.onError.push((l=m.hooks)==null?void 0:l.onError),h.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:h}},aT=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Z6=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Y6(e){if(typeof e=="number")return new aT({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new aT(e);case"exponential":return new Z6(e);default:throw new Error("Invalid retry strategy")}}var W6=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const r=n(e.auth.username),o=n(e.auth.password);if(!r||!o)return t;t.authorization=`Basic ${btoa(`${r}:${o}`)}`}else if(e.auth.type==="Custom"){const r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},X6=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Q6(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return X6.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function J6(e){try{return JSON.parse(e),!0}catch{return!1}}function rk(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function sT(e){try{return JSON.parse(e)}catch{return e}}function lT(e){return typeof e=="function"}function e5(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&lT(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&lT(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function t5(e){const t=new Headers(e?.headers),n=await W6(e);for(const[r,o]of Object.entries(n||{}))t.set(r,o);if(!t.has("content-type")){const r=n5(e?.body);r&&t.set("content-type",r)}return t}function n5(e){return rk(e)?"application/json":null}function r5(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(rk(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return e.body}function i5(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return ok.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function o5(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var a5=class ik extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,ik.prototype)}};async function ff(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new a5(n.issues);return n.value}var ok=["get","post","put","patch","delete"],s5=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,o,s,l;const u=((o=(r=e.plugins)==null?void 0:r.find(d=>{var h;return(h=d.schema)!=null&&h.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:o.schema)||e.schema;if(u){let d=t;(s=u.config)!=null&&s.prefix&&d.startsWith(u.config.prefix)&&(d=d.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(l=u.config)!=null&&l.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const h=u.schema[d];if(h){let m=kr(mr({},n),{method:h.method,output:h.output});return n?.disableValidation||(m=kr(mr({},m),{body:h.input?await ff(h.input,n?.body):n?.body,params:h.params?await ff(h.params,n?.params):n?.params,query:h.query?await ff(h.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),l5=e=>{async function t(n,r){const o=kr(mr(mr({},e),r),{plugins:[...e?.plugins||[],s5(e||{})]});if(e?.catchAllError)try{return await lv(n,o)}catch(s){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:s}}}return await lv(n,o)}return t};function c5(e,t){let{baseURL:n,params:r,query:o}=t||{query:{},params:{},baseURL:""},s=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const g=e.toString().split("@")[1].split("/")[0];ok.includes(g)&&(e=e.replace(`@${g}/`,"/"))}s.endsWith("/")||(s+="/");let[l,u]=e.replace(s,"").split("?");const d=new URLSearchParams(u);for(const[g,v]of Object.entries(o||{}))v!=null&&d.set(g,String(v));if(r)if(Array.isArray(r)){const g=l.split("/").filter(v=>v.startsWith(":"));for(const[v,_]of g.entries()){const A=r[v];l=l.replace(_,A)}}else for(const[g,v]of Object.entries(r))l=l.replace(`:${g}`,String(v));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let h=d.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",s.startsWith("http")?new URL(`${l}${h}`,s):`${s}${l}${h}`}var lv=async(e,t)=>{var n,r,o,s,l,u,d,h;const{hooks:m,url:g,options:v}=await q6(e,t),_=e5(v),A=new AbortController,w=(n=v.signal)!=null?n:A.signal,R=c5(g,v),S=r5(v),x=await t5(v),T=i5(g,v);let O=kr(mr({},v),{url:R,headers:x,body:S,method:T,signal:w});for(const ae of m.onRequest)if(ae){const Y=await ae(O);Y instanceof Object&&(O=Y)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:C}=o5(v,A);let D=await _(O.url,O);C();const I={response:D,request:O};for(const ae of m.onResponse)if(ae){const Y=await ae(kr(mr({},I),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?D.clone():D}));Y instanceof Response?D=Y:Y instanceof Object&&(D=Y.response)}if(D.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const Y=Q6(D),re={data:"",response:D,request:O};if(Y==="json"||Y==="text"){const j=await D.text(),F=await((s=O.jsonParser)!=null?s:sT)(j);re.data=F}else re.data=await D[Y]();O?.output&&O.output&&!O.disableValidation&&(re.data=await ff(O.output,re.data));for(const j of m.onSuccess)j&&await j(kr(mr({},re),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?D.clone():D}));return t?.throw?re.data:{data:re.data,error:null}}const M=(u=t?.jsonParser)!=null?u:sT,H=await D.text(),K=J6(H),Z=K?await M(H):null,J={response:D,responseText:H,request:O,error:kr(mr({},Z),{status:D.status,statusText:D.statusText})};for(const ae of m.onError)ae&&await ae(kr(mr({},J),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?D.clone():D}));if(t?.retry){const ae=Y6(t.retry),Y=(h=t.retryAttempt)!=null?h:0;if(await ae.shouldAttemptRetry(Y,D)){for(const j of m.onRetry)j&&await j(I);const re=ae.getDelay(Y);return await new Promise(j=>setTimeout(j,re)),await lv(e,kr(mr({},t),{retryAttempt:Y+1}))}}if(t?.throw)throw new K6(D.status,D.statusText,K?Z:H);return{data:null,error:kr(mr({},Z),{status:D.status,statusText:D.statusText})}};class u5 extends Error{constructor(t,n){super(t),this.name="BetterAuthError",this.message=t,this.cause=n,this.stack=""}}function d5(e){try{return new URL(e).pathname!=="/"}catch{throw new u5(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Xg(e,t="/api/auth"){return d5(e)?e:(t=t.startsWith("/")?t:`/${t}`,`${e.replace(/\/+$/,"")}${t}`)}function f5(e,t,n){if(e)return Xg(e,t);const r=$o.BETTER_AUTH_URL||$o.NEXT_PUBLIC_BETTER_AUTH_URL||$o.PUBLIC_BETTER_AUTH_URL||$o.NUXT_PUBLIC_BETTER_AUTH_URL||$o.NUXT_PUBLIC_AUTH_URL||($o.BASE_URL!=="/"?$o.BASE_URL:void 0);if(r)return Xg(r,t);if(typeof window<"u"&&window.location)return Xg(window.location.origin,t)}var Qg={},Jg={},ey={},dr={},cT;function s0(){if(cT)return dr;cT=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.cleanTasks=dr.allTasks=dr.task=dr.startTask=void 0;let e=0,t=[];function n(){return e+=1,()=>{if(e-=1,e===0){let l=t;t=[];for(let u of l)u()}}}dr.startTask=n;function r(l){let u=n();return l().finally(u)}dr.task=r;function o(){return e===0?Promise.resolve():new Promise(l=>{t.push(l)})}dr.allTasks=o;function s(){e=0}return dr.cleanTasks=s,dr}var uT;function Eh(){return uT||(uT=1,(function(e){var t={};Object.defineProperty(e,"__esModule",{value:!0}),e.cleanStores=e.clean=void 0;const n=s0();e.clean=Symbol("clean");let r=(...o)=>{if(t.NODE_ENV==="production")throw new Error("cleanStores() can be used only during development or tests");(0,n.cleanTasks)();for(let s of o)s&&(s.mocked&&delete s.mocked,s[e.clean]&&s[e.clean]())};e.cleanStores=r})(ey)),ey}var dT;function l0(){return dT||(dT=1,(function(e){var t={};Object.defineProperty(e,"__esModule",{value:!0}),e.onMount=e.STORE_UNMOUNT_DELAY=e.onBuild=e.onNotify=e.onSet=e.onStop=e.onStart=void 0;const n=Eh(),r=0,o=1,s=2,l=3,u=4,d=5,h=6,m=10;let g=(x,T,O,C)=>(x.events=x.events||{},x.events[O+m]||(x.events[O+m]=C(D=>{x.events[O].reduceRight((I,M)=>(M(I),I),{shared:{},...D})})),x.events[O]=x.events[O]||[],x.events[O].push(T),()=>{let D=x.events[O],I=D.indexOf(T);D.splice(I,1),D.length||(delete x.events[O],x.events[O+m](),delete x.events[O+m])}),v=(x,T)=>g(x,T,r,O=>{let C=x.listen;return x.listen=D=>(!x.lc&&!x.starting&&(x.starting=!0,O(),delete x.starting),C(D)),()=>{x.listen=C}});e.onStart=v;let _=(x,T)=>g(x,T,o,O=>{let C=x.off;return x.off=()=>{O(),C()},()=>{x.off=C}});e.onStop=_;let A=(x,T)=>g(x,T,s,O=>{let C=x.set,D=x.setKey;return x.setKey&&(x.setKey=(I,M)=>{let H;if(O({abort:()=>{H=!0},changed:I,newValue:{...x.value,[I]:M}}),!H)return D(I,M)}),x.set=I=>{let M;if(O({abort:()=>{M=!0},newValue:I}),!M)return C(I)},()=>{x.set=C,x.setKey=D}});e.onSet=A;let w=(x,T)=>g(x,T,l,O=>{let C=x.notify;return x.notify=D=>{let I;if(O({abort:()=>{I=!0},changed:D}),!I)return C(D)},()=>{x.notify=C}});e.onNotify=w;let R=(x,T)=>g(x,T,u,O=>{let C=x.build;return x.build=(...D)=>{let I=C(...D);return O({store:I}),I},()=>{x.build=C}});e.onBuild=R,e.STORE_UNMOUNT_DELAY=1e3;let S=(x,T)=>g(x,C=>{let D=T(C);D&&x.events[h].push(D)},d,C=>{let D=x.listen;x.listen=M=>(!x.lc&&!x.active&&(x.active=!0,C()),D(M));let I=x.off;if(x.events[h]=[],x.off=()=>{setTimeout(()=>{if(x.active&&!x.lc){x.active=!1;for(let M of x.events[h])M();x.events[h]=[],I()}},e.STORE_UNMOUNT_DELAY)},t.NODE_ENV!=="production"){let M=x[n.clean];x[n.clean]=()=>{for(let H of x.events[h])H();x.events[h]=[],x.active=!1,M()}}return()=>{x.listen=D,x.off=I}});e.onMount=S})(Jg)),Jg}var ty={},fT;function h5(){return fT||(fT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.actionFor=e.action=e.lastAction=void 0;const t=s0();e.lastAction=Symbol();let n=(s,l,u,d)=>{let h={...s};h.set=(...g)=>{s[e.lastAction]=l,s.set(...g),delete s[e.lastAction]},s.setKey&&(h.setKey=(...g)=>{s[e.lastAction]=l,s.setKey(...g),delete s[e.lastAction]});let m=u(h,...d);if(m instanceof Promise){let g=(0,t.startTask)();return m.finally(g)}return m},r=(s,l,u)=>(...d)=>n(s,l,u,d);e.action=r;let o=(s,l,u)=>(d,...h)=>n(d,l,u,h);e.actionFor=o})(ty)),ty}var Yl={},Wl={},ny={},hT;function c0(){return hT||(hT=1,(function(e){var t={};Object.defineProperty(e,"__esModule",{value:!0}),e.atom=e.notifyId=void 0;const n=Eh();let r=[];e.notifyId=0;let o=s=>{let l,u=[],d={lc:0,value:s,set(h){d.value=h,d.notify()},get(){return d.lc||d.listen(()=>{})(),d.value},notify(h){l=u;let m=!r.length;for(let g=0;g<l.length;g++)r.push(l[g],d.value,h);if(m){e.notifyId++;for(let g=0;g<r.length;g+=3)r[g](r[g+1],r[g+2]);r.length=0}},listen(h){return u===l&&(u=u.slice()),d.lc=u.push(h),()=>{u===l&&(u=u.slice());let m=u.indexOf(h);~m&&(u.splice(m,1),d.lc--,d.lc||d.off())}},subscribe(h){let m=d.listen(h);return h(d.value),m},off(){}};return t.NODE_ENV!=="production"&&(d[n.clean]=()=>{u=[],d.lc=0,d.off()}),d};e.atom=o})(ny)),ny}var mT;function ak(){if(mT)return Wl;mT=1,Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.map=void 0;const e=c0();let t=(n={})=>{let r=(0,e.atom)(n);return r.setKey=function(o,s){typeof s>"u"?o in r.value&&(r.value={...r.value},delete r.value[o],r.notify(o)):r.value[o]!==s&&(r.value={...r.value,[o]:s},r.notify(o))},r};return Wl.map=t,Wl}var pT;function m5(){if(pT)return Yl;pT=1;var e={};Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.mapTemplate=void 0;const t=l0(),n=Eh(),r=ak();function o(s){let l=(u,...d)=>(l.cache[u]||(l.cache[u]=l.build(u,...d)),l.cache[u]);return l.build=(u,...d)=>{let h=(0,r.map)({id:u});return(0,t.onMount)(h,()=>{let m;return s&&(m=s(h,u,...d)),()=>{delete l.cache[u],m&&m()}}),h},l.cache={},e.NODE_ENV!=="production"&&(l[n.clean]=()=>{for(let u in l.cache)l.cache[u][n.clean]();l.cache={}}),l}return Yl.mapTemplate=o,Yl}var Xl={},gT;function p5(){if(gT)return Xl;gT=1,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.listenKeys=void 0;function e(t,n,r){let o=new Set([...n,void 0]);return t.listen((s,l)=>{o.has(l)&&r(s,l)})}return Xl.listenKeys=e,Xl}var Ql={},yT;function g5(){if(yT)return Ql;yT=1,Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.keepMount=void 0;let e=t=>{t.listen(()=>{})};return Ql.keepMount=e,Ql}var Jl={},vT;function y5(){if(vT)return Jl;vT=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.computed=void 0;const e=l0(),t=c0();let n=(r,o)=>{Array.isArray(r)||(r=[r]);let s,l=[],u=()=>{let h=r.map(m=>m.get());(s!==t.notifyId||h.some((m,g)=>m!==l[g]))&&(s=t.notifyId,l=h,d.set(o(...h)))},d=(0,t.atom)();return(0,e.onMount)(d,()=>{let h=r.map(m=>m.listen(u,o));return u(),()=>{for(let m of h)m()}}),d};return Jl.computed=n,Jl}var bT;function v5(){return bT||(bT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.map=e.atom=e.computed=e.keepMount=e.listenKeys=e.mapTemplate=e.cleanStores=e.clean=e.lastAction=e.actionFor=e.action=e.task=e.allTasks=e.startTask=e.cleanTasks=e.onSet=e.onStop=e.onBuild=e.onMount=e.onStart=e.onNotify=e.STORE_UNMOUNT_DELAY=void 0;var t=l0();Object.defineProperty(e,"STORE_UNMOUNT_DELAY",{enumerable:!0,get:function(){return t.STORE_UNMOUNT_DELAY}}),Object.defineProperty(e,"onNotify",{enumerable:!0,get:function(){return t.onNotify}}),Object.defineProperty(e,"onStart",{enumerable:!0,get:function(){return t.onStart}}),Object.defineProperty(e,"onMount",{enumerable:!0,get:function(){return t.onMount}}),Object.defineProperty(e,"onBuild",{enumerable:!0,get:function(){return t.onBuild}}),Object.defineProperty(e,"onStop",{enumerable:!0,get:function(){return t.onStop}}),Object.defineProperty(e,"onSet",{enumerable:!0,get:function(){return t.onSet}});var n=s0();Object.defineProperty(e,"cleanTasks",{enumerable:!0,get:function(){return n.cleanTasks}}),Object.defineProperty(e,"startTask",{enumerable:!0,get:function(){return n.startTask}}),Object.defineProperty(e,"allTasks",{enumerable:!0,get:function(){return n.allTasks}}),Object.defineProperty(e,"task",{enumerable:!0,get:function(){return n.task}});var r=h5();Object.defineProperty(e,"action",{enumerable:!0,get:function(){return r.action}}),Object.defineProperty(e,"actionFor",{enumerable:!0,get:function(){return r.actionFor}}),Object.defineProperty(e,"lastAction",{enumerable:!0,get:function(){return r.lastAction}});var o=Eh();Object.defineProperty(e,"clean",{enumerable:!0,get:function(){return o.clean}}),Object.defineProperty(e,"cleanStores",{enumerable:!0,get:function(){return o.cleanStores}});var s=m5();Object.defineProperty(e,"mapTemplate",{enumerable:!0,get:function(){return s.mapTemplate}});var l=p5();Object.defineProperty(e,"listenKeys",{enumerable:!0,get:function(){return l.listenKeys}});var u=g5();Object.defineProperty(e,"keepMount",{enumerable:!0,get:function(){return u.keepMount}});var d=y5();Object.defineProperty(e,"computed",{enumerable:!0,get:function(){return d.computed}});var h=c0();Object.defineProperty(e,"atom",{enumerable:!0,get:function(){return h.atom}});var m=ak();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return m.map}})})(Qg)),Qg}var cv=v5();const b5=typeof window>"u",_5=(e,t,n,r)=>{const o=cv.atom({data:null,error:null,isPending:!0,isRefetching:!1,refetch:()=>s()}),s=()=>{const u=typeof r=="function"?r({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):r;return n(t,{...u,async onSuccess(d){o.set({data:d.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await u?.onSuccess?.(d)},async onError(d){const{request:h}=d,m=typeof h.retry=="number"?h.retry:h.retry?.attempts,g=h.retryAttempt||0;m&&g<m||(o.set({error:d.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await u?.onError?.(d))},async onRequest(d){const h=o.get();o.set({isPending:h.data===null,data:h.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await u?.onRequest?.(d)}})};e=Array.isArray(e)?e:[e];let l=!1;for(const u of e)u.subscribe(()=>{b5||(l?s():cv.onMount(o,()=>(setTimeout(()=>{s()},0),l=!0,()=>{o.off(),u.off()})))});return o},E5={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},x5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,_T={true:!0,false:!1,null:null,undefined:void 0,nan:Number.NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},S5=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function A5(e){return e instanceof Date&&!isNaN(e.getTime())}function w5(e){const t=S5.exec(e);if(!t)return null;const[,n,r,o,s,l,u,d,h,m,g]=t;let v=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(s,10),parseInt(l,10),parseInt(u,10),d?parseInt(d.padEnd(3,"0"),10):0));if(h){const _=(parseInt(m,10)*60+parseInt(g,10))*(h==="+"?-1:1);v.setUTCMinutes(v.getUTCMinutes()+_)}return A5(v)?v:null}function T5(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:o,parseDates:s=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const u=l.toLowerCase();if(u.length<=9&&u in _T)return _T[u];if(!x5.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(E5).some(([h,m])=>{const g=m.test(l);return g&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${h} pattern`),g})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(m,g)=>{if(m==="__proto__"||m==="constructor"&&g&&typeof g=="object"&&"prototype"in g){r&&console.warn(`[better-json] Dropping "${m}" key to prevent prototype pollution`);return}if(s&&typeof g=="string"){const v=w5(g);if(v)return v}return o?o(m,g):g})}catch(h){if(n)throw h;return e}}function R5(e,t={strict:!0}){return T5(e,t)}const C5={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function N5(e){const t=cv.atom(!1);return{session:_5(t,"/get-session",e,{method:"GET"}),$sessionSignal:t}}const O5=e=>{const t="credentials"in Request.prototype,n=f5(e?.baseURL,e?.basePath),r=e?.plugins?.flatMap(T=>T.fetchPlugins).filter(T=>T!==void 0)||[],o={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:s,onError:l,onRequest:u,onResponse:d,...h}=e?.fetchOptions||{},m=l5({baseURL:n,...t?{credentials:"include"}:{},method:"GET",jsonParser(T){return T?R5(T,{strict:!1}):null},customFetchImpl:async(T,O)=>{try{return await fetch(T,O)}catch{return Response.error()}},...h,plugins:[o,...h.plugins||[],...e?.disableDefaultFetchPlugins?[]:[C5],...r]}),{$sessionSignal:g,session:v}=N5(m),_=e?.plugins||[];let A={},w={$sessionSignal:g,session:v},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const S=[{signal:"$sessionSignal",matcher(T){return T==="/sign-out"||T==="/update-user"||T.startsWith("/sign-in")||T.startsWith("/sign-up")||T==="/delete-user"||T==="/verify-email"}}];for(const T of _)T.getAtoms&&Object.assign(w,T.getAtoms?.(m)),T.pathMethods&&Object.assign(R,T.pathMethods),T.atomListeners&&S.push(...T.atomListeners);const x={notify:T=>{w[T].set(!w[T].get())},listen:(T,O)=>{w[T].subscribe(O)},atoms:w};for(const T of _)T.getActions&&Object.assign(A,T.getActions?.(m,x,e));return{pluginsActions:A,pluginsAtoms:w,pluginPathMethods:R,atomListeners:S,$fetch:m,$store:x}};function k5(e,t,n){const r=t[e],{fetchOptions:o,query:s,...l}=n||{};return r||(o?.method?o.method:l&&Object.keys(l).length>0?"POST":"GET")}function D5(e,t,n,r,o){function s(l=[]){return new Proxy(function(){},{get(u,d){const h=[...l,d];let m=e;for(const g of h)if(m&&typeof m=="object"&&g in m)m=m[g];else{m=void 0;break}return typeof m=="function"?m:s(h)},apply:async(u,d,h)=>{const m="/"+l.map(x=>x.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),g=h[0]||{},v=h[1]||{},{query:_,fetchOptions:A,...w}=g,R={...v,...A},S=k5(m,n,g);return await t(m,{...R,body:S==="GET"?void 0:{...w,...R?.body||{}},query:_||R?.query,method:S,async onSuccess(x){await R?.onSuccess?.(x);const T=o?.find(D=>D.matcher(m));if(!T)return;const O=r[T.signal];if(!O)return;const C=O.get();setTimeout(()=>{O.set(!C)},10)}})}})}return s()}function I5(e){return e.charAt(0).toUpperCase()+e.slice(1)}function L5(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:o,atomListeners:s,$store:l}=O5(e);let u={};for(const[m,g]of Object.entries(r))u[`use${I5(m)}`]=g;const d={...n,...u,$fetch:o,$store:l};return D5(d,o,t,r,s)}const sk=e=>{const t=e?.editor?.backendURL??tt.editor?.backendURL;if(!t)throw new Error("Backend URL is not defined in the Intlayer configuration.");const n=()=>L5({baseURL:t,withCredentials:!0});return{signInEmail:async(...Z)=>n().signIn.email(...Z),signUpEmail:async(...Z)=>n().signUp.email(...Z),signOut:async(...Z)=>n().signOut(...Z),signInSocial:async(...Z)=>n().signIn.social(...Z),linkSocial:async(...Z)=>n().linkSocial(...Z),changePasswordSession:async(...Z)=>n().changePassword(...Z),requestPasswordResetSession:async(...Z)=>n().requestPasswordReset(...Z),resetPassword:async(...Z)=>n().resetPassword(...Z),verifyEmailSession:async(...Z)=>n().verifyEmail(...Z),getSession:async(...Z)=>n().getSession(...Z),forgetPassword:async(...Z)=>n().forgetPassword(...Z),sendVerificationEmail:async(...Z)=>n().sendVerificationEmail(...Z),changeEmail:async(...Z)=>n().changeEmail(...Z),deleteUser:async(...Z)=>n().deleteUser(...Z),revokeSession:async(...Z)=>n().revokeSession(...Z),revokeSessions:async(...Z)=>n().revokeSessions(...Z),revokeOtherSessions:async(...Z)=>n().revokeOtherSessions(...Z),listAccounts:async(...Z)=>n().listAccounts(...Z),unlinkAccount:async(...Z)=>n().unlinkAccount(...Z),refreshToken:async(...Z)=>n().refreshToken(...Z),getAccessToken:async(...Z)=>n().getAccessToken(...Z),accountInfo:async(...Z)=>n().accountInfo(...Z),updateUser:async(...Z)=>n().updateUser(...Z),listSessions:async(...Z)=>n().listSessions(...Z)}},j5=(e,t)=>{const n=Hr(),r=t??n??tt,{getSession:o,revalidate:s,data:l,setData:u,isFetched:d}=_h("getSession",async()=>(await sk(r).getSession()).data,{cache:!0,store:!0,autoFetch:!0,enable:!e,invalidateQueries:["getOrganizations","getProjects","getUsers","getDictionaries"]});return{session:l??(d?null:void 0),fetchSession:o,revalidateSession:s,setSession:u}},tu=({session:e,intlayerConfiguration:t}={})=>{const{session:n,fetchSession:r,revalidateSession:o,setSession:s}=j5(e,t),{oAuth2AccessToken:l}=U6(t);return{session:n,fetchSession:r,setSession:s,revalidateSession:o,oAuth2AccessToken:l,isAuthenticated:!!(n?.user||l)}},Gr=e=>{const t=Hr(),{oAuth2AccessToken:n}=tu();return kM({...n&&{headers:{Authorization:`Bearer ${n}`}}},t)},P5=e=>{const t=Hr();return sk(t)};var M5={};const ET=e=>e.split("_").join(" "),lk=e=>{const{toast:t}=nk();return{...e,onError:n=>{let r;try{if(typeof n>"u")return;r=JSON.parse(n)}catch{r=n}[r].flatMap(o=>o).forEach(o=>t({title:ET((M5.NODE_ENV==="production"?o.title:o.code)??"Error"),description:o.message??n??"An error occurred",variant:"error"})),e.onError?.(n)},onSuccess:n=>{n?.error&&t({title:ET(n.error.title??n.error.code??"Error"),description:n.error.message??n.error.code??"An error occurred",variant:"error"}),n?.message&&t({title:n.message,description:n.description,variant:"success"}),e.onSuccess?.(n)}}},z5=(e,{requireUser:t,requireProject:n,requireOrganization:r}={})=>{const o=Hr(),{oAuth2AccessToken:s,session:l}=tu({intlayerConfiguration:o}),u=e?.enable??!0,d=l?l.user:s?.user,h=l?l.organization:s?.organization,m=l?l.project:s?.project;return{...e,enable:u&&(t?!!d:!0)&&(n?!!m:!0)&&(r?!!h:!0)}},xi=(e,t,n,r)=>{const o=z5(n??{},r),s=lk(o);return _h(e,t,s)},ck=(e,t,n)=>{const r=lk(n??{});return _h(e,t,r)},V5=e=>xi("logout",P5().signOut,{...e}),U5=e=>xi("getProjects",Gr().project.getProjects,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:300*1e3,...e},{requireUser:!0,requireOrganization:!0}),B5=e=>xi("getDictionaries",Gr().dictionary.getDictionaries,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:300*1e3,...e},{requireUser:!0,requireOrganization:!0,requireProject:!0}),$5=e=>xi("pushDictionaries",Gr().dictionary.pushDictionaries,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),H5=e=>xi("deleteDictionary",Gr().dictionary.deleteDictionary,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),F5=e=>xi("getTags",Gr().tag.getTags,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:300*1e3,...e},{requireUser:!0,requireOrganization:!0}),G5=e=>xi("auditContentDeclaration",Gr().ai.auditContentDeclarationMetadata,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),K5=e=>xi("auditContentDeclarationField",Gr().ai.auditContentDeclarationField,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),q5=e=>xi("autocomplete",Gr().ai.autocomplete,e),Z5=e=>ck("writeDictionary",Gr().editor.writeDictionary,e),Y5=e=>ck("getDictionaries",Gr().editor.getDictionaries,{store:!0,cache:!0,...e});var nu=e=>e.type==="checkbox",Yo=e=>e instanceof Date,bn=e=>e==null;const uk=e=>typeof e=="object";var jt=e=>!bn(e)&&!Array.isArray(e)&&uk(e)&&!Yo(e),dk=e=>jt(e)&&e.target?nu(e.target)?e.target.checked:e.target.value:e,W5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,fk=(e,t)=>e.has(W5(t)),X5=e=>{const t=e.constructor&&e.constructor.prototype;return jt(t)&&t.hasOwnProperty("isPrototypeOf")},u0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function qt(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(!(u0&&(e instanceof Blob||r))&&(n||jt(e)))if(t=n?[]:Object.create(Object.getPrototypeOf(e)),!n&&!X5(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=qt(e[o]));else return e;return t}var xh=e=>/^\w*$/.test(e),Lt=e=>e===void 0,d0=e=>Array.isArray(e)?e.filter(Boolean):[],f0=e=>d0(e.replace(/["|']|\]/g,"").split(/\.|\[/)),xe=(e,t,n)=>{if(!t||!jt(e))return n;const r=(xh(t)?[t]:f0(t)).reduce((o,s)=>bn(o)?o:o[s],e);return Lt(r)||r===e?Lt(e[t])?n:e[t]:r},Un=e=>typeof e=="boolean",ut=(e,t,n)=>{let r=-1;const o=xh(t)?[t]:f0(t),s=o.length,l=s-1;for(;++r<s;){const u=o[r];let d=n;if(r!==l){const h=e[u];d=jt(h)||Array.isArray(h)?h:isNaN(+o[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Df={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},pr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},di={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},h0=De.createContext(null);h0.displayName="HookFormContext";const ho=()=>De.useContext(h0),Q5=e=>{const{children:t,...n}=e;return De.createElement(h0.Provider,{value:n},t)};var hk=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const l=s;return t._proxyFormState[l]!==pr.all&&(t._proxyFormState[l]=!r||pr.all),n&&(n[l]=!0),e[l]}});return o};const m0=typeof window<"u"?De.useLayoutEffect:De.useEffect;function J5(e){const t=ho(),{control:n=t.control,disabled:r,name:o,exact:s}=e||{},[l,u]=De.useState(n._formState),d=De.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return m0(()=>n._subscribe({name:o,formState:d.current,exact:s,callback:h=>{!r&&u({...n._formState,...h})}}),[o,r,s]),De.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),De.useMemo(()=>hk(l,n,d.current,!1),[l,n])}var Ir=e=>typeof e=="string",mk=(e,t,n,r,o)=>Ir(e)?(r&&t.watch.add(e),xe(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),xe(n,s))):(r&&(t.watchAll=!0),n),uv=e=>bn(e)||!uk(e);function hi(e,t,n=new WeakSet){if(uv(e)||uv(t))return e===t;if(Yo(e)&&Yo(t))return e.getTime()===t.getTime();const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const l=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const u=t[s];if(Yo(l)&&Yo(u)||jt(l)&&jt(u)||Array.isArray(l)&&Array.isArray(u)?!hi(l,u,n):l!==u)return!1}}return!0}function e8(e){const t=ho(),{control:n=t.control,name:r,defaultValue:o,disabled:s,exact:l,compute:u}=e||{},d=De.useRef(o),h=De.useRef(u),m=De.useRef(void 0);h.current=u;const g=De.useMemo(()=>n._getWatch(r,d.current),[n,r]),[v,_]=De.useState(h.current?h.current(g):g);return m0(()=>n._subscribe({name:r,formState:{values:!0},exact:l,callback:A=>{if(!s){const w=mk(r,n._names,A.values||n._formValues,!1,d.current);if(h.current){const R=h.current(w);hi(R,m.current)||(_(R),m.current=R)}else _(w)}}}),[n,s,r,l]),De.useEffect(()=>n._removeUnmounted()),v}function t8(e){const t=ho(),{name:n,disabled:r,control:o=t.control,shouldUnregister:s,defaultValue:l}=e,u=fk(o._names.array,n),d=De.useMemo(()=>xe(o._formValues,n,xe(o._defaultValues,n,l)),[o,n,l]),h=e8({control:o,name:n,defaultValue:d,exact:!0}),m=J5({control:o,name:n,exact:!0}),g=De.useRef(e),v=De.useRef(o.register(n,{...e.rules,value:h,...Un(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const _=De.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!xe(m.errors,n)},isDirty:{enumerable:!0,get:()=>!!xe(m.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!xe(m.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!xe(m.validatingFields,n)},error:{enumerable:!0,get:()=>xe(m.errors,n)}}),[m,n]),A=De.useCallback(x=>v.current.onChange({target:{value:dk(x),name:n},type:Df.CHANGE}),[n]),w=De.useCallback(()=>v.current.onBlur({target:{value:xe(o._formValues,n),name:n},type:Df.BLUR}),[n,o._formValues]),R=De.useCallback(x=>{const T=xe(o._fields,n);T&&x&&(T._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:O=>x.setCustomValidity(O),reportValidity:()=>x.reportValidity()})},[o._fields,n]),S=De.useMemo(()=>({name:n,value:h,...Un(r)||m.disabled?{disabled:m.disabled||r}:{},onChange:A,onBlur:w,ref:R}),[n,r,m.disabled,A,w,R,h]);return De.useEffect(()=>{const x=o._options.shouldUnregister||s;o.register(n,{...g.current.rules,...Un(g.current.disabled)?{disabled:g.current.disabled}:{}});const T=(O,C)=>{const D=xe(o._fields,O);D&&D._f&&(D._f.mount=C)};if(T(n,!0),x){const O=qt(xe(o._options.defaultValues,n));ut(o._defaultValues,n,O),Lt(xe(o._formValues,n))&&ut(o._formValues,n,O)}return!u&&o.register(n),()=>{(u?x&&!o._state.action:x)?o.unregister(n):T(n,!1)}},[n,o,u,s]),De.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),De.useMemo(()=>({field:S,formState:m,fieldState:_}),[S,m,_])}const n8=e=>e.render(t8(e));var p0=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},gc=e=>Array.isArray(e)?e:[e],xT=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},Nn=e=>jt(e)&&!Object.keys(e).length,g0=e=>e.type==="file",gr=e=>typeof e=="function",If=e=>{if(!u0)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},pk=e=>e.type==="select-multiple",y0=e=>e.type==="radio",r8=e=>y0(e)||nu(e),ry=e=>If(e)&&e.isConnected;function i8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Lt(e)?r++:e[t[r++]];return e}function o8(e){for(const t in e)if(e.hasOwnProperty(t)&&!Lt(e[t]))return!1;return!0}function Vt(e,t){const n=Array.isArray(t)?t:xh(t)?[t]:f0(t),r=n.length===1?e:i8(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(jt(r)&&Nn(r)||Array.isArray(r)&&o8(r))&&Vt(e,n.slice(0,-1)),e}var gk=e=>{for(const t in e)if(gr(e[t]))return!0;return!1};function Lf(e,t={}){const n=Array.isArray(e);if(jt(e)||n)for(const r in e)Array.isArray(e[r])||jt(e[r])&&!gk(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Lf(e[r],t[r])):bn(e[r])||(t[r]=!0);return t}function yk(e,t,n){const r=Array.isArray(e);if(jt(e)||r)for(const o in e)Array.isArray(e[o])||jt(e[o])&&!gk(e[o])?Lt(t)||uv(n[o])?n[o]=Array.isArray(e[o])?Lf(e[o],[]):{...Lf(e[o])}:yk(e[o],bn(t)?{}:t[o],n[o]):n[o]=!hi(e[o],t[o]);return n}var ec=(e,t)=>yk(e,t,Lf(t));const ST={value:!1,isValid:!1},AT={value:!0,isValid:!0};var vk=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&&!Lt(e[0].attributes.value)?Lt(e[0].value)||e[0].value===""?AT:{value:e[0].value,isValid:!0}:AT:ST}return ST},bk=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Lt(e)?e:t?e===""?NaN:e&&+e:n&&Ir(e)?new Date(e):r?r(e):e;const wT={isValid:!1,value:null};var _k=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,wT):wT;function TT(e){const t=e.ref;return g0(t)?t.files:y0(t)?_k(e.refs).value:pk(t)?[...t.selectedOptions].map(({value:n})=>n):nu(t)?vk(e.refs).value:bk(Lt(t.value)?e.ref.value:t.value,e)}var a8=(e,t,n,r)=>{const o={};for(const s of e){const l=xe(t,s);l&&ut(o,s,l._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},jf=e=>e instanceof RegExp,tc=e=>Lt(e)?e:jf(e)?e.source:jt(e)?jf(e.value)?e.value.source:e.value:e,RT=e=>({isOnSubmit:!e||e===pr.onSubmit,isOnBlur:e===pr.onBlur,isOnChange:e===pr.onChange,isOnAll:e===pr.all,isOnTouch:e===pr.onTouched});const CT="AsyncFunction";var s8=e=>!!e&&!!e.validate&&!!(gr(e.validate)&&e.validate.constructor.name===CT||jt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===CT)),l8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),NT=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const yc=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=xe(e,o);if(s){const{_f:l,...u}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(yc(u,t))break}else if(jt(u)&&yc(u,t))break}}};function OT(e,t,n){const r=xe(e,n);if(r||xh(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),l=xe(t,s),u=xe(e,s);if(l&&!Array.isArray(l)&&n!==s)return{name:n};if(u&&u.type)return{name:s,error:u};if(u&&u.root&&u.root.type)return{name:`${s}.root`,error:u.root};o.pop()}return{name:n}}var c8=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return Nn(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===(!r||pr.all))},u8=(e,t,n)=>!e||!t||e===t||gc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),d8=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,f8=(e,t)=>!d0(xe(e,t)).length&&Vt(e,t),h8=(e,t,n)=>{const r=gc(xe(e,n));return ut(r,"root",t[n]),ut(e,n,r),e},hf=e=>Ir(e);function kT(e,t,n="validate"){if(hf(e)||Array.isArray(e)&&e.every(hf)||Un(e)&&!e)return{type:n,message:hf(e)?e:"",ref:t}}var ns=e=>jt(e)&&!jf(e)?e:{value:e,message:""},DT=async(e,t,n,r,o,s)=>{const{ref:l,refs:u,required:d,maxLength:h,minLength:m,min:g,max:v,pattern:_,validate:A,name:w,valueAsNumber:R,mount:S}=e._f,x=xe(n,w);if(!S||t.has(w))return{};const T=u?u[0]:l,O=J=>{o&&T.reportValidity&&(T.setCustomValidity(Un(J)?"":J||""),T.reportValidity())},C={},D=y0(l),I=nu(l),M=D||I,H=(R||g0(l))&&Lt(l.value)&&Lt(x)||If(l)&&l.value===""||x===""||Array.isArray(x)&&!x.length,K=p0.bind(null,w,r,C),Z=(J,ae,Y,re=di.maxLength,j=di.minLength)=>{const X=J?ae:Y;C[w]={type:J?re:j,message:X,ref:l,...K(J?re:j,X)}};if(s?!Array.isArray(x)||!x.length:d&&(!M&&(H||bn(x))||Un(x)&&!x||I&&!vk(u).isValid||D&&!_k(u).isValid)){const{value:J,message:ae}=hf(d)?{value:!!d,message:d}:ns(d);if(J&&(C[w]={type:di.required,message:ae,ref:T,...K(di.required,ae)},!r))return O(ae),C}if(!H&&(!bn(g)||!bn(v))){let J,ae;const Y=ns(v),re=ns(g);if(!bn(x)&&!isNaN(x)){const j=l.valueAsNumber||x&&+x;bn(Y.value)||(J=j>Y.value),bn(re.value)||(ae=j<re.value)}else{const j=l.valueAsDate||new Date(x),X=P=>new Date(new Date().toDateString()+" "+P),F=l.type=="time",ve=l.type=="week";Ir(Y.value)&&x&&(J=F?X(x)>X(Y.value):ve?x>Y.value:j>new Date(Y.value)),Ir(re.value)&&x&&(ae=F?X(x)<X(re.value):ve?x<re.value:j<new Date(re.value))}if((J||ae)&&(Z(!!J,Y.message,re.message,di.max,di.min),!r))return O(C[w].message),C}if((h||m)&&!H&&(Ir(x)||s&&Array.isArray(x))){const J=ns(h),ae=ns(m),Y=!bn(J.value)&&x.length>+J.value,re=!bn(ae.value)&&x.length<+ae.value;if((Y||re)&&(Z(Y,J.message,ae.message),!r))return O(C[w].message),C}if(_&&!H&&Ir(x)){const{value:J,message:ae}=ns(_);if(jf(J)&&!x.match(J)&&(C[w]={type:di.pattern,message:ae,ref:l,...K(di.pattern,ae)},!r))return O(ae),C}if(A){if(gr(A)){const J=await A(x,n),ae=kT(J,T);if(ae&&(C[w]={...ae,...K(di.validate,ae.message)},!r))return O(ae.message),C}else if(jt(A)){let J={};for(const ae in A){if(!Nn(J)&&!r)break;const Y=kT(await A[ae](x,n),T,ae);Y&&(J={...Y,...K(ae,Y.message)},O(Y.message),r&&(C[w]=J))}if(!Nn(J)&&(C[w]={ref:T,...J},!r))return C}}return O(!0),C};const m8={mode:pr.onSubmit,reValidateMode:pr.onChange,shouldFocusError:!0};function p8(e={}){let t={...m8,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:gr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=jt(t.defaultValues)||jt(t.values)?qt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:qt(o),l={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,h=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let g={...m};const v={array:xT(),state:xT()},_=t.criteriaMode===pr.all,A=U=>te=>{clearTimeout(h),h=setTimeout(U,te)},w=async U=>{if(!t.disabled&&(m.isValid||g.isValid||U)){const te=t.resolver?Nn((await I()).errors):await H(r,!0);te!==n.isValid&&v.state.next({isValid:te})}},R=(U,te)=>{!t.disabled&&(m.isValidating||m.validatingFields||g.isValidating||g.validatingFields)&&((U||Array.from(u.mount)).forEach(ce=>{ce&&(te?ut(n.validatingFields,ce,te):Vt(n.validatingFields,ce))}),v.state.next({validatingFields:n.validatingFields,isValidating:!Nn(n.validatingFields)}))},S=(U,te=[],ce,Ae,_e=!0,be=!0)=>{if(Ae&&ce&&!t.disabled){if(l.action=!0,be&&Array.isArray(xe(r,U))){const Ce=ce(xe(r,U),Ae.argA,Ae.argB);_e&&ut(r,U,Ce)}if(be&&Array.isArray(xe(n.errors,U))){const Ce=ce(xe(n.errors,U),Ae.argA,Ae.argB);_e&&ut(n.errors,U,Ce),f8(n.errors,U)}if((m.touchedFields||g.touchedFields)&&be&&Array.isArray(xe(n.touchedFields,U))){const Ce=ce(xe(n.touchedFields,U),Ae.argA,Ae.argB);_e&&ut(n.touchedFields,U,Ce)}(m.dirtyFields||g.dirtyFields)&&(n.dirtyFields=ec(o,s)),v.state.next({name:U,isDirty:Z(U,te),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ut(s,U,te)},x=(U,te)=>{ut(n.errors,U,te),v.state.next({errors:n.errors})},T=U=>{n.errors=U,v.state.next({errors:n.errors,isValid:!1})},O=(U,te,ce,Ae)=>{const _e=xe(r,U);if(_e){const be=xe(s,U,Lt(ce)?xe(o,U):ce);Lt(be)||Ae&&Ae.defaultChecked||te?ut(s,U,te?be:TT(_e._f)):Y(U,be),l.mount&&w()}},C=(U,te,ce,Ae,_e)=>{let be=!1,Ce=!1;const Be={name:U};if(!t.disabled){if(!ce||Ae){(m.isDirty||g.isDirty)&&(Ce=n.isDirty,n.isDirty=Be.isDirty=Z(),be=Ce!==Be.isDirty);const Qe=hi(xe(o,U),te);Ce=!!xe(n.dirtyFields,U),Qe?Vt(n.dirtyFields,U):ut(n.dirtyFields,U,!0),Be.dirtyFields=n.dirtyFields,be=be||(m.dirtyFields||g.dirtyFields)&&Ce!==!Qe}if(ce){const Qe=xe(n.touchedFields,U);Qe||(ut(n.touchedFields,U,ce),Be.touchedFields=n.touchedFields,be=be||(m.touchedFields||g.touchedFields)&&Qe!==ce)}be&&_e&&v.state.next(Be)}return be?Be:{}},D=(U,te,ce,Ae)=>{const _e=xe(n.errors,U),be=(m.isValid||g.isValid)&&Un(te)&&n.isValid!==te;if(t.delayError&&ce?(d=A(()=>x(U,ce)),d(t.delayError)):(clearTimeout(h),d=null,ce?ut(n.errors,U,ce):Vt(n.errors,U)),(ce?!hi(_e,ce):_e)||!Nn(Ae)||be){const Ce={...Ae,...be&&Un(te)?{isValid:te}:{},errors:n.errors,name:U};n={...n,...Ce},v.state.next(Ce)}},I=async U=>{R(U,!0);const te=await t.resolver(s,t.context,a8(U||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return R(U),te},M=async U=>{const{errors:te}=await I(U);if(U)for(const ce of U){const Ae=xe(te,ce);Ae?ut(n.errors,ce,Ae):Vt(n.errors,ce)}else n.errors=te;return te},H=async(U,te,ce={valid:!0})=>{for(const Ae in U){const _e=U[Ae];if(_e){const{_f:be,...Ce}=_e;if(be){const Be=u.array.has(be.name),Qe=_e._f&&s8(_e._f);Qe&&m.validatingFields&&R([Ae],!0);const pt=await DT(_e,u.disabled,s,_,t.shouldUseNativeValidation&&!te,Be);if(Qe&&m.validatingFields&&R([Ae]),pt[be.name]&&(ce.valid=!1,te))break;!te&&(xe(pt,be.name)?Be?h8(n.errors,pt,be.name):ut(n.errors,be.name,pt[be.name]):Vt(n.errors,be.name))}!Nn(Ce)&&await H(Ce,te,ce)}}return ce.valid},K=()=>{for(const U of u.unMount){const te=xe(r,U);te&&(te._f.refs?te._f.refs.every(ce=>!ry(ce)):!ry(te._f.ref))&&ue(U)}u.unMount=new Set},Z=(U,te)=>!t.disabled&&(U&&te&&ut(s,U,te),!hi(P(),o)),J=(U,te,ce)=>mk(U,u,{...l.mount?s:Lt(te)?o:Ir(U)?{[U]:te}:te},ce,te),ae=U=>d0(xe(l.mount?s:o,U,t.shouldUnregister?xe(o,U,[]):[])),Y=(U,te,ce={})=>{const Ae=xe(r,U);let _e=te;if(Ae){const be=Ae._f;be&&(!be.disabled&&ut(s,U,bk(te,be)),_e=If(be.ref)&&bn(te)?"":te,pk(be.ref)?[...be.ref.options].forEach(Ce=>Ce.selected=_e.includes(Ce.value)):be.refs?nu(be.ref)?be.refs.forEach(Ce=>{(!Ce.defaultChecked||!Ce.disabled)&&(Array.isArray(_e)?Ce.checked=!!_e.find(Be=>Be===Ce.value):Ce.checked=_e===Ce.value||!!_e)}):be.refs.forEach(Ce=>Ce.checked=Ce.value===_e):g0(be.ref)?be.ref.value="":(be.ref.value=_e,be.ref.type||v.state.next({name:U,values:qt(s)})))}(ce.shouldDirty||ce.shouldTouch)&&C(U,_e,ce.shouldTouch,ce.shouldDirty,!0),ce.shouldValidate&&ve(U)},re=(U,te,ce)=>{for(const Ae in te){if(!te.hasOwnProperty(Ae))return;const _e=te[Ae],be=U+"."+Ae,Ce=xe(r,be);(u.array.has(U)||jt(_e)||Ce&&!Ce._f)&&!Yo(_e)?re(be,_e,ce):Y(be,_e,ce)}},j=(U,te,ce={})=>{const Ae=xe(r,U),_e=u.array.has(U),be=qt(te);ut(s,U,be),_e?(v.array.next({name:U,values:qt(s)}),(m.isDirty||m.dirtyFields||g.isDirty||g.dirtyFields)&&ce.shouldDirty&&v.state.next({name:U,dirtyFields:ec(o,s),isDirty:Z(U,be)})):Ae&&!Ae._f&&!bn(be)?re(U,be,ce):Y(U,be,ce),NT(U,u)&&v.state.next({...n,name:U}),v.state.next({name:l.mount?U:void 0,values:qt(s)})},X=async U=>{l.mount=!0;const te=U.target;let ce=te.name,Ae=!0;const _e=xe(r,ce),be=Qe=>{Ae=Number.isNaN(Qe)||Yo(Qe)&&isNaN(Qe.getTime())||hi(Qe,xe(s,ce,Qe))},Ce=RT(t.mode),Be=RT(t.reValidateMode);if(_e){let Qe,pt;const fa=te.type?TT(_e._f):dk(U),xr=U.type===Df.BLUR||U.type===Df.FOCUS_OUT,Gh=!l8(_e._f)&&!t.resolver&&!xe(n.errors,ce)&&!_e._f.deps||d8(xr,xe(n.touchedFields,ce),n.isSubmitted,Be,Ce),Ai=NT(ce,u,xr);ut(s,ce,fa),xr?(!te||!te.readOnly)&&(_e._f.onBlur&&_e._f.onBlur(U),d&&d(0)):_e._f.onChange&&_e._f.onChange(U);const wi=C(ce,fa,xr),Zr=!Nn(wi)||Ai;if(!xr&&v.state.next({name:ce,type:U.type,values:qt(s)}),Gh)return(m.isValid||g.isValid)&&(t.mode==="onBlur"?xr&&w():xr||w()),Zr&&v.state.next({name:ce,...Ai?{}:wi});if(!xr&&Ai&&v.state.next({...n}),t.resolver){const{errors:Eo}=await I([ce]);if(be(fa),Ae){const xo=OT(n.errors,r,ce),du=OT(Eo,r,xo.name||ce);Qe=du.error,ce=du.name,pt=Nn(Eo)}}else R([ce],!0),Qe=(await DT(_e,u.disabled,s,_,t.shouldUseNativeValidation))[ce],R([ce]),be(fa),Ae&&(Qe?pt=!1:(m.isValid||g.isValid)&&(pt=await H(r,!0)));Ae&&(_e._f.deps&&ve(_e._f.deps),D(ce,pt,Qe,wi))}},F=(U,te)=>{if(xe(n.errors,te)&&U.focus)return U.focus(),1},ve=async(U,te={})=>{let ce,Ae;const _e=gc(U);if(t.resolver){const be=await M(Lt(U)?U:_e);ce=Nn(be),Ae=U?!_e.some(Ce=>xe(be,Ce)):ce}else U?(Ae=(await Promise.all(_e.map(async be=>{const Ce=xe(r,be);return await H(Ce&&Ce._f?{[be]:Ce}:Ce)}))).every(Boolean),!(!Ae&&!n.isValid)&&w()):Ae=ce=await H(r);return v.state.next({...!Ir(U)||(m.isValid||g.isValid)&&ce!==n.isValid?{}:{name:U},...t.resolver||!U?{isValid:ce}:{},errors:n.errors}),te.shouldFocus&&!Ae&&yc(r,F,U?_e:u.mount),Ae},P=U=>{const te={...l.mount?s:o};return Lt(U)?te:Ir(U)?xe(te,U):U.map(ce=>xe(te,ce))},oe=(U,te)=>({invalid:!!xe((te||n).errors,U),isDirty:!!xe((te||n).dirtyFields,U),error:xe((te||n).errors,U),isValidating:!!xe(n.validatingFields,U),isTouched:!!xe((te||n).touchedFields,U)}),B=U=>{U&&gc(U).forEach(te=>Vt(n.errors,te)),v.state.next({errors:U?n.errors:{}})},W=(U,te,ce)=>{const Ae=(xe(r,U,{_f:{}})._f||{}).ref,_e=xe(n.errors,U)||{},{ref:be,message:Ce,type:Be,...Qe}=_e;ut(n.errors,U,{...Qe,...te,ref:Ae}),v.state.next({name:U,errors:n.errors,isValid:!1}),ce&&ce.shouldFocus&&Ae&&Ae.focus&&Ae.focus()},se=(U,te)=>gr(U)?v.state.subscribe({next:ce=>"values"in ce&&U(J(void 0,te),ce)}):J(U,te,!0),he=U=>v.state.subscribe({next:te=>{u8(U.name,te.name,U.exact)&&c8(te,U.formState||m,un,U.reRenderRoot)&&U.callback({values:{...s},...n,...te,defaultValues:o})}}).unsubscribe,ye=U=>(l.mount=!0,g={...g,...U.formState},he({...U,formState:g})),ue=(U,te={})=>{for(const ce of U?gc(U):u.mount)u.mount.delete(ce),u.array.delete(ce),te.keepValue||(Vt(r,ce),Vt(s,ce)),!te.keepError&&Vt(n.errors,ce),!te.keepDirty&&Vt(n.dirtyFields,ce),!te.keepTouched&&Vt(n.touchedFields,ce),!te.keepIsValidating&&Vt(n.validatingFields,ce),!t.shouldUnregister&&!te.keepDefaultValue&&Vt(o,ce);v.state.next({values:qt(s)}),v.state.next({...n,...te.keepDirty?{isDirty:Z()}:{}}),!te.keepIsValid&&w()},Ee=({disabled:U,name:te})=>{(Un(U)&&l.mount||U||u.disabled.has(te))&&(U?u.disabled.add(te):u.disabled.delete(te))},je=(U,te={})=>{let ce=xe(r,U);const Ae=Un(te.disabled)||Un(t.disabled);return ut(r,U,{...ce||{},_f:{...ce&&ce._f?ce._f:{ref:{name:U}},name:U,mount:!0,...te}}),u.mount.add(U),ce?Ee({disabled:Un(te.disabled)?te.disabled:t.disabled,name:U}):O(U,!0,te.value),{...Ae?{disabled:te.disabled||t.disabled}:{},...t.progressive?{required:!!te.required,min:tc(te.min),max:tc(te.max),minLength:tc(te.minLength),maxLength:tc(te.maxLength),pattern:tc(te.pattern)}:{},name:U,onChange:X,onBlur:X,ref:_e=>{if(_e){je(U,te),ce=xe(r,U);const be=Lt(_e.value)&&_e.querySelectorAll&&_e.querySelectorAll("input,select,textarea")[0]||_e,Ce=r8(be),Be=ce._f.refs||[];if(Ce?Be.find(Qe=>Qe===be):be===ce._f.ref)return;ut(r,U,{_f:{...ce._f,...Ce?{refs:[...Be.filter(ry),be,...Array.isArray(xe(o,U))?[{}]:[]],ref:{type:be.type,name:U}}:{ref:be}}}),O(U,!1,void 0,be)}else ce=xe(r,U,{}),ce._f&&(ce._f.mount=!1),(t.shouldUnregister||te.shouldUnregister)&&!(fk(u.array,U)&&l.action)&&u.unMount.add(U)}}},Ue=()=>t.shouldFocusError&&yc(r,F,u.mount),Xe=U=>{Un(U)&&(v.state.next({disabled:U}),yc(r,(te,ce)=>{const Ae=xe(r,ce);Ae&&(te.disabled=Ae._f.disabled||U,Array.isArray(Ae._f.refs)&&Ae._f.refs.forEach(_e=>{_e.disabled=Ae._f.disabled||U}))},0,!1))},nt=(U,te)=>async ce=>{let Ae;ce&&(ce.preventDefault&&ce.preventDefault(),ce.persist&&ce.persist());let _e=qt(s);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:be,values:Ce}=await I();n.errors=be,_e=qt(Ce)}else await H(r);if(u.disabled.size)for(const be of u.disabled)Vt(_e,be);if(Vt(n.errors,"root"),Nn(n.errors)){v.state.next({errors:{}});try{await U(_e,ce)}catch(be){Ae=be}}else te&&await te({...n.errors},ce),Ue(),setTimeout(Ue);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Nn(n.errors)&&!Ae,submitCount:n.submitCount+1,errors:n.errors}),Ae)throw Ae},Wt=(U,te={})=>{xe(r,U)&&(Lt(te.defaultValue)?j(U,qt(xe(o,U))):(j(U,te.defaultValue),ut(o,U,qt(te.defaultValue))),te.keepTouched||Vt(n.touchedFields,U),te.keepDirty||(Vt(n.dirtyFields,U),n.isDirty=te.defaultValue?Z(U,qt(xe(o,U))):Z()),te.keepError||(Vt(n.errors,U),m.isValid&&w()),v.state.next({...n}))},Sn=(U,te={})=>{const ce=U?qt(U):o,Ae=qt(ce),_e=Nn(U),be=_e?o:Ae;if(te.keepDefaultValues||(o=ce),!te.keepValues){if(te.keepDirtyValues){const Ce=new Set([...u.mount,...Object.keys(ec(o,s))]);for(const Be of Array.from(Ce))xe(n.dirtyFields,Be)?ut(be,Be,xe(s,Be)):j(Be,xe(be,Be))}else{if(u0&&Lt(U))for(const Ce of u.mount){const Be=xe(r,Ce);if(Be&&Be._f){const Qe=Array.isArray(Be._f.refs)?Be._f.refs[0]:Be._f.ref;if(If(Qe)){const pt=Qe.closest("form");if(pt){pt.reset();break}}}}if(te.keepFieldsRef)for(const Ce of u.mount)j(Ce,xe(be,Ce));else r={}}s=t.shouldUnregister?te.keepDefaultValues?qt(o):{}:qt(be),v.array.next({values:{...be}}),v.state.next({values:{...be}})}u={mount:te.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!te.keepIsValid||!!te.keepDirtyValues,l.watch=!!t.shouldUnregister,v.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:_e?!1:te.keepDirty?n.isDirty:!!(te.keepDefaultValues&&!hi(U,o)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:_e?{}:te.keepDirtyValues?te.keepDefaultValues&&s?ec(o,s):n.dirtyFields:te.keepDefaultValues&&U?ec(o,U):te.keepDirty?n.dirtyFields:{},touchedFields:te.keepTouched?n.touchedFields:{},errors:te.keepErrors?n.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Si=(U,te)=>Sn(gr(U)?U(s):U,te),_o=(U,te={})=>{const ce=xe(r,U),Ae=ce&&ce._f;if(Ae){const _e=Ae.refs?Ae.refs[0]:Ae.ref;_e.focus&&(_e.focus(),te.shouldSelect&&gr(_e.select)&&_e.select())}},un=U=>{n={...n,...U}},Gs={control:{register:je,unregister:ue,getFieldState:oe,handleSubmit:nt,setError:W,_subscribe:he,_runSchema:I,_focusError:Ue,_getWatch:J,_getDirty:Z,_setValid:w,_setFieldArray:S,_setDisabledField:Ee,_setErrors:T,_getFieldArray:ae,_reset:Sn,_resetDefaultValues:()=>gr(t.defaultValues)&&t.defaultValues().then(U=>{Si(U,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:K,_disableForm:Xe,_subjects:v,_proxyFormState:m,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(U){l=U},get _defaultValues(){return o},get _names(){return u},set _names(U){u=U},get _formState(){return n},get _options(){return t},set _options(U){t={...t,...U}}},subscribe:ye,trigger:ve,register:je,handleSubmit:nt,watch:se,setValue:j,getValues:P,reset:Si,resetField:Wt,clearErrors:B,unregister:ue,setError:W,setFocus:_o,getFieldState:oe};return{...Gs,formControl:Gs}}function g8(e={}){const t=De.useRef(void 0),n=De.useRef(void 0),[r,o]=De.useState({isDirty:!1,isValidating:!1,isLoading:gr(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:gr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!gr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...u}=p8(e);t.current={...u,formState:r}}const s=t.current.control;return s._options=e,m0(()=>{const l=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(u=>({...u,isReady:!0})),s._formState.isReady=!0,l},[s]),De.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),De.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),De.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),De.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),De.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),De.useEffect(()=>{e.values&&!hi(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),n.current=e.values,o(l=>({...l}))):s._resetDefaultValues()},[s,e.values]),De.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=hk(r,s),t.current}const IT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},dv=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?IT(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>IT(o,n,e))}},LT=(e,t)=>{t.shouldUseNativeValidation&&dv(e,t);const n={};for(const r in e){const o=xe(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.ref});if(y8(t.names||Object.keys(e),r)){const l=Object.assign({},xe(n,r));ut(l,"root",s),ut(n,r,l)}else ut(n,r,s)}return n},y8=(e,t)=>{const n=jT(t);return e.some(r=>jT(r).match(`^${n}\\.\\d+`))};function jT(e){return e.replace(/\]|\[/g,"")}const v8=e=>{const t=E.useId(),n=E.useMemo(()=>({id:t}),[t]);return y.jsx(Ek,{value:n,children:y.jsx("div",{className:"flex flex-col gap-2 p-2",...e})})},Ek=E.createContext({}),xk=E.createContext({}),b8=({...e})=>{const t=E.useMemo(()=>({name:e.name}),[e.name]);return y.jsx(xk,{value:t,children:y.jsx(n8,{...e})})},mo=()=>{const e=E.useContext(xk),t=E.useContext(Ek),{getFieldState:n,formState:r}=ho(),o=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Sk=sr("",{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"}});var ao=(e=>(e.DEFAULT="default",e.INVISIBLE="invisible",e))(ao||{});const zs=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...o})=>y.jsx("input",{className:Sk({variant:t,size:n,validationStyleEnabled:e?"enabled":"disabled",className:r}),...o}),_8=sr("",{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"}}),PT=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:o,variant:s,className:l,...u})=>y.jsx("input",{type:"checkbox",className:_8({variant:s,size:n,color:r,validationStyleEnabled:e?"enabled":"disabled",className:l}),...u}),E8=e=>{const{label:t,name:n,id:r}=e;return t?y.jsxs("label",{htmlFor:r??n,className:"flex items-center gap-x-4 font-medium text-sm cursor-pointer",children:[y.jsx(PT,{id:r??n,...e}),t]}):y.jsx(PT,{id:r??n,...e})},x8=e=>{const[t,n]=E.useState(!1),r=s=>{s.preventDefault(),s.stopPropagation(),n(l=>!l)},o=t?SU:EU;return y.jsxs("div",{className:"relative",children:[y.jsx(zs,{...e,"aria-label":"password",type:t?"text":"password"}),y.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:y.jsx(o,{className:"text-neutral mr-2 inline-block",size:20})})]})},Ak=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>y.jsx("textarea",{className:Se("resize-none",Sk({variant:t,validationStyleEnabled:n?"enabled":"disabled",className:e})),...r}),wk=({value:e="",onCancel:t,onSave:n,onClick:r,children:o,isDisabled:s,...l})=>{const[u,d]=E.useState(!1),h=E.useRef(null),m=A=>{A.stopPropagation(),d(!1),n()},g=A=>{A.stopPropagation(),d(!1),t()},v=!e||e===""?"-":e,_=E.useCallback(A=>{const w=window.getSelection();w&&w.toString().trim()!==""||h.current&&!h.current.contains(A.target)&&(d(!1),n())},[n]);return E.useEffect(()=>(u?document.addEventListener("click",_):document.removeEventListener("click",_),()=>document.removeEventListener("click",_)),[_,u]),y.jsxs("span",{className:"group/editable-field flex gap-2",role:"button",tabIndex:0,onClick:A=>{d(!0),r?.(A)},ref:h,...l,children:[y.jsxs("div",{className:Se("flex flex-1 gap-2",u?"display":"hidden"),children:[o,y.jsx(st,{label:"Save",variant:at.HOVERABLE,size:Fn.ICON_SM,color:ot.TEXT,Icon:Ds,onClick:m,disabled:s,className:"!text-current"}),y.jsx(st,{label:"Cancel",color:ot.TEXT,variant:at.HOVERABLE,className:"!text-current",size:Fn.ICON_SM,Icon:la,onClick:g,disabled:s})]},String(u)),y.jsxs("div",{className:Se("flex flex-1 gap-2",u?"hidden":"display"),children:[y.jsx("span",{className:"ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6",children:v}),y.jsx(st,{label:"Edit",Icon:tC,color:ot.TEXT,variant:at.HOVERABLE,size:Fn.ICON_SM,className:"invisible !text-current group-hover/editable-field:visible",disabled:s,onClick:A=>{A.stopPropagation(),d(!0)}})]})]})},Tk=({onSave:e,onCancel:t,ref:n,...r})=>{const o=E.useRef(null),s=()=>{e?.(o.current?.value??"")},l=()=>{o.current&&(o.current.value=o.current.defaultValue??""),t?.()};E.useImperativeHandle(n,()=>o.current);const u=E.useMemo(()=>r.value??o.current?.value??r.defaultValue,[r.value,r.defaultValue,o.current?.value]);return y.jsx(wk,{value:u,onCancel:l,onSave:s,children:y.jsx(zs,{ref:o,...r})})},MT=24,zT=12,v0=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:o,...s})=>{const l=E.useRef(null);E.useImperativeHandle(o,()=>l.current);const u=()=>{const m=l.current;if(!m||!t)return;const g=m.style;g.height="auto";const v=m.scrollHeight,_=MT*r+zT,A=MT+zT;g.height=Math.max(Math.min(v,_),A)+"px"};E.useEffect(()=>{u()},[s.value,s.defaultValue,u]);const d=m=>{n?.(m),u()},h=m=>{l.current=m,m&&u()};return y.jsx(Ak,{ref:h,onChange:d,className:Se("overflow-y-auto",t?"resize-none":"",e),...s})},Rk=({onSave:e,onCancel:t,ref:n,...r})=>{const o=E.useRef(null);E.useImperativeHandle(n,()=>o.current);const s=()=>{e?.(o.current?.value??"")},l=()=>{o.current&&(o.current.value=o.current.defaultValue??""),t?.()},u=r.value??o.current?.value??r.defaultValue??"";return y.jsx(wk,{value:u,onCancel:l,onSave:s,onClick:d=>{d.preventDefault(),d.stopPropagation()},children:y.jsx(v0,{className:"leading-6",ref:o,onClick:d=>{d.preventDefault(),d.stopPropagation()},...r})})},Ck=E.createContext(null),Sh=()=>{const e=E.useContext(Ck);if(!e)throw new Error("useMultiSelect must be used within MultiSelectProvider");return e},S8=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:o,children:s,dir:l,...u})=>{const[d,h]=E.useState(t??[]),[m,g]=E.useState(""),[v,_]=E.useState(!1),[A,w]=E.useState(-1),R=E.useRef(null),[S,x]=E.useState(!1),[T,O]=E.useState("");E.useEffect(()=>{e&&h(e)},[e]);const C=E.useCallback(H=>{if(d.includes(H)){const K=d.filter(Z=>Z!==H);h(K),n?.(K)}else{const K=[...d,H];h(K),n?.(K)}},[d]),D=E.useCallback(H=>{H.preventDefault();const K=H.currentTarget,Z=K.value.substring(K.selectionStart??0,K.selectionEnd??0);O(Z),x(Z===m)},[m]),I=E.useCallback(H=>{H.stopPropagation();const K=R.current;if(!K)return;const Z=()=>{const Y=A+1;w(Y>d.length-1?r?0:-1:Y)},J=()=>{const Y=A-1;w(Y<0?d.length-1:Y)},ae=()=>{const Y=A-1<=0?d.length-1===0?-1:0:A-1;w(Y)};switch(H.key){case"ArrowLeft":l==="rtl"?d.length>0&&(A!==-1||r)&&Z():d.length>0&&K.selectionStart===0&&J();break;case"ArrowRight":l==="rtl"?d.length>0&&K.selectionStart===0&&J():d.length>0&&(A!==-1||r)&&Z();break;case"Backspace":case"Delete":d.length>0&&(A!==-1&&A<d.length?(C(d[A]),ae()):(K.selectionStart===0&&T===m||S)&&C(d[d.length-1]));break;case"Enter":_(!0);break;case"Escape":A!==-1?w(-1):v&&_(!1);break}},[d,m,A,r]),M=E.useMemo(()=>({value:d,onValueChange:C,open:v,setOpen:_,inputValue:m,setInputValue:g,activeIndex:A,setActiveIndex:w,ref:R,handleSelect:D}),[d,C,v,_,m,g,A,w,R,D]);return y.jsx(Ck,{value:M,children:y.jsx(eN,{onKeyDown:I,className:Se("flex w-full flex-col gap-2 overflow-visible bg-transparent",o),dir:l,...u,children:s})})},A8=({className:e,getBadgeValue:t=s=>s,validationStyleEnabled:n=!1,children:r,...o})=>{const{value:s,onValueChange:l,activeIndex:u}=Sh(),d=E.useCallback(h=>{h.preventDefault(),h.stopPropagation()},[]);return y.jsxs("div",{className:Se("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),...o,children:[s.length>0&&y.jsx("div",{className:"flex w-full flex-wrap gap-1",children:s.map((h,m)=>y.jsxs(xB,{className:Se("flex items-center gap-1 rounded-xl px-1",u===m&&"ring-muted-foreground ring-2"),color:gC.TEXT,children:[y.jsx("span",{className:"text-xs",children:t(h)}),y.jsxs("button",{"aria-label":`Remove ${h} option`,"aria-roledescription":"button to remove option",onMouseDown:d,onClick:()=>l(h),children:[y.jsxs("span",{className:"sr-only",children:["Remove ",h," option"]}),y.jsx(la,{className:"size-4 cursor-pointer"})]})]},h))}),r]})},w8=({className:e,...t})=>{const{setOpen:n,inputValue:r,setInputValue:o,activeIndex:s,setActiveIndex:l,handleSelect:u,ref:d}=Sh();return y.jsx(Tf.Input,{...t,tabIndex:0,ref:d,value:r,onValueChange:s===-1?o:void 0,onSelect:u,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>l(-1),className:Se("outline-hidden ml-2 flex-1 cursor-pointer",e,s!==-1&&"caret-transparent")})},T8=({children:e})=>{const{open:t}=Sh();return y.jsx("div",{className:"relative",children:t&&e})},R8=({className:e,children:t})=>y.jsxs(Tf.List,{className:Se("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,y.jsx(Tf.Empty,{children:y.jsx("span",{className:"text-muted-foreground",children:"No results found"})})]}),C8=({className:e,value:t,children:n,...r})=>{const{value:o,onValueChange:s,setInputValue:l}=Sh(),u=E.useCallback(h=>{h.preventDefault(),h.stopPropagation()},[]),d=o.includes(t);return y.jsxs(Tf.Item,{...r,onSelect:()=>{s(t),l("")},className:Se("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&&y.jsx(Ds,{className:"size-4"})]})},pn=S8;pn.Trigger=A8;pn.Input=w8;pn.Content=T8;pn.List=R8;pn.Item=C8;const N8=({className:e,children:t,...n})=>y.jsxs("i",{className:Se("text-xs text-neutral-400",e),...n,children:["ⓘ ",t]}),fv=({htmlFor:e,...t})=>y.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",htmlFor:e,...t}),O8=({className:e,...t})=>{const{error:n,formItemId:r}=mo();return y.jsx(fv,{className:Se("mb-2",n&&"text-error",e),htmlFor:r,...t})},k8=({isRequired:e})=>e?y.jsx("span",{"aria-label":"Asterisk meaning the field is required",children:"*"}):y.jsx(y.Fragment,{}),Nk=({children:e,isRequired:t,info:n,htmlFor:r,className:o})=>y.jsxs("div",{className:"ml-1 flex gap-1 align-middle text-base leading-none",children:[e&&y.jsxs(O8,{htmlFor:r,id:`${r}-label`,className:ch("font-bold",o),children:[e,y.jsx(k8,{isRequired:t})]}),n&&y.jsx(N8,{content:n})]});function VT(e,[t,n]){return Math.min(n,Math.max(t,e))}var D8=E.createContext(void 0);function I8(e){const t=E.useContext(D8);return e||t||"ltr"}const L8=["top","right","bottom","left"],so=Math.min,$n=Math.max,Pf=Math.round,zd=Math.floor,Ur=e=>({x:e,y:e}),j8={left:"right",right:"left",bottom:"top",top:"bottom"},P8={start:"end",end:"start"};function hv(e,t,n){return $n(e,so(t,n))}function vi(e,t){return typeof e=="function"?e(t):e}function bi(e){return e.split("-")[0]}function Vs(e){return e.split("-")[1]}function b0(e){return e==="x"?"y":"x"}function _0(e){return e==="y"?"height":"width"}const M8=new Set(["top","bottom"]);function Lr(e){return M8.has(bi(e))?"y":"x"}function E0(e){return b0(Lr(e))}function z8(e,t,n){n===void 0&&(n=!1);const r=Vs(e),o=E0(e),s=_0(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Mf(l)),[l,Mf(l)]}function V8(e){const t=Mf(e);return[mv(e),t,mv(t)]}function mv(e){return e.replace(/start|end/g,t=>P8[t])}const UT=["left","right"],BT=["right","left"],U8=["top","bottom"],B8=["bottom","top"];function $8(e,t,n){switch(e){case"top":case"bottom":return n?t?BT:UT:t?UT:BT;case"left":case"right":return t?U8:B8;default:return[]}}function H8(e,t,n,r){const o=Vs(e);let s=$8(bi(e),n==="start",r);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(mv)))),s}function Mf(e){return e.replace(/left|right|bottom|top/g,t=>j8[t])}function F8(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ok(e){return typeof e!="number"?F8(e):{top:e,right:e,bottom:e,left:e}}function zf(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function $T(e,t,n){let{reference:r,floating:o}=e;const s=Lr(t),l=E0(t),u=_0(l),d=bi(t),h=s==="y",m=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,v=r[u]/2-o[u]/2;let _;switch(d){case"top":_={x:m,y:r.y-o.height};break;case"bottom":_={x:m,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:g};break;case"left":_={x:r.x-o.width,y:g};break;default:_={x:r.x,y:r.y}}switch(Vs(t)){case"start":_[l]-=v*(n&&h?-1:1);break;case"end":_[l]+=v*(n&&h?-1:1);break}return _}const G8=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:l}=n,u=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:g}=$T(h,r,d),v=r,_={},A=0;for(let w=0;w<u.length;w++){const{name:R,fn:S}=u[w],{x,y:T,data:O,reset:C}=await S({x:m,y:g,initialPlacement:r,placement:v,strategy:o,middlewareData:_,rects:h,platform:l,elements:{reference:e,floating:t}});m=x??m,g=T??g,_={..._,[R]:{..._[R],...O}},C&&A<=50&&(A++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(h=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:m,y:g}=$T(h,v,d)),w=-1)}return{x:m,y:g,placement:v,strategy:o,middlewareData:_}};async function kc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:l,elements:u,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:v=!1,padding:_=0}=vi(t,e),A=Ok(_),R=u[v?g==="floating"?"reference":"floating":g],S=zf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(R)))==null||n?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:h,rootBoundary:m,strategy:d})),x=g==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),O=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},C=zf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:x,offsetParent:T,strategy:d}):x);return{top:(S.top-C.top+A.top)/O.y,bottom:(C.bottom-S.bottom+A.bottom)/O.y,left:(S.left-C.left+A.left)/O.x,right:(C.right-S.right+A.right)/O.x}}const K8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:l,elements:u,middlewareData:d}=t,{element:h,padding:m=0}=vi(e,t)||{};if(h==null)return{};const g=Ok(m),v={x:n,y:r},_=E0(o),A=_0(_),w=await l.getDimensions(h),R=_==="y",S=R?"top":"left",x=R?"bottom":"right",T=R?"clientHeight":"clientWidth",O=s.reference[A]+s.reference[_]-v[_]-s.floating[A],C=v[_]-s.reference[_],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let I=D?D[T]:0;(!I||!await(l.isElement==null?void 0:l.isElement(D)))&&(I=u.floating[T]||s.floating[A]);const M=O/2-C/2,H=I/2-w[A]/2-1,K=so(g[S],H),Z=so(g[x],H),J=K,ae=I-w[A]-Z,Y=I/2-w[A]/2+M,re=hv(J,Y,ae),j=!d.arrow&&Vs(o)!=null&&Y!==re&&s.reference[A]/2-(Y<J?K:Z)-w[A]/2<0,X=j?Y<J?Y-J:Y-ae:0;return{[_]:v[_]+X,data:{[_]:re,centerOffset:Y-re-X,...j&&{alignmentOffset:X}},reset:j}}}),q8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:l,initialPlacement:u,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:w=!0,...R}=vi(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const S=bi(o),x=Lr(u),T=bi(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(h.floating)),C=v||(T||!w?[Mf(u)]:V8(u)),D=A!=="none";!v&&D&&C.push(...H8(u,w,A,O));const I=[u,...C],M=await kc(t,R),H=[];let K=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&H.push(M[S]),g){const Y=z8(o,l,O);H.push(M[Y[0]],M[Y[1]])}if(K=[...K,{placement:o,overflows:H}],!H.every(Y=>Y<=0)){var Z,J;const Y=(((Z=s.flip)==null?void 0:Z.index)||0)+1,re=I[Y];if(re&&(!(g==="alignment"?x!==Lr(re):!1)||K.every(F=>Lr(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:Y,overflows:K},reset:{placement:re}};let j=(J=K.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:J.placement;if(!j)switch(_){case"bestFit":{var ae;const X=(ae=K.filter(F=>{if(D){const ve=Lr(F.placement);return ve===x||ve==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(ve=>ve>0).reduce((ve,P)=>ve+P,0)]).sort((F,ve)=>F[1]-ve[1])[0])==null?void 0:ae[0];X&&(j=X);break}case"initialPlacement":j=u;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function HT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FT(e){return L8.some(t=>e[t]>=0)}const Z8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=vi(e,t);switch(r){case"referenceHidden":{const s=await kc(t,{...o,elementContext:"reference"}),l=HT(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:FT(l)}}}case"escaped":{const s=await kc(t,{...o,altBoundary:!0}),l=HT(s,n.floating);return{data:{escapedOffsets:l,escaped:FT(l)}}}default:return{}}}}},kk=new Set(["left","top"]);async function Y8(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=bi(n),u=Vs(n),d=Lr(n)==="y",h=kk.has(l)?-1:1,m=s&&d?-1:1,g=vi(t,e);let{mainAxis:v,crossAxis:_,alignmentAxis:A}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof A=="number"&&(_=u==="end"?A*-1:A),d?{x:_*m,y:v*h}:{x:v*h,y:_*m}}const W8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:l,middlewareData:u}=t,d=await Y8(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:l}}}}},X8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:R=>{let{x:S,y:x}=R;return{x:S,y:x}}},...d}=vi(e,t),h={x:n,y:r},m=await kc(t,d),g=Lr(bi(o)),v=b0(g);let _=h[v],A=h[g];if(s){const R=v==="y"?"top":"left",S=v==="y"?"bottom":"right",x=_+m[R],T=_-m[S];_=hv(x,_,T)}if(l){const R=g==="y"?"top":"left",S=g==="y"?"bottom":"right",x=A+m[R],T=A-m[S];A=hv(x,A,T)}const w=u.fn({...t,[v]:_,[g]:A});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[v]:s,[g]:l}}}}}},Q8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:h=!0}=vi(e,t),m={x:n,y:r},g=Lr(o),v=b0(g);let _=m[v],A=m[g];const w=vi(u,t),R=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(d){const T=v==="y"?"height":"width",O=s.reference[v]-s.floating[T]+R.mainAxis,C=s.reference[v]+s.reference[T]-R.mainAxis;_<O?_=O:_>C&&(_=C)}if(h){var S,x;const T=v==="y"?"width":"height",O=kk.has(bi(o)),C=s.reference[g]-s.floating[T]+(O&&((S=l.offset)==null?void 0:S[g])||0)+(O?0:R.crossAxis),D=s.reference[g]+s.reference[T]+(O?0:((x=l.offset)==null?void 0:x[g])||0)-(O?R.crossAxis:0);A<C?A=C:A>D&&(A=D)}return{[v]:_,[g]:A}}}},J8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:l,elements:u}=t,{apply:d=()=>{},...h}=vi(e,t),m=await kc(t,h),g=bi(o),v=Vs(o),_=Lr(o)==="y",{width:A,height:w}=s.floating;let R,S;g==="top"||g==="bottom"?(R=g,S=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(S=g,R=v==="end"?"top":"bottom");const x=w-m.top-m.bottom,T=A-m.left-m.right,O=so(w-m[R],x),C=so(A-m[S],T),D=!t.middlewareData.shift;let I=O,M=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=x),D&&!v){const K=$n(m.left,0),Z=$n(m.right,0),J=$n(m.top,0),ae=$n(m.bottom,0);_?M=A-2*(K!==0||Z!==0?K+Z:$n(m.left,m.right)):I=w-2*(J!==0||ae!==0?J+ae:$n(m.top,m.bottom))}await d({...t,availableWidth:M,availableHeight:I});const H=await l.getDimensions(u.floating);return A!==H.width||w!==H.height?{reset:{rects:!0}}:{}}}};function Ah(){return typeof window<"u"}function Us(e){return Dk(e)?(e.nodeName||"").toLowerCase():"#document"}function Gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kr(e){var t;return(t=(Dk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dk(e){return Ah()?e instanceof Node||e instanceof Gn(e).Node:!1}function vr(e){return Ah()?e instanceof Element||e instanceof Gn(e).Element:!1}function $r(e){return Ah()?e instanceof HTMLElement||e instanceof Gn(e).HTMLElement:!1}function GT(e){return!Ah()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gn(e).ShadowRoot}const e9=new Set(["inline","contents"]);function ru(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!e9.has(o)}const t9=new Set(["table","td","th"]);function n9(e){return t9.has(Us(e))}const r9=[":popover-open",":modal"];function wh(e){return r9.some(t=>{try{return e.matches(t)}catch{return!1}})}const i9=["transform","translate","scale","rotate","perspective"],o9=["transform","translate","scale","rotate","perspective","filter"],a9=["paint","layout","strict","content"];function x0(e){const t=S0(),n=vr(e)?br(e):e;return i9.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)||o9.some(r=>(n.willChange||"").includes(r))||a9.some(r=>(n.contain||"").includes(r))}function s9(e){let t=lo(e);for(;$r(t)&&!ws(t);){if(x0(t))return t;if(wh(t))return null;t=lo(t)}return null}function S0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const l9=new Set(["html","body","#document"]);function ws(e){return l9.has(Us(e))}function br(e){return Gn(e).getComputedStyle(e)}function Th(e){return vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lo(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GT(e)&&e.host||Kr(e);return GT(t)?t.host:t}function Ik(e){const t=lo(e);return ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:$r(t)&&ru(t)?t:Ik(t)}function Dc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ik(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=Gn(o);if(s){const u=pv(l);return t.concat(l,l.visualViewport||[],ru(o)?o:[],u&&n?Dc(u):[])}return t.concat(o,Dc(o,[],n))}function pv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lk(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$r(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=Pf(n)!==s||Pf(r)!==l;return u&&(n=s,r=l),{width:n,height:r,$:u}}function A0(e){return vr(e)?e:e.contextElement}function gs(e){const t=A0(e);if(!$r(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Lk(t);let l=(s?Pf(n.width):n.width)/r,u=(s?Pf(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const c9=Ur(0);function jk(e){const t=Gn(e);return!S0()||!t.visualViewport?c9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function u9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gn(e)?!1:t}function na(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=A0(e);let l=Ur(1);t&&(r?vr(r)&&(l=gs(r)):l=gs(e));const u=u9(s,n,r)?jk(s):Ur(0);let d=(o.left+u.x)/l.x,h=(o.top+u.y)/l.y,m=o.width/l.x,g=o.height/l.y;if(s){const v=Gn(s),_=r&&vr(r)?Gn(r):r;let A=v,w=pv(A);for(;w&&r&&_!==A;){const R=gs(w),S=w.getBoundingClientRect(),x=br(w),T=S.left+(w.clientLeft+parseFloat(x.paddingLeft))*R.x,O=S.top+(w.clientTop+parseFloat(x.paddingTop))*R.y;d*=R.x,h*=R.y,m*=R.x,g*=R.y,d+=T,h+=O,A=Gn(w),w=pv(A)}}return zf({width:m,height:g,x:d,y:h})}function w0(e,t){const n=Th(e).scrollLeft;return t?t.left+n:na(Kr(e)).left+n}function Pk(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:w0(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function d9(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",l=Kr(r),u=t?wh(t.floating):!1;if(r===l||u&&s)return n;let d={scrollLeft:0,scrollTop:0},h=Ur(1);const m=Ur(0),g=$r(r);if((g||!g&&!s)&&((Us(r)!=="body"||ru(l))&&(d=Th(r)),$r(r))){const _=na(r);h=gs(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const v=l&&!g&&!s?Pk(l,d,!0):Ur(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+v.x,y:n.y*h.y-d.scrollTop*h.y+m.y+v.y}}function f9(e){return Array.from(e.getClientRects())}function h9(e){const t=Kr(e),n=Th(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+w0(e);const u=-n.scrollTop;return br(r).direction==="rtl"&&(l+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:l,y:u}}function m9(e,t){const n=Gn(e),r=Kr(e),o=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,u=0,d=0;if(o){s=o.width,l=o.height;const h=S0();(!h||h&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}return{width:s,height:l,x:u,y:d}}const p9=new Set(["absolute","fixed"]);function g9(e,t){const n=na(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=$r(e)?gs(e):Ur(1),l=e.clientWidth*s.x,u=e.clientHeight*s.y,d=o*s.x,h=r*s.y;return{width:l,height:u,x:d,y:h}}function KT(e,t,n){let r;if(t==="viewport")r=m9(e,n);else if(t==="document")r=h9(Kr(e));else if(vr(t))r=g9(t,n);else{const o=jk(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zf(r)}function Mk(e,t){const n=lo(e);return n===t||!vr(n)||ws(n)?!1:br(n).position==="fixed"||Mk(n,t)}function y9(e,t){const n=t.get(e);if(n)return n;let r=Dc(e,[],!1).filter(u=>vr(u)&&Us(u)!=="body"),o=null;const s=br(e).position==="fixed";let l=s?lo(e):e;for(;vr(l)&&!ws(l);){const u=br(l),d=x0(l);!d&&u.position==="fixed"&&(o=null),(s?!d&&!o:!d&&u.position==="static"&&!!o&&p9.has(o.position)||ru(l)&&!d&&Mk(e,l))?r=r.filter(m=>m!==l):o=u,l=lo(l)}return t.set(e,r),r}function v9(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?wh(t)?[]:y9(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((h,m)=>{const g=KT(t,m,o);return h.top=$n(g.top,h.top),h.right=so(g.right,h.right),h.bottom=so(g.bottom,h.bottom),h.left=$n(g.left,h.left),h},KT(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function b9(e){const{width:t,height:n}=Lk(e);return{width:t,height:n}}function _9(e,t,n){const r=$r(t),o=Kr(t),s=n==="fixed",l=na(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const d=Ur(0);function h(){d.x=w0(o)}if(r||!r&&!s)if((Us(t)!=="body"||ru(o))&&(u=Th(t)),r){const _=na(t,!0,s,t);d.x=_.x+t.clientLeft,d.y=_.y+t.clientTop}else o&&h();s&&!r&&o&&h();const m=o&&!r&&!s?Pk(o,u):Ur(0),g=l.left+u.scrollLeft-d.x-m.x,v=l.top+u.scrollTop-d.y-m.y;return{x:g,y:v,width:l.width,height:l.height}}function iy(e){return br(e).position==="static"}function qT(e,t){if(!$r(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Kr(e)===n&&(n=n.ownerDocument.body),n}function zk(e,t){const n=Gn(e);if(wh(e))return n;if(!$r(e)){let o=lo(e);for(;o&&!ws(o);){if(vr(o)&&!iy(o))return o;o=lo(o)}return n}let r=qT(e,t);for(;r&&n9(r)&&iy(r);)r=qT(r,t);return r&&ws(r)&&iy(r)&&!x0(r)?n:r||s9(e)||n}const E9=async function(e){const t=this.getOffsetParent||zk,n=this.getDimensions,r=await n(e.floating);return{reference:_9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function x9(e){return br(e).direction==="rtl"}const S9={convertOffsetParentRelativeRectToViewportRelativeRect:d9,getDocumentElement:Kr,getClippingRect:v9,getOffsetParent:zk,getElementRects:E9,getClientRects:f9,getDimensions:b9,getScale:gs,isElement:vr,isRTL:x9};function Vk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function A9(e,t){let n=null,r;const o=Kr(e);function s(){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),s();const h=e.getBoundingClientRect(),{left:m,top:g,width:v,height:_}=h;if(u||t(),!v||!_)return;const A=zd(g),w=zd(o.clientWidth-(m+v)),R=zd(o.clientHeight-(g+_)),S=zd(m),T={rootMargin:-A+"px "+-w+"px "+-R+"px "+-S+"px",threshold:$n(0,so(1,d))||1};let O=!0;function C(D){const I=D[0].intersectionRatio;if(I!==d){if(!O)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!Vk(h,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(C,{...T,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,T)}n.observe(e)}return l(!0),s}function w9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=A0(e),m=o||s?[...h?Dc(h):[],...Dc(t)]:[];m.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const g=h&&u?A9(h,n):null;let v=-1,_=null;l&&(_=new ResizeObserver(S=>{let[x]=S;x&&x.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=_)==null||T.observe(t)})),n()}),h&&!d&&_.observe(h),_.observe(t));let A,w=d?na(e):null;d&&R();function R(){const S=na(e);w&&!Vk(w,S)&&n(),w=S,A=requestAnimationFrame(R)}return n(),()=>{var S;m.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g?.(),(S=_)==null||S.disconnect(),_=null,d&&cancelAnimationFrame(A)}}const T9=W8,R9=X8,C9=q8,N9=J8,O9=Z8,ZT=K8,k9=Q8,D9=(e,t,n)=>{const r=new Map,o={platform:S9,...n},s={...o.platform,_c:r};return G8(e,t,{...o,platform:s})};var I9=typeof document<"u",L9=function(){},mf=I9?E.useLayoutEffect:L9;function Vf(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,o;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(!Vf(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Vf(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Uk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YT(e,t){const n=Uk(e);return Math.round(t*n)/n}function oy(e){const t=E.useRef(e);return mf(()=>{t.current=e}),t}function j9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:l}={},transform:u=!0,whileElementsMounted:d,open:h}=e,[m,g]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,_]=E.useState(r);Vf(v,r)||_(r);const[A,w]=E.useState(null),[R,S]=E.useState(null),x=E.useCallback(F=>{F!==D.current&&(D.current=F,w(F))},[]),T=E.useCallback(F=>{F!==I.current&&(I.current=F,S(F))},[]),O=s||A,C=l||R,D=E.useRef(null),I=E.useRef(null),M=E.useRef(m),H=d!=null,K=oy(d),Z=oy(o),J=oy(h),ae=E.useCallback(()=>{if(!D.current||!I.current)return;const F={placement:t,strategy:n,middleware:v};Z.current&&(F.platform=Z.current),D9(D.current,I.current,F).then(ve=>{const P={...ve,isPositioned:J.current!==!1};Y.current&&!Vf(M.current,P)&&(M.current=P,sa.flushSync(()=>{g(P)}))})},[v,t,n,Z,J]);mf(()=>{h===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,g(F=>({...F,isPositioned:!1})))},[h]);const Y=E.useRef(!1);mf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),mf(()=>{if(O&&(D.current=O),C&&(I.current=C),O&&C){if(K.current)return K.current(O,C,ae);ae()}},[O,C,ae,K,H]);const re=E.useMemo(()=>({reference:D,floating:I,setReference:x,setFloating:T}),[x,T]),j=E.useMemo(()=>({reference:O,floating:C}),[O,C]),X=E.useMemo(()=>{const F={position:n,left:0,top:0};if(!j.floating)return F;const ve=YT(j.floating,m.x),P=YT(j.floating,m.y);return u?{...F,transform:"translate("+ve+"px, "+P+"px)",...Uk(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:P}},[n,u,j.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:ae,refs:re,elements:j,floatingStyles:X}),[m,ae,re,j,X])}const P9=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ZT({element:r.current,padding:o}).fn(n):{}:r?ZT({element:r,padding:o}).fn(n):{}}}},M9=(e,t)=>({...T9(e),options:[e,t]}),z9=(e,t)=>({...R9(e),options:[e,t]}),V9=(e,t)=>({...k9(e),options:[e,t]}),U9=(e,t)=>({...C9(e),options:[e,t]}),B9=(e,t)=>({...N9(e),options:[e,t]}),$9=(e,t)=>({...O9(e),options:[e,t]}),H9=(e,t)=>({...P9(e),options:[e,t]});var F9="Arrow",Bk=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return y.jsx(Ge.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bk.displayName=F9;var G9=Bk;function K9(e){const[t,n]=E.useState(void 0);return cn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,u;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;l=h.inlineSize,u=h.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 T0="Popper",[$k,Hk]=Kc(T0),[q9,Fk]=$k(T0),Gk=e=>{const{__scopePopper:t,children:n}=e,[r,o]=E.useState(null);return y.jsx(q9,{scope:t,anchor:r,onAnchorChange:o,children:n})};Gk.displayName=T0;var Kk="PopperAnchor",qk=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Fk(Kk,n),l=E.useRef(null),u=Tt(t,l),d=E.useRef(null);return E.useEffect(()=>{const h=d.current;d.current=r?.current||l.current,h!==d.current&&s.onAnchorChange(d.current)}),r?null:y.jsx(Ge.div,{...o,ref:u})});qk.displayName=Kk;var R0="PopperContent",[Z9,Y9]=$k(R0),Zk=E.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:_="optimized",onPlaced:A,...w}=e,R=Fk(R0,n),[S,x]=E.useState(null),T=Tt(t,ue=>x(ue)),[O,C]=E.useState(null),D=K9(O),I=D?.width??0,M=D?.height??0,H=r+(s!=="center"?"-"+s:""),K=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Z=Array.isArray(h)?h:[h],J=Z.length>0,ae={padding:K,boundary:Z.filter(X9),altBoundary:J},{refs:Y,floatingStyles:re,placement:j,isPositioned:X,middlewareData:F}=j9({strategy:"fixed",placement:H,whileElementsMounted:(...ue)=>w9(...ue,{animationFrame:_==="always"}),elements:{reference:R.anchor},middleware:[M9({mainAxis:o+M,alignmentAxis:l}),d&&z9({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?V9():void 0,...ae}),d&&U9({...ae}),B9({...ae,apply:({elements:ue,rects:Ee,availableWidth:je,availableHeight:Ue})=>{const{width:Xe,height:nt}=Ee.reference,Wt=ue.floating.style;Wt.setProperty("--radix-popper-available-width",`${je}px`),Wt.setProperty("--radix-popper-available-height",`${Ue}px`),Wt.setProperty("--radix-popper-anchor-width",`${Xe}px`),Wt.setProperty("--radix-popper-anchor-height",`${nt}px`)}}),O&&H9({element:O,padding:u}),Q9({arrowWidth:I,arrowHeight:M}),v&&$9({strategy:"referenceHidden",...ae})]}),[ve,P]=Xk(j),oe=yr(A);cn(()=>{X&&oe?.()},[X,oe]);const B=F.arrow?.x,W=F.arrow?.y,se=F.arrow?.centerOffset!==0,[he,ye]=E.useState();return cn(()=>{S&&ye(window.getComputedStyle(S).zIndex)},[S]),y.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:X?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(Z9,{scope:n,placedSide:ve,onArrowChange:C,arrowX:B,arrowY:W,shouldHideArrow:se,children:y.jsx(Ge.div,{"data-side":ve,"data-align":P,...w,ref:T,style:{...w.style,animation:X?void 0:"none"}})})})});Zk.displayName=R0;var Yk="PopperArrow",W9={top:"bottom",right:"left",bottom:"top",left:"right"},Wk=E.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Y9(Yk,r),l=W9[s.placedSide];return y.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:y.jsx(G9,{...o,ref:n,style:{...o.style,display:"block"}})})});Wk.displayName=Yk;function X9(e){return e!==null}var Q9=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,l=o.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[h,m]=Xk(n),g={start:"0%",center:"50%",end:"100%"}[m],v=(o.arrow?.x??0)+u/2,_=(o.arrow?.y??0)+d/2;let A="",w="";return h==="bottom"?(A=l?g:`${v}px`,w=`${-d}px`):h==="top"?(A=l?g:`${v}px`,w=`${r.floating.height+d}px`):h==="right"?(A=`${-d}px`,w=l?g:`${_}px`):h==="left"&&(A=`${r.floating.width+d}px`,w=l?g:`${_}px`),{data:{x:A,y:w}}}});function Xk(e){const[t,n="center"]=e.split("-");return[t,n]}var J9=Gk,eK=qk,tK=Zk,nK=Wk;function rK(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 iK=[" ","Enter","ArrowUp","ArrowDown"],oK=[" ","Enter"],ra="Select",[Rh,Ch,aK]=PO(ra),[Bs,gie]=Kc(ra,[aK,Hk]),Nh=Hk(),[sK,po]=Bs(ra),[lK,cK]=Bs(ra),Qk=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:l,defaultValue:u,onValueChange:d,dir:h,name:m,autoComplete:g,disabled:v,required:_,form:A}=e,w=Nh(t),[R,S]=E.useState(null),[x,T]=E.useState(null),[O,C]=E.useState(!1),D=I8(h),[I,M]=Af({prop:r,defaultProp:o??!1,onChange:s,caller:ra}),[H,K]=Af({prop:l,defaultProp:u,onChange:d,caller:ra}),Z=E.useRef(null),J=R?A||!!R.closest("form"):!0,[ae,Y]=E.useState(new Set),re=Array.from(ae).map(j=>j.props.value).join(";");return y.jsx(J9,{...w,children:y.jsxs(sK,{required:_,scope:t,trigger:R,onTriggerChange:S,valueNode:x,onValueNodeChange:T,valueNodeHasChildren:O,onValueNodeHasChildrenChange:C,contentId:or(),value:H,onValueChange:K,open:I,onOpenChange:M,dir:D,triggerPointerDownPosRef:Z,disabled:v,children:[y.jsx(Rh.Provider,{scope:t,children:y.jsx(lK,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(j=>{Y(X=>new Set(X).add(j))},[]),onNativeOptionRemove:E.useCallback(j=>{Y(X=>{const F=new Set(X);return F.delete(j),F})},[]),children:n})}),J?y.jsxs(SD,{"aria-hidden":!0,required:_,tabIndex:-1,name:m,autoComplete:g,value:H,onChange:j=>K(j.target.value),disabled:v,form:A,children:[H===void 0?y.jsx("option",{value:""}):null,Array.from(ae)]},re):null]})})};Qk.displayName=ra;var Jk="SelectTrigger",eD=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Nh(n),l=po(Jk,n),u=l.disabled||r,d=Tt(t,l.onTriggerChange),h=Ch(n),m=E.useRef("touch"),[g,v,_]=wD(w=>{const R=h().filter(T=>!T.disabled),S=R.find(T=>T.value===l.value),x=TD(R,w,S);x!==void 0&&l.onValueChange(x.value)}),A=w=>{u||(l.onOpenChange(!0),_()),w&&(l.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return y.jsx(eK,{asChild:!0,...s,children:y.jsx(Ge.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":AD(l.value)?"":void 0,...o,ref:d,onClick:Je(o.onClick,w=>{w.currentTarget.focus(),m.current!=="mouse"&&A(w)}),onPointerDown:Je(o.onPointerDown,w=>{m.current=w.pointerType;const R=w.target;R.hasPointerCapture(w.pointerId)&&R.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(A(w),w.preventDefault())}),onKeyDown:Je(o.onKeyDown,w=>{const R=g.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&v(w.key),!(R&&w.key===" ")&&iK.includes(w.key)&&(A(),w.preventDefault())})})})});eD.displayName=Jk;var tD="SelectValue",nD=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:l="",...u}=e,d=po(tD,n),{onValueNodeHasChildrenChange:h}=d,m=s!==void 0,g=Tt(t,d.onValueNodeChange);return cn(()=>{h(m)},[h,m]),y.jsx(Ge.span,{...u,ref:g,style:{pointerEvents:"none"},children:AD(d.value)?y.jsx(y.Fragment,{children:l}):s})});nD.displayName=tD;var uK="SelectIcon",rD=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(Ge.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});rD.displayName=uK;var dK="SelectPortal",iD=e=>y.jsx(dh,{asChild:!0,...e});iD.displayName=dK;var ia="SelectContent",oD=E.forwardRef((e,t)=>{const n=po(ia,e.__scopeSelect),[r,o]=E.useState();if(cn(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?sa.createPortal(y.jsx(aD,{scope:e.__scopeSelect,children:y.jsx(Rh.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),s):null}return y.jsx(sD,{...e,ref:t})});oD.displayName=ia;var hr=10,[aD,go]=Bs(ia),fK="SelectContentImpl",hK=xs("SelectContent.RemoveScroll"),sD=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:l,side:u,sideOffset:d,align:h,alignOffset:m,arrowPadding:g,collisionBoundary:v,collisionPadding:_,sticky:A,hideWhenDetached:w,avoidCollisions:R,...S}=e,x=po(ia,n),[T,O]=E.useState(null),[C,D]=E.useState(null),I=Tt(t,ue=>O(ue)),[M,H]=E.useState(null),[K,Z]=E.useState(null),J=Ch(n),[ae,Y]=E.useState(!1),re=E.useRef(!1);E.useEffect(()=>{if(T)return IC(T)},[T]),AC();const j=E.useCallback(ue=>{const[Ee,...je]=J().map(nt=>nt.ref.current),[Ue]=je.slice(-1),Xe=document.activeElement;for(const nt of ue)if(nt===Xe||(nt?.scrollIntoView({block:"nearest"}),nt===Ee&&C&&(C.scrollTop=0),nt===Ue&&C&&(C.scrollTop=C.scrollHeight),nt?.focus(),document.activeElement!==Xe))return},[J,C]),X=E.useCallback(()=>j([M,T]),[j,M,T]);E.useEffect(()=>{ae&&X()},[ae,X]);const{onOpenChange:F,triggerPointerDownPosRef:ve}=x;E.useEffect(()=>{if(T){let ue={x:0,y:0};const Ee=Ue=>{ue={x:Math.abs(Math.round(Ue.pageX)-(ve.current?.x??0)),y:Math.abs(Math.round(Ue.pageY)-(ve.current?.y??0))}},je=Ue=>{ue.x<=10&&ue.y<=10?Ue.preventDefault():T.contains(Ue.target)||F(!1),document.removeEventListener("pointermove",Ee),ve.current=null};return ve.current!==null&&(document.addEventListener("pointermove",Ee),document.addEventListener("pointerup",je,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ee),document.removeEventListener("pointerup",je,{capture:!0})}}},[T,F,ve]),E.useEffect(()=>{const ue=()=>F(!1);return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[F]);const[P,oe]=wD(ue=>{const Ee=J().filter(Xe=>!Xe.disabled),je=Ee.find(Xe=>Xe.ref.current===document.activeElement),Ue=TD(Ee,ue,je);Ue&&setTimeout(()=>Ue.ref.current.focus())}),B=E.useCallback((ue,Ee,je)=>{const Ue=!re.current&&!je;(x.value!==void 0&&x.value===Ee||Ue)&&(H(ue),Ue&&(re.current=!0))},[x.value]),W=E.useCallback(()=>T?.focus(),[T]),se=E.useCallback((ue,Ee,je)=>{const Ue=!re.current&&!je;(x.value!==void 0&&x.value===Ee||Ue)&&Z(ue)},[x.value]),he=r==="popper"?gv:lD,ye=he===gv?{side:u,sideOffset:d,align:h,alignOffset:m,arrowPadding:g,collisionBoundary:v,collisionPadding:_,sticky:A,hideWhenDetached:w,avoidCollisions:R}:{};return y.jsx(aD,{scope:n,content:T,viewport:C,onViewportChange:D,itemRefCallback:B,selectedItem:M,onItemLeave:W,itemTextRefCallback:se,focusSelectedItem:X,selectedItemText:K,position:r,isPositioned:ae,searchRef:P,children:y.jsx(cb,{as:hK,allowPinchZoom:!0,children:y.jsx(lb,{asChild:!0,trapped:x.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:Je(o,ue=>{x.trigger?.focus({preventScroll:!0}),ue.preventDefault()}),children:y.jsx(uh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:y.jsx(he,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ue=>ue.preventDefault(),...S,...ye,onPlaced:()=>Y(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Je(S.onKeyDown,ue=>{const Ee=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!Ee&&ue.key.length===1&&oe(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let Ue=J().filter(Xe=>!Xe.disabled).map(Xe=>Xe.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(Ue=Ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const Xe=ue.target,nt=Ue.indexOf(Xe);Ue=Ue.slice(nt+1)}setTimeout(()=>j(Ue)),ue.preventDefault()}})})})})})})});sD.displayName=fK;var mK="SelectItemAlignedPosition",lD=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=po(ia,n),l=go(ia,n),[u,d]=E.useState(null),[h,m]=E.useState(null),g=Tt(t,I=>m(I)),v=Ch(n),_=E.useRef(!1),A=E.useRef(!0),{viewport:w,selectedItem:R,selectedItemText:S,focusSelectedItem:x}=l,T=E.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&h&&w&&R&&S){const I=s.trigger.getBoundingClientRect(),M=h.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),K=S.getBoundingClientRect();if(s.dir!=="rtl"){const Xe=K.left-M.left,nt=H.left-Xe,Wt=I.left-nt,Sn=I.width+Wt,Si=Math.max(Sn,M.width),_o=window.innerWidth-hr,un=VT(nt,[hr,Math.max(hr,_o-Si)]);u.style.minWidth=Sn+"px",u.style.left=un+"px"}else{const Xe=M.right-K.right,nt=window.innerWidth-H.right-Xe,Wt=window.innerWidth-I.right-nt,Sn=I.width+Wt,Si=Math.max(Sn,M.width),_o=window.innerWidth-hr,un=VT(nt,[hr,Math.max(hr,_o-Si)]);u.style.minWidth=Sn+"px",u.style.right=un+"px"}const Z=v(),J=window.innerHeight-hr*2,ae=w.scrollHeight,Y=window.getComputedStyle(h),re=parseInt(Y.borderTopWidth,10),j=parseInt(Y.paddingTop,10),X=parseInt(Y.borderBottomWidth,10),F=parseInt(Y.paddingBottom,10),ve=re+j+ae+F+X,P=Math.min(R.offsetHeight*5,ve),oe=window.getComputedStyle(w),B=parseInt(oe.paddingTop,10),W=parseInt(oe.paddingBottom,10),se=I.top+I.height/2-hr,he=J-se,ye=R.offsetHeight/2,ue=R.offsetTop+ye,Ee=re+j+ue,je=ve-Ee;if(Ee<=se){const Xe=Z.length>0&&R===Z[Z.length-1].ref.current;u.style.bottom="0px";const nt=h.clientHeight-w.offsetTop-w.offsetHeight,Wt=Math.max(he,ye+(Xe?W:0)+nt+X),Sn=Ee+Wt;u.style.height=Sn+"px"}else{const Xe=Z.length>0&&R===Z[0].ref.current;u.style.top="0px";const Wt=Math.max(se,re+w.offsetTop+(Xe?B:0)+ye)+je;u.style.height=Wt+"px",w.scrollTop=Ee-se+w.offsetTop}u.style.margin=`${hr}px 0`,u.style.minHeight=P+"px",u.style.maxHeight=J+"px",r?.(),requestAnimationFrame(()=>_.current=!0)}},[v,s.trigger,s.valueNode,u,h,w,R,S,s.dir,r]);cn(()=>T(),[T]);const[O,C]=E.useState();cn(()=>{h&&C(window.getComputedStyle(h).zIndex)},[h]);const D=E.useCallback(I=>{I&&A.current===!0&&(T(),x?.(),A.current=!1)},[T,x]);return y.jsx(gK,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:_,onScrollButtonChange:D,children:y.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:y.jsx(Ge.div,{...o,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});lD.displayName=mK;var pK="SelectPopperPosition",gv=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=hr,...s}=e,l=Nh(n);return y.jsx(tK,{...l,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});gv.displayName=pK;var[gK,C0]=Bs(ia,{}),yv="SelectViewport",cD=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=go(yv,n),l=C0(yv,n),u=Tt(t,s.onViewportChange),d=E.useRef(0);return y.jsxs(y.Fragment,{children:[y.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}),y.jsx(Rh.Slot,{scope:n,children:y.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Je(o.onScroll,h=>{const m=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:v}=l;if(v?.current&&g){const _=Math.abs(d.current-m.scrollTop);if(_>0){const A=window.innerHeight-hr*2,w=parseFloat(g.style.minHeight),R=parseFloat(g.style.height),S=Math.max(w,R);if(S<A){const x=S+_,T=Math.min(A,x),O=x-T;g.style.height=T+"px",g.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,g.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});cD.displayName=yv;var uD="SelectGroup",[yK,vK]=Bs(uD),dD=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=or();return y.jsx(yK,{scope:n,id:o,children:y.jsx(Ge.div,{role:"group","aria-labelledby":o,...r,ref:t})})});dD.displayName=uD;var fD="SelectLabel",hD=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=vK(fD,n);return y.jsx(Ge.div,{id:o.id,...r,ref:t})});hD.displayName=fD;var Uf="SelectItem",[bK,mD]=Bs(Uf),pD=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...l}=e,u=po(Uf,n),d=go(Uf,n),h=u.value===r,[m,g]=E.useState(s??""),[v,_]=E.useState(!1),A=Tt(t,x=>d.itemRefCallback?.(x,r,o)),w=or(),R=E.useRef("touch"),S=()=>{o||(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 y.jsx(bK,{scope:n,value:r,disabled:o,textId:w,isSelected:h,onItemTextChange:E.useCallback(x=>{g(T=>T||(x?.textContent??"").trim())},[]),children:y.jsx(Rh.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:y.jsx(Ge.div,{role:"option","aria-labelledby":w,"data-highlighted":v?"":void 0,"aria-selected":h&&v,"data-state":h?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:A,onFocus:Je(l.onFocus,()=>_(!0)),onBlur:Je(l.onBlur,()=>_(!1)),onClick:Je(l.onClick,()=>{R.current!=="mouse"&&S()}),onPointerUp:Je(l.onPointerUp,()=>{R.current==="mouse"&&S()}),onPointerDown:Je(l.onPointerDown,x=>{R.current=x.pointerType}),onPointerMove:Je(l.onPointerMove,x=>{R.current=x.pointerType,o?d.onItemLeave?.():R.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Je(l.onPointerLeave,x=>{x.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Je(l.onKeyDown,x=>{d.searchRef?.current!==""&&x.key===" "||(oK.includes(x.key)&&S(),x.key===" "&&x.preventDefault())})})})})});pD.displayName=Uf;var sc="SelectItemText",gD=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,l=po(sc,n),u=go(sc,n),d=mD(sc,n),h=cK(sc,n),[m,g]=E.useState(null),v=Tt(t,S=>g(S),d.onItemTextChange,S=>u.itemTextRefCallback?.(S,d.value,d.disabled)),_=m?.textContent,A=E.useMemo(()=>y.jsx("option",{value:d.value,disabled:d.disabled,children:_},d.value),[d.disabled,d.value,_]),{onNativeOptionAdd:w,onNativeOptionRemove:R}=h;return cn(()=>(w(A),()=>R(A)),[w,R,A]),y.jsxs(y.Fragment,{children:[y.jsx(Ge.span,{id:d.textId,...s,ref:v}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?sa.createPortal(s.children,l.valueNode):null]})});gD.displayName=sc;var yD="SelectItemIndicator",vD=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return mD(yD,n).isSelected?y.jsx(Ge.span,{"aria-hidden":!0,...r,ref:t}):null});vD.displayName=yD;var vv="SelectScrollUpButton",bD=E.forwardRef((e,t)=>{const n=go(vv,e.__scopeSelect),r=C0(vv,e.__scopeSelect),[o,s]=E.useState(!1),l=Tt(t,r.onScrollButtonChange);return cn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollTop>0;s(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(ED,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});bD.displayName=vv;var bv="SelectScrollDownButton",_D=E.forwardRef((e,t)=>{const n=go(bv,e.__scopeSelect),r=C0(bv,e.__scopeSelect),[o,s]=E.useState(!1),l=Tt(t,r.onScrollButtonChange);return cn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;s(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?y.jsx(ED,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});_D.displayName=bv;var ED=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=go("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]),cn(()=>{u().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),y.jsx(Ge.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Je(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Je(o.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Je(o.onPointerLeave,()=>{d()})})}),_K="SelectSeparator",xD=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(Ge.div,{"aria-hidden":!0,...r,ref:t})});xD.displayName=_K;var _v="SelectArrow",EK=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Nh(n),s=po(_v,n),l=go(_v,n);return s.open&&l.position==="popper"?y.jsx(nK,{...o,...r,ref:t}):null});EK.displayName=_v;var xK="SelectBubbleInput",SD=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=E.useRef(null),s=Tt(r,o),l=rK(t);return E.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const g=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(g)}},[l,t]),y.jsx(Ge.select,{...n,style:{...MO,...n.style},ref:s,defaultValue:t})});SD.displayName=xK;function AD(e){return e===""||e===void 0}function wD(e){const t=yr(e),n=E.useRef(""),r=E.useRef(0),o=E.useCallback(l=>{const u=n.current+l;t(u),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),s=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function TD(e,t,n){const o=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=SK(e,Math.max(s,0));o.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function SK(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var AK=Qk,wK=eD,TK=nD,RK=rD,CK=iD,NK=oD,OK=cD,kK=dD,DK=hD,IK=pD,LK=gD,jK=vD,PK=bD,MK=_D,zK=xD;const VK=AK,UK=kK,BK=TK,$K=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>y.jsxs(wK,{className:Se("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,y.jsx(RK,{asChild:!0,children:y.jsx(dU,{className:"size-4 opacity-50"})})]}),RD=({className:e,...t})=>y.jsx(PK,{className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(cU,{})}),CD=({className:e,...t})=>y.jsx(MK,{className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(eC,{})}),HK=({className:e,children:t,position:n="popper",...r})=>y.jsx(CK,{children:y.jsxs(NK,{className:Se("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:[y.jsx(RD,{}),y.jsx(OK,{className:Se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),y.jsx(CD,{})]})}),FK=({className:e,...t})=>y.jsx(DK,{className:Se("px-1 py-0.5 text-sm font-semibold",e),...t}),GK=({className:e,children:t,...n})=>y.jsxs(IK,{className:Se("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:[y.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(jK,{children:y.jsx(Ds,{className:"size-4"})})}),y.jsx(LK,{children:t})]}),KK=({className:e,...t})=>y.jsx(zK,{className:Se("-mx-1 my-1 h-px bg-red-300",e),...t}),Ne=VK;Ne.Group=UK;Ne.Value=BK;Ne.Trigger=$K;Ne.ScrollUpButton=RD;Ne.ScrollDownButton=CD;Ne.Content=HK;Ne.Label=FK;Ne.Item=GK;Ne.Separator=KK;const qK=e=>e?.getAttribute("aria-selected")==="true",ZK=(e,t=qK,n=!1)=>{const[r,o]=E.useState(null),[s,l]=E.useState(null),u=e.current.length;return E.useEffect(()=>{const d=()=>{let w=null;if(s?w=s:w=e.current.find(t)??null,!w){o(x=>({left:0,width:0,...x,opacity:0}));return}const R=w.offsetLeft,S=w.offsetWidth;o({left:R,width:S,opacity:1})};d(),window.addEventListener("resize",d),window.addEventListener("DOMContentLoaded",d);const h=[];e.current.forEach(w=>{if(w){const R=new MutationObserver(S=>{for(const x of S)if(x.type==="attributes"&&x.attributeName==="aria-selected"){d();break}});R.observe(w,{attributes:!0,attributeFilter:["aria-selected"]}),h.push(R)}});const m=[],g=w=>{if(!w)return;const R=new ResizeObserver(()=>{d()});R.observe(w),m.push(R)},v=e.current.find(t)??null;v&&g(v),s&&g(s);const _=w=>{l(w.currentTarget)},A=()=>{l(null)};return n&&e.current.forEach(w=>{w?.addEventListener("mouseenter",_,{passive:!0}),w?.addEventListener("mouseleave",A,{passive:!0})}),()=>{window.removeEventListener("resize",d),window.removeEventListener("DOMContentLoaded",d),h.forEach(w=>w.disconnect()),m.forEach(w=>w.disconnect()),e.current.forEach(w=>{w?.removeEventListener("mouseenter",_),w?.removeEventListener("mouseleave",A)})}},[e,t,s,u]),{choiceIndicatorPosition:r}},YK=[{content:"Off",value:!1},{content:"On",value:!0}];var iu=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.DESTRUCTIVE="destructive",e.NEUTRAL="neutral",e.LIGHT="light",e.DARK="dark",e.TEXT="text",e))(iu||{});const WK=sr("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"}});var ou=(e=>(e.SM="sm",e.MD="md",e.LG="lg",e))(ou||{});const XK=sr("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"}}),QK=sr("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"}}}),au=({choices:e=YK,value:t,defaultValue:n,onChange:r,color:o="primary",size:s="md",className:l})=>{const[u,d]=E.useState(t??n??e[0].value),h=E.useRef([]),m=E.useRef(null),{choiceIndicatorPosition:g}=ZK(h),v=_=>{d(_),r?.(_)};return E.useEffect(()=>{t!==void 0&&d(t)},[t]),y.jsx("div",{className:WK({color:o,className:l}),role:"tablist",children:y.jsxs("div",{className:"relative flex size-full flex-row items-center justify-center",children:[e.map((_,A)=>{const{content:w,value:R,...S}=_,x=typeof R=="string"||typeof R=="number",T=R===u;return E.createElement("button",{...S,className:Se(XK({size:s})),key:x?R:A,role:"tab",onClick:()=>v(R),"aria-selected":T,disabled:T,ref:O=>{h.current[A]=O}},w)}),g&&y.jsx("div",{className:Se(QK({color:o})),style:g,ref:m})]})})};function pe(e,t,n){function r(u,d){var h;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(h=u._zod).traits??(h.traits=new Set),u._zod.traits.add(e),t(u,d);for(const m in l.prototype)m in u||Object.defineProperty(u,m,{value:l.prototype[m].bind(u)});u._zod.constr=l,u._zod.def=d}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function l(u){var d;const h=n?.Parent?new s:this;r(h,u),(d=h._zod).deferred??(d.deferred=[]);for(const m of h._zod.deferred)m();return h}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Ic extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const ND={};function oa(e){return ND}function JK(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function e7(e,t){return typeof t=="bigint"?t.toString():t}function OD(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function N0(e){return e==null}function O0(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Et(e,t,n){Object.defineProperty(e,t,{get(){{const r=n();return e[t]=r,r}},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function k0(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nc(e){return JSON.stringify(e)}const kD=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Ev(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const t7=OD(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function xv(e){if(Ev(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(Ev(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const n7=new Set(["string","number","symbol"]);function Oh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ca(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ve(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function r7(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function i7(e,t){const n={},r=e._zod.def;for(const o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(n[o]=r.shape[o])}return ca(e,{...e._zod.def,shape:n,checks:[]})}function o7(e,t){const n={...e._zod.def.shape},r=e._zod.def;for(const o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete n[o]}return ca(e,{...e._zod.def,shape:n,checks:[]})}function a7(e,t){if(!xv(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return k0(this,"shape",r),r},checks:[]};return ca(e,n)}function s7(e,t){return ca(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return k0(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function l7(e,t,n){const r=t._zod.def.shape,o={...r};if(n)for(const s in n){if(!(s in r))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=e?new e({type:"optional",innerType:r[s]}):r[s])}else for(const s in r)o[s]=e?new e({type:"optional",innerType:r[s]}):r[s];return ca(t,{...t._zod.def,shape:o,checks:[]})}function c7(e,t,n){const r=t._zod.def.shape,o={...r};if(n)for(const s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(const s in r)o[s]=new e({type:"nonoptional",innerType:r[s]});return ca(t,{...t._zod.def,shape:o,checks:[]})}function vc(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function D0(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Vd(e){return typeof e=="string"?e:e?.message}function aa(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Vd(e.inst?._zod.def?.error?.(e))??Vd(t?.error?.(e))??Vd(n.customError?.(e))??Vd(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function I0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Lc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const DD=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,e7,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},L0=pe("$ZodError",DD),kh=pe("$ZodError",DD,{Parent:Error});function u7(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function d7(e,t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>o({issues:u}));else if(l.code==="invalid_key")o({issues:l.issues});else if(l.code==="invalid_element")o({issues:l.issues});else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const h=l.path[d];d===l.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(n(l))):u[h]=u[h]||{_errors:[]},u=u[h],d++}}};return o(e),r}const ID=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new Ic;if(l.issues.length){const u=new(o?.Err??e)(l.issues.map(d=>aa(d,s,oa())));throw kD(u,o?.callee),u}return l.value},f7=ID(kh),LD=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new(o?.Err??e)(l.issues.map(d=>aa(d,s,oa())));throw kD(u,o?.callee),u}return l.value},h7=LD(kh),jD=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Ic;return s.issues.length?{success:!1,error:new(e??L0)(s.issues.map(l=>aa(l,o,oa())))}:{success:!0,data:s.value}},m7=jD(kh),PD=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>aa(l,o,oa())))}:{success:!0,data:s.value}},p7=PD(kh);function WT(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function g7(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=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:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(g){return e.push(g)})}),t){var d=n[l].types,h=d&&d[r.code];n[l]=p0(l,t,n,o,h?[].concat(h,r.message):r.message)}e.shift()}return n}function y7(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[l]={message:u.message,type:u.code}}else n[l]={message:s,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(g){return e.push(g)})}),t){var d=n[l].types,h=d&&d[r.code];n[l]=p0(l,t,n,o,h?[].concat(h,r.message):r.message)}e.shift()}return n}function v7(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,s){try{return Promise.resolve(WT(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return s.shouldUseNativeValidation&&dv({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return Array.isArray(u?.issues)})(l))return{values:{},errors:LT(g7(l.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(WT(function(){return Promise.resolve((n.mode==="sync"?f7:h7)(e,r,t)).then(function(l){return s.shouldUseNativeValidation&&dv({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return u instanceof L0})(l))return{values:{},errors:LT(y7(l.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}const ay=async e=>e&&typeof e.then=="function"?await e:e,b7=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:o,children:s,autoComplete:l,...u})=>{const d=async h=>{const m=e?.safeParse(h)??{success:!0,data:void 0};await ay(t?.(h)),m.success?await ay(n?.(m.data)):await ay(r?.(new Error(m.error.issues.map(g=>g.message).join(", "))))};return y.jsx(Q5,{...u,children:y.jsx("form",{className:Se("flex size-full flex-col gap-y-6",o),onSubmit:u.handleSubmit(d),autoComplete:l?"on":"off",noValidate:!0,children:s})})},_7=(e,t)=>{const n=g8({resolver:v7(e),...t}),r=n.formState.isSubmitting,o=n.formState.isSubmitted,s=n.formState.isLoading,l=n.formState.isValid;return{form:n,isSubmitting:r,isSubmitted:o,isLoading:s,isValid:l}},E7=e=>{const{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=mo();return y.jsx(PB,{id:n,"aria-describedby":t?`${r} ${o}`:`${r}`,"aria-invalid":!!t,...e})},x7=e=>{const{formDescriptionId:t}=mo();return y.jsx("p",{className:"text-neutral text-sm",id:t,...e})},S7=({children:e,...t})=>{const{error:n,formMessageId:r}=mo(),o=n?String(n?.message??""):e;return o?y.jsx("p",{className:"text-error text-xs font-medium",role:"alert",id:r,...t,children:o}):null},Dh=({label:e,description:t,isRequired:n,info:r,children:o,showErrorMessage:s=!0,htmlFor:l})=>y.jsxs(Fe.Item,{className:"flex w-full flex-col gap-2 p-2",children:[(t||e)&&y.jsxs("div",{className:"flex flex-col gap-1 p-1 leading-none",children:[e&&y.jsx(Nk,{isRequired:n,info:r,htmlFor:l,children:e}),t&&y.jsx(Fe.Description,{children:t})]}),y.jsx(Fe.Control,{children:o}),s&&y.jsx(Fe.Message,{"data-testid":"error-message"})]}),A7=({field:e,name:t,label:n,Element:r,isRequired:o=!1,info:s,description:l,showErrorMessage:u=!0,...d})=>{const{error:h}=mo();return y.jsx(Dh,{htmlFor:t,label:n,description:l,isRequired:o,info:s,showErrorMessage:u,"aria-invalid":!!h,children:y.jsx(r,{"data-testid":"element",id:t,...e,...d,children:d.children})})},yo=e=>{const{control:t}=ho();return y.jsx(Fe.Field,{control:t,name:e.name,render:({field:n})=>y.jsx(A7,{...e,field:n})})},w7=e=>y.jsx(yo,{id:e.name,"data-testid":e.name,Element:zs,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),T7=({autoComplete:e,...t})=>y.jsx(yo,{Element:x8,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}),R7=e=>y.jsx(yo,{Element:Ak,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}),C7=e=>y.jsx(yo,{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:Tk,...e}),N7=e=>y.jsx(yo,{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:Rk,...e}),O7=e=>y.jsx(yo,{Element:v0,id:e.name,"data-testid":e.name,...e}),k7=({inputLabel:e,...t})=>y.jsx(E8,{...t,label:e}),D7=({autoComplete:e,...t})=>y.jsx(yo,{Element:k7,id:t.name,"data-testid":t.name,autoComplete:e,minLength:6,maxLength:255,...t}),I7=({name:e,description:t,label:n,isRequired:r,info:o,showErrorMessage:s,children:l,...u})=>{const{control:d}=ho();return y.jsx(Fe.Field,{control:d,name:e,render:({field:h})=>{const{error:m}=mo();return y.jsx(Dh,{htmlFor:e,label:n,description:t,isRequired:r,info:o,showErrorMessage:s,"aria-invalid":!!m,children:y.jsx(pn,{onValueChange:h.onChange,values:h.value,...u,children:l})})}})},L7=({name:e,description:t,label:n,isRequired:r,info:o,showErrorMessage:s,children:l,...u})=>{const{control:d}=ho();return y.jsx(Fe.Field,{control:d,name:e,render:({field:h})=>{const{error:m}=mo();return y.jsx(Dh,{htmlFor:e,label:n,description:t,isRequired:r,info:o,showErrorMessage:s,"aria-invalid":!!m,children:y.jsx(Ne,{onValueChange:h.onChange,defaultValue:h.value,...u,children:l})})}})},j7=({name:e,description:t,label:n,isRequired:r,info:o,showErrorMessage:s,children:l,...u})=>{const{control:d}=ho();return y.jsx(Fe.Field,{control:d,name:e,render:({field:h})=>{const{error:m}=mo();return y.jsx(Dh,{htmlFor:e,label:n,description:t,isRequired:r,info:o,showErrorMessage:s,"aria-invalid":!!m,children:y.jsx(au,{...h,...u,children:l})})}})},Fe=b7;Fe.Description=x7;Fe.Control=E7;Fe.Field=b8;Fe.Item=v8;Fe.Label=Nk;Fe.Message=S7;Fe.Element=yo;Fe.Input=w7;Fe.InputPassword=T7;Fe.Checkbox=D7;Fe.TextArea=R7;Fe.AutoSizedTextArea=O7;Fe.Button=st;Fe.Select=L7;Fe.MultiSelect=I7;Fe.EditableFieldInput=C7;Fe.EditableFieldTextArea=N7;Fe.SwitchSelector=j7;const P7={key:"save-dictionary-details",content:{deleteButton:{text:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({en:"Download","en-GB":"Download",fr:"Télécharger",es:"Descargar",de:"Herunterladen",ja:"ダウンロード",ko:"다운로드",zh:"下载",it:"Scarica",pt:"Baixar",hi:"डाउनलोड",ar:"تنزيل",ru:"Скачать"}),label:me({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:me({en:"Confirmation","en-GB":"Confirmation",fr:"Confirmation",es:"Confirmation",de:"Confirmation",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmação",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтверждение"}),message:me({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:me({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:me({en:"Confirm","en-GB":"Confirm",fr:"Confirmer",es:"Confirmar",de:"Bestätigen",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmar",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтвердить"}),label:me({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:me({en:"Cancel","en-GB":"Cancel",fr:"Annuler",es:"Cancelar",de:"Abbrechen",ja:"キャンセル",ko:"취소",zh:"取消",it:"Annulla",pt:"Cancelar",hi:"रद्द करें",ar:"إلغاء",ru:"Отмена"}),label:me({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:"Нажмите, чтобы отменить"})}}}},MD=({dictionary:e,mode:t,className:n,onDelete:r,...o})=>{const[s,l]=E.useState(!1),{setLocaleDictionary:u}=rh(),{deleteDictionary:d,isLoading:h}=H5(),{writeDictionary:m,isLoading:g}=Z5(),{pushDictionaries:v,isLoading:_}=$5(),A=g||_,w=t.includes("local")&&e.filePath?.endsWith(".json"),{editedContent:R,restoreEditedContent:S}=xn(),{deleteButton:x,resetButton:T,saveButton:O,publishButton:C,downloadButton:D,confirmation:I}=Pt(P7),{isAuthenticated:M}=tu(),H=R?.[e.key],K=H&&JSON.stringify(H)!==JSON.stringify(e),Z=typeof e?.id<"u",J=async()=>{if(!R?.[e.key])return;const re={...e,...R?.[e.key]};await m({dictionary:re}).then(()=>{u(R?.[e.key]),S(e.key)})},ae=async()=>{if(!R?.[e.key])return;const re={...e,...R?.[e.key]};await v([re]).then(j=>{j&&(u(R?.[e.key]),S(e.key))})},Y=async()=>{e.id&&await d(e.id.toString()).then(re=>{re&&r?.()})};return y.jsxs(y.Fragment,{children:[y.jsx(a0,{isOpen:s,title:I.title.value,size:o0.MD,children:y.jsxs("form",{className:"size-full px-3",children:[w?y.jsx("p",{className:"text-neutral py-4 text-sm",children:I.message}):y.jsx("p",{className:"text-neutral py-4 text-sm",children:I.differentFormatMessage}),y.jsxs("div",{className:"mt-12 flex justify-end gap-2 max-md:flex-col",children:[y.jsx(Fe.Button,{label:I.cancelButton.label.value,disabled:!K||A,color:ot.TEXT,className:"max-md:w-full",variant:at.OUTLINE,onClick:()=>l(!1),children:I.cancelButton.text}),y.jsx(Fe.Button,{label:I.confirmButton.label.value,disabled:!K||A,Icon:hA,color:ot.TEXT,className:"max-md:w-full",isLoading:_,onClick:J,children:I.confirmButton.text})]})]})}),y.jsxs("form",{className:Se("flex justify-end gap-2 max-md:flex-col",n),...o,children:[t.includes("remote")&&Z&&r&&M&&y.jsx(Fe.Button,{label:x.label.value,Icon:lh,color:ot.ERROR,variant:at.OUTLINE,className:"max-md:w-full",isLoading:h,onClick:Y,children:x.text}),K&&y.jsx(Fe.Button,{label:T.label.value,disabled:!K,Icon:IU,variant:at.OUTLINE,color:ot.TEXT,className:"max-md:w-full",onClick:()=>S(e.key),children:T.text}),t.includes("local")&&y.jsx(Fe.Button,{label:D.label.value,disabled:!K||A,Icon:yU,color:ot.TEXT,variant:M?at.OUTLINE:at.DEFAULT,className:"max-md:w-full",isLoading:g,onClick:()=>l(!0),children:D.text}),t.includes("remote")&&M&&!Z&&y.jsx(Fe.Button,{label:C.label.value,disabled:A,Icon:nU,color:ot.TEXT,className:"max-md:w-full",isLoading:_,onClick:ae,children:C.text}),t.includes("remote")&&M&&Z&&K&&y.jsx(Fe.Button,{label:O.label.value,disabled:!K||A,Icon:hA,color:"text",className:"max-md:w-full",isLoading:_,onClick:ae,children:O.text})]})]})},zD=({level:e,title:t,description:n,children:r,rightParam:o,isSelected:s,...l})=>y.jsx("div",{className:Se("rounded-md p-2 transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",e===2&&"hover:bg-card/30",e>=3&&"",s===!0&&"bg-card/40"),...l,children:y.jsx(pC,{isOpen:s,label:t,header:y.jsxs("div",{className:"flex w-full",children:[y.jsxs("div",{className:"flex w-full items-center justify-between",children:[y.jsx("span",{className:Se(e===0&&"text-2xl",e===1&&"text-xl",e===2&&"text-lg",e>=3&&"text-base"),children:t}),o&&y.jsx("div",{className:"flex w-auto items-center justify-between p-3",children:o})]}),n&&y.jsx("p",{className:"text-card pl-3 text-sm",children:n})]}),children:r})}),VD=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:o,onFocusKeyPath:s,renderSection:l})=>{const u=r??Pr(n,e);if(u&&typeof u!="string")return y.jsx(y.Fragment,{children:"Error loading section - Edited content Incoherence with the original content format"});const d=e.length,h=String(u??t);return y.jsx("span",{role:"button",tabIndex:0,className:Se("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(),s(e)},children:typeof l=="function"?l(h):y.jsx(Rk,{"aria-label":"Editable field",defaultValue:h,onSave:m=>o({keyPath:e,newValue:m}),onCancel:()=>null})})},M7=e=>{const{keyPath:t,section:n}=e,{addEditedContent:r}=xn(),o=Pr(e.editedContent,t),s=n[G.File],{content:l}=n,u=[...t,{type:G.File}];return y.jsxs("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:[y.jsxs("span",{className:"text-neutral text-sm",children:[s," "]}),y.jsx(VD,{...e,keyPath:u,section:l,editedContentValue:o?.content,onContentChange:d=>{r(e.dictionary.key,{...n,content:d.newValue},t)}})]})},z7=e=>{const{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:o=[]}=e;return n.map((s,l)=>{const u={key:l,type:G.Array},d=[...t,u];return y.jsx(zD,{level:t.length,title:`${l}`,description:"",isSelected:$c(d,o),onClick:h=>{h.stopPropagation(),r(d)},children:y.jsx(vo,{...e,keyPath:d,section:s})},JSON.stringify(s))})},V7=e=>{const{keyPath:t,section:n}=e;return y.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!j0.includes(r)).map(r=>{const o={type:G.Condition,key:r},s=[...t,o],l=n[G.Condition][r];return y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(vo,{...e,key:r,keyPath:s,section:l})]})})})},U7=e=>{const{keyPath:t,section:n}=e;return y.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!j0.includes(r)).map(r=>{const o={type:G.Enumeration,key:r},s=[...t,o],l=n[G.Enumeration][r];return y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(vo,{...e,key:r,keyPath:s,section:l})]})})})},B7=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:G.Insertion}],o=n[G.Insertion];return y.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:y.jsx(vo,{...e,keyPath:r,section:o})})},$7=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:G.Markdown}],o=n[G.Markdown];return y.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:y.jsx(vo,{...e,keyPath:r,section:o})})},H7=e=>{const{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:o}=e;return Object.keys(n).filter(s=>!j0.includes(s)).map(s=>{const l={key:s,type:G.Object},u=[...t,l];return y.jsx(zD,{level:t.length,title:s,description:"",isSelected:$c(u,r),onClick:d=>{d.stopPropagation(),o(u)},children:y.jsx(vo,{...e,keyPath:u,section:n[s]})},s)})},F7=e=>{const{keyPath:t,section:n,locale:r}=e,o={type:G.Translation,key:r},s=[...t,o],l=n.translation[r];return y.jsx(vo,{...e,keyPath:s,section:l})},j0=["filePath","id","nodeType"],vo=e=>{const n=Pr(e.editedContent,e.keyPath)??e.section,r=Cs(n);if(typeof n=="object")return r===G.ReactNode?y.jsx("span",{className:"text-neutral text-xs",children:"React node not editable"}):r===G.Nested?y.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:"[Nested] Dictionary"}):r===G.Markdown?y.jsx($7,{...e,section:n}):r===G.Translation?y.jsx(F7,{...e,section:n}):r===G.Enumeration?y.jsx(U7,{...e,section:n}):r===G.Condition?y.jsx(V7,{...e,section:n}):r===G.Insertion?y.jsx(B7,{...e,section:n}):r===G.Array?y.jsx(z7,{...e,section:n}):r===G.File?y.jsx(M7,{...e,section:n}):y.jsx(H7,{...e,section:n});if(typeof n=="string")return y.jsx(VD,{...e,section:n})},G7=({dictionary:e,mode:t,onDelete:n,...r})=>{const{editedContent:o,addEditedContent:s}=xn(),{focusedContent:l,setFocusedContentKeyPath:u,setFocusedContent:d}=co(),h=l?.keyPath;return y.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2",children:[y.jsx("div",{children:E.createElement(vo,{...r,keyPath:[],dictionary:e,key:JSON.stringify((o?.[e.key]??e).content),editedContent:o?.[e.key]?.content,focusedKeyPath:h,section:e.content,onContentChange:m=>{s(e.key,m.newValue,m.keyPath)},onFocusKeyPath:u})}),y.jsx(MD,{dictionary:e,mode:t,className:"mb-4 flex-col",onDelete:()=>{d(null),n?.()}})]})},K7=/^[cC][^\s-]{8,}$/,q7=/^[0-9a-z]+$/,Z7=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Y7=/^[0-9a-vA-V]{20}$/,W7=/^[A-Za-z0-9]{27}$/,X7=/^[a-zA-Z0-9_-]{21}$/,Q7=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,J7=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,XT=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,eq=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tq="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function nq(){return new RegExp(tq,"u")}const rq=/^(?:(?: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])$/,iq=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,oq=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,aq=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sq=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,UD=/^[A-Za-z0-9_-]*$/,lq=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,cq=/^\+(?:[0-9]){6,14}[0-9]$/,BD="(?:(?:\\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])))",uq=new RegExp(`^${BD}$`);function $D(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function dq(e){return new RegExp(`^${$D(e)}$`)}function fq(e){const t=$D({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${BD}T(?:${r})$`)}const hq=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},mq=/^[^A-Z]*$/,pq=/^[^a-z]*$/,qr=pe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gq=pe("$ZodCheckMaxLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!N0(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=I0(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),yq=pe("$ZodCheckMinLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!N0(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=I0(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),vq=pe("$ZodCheckLengthEquals",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!N0(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const l=I0(o),u=s>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ih=pe("$ZodCheckStringFormat",(e,t)=>{var n,r;qr.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),bq=pe("$ZodCheckRegex",(e,t)=>{Ih.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_q=pe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mq),Ih.init(e,t)}),Eq=pe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=pq),Ih.init(e,t)}),xq=pe("$ZodCheckIncludes",(e,t)=>{qr.init(e,t);const n=Oh(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Sq=pe("$ZodCheckStartsWith",(e,t)=>{qr.init(e,t);const n=new RegExp(`^${Oh(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Aq=pe("$ZodCheckEndsWith",(e,t)=>{qr.init(e,t);const n=new RegExp(`.*${Oh(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),wq=pe("$ZodCheckOverwrite",(e,t)=>{qr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Tq{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
268
- `).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
269
- `))}}const Rq={major:4,minor:0,patch:0},Ht=pe("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Rq;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,l,u)=>{let d=vc(s),h;for(const m of l){if(m._zod.def.when){if(!m._zod.def.when(s))continue}else if(d)continue;const g=s.issues.length,v=m._zod.check(s);if(v instanceof Promise&&u?.async===!1)throw new Ic;if(h||v instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await v,s.issues.length!==g&&(d||(d=vc(s,g)))});else{if(s.issues.length===g)continue;d||(d=vc(s,g))}}return h?h.then(()=>s):s};e._zod.run=(s,l)=>{const u=e._zod.parse(s,l);if(u instanceof Promise){if(l.async===!1)throw new Ic;return u.then(d=>o(d,r,l))}return o(u,r,l)}}e["~standard"]={validate:o=>{try{const s=m7(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return p7(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),P0=pe("$ZodString",(e,t)=>{Ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hq(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),xt=pe("$ZodStringFormat",(e,t)=>{Ih.init(e,t),P0.init(e,t)}),Cq=pe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=J7),xt.init(e,t)}),Nq=pe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=XT(r))}else t.pattern??(t.pattern=XT());xt.init(e,t)}),Oq=pe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=eq),xt.init(e,t)}),kq=pe("$ZodURL",(e,t)=>{xt.init(e,t),e._zod.check=n=>{try{const r=n.value,o=new URL(r),s=o.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:lq.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),!r.endsWith("/")&&s.endsWith("/")?n.value=s.slice(0,-1):n.value=s;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Dq=pe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=nq()),xt.init(e,t)}),Iq=pe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=X7),xt.init(e,t)}),Lq=pe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=K7),xt.init(e,t)}),jq=pe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=q7),xt.init(e,t)}),Pq=pe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Z7),xt.init(e,t)}),Mq=pe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Y7),xt.init(e,t)}),zq=pe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=W7),xt.init(e,t)}),Vq=pe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=fq(t)),xt.init(e,t)}),Uq=pe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=uq),xt.init(e,t)}),Bq=pe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=dq(t)),xt.init(e,t)}),$q=pe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Q7),xt.init(e,t)}),Hq=pe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=rq),xt.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),Fq=pe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=iq),xt.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Gq=pe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=oq),xt.init(e,t)}),Kq=pe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=aq),xt.init(e,t),e._zod.check=n=>{const[r,o]=n.value.split("/");try{if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function HD(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const qq=pe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=sq),xt.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{HD(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Zq(e){if(!UD.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return HD(n)}const Yq=pe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=UD),xt.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{Zq(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Wq=pe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cq),xt.init(e,t)});function Xq(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Qq=pe("$ZodJWT",(e,t)=>{xt.init(e,t),e._zod.check=n=>{Xq(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Jq=pe("$ZodUnknown",(e,t)=>{Ht.init(e,t),e._zod.parse=n=>n}),eZ=pe("$ZodNever",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function QT(e,t,n){e.issues.length&&t.issues.push(...D0(n,e.issues)),t.value[n]=e.value}const tZ=pe("$ZodArray",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let l=0;l<o.length;l++){const u=o[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?s.push(d.then(h=>QT(h,n,l))):QT(d,n,l)}return s.length?Promise.all(s).then(()=>n):n}});function Ud(e,t,n){e.issues.length&&t.issues.push(...D0(n,e.issues)),t.value[n]=e.value}function JT(e,t,n,r){e.issues.length?r[n]===void 0?n in r?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...D0(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}const nZ=pe("$ZodObject",(e,t)=>{Ht.init(e,t);const n=OD(()=>{const g=Object.keys(t.shape);for(const _ of g)if(!(t.shape[_]instanceof Ht))throw new Error(`Invalid element at key "${_}": expected a Zod schema`);const v=r7(t.shape);return{shape:t.shape,keys:g,keySet:new Set(g),numKeys:g.length,optionalKeys:new Set(v)}});Et(e._zod,"propValues",()=>{const g=t.shape,v={};for(const _ in g){const A=g[_]._zod;if(A.values){v[_]??(v[_]=new Set);for(const w of A.values)v[_].add(w)}}return v});const r=g=>{const v=new Tq(["shape","payload","ctx"]),_=n.value,A=x=>{const T=nc(x);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};v.write("const input = payload.value;");const w=Object.create(null);let R=0;for(const x of _.keys)w[x]=`key_${R++}`;v.write("const newResult = {}");for(const x of _.keys)if(_.optionalKeys.has(x)){const T=w[x];v.write(`const ${T} = ${A(x)};`);const O=nc(x);v.write(`
270
- if (${T}.issues.length) {
271
- if (input[${O}] === undefined) {
272
- if (${O} in input) {
273
- newResult[${O}] = undefined;
274
- }
275
- } else {
276
- payload.issues = payload.issues.concat(
277
- ${T}.issues.map((iss) => ({
278
- ...iss,
279
- path: iss.path ? [${O}, ...iss.path] : [${O}],
280
- }))
281
- );
282
- }
283
- } else if (${T}.value === undefined) {
284
- if (${O} in input) newResult[${O}] = undefined;
285
- } else {
286
- newResult[${O}] = ${T}.value;
287
- }
288
- `)}else{const T=w[x];v.write(`const ${T} = ${A(x)};`),v.write(`
289
- if (${T}.issues.length) payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
290
- ...iss,
291
- path: iss.path ? [${nc(x)}, ...iss.path] : [${nc(x)}]
292
- })));`),v.write(`newResult[${nc(x)}] = ${T}.value`)}v.write("payload.value = newResult;"),v.write("return payload;");const S=v.compile();return(x,T)=>S(g,x,T)};let o;const s=Ev,l=!ND.jitless,d=l&&t7.value,h=t.catchall;let m;e._zod.parse=(g,v)=>{m??(m=n.value);const _=g.value;if(!s(_))return g.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),g;const A=[];if(l&&d&&v?.async===!1&&v.jitless!==!0)o||(o=r(t.shape)),g=o(g,v);else{g.value={};const T=m.shape;for(const O of m.keys){const C=T[O],D=C._zod.run({value:_[O],issues:[]},v),I=C._zod.optin==="optional"&&C._zod.optout==="optional";D instanceof Promise?A.push(D.then(M=>I?JT(M,g,O,_):Ud(M,g,O))):I?JT(D,g,O,_):Ud(D,g,O)}}if(!h)return A.length?Promise.all(A).then(()=>g):g;const w=[],R=m.keySet,S=h._zod,x=S.def.type;for(const T of Object.keys(_)){if(R.has(T))continue;if(x==="never"){w.push(T);continue}const O=S.run({value:_[T],issues:[]},v);O instanceof Promise?A.push(O.then(C=>Ud(C,g,T))):Ud(O,g,T)}return w.length&&g.issues.push({code:"unrecognized_keys",keys:w,input:_,inst:e}),A.length?Promise.all(A).then(()=>g):g}});function eR(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>aa(s,r,oa())))}),t}const rZ=pe("$ZodUnion",(e,t)=>{Ht.init(e,t),Et(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Et(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Et(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Et(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>O0(r.source)).join("|")})$`)}}),e._zod.parse=(n,r)=>{let o=!1;const s=[];for(const l of t.options){const u=l._zod.run({value:n.value,issues:[]},r);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(l=>eR(l,n,e,r)):eR(s,n,e,r)}}),iZ=pe("$ZodIntersection",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([d,h])=>tR(n,d,h)):tR(n,s,l)}});function Sv(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xv(e)&&xv(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const l=Sv(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};o[s]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],l=Sv(o,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function tR(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),vc(e))return e;const r=Sv(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const oZ=pe("$ZodEnum",(e,t)=>{Ht.init(e,t);const n=JK(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(r=>n7.has(typeof r)).map(r=>typeof r=="string"?Oh(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{const s=r.value;return e._zod.values.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),aZ=pe("$ZodTransform",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Ic;return n.value=o,n}}),sZ=pe("$ZodOptional",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Et(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Et(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${O0(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(n,r):n.value===void 0?n:t.innerType._zod.run(n,r)}),lZ=pe("$ZodNullable",(e,t)=>{Ht.init(e,t),Et(e._zod,"optin",()=>t.innerType._zod.optin),Et(e._zod,"optout",()=>t.innerType._zod.optout),Et(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${O0(n.source)}|null)$`):void 0}),Et(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),cZ=pe("$ZodDefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Et(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>nR(s,t)):nR(o,t)}});function nR(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const uZ=pe("$ZodPrefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Et(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),dZ=pe("$ZodNonOptional",(e,t)=>{Ht.init(e,t),Et(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>rR(s,e)):rR(o,e)}});function rR(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const fZ=pe("$ZodCatch",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Et(e._zod,"optout",()=>t.innerType._zod.optout),Et(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>aa(l,r,oa()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>aa(s,r,oa()))},input:n.value}),n.issues=[]),n)}}),hZ=pe("$ZodPipe",(e,t)=>{Ht.init(e,t),Et(e._zod,"values",()=>t.in._zod.values),Et(e._zod,"optin",()=>t.in._zod.optin),Et(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(n,r)=>{const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>iR(s,t,r)):iR(o,t,r)}});function iR(e,t,n){return vc(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const mZ=pe("$ZodReadonly",(e,t)=>{Ht.init(e,t),Et(e._zod,"propValues",()=>t.innerType._zod.propValues),Et(e._zod,"values",()=>t.innerType._zod.values),Et(e._zod,"optin",()=>t.innerType._zod.optin),Et(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(oR):oR(o)}});function oR(e){return e.value=Object.freeze(e.value),e}const pZ=pe("$ZodCustom",(e,t)=>{qr.init(e,t),Ht.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>aR(s,n,r,e));aR(o,n,r,e)}});function aR(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Lc(o))}}class gZ{constructor(){this._map=new Map,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};return delete r.id,{...r,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function yZ(){return new gZ}const Bd=yZ();function vZ(e,t){return new e({type:"string",...Ve(t)})}function bZ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ve(t)})}function sR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ve(t)})}function _Z(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ve(t)})}function EZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ve(t)})}function xZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ve(t)})}function SZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ve(t)})}function AZ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ve(t)})}function wZ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ve(t)})}function TZ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ve(t)})}function RZ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ve(t)})}function CZ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ve(t)})}function NZ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ve(t)})}function OZ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ve(t)})}function kZ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ve(t)})}function DZ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ve(t)})}function IZ(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ve(t)})}function LZ(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ve(t)})}function jZ(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ve(t)})}function PZ(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ve(t)})}function MZ(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ve(t)})}function zZ(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ve(t)})}function VZ(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ve(t)})}function UZ(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ve(t)})}function BZ(e,t){return new e({type:"string",format:"date",check:"string_format",...Ve(t)})}function $Z(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ve(t)})}function HZ(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ve(t)})}function FZ(e){return new e({type:"unknown"})}function GZ(e,t){return new e({type:"never",...Ve(t)})}function FD(e,t){return new gq({check:"max_length",...Ve(t),maximum:e})}function Bf(e,t){return new yq({check:"min_length",...Ve(t),minimum:e})}function GD(e,t){return new vq({check:"length_equals",...Ve(t),length:e})}function KZ(e,t){return new bq({check:"string_format",format:"regex",...Ve(t),pattern:e})}function qZ(e){return new _q({check:"string_format",format:"lowercase",...Ve(e)})}function ZZ(e){return new Eq({check:"string_format",format:"uppercase",...Ve(e)})}function YZ(e,t){return new xq({check:"string_format",format:"includes",...Ve(t),includes:e})}function WZ(e,t){return new Sq({check:"string_format",format:"starts_with",...Ve(t),prefix:e})}function XZ(e,t){return new Aq({check:"string_format",format:"ends_with",...Ve(t),suffix:e})}function su(e){return new wq({check:"overwrite",tx:e})}function QZ(e){return su(t=>t.normalize(e))}function JZ(){return su(e=>e.trim())}function eY(){return su(e=>e.toLowerCase())}function tY(){return su(e=>e.toUpperCase())}function nY(e,t,n){return new e({type:"array",element:t,...Ve(n)})}function rY(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ve(n)})}const iY=pe("ZodISODateTime",(e,t)=>{Vq.init(e,t),Rt.init(e,t)});function oY(e){return UZ(iY,e)}const aY=pe("ZodISODate",(e,t)=>{Uq.init(e,t),Rt.init(e,t)});function sY(e){return BZ(aY,e)}const lY=pe("ZodISOTime",(e,t)=>{Bq.init(e,t),Rt.init(e,t)});function cY(e){return $Z(lY,e)}const uY=pe("ZodISODuration",(e,t)=>{$q.init(e,t),Rt.init(e,t)});function dY(e){return HZ(uY,e)}const fY=(e,t)=>{L0.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>d7(e,n)},flatten:{value:n=>u7(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},Lh=pe("ZodError",fY,{Parent:Error}),hY=ID(Lh),mY=LD(Lh),pY=jD(Lh),gY=PD(Lh),nn=pe("ZodType",(e,t)=>(Ht.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(n,r)=>ca(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>hY(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>pY(e,n,r),e.parseAsync=async(n,r)=>mY(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>gY(e,n,r),e.spa=e.safeParseAsync,e.refine=(n,r)=>e.check(sW(n,r)),e.superRefine=n=>e.check(lW(n)),e.overwrite=n=>e.check(su(n)),e.optional=()=>uR(e),e.nullable=()=>dR(e),e.nullish=()=>uR(dR(e)),e.nonoptional=n=>JY(e,n),e.array=()=>Av(e),e.or=n=>$Y([e,n]),e.and=n=>FY(e,n),e.transform=n=>fR(e,qY(n)),e.default=n=>WY(e,n),e.prefault=n=>QY(e,n),e.catch=n=>tW(e,n),e.pipe=n=>fR(e,n),e.readonly=()=>iW(e),e.describe=n=>{const r=e.clone();return Bd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Bd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Bd.get(e);const r=e.clone();return Bd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),KD=pe("_ZodString",(e,t)=>{P0.init(e,t),nn.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(KZ(...r)),e.includes=(...r)=>e.check(YZ(...r)),e.startsWith=(...r)=>e.check(WZ(...r)),e.endsWith=(...r)=>e.check(XZ(...r)),e.min=(...r)=>e.check(Bf(...r)),e.max=(...r)=>e.check(FD(...r)),e.length=(...r)=>e.check(GD(...r)),e.nonempty=(...r)=>e.check(Bf(1,...r)),e.lowercase=r=>e.check(qZ(r)),e.uppercase=r=>e.check(ZZ(r)),e.trim=()=>e.check(JZ()),e.normalize=(...r)=>e.check(QZ(...r)),e.toLowerCase=()=>e.check(eY()),e.toUpperCase=()=>e.check(tY())}),yY=pe("ZodString",(e,t)=>{P0.init(e,t),KD.init(e,t),e.email=n=>e.check(bZ(vY,n)),e.url=n=>e.check(AZ(bY,n)),e.jwt=n=>e.check(VZ(LY,n)),e.emoji=n=>e.check(wZ(_Y,n)),e.guid=n=>e.check(sR(lR,n)),e.uuid=n=>e.check(_Z($d,n)),e.uuidv4=n=>e.check(EZ($d,n)),e.uuidv6=n=>e.check(xZ($d,n)),e.uuidv7=n=>e.check(SZ($d,n)),e.nanoid=n=>e.check(TZ(EY,n)),e.guid=n=>e.check(sR(lR,n)),e.cuid=n=>e.check(RZ(xY,n)),e.cuid2=n=>e.check(CZ(SY,n)),e.ulid=n=>e.check(NZ(AY,n)),e.base64=n=>e.check(PZ(kY,n)),e.base64url=n=>e.check(MZ(DY,n)),e.xid=n=>e.check(OZ(wY,n)),e.ksuid=n=>e.check(kZ(TY,n)),e.ipv4=n=>e.check(DZ(RY,n)),e.ipv6=n=>e.check(IZ(CY,n)),e.cidrv4=n=>e.check(LZ(NY,n)),e.cidrv6=n=>e.check(jZ(OY,n)),e.e164=n=>e.check(zZ(IY,n)),e.datetime=n=>e.check(oY(n)),e.date=n=>e.check(sY(n)),e.time=n=>e.check(cY(n)),e.duration=n=>e.check(dY(n))});function rc(e){return vZ(yY,e)}const Rt=pe("ZodStringFormat",(e,t)=>{xt.init(e,t),KD.init(e,t)}),vY=pe("ZodEmail",(e,t)=>{Oq.init(e,t),Rt.init(e,t)}),lR=pe("ZodGUID",(e,t)=>{Cq.init(e,t),Rt.init(e,t)}),$d=pe("ZodUUID",(e,t)=>{Nq.init(e,t),Rt.init(e,t)}),bY=pe("ZodURL",(e,t)=>{kq.init(e,t),Rt.init(e,t)}),_Y=pe("ZodEmoji",(e,t)=>{Dq.init(e,t),Rt.init(e,t)}),EY=pe("ZodNanoID",(e,t)=>{Iq.init(e,t),Rt.init(e,t)}),xY=pe("ZodCUID",(e,t)=>{Lq.init(e,t),Rt.init(e,t)}),SY=pe("ZodCUID2",(e,t)=>{jq.init(e,t),Rt.init(e,t)}),AY=pe("ZodULID",(e,t)=>{Pq.init(e,t),Rt.init(e,t)}),wY=pe("ZodXID",(e,t)=>{Mq.init(e,t),Rt.init(e,t)}),TY=pe("ZodKSUID",(e,t)=>{zq.init(e,t),Rt.init(e,t)}),RY=pe("ZodIPv4",(e,t)=>{Hq.init(e,t),Rt.init(e,t)}),CY=pe("ZodIPv6",(e,t)=>{Fq.init(e,t),Rt.init(e,t)}),NY=pe("ZodCIDRv4",(e,t)=>{Gq.init(e,t),Rt.init(e,t)}),OY=pe("ZodCIDRv6",(e,t)=>{Kq.init(e,t),Rt.init(e,t)}),kY=pe("ZodBase64",(e,t)=>{qq.init(e,t),Rt.init(e,t)}),DY=pe("ZodBase64URL",(e,t)=>{Yq.init(e,t),Rt.init(e,t)}),IY=pe("ZodE164",(e,t)=>{Wq.init(e,t),Rt.init(e,t)}),LY=pe("ZodJWT",(e,t)=>{Qq.init(e,t),Rt.init(e,t)}),jY=pe("ZodUnknown",(e,t)=>{Jq.init(e,t),nn.init(e,t)});function cR(){return FZ(jY)}const PY=pe("ZodNever",(e,t)=>{eZ.init(e,t),nn.init(e,t)});function MY(e){return GZ(PY,e)}const zY=pe("ZodArray",(e,t)=>{tZ.init(e,t),nn.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(Bf(n,r)),e.nonempty=n=>e.check(Bf(1,n)),e.max=(n,r)=>e.check(FD(n,r)),e.length=(n,r)=>e.check(GD(n,r)),e.unwrap=()=>e.element});function Av(e,t){return nY(zY,e,t)}const VY=pe("ZodObject",(e,t)=>{nZ.init(e,t),nn.init(e,t),Et(e,"shape",()=>t.shape),e.keyof=()=>GY(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:cR()}),e.loose=()=>e.clone({...e._zod.def,catchall:cR()}),e.strict=()=>e.clone({...e._zod.def,catchall:MY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>a7(e,n),e.merge=n=>s7(e,n),e.pick=n=>i7(e,n),e.omit=n=>o7(e,n),e.partial=(...n)=>l7(qD,e,n[0]),e.required=(...n)=>c7(ZD,e,n[0])});function UY(e,t){const n={type:"object",get shape(){return k0(this,"shape",{...e}),this.shape},...Ve(t)};return new VY(n)}const BY=pe("ZodUnion",(e,t)=>{rZ.init(e,t),nn.init(e,t),e.options=t.options});function $Y(e,t){return new BY({type:"union",options:e,...Ve(t)})}const HY=pe("ZodIntersection",(e,t)=>{iZ.init(e,t),nn.init(e,t)});function FY(e,t){return new HY({type:"intersection",left:e,right:t})}const wv=pe("ZodEnum",(e,t)=>{oZ.init(e,t),nn.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new wv({...t,checks:[],...Ve(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new wv({...t,checks:[],...Ve(o),entries:s})}});function GY(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new wv({type:"enum",entries:n,...Ve(t)})}const KY=pe("ZodTransform",(e,t)=>{aZ.init(e,t),nn.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=s=>{if(typeof s=="string")n.issues.push(Lc(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),l.continue??(l.continue=!0),n.issues.push(Lc(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function qY(e){return new KY({type:"transform",transform:e})}const qD=pe("ZodOptional",(e,t)=>{sZ.init(e,t),nn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function uR(e){return new qD({type:"optional",innerType:e})}const ZY=pe("ZodNullable",(e,t)=>{lZ.init(e,t),nn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function dR(e){return new ZY({type:"nullable",innerType:e})}const YY=pe("ZodDefault",(e,t)=>{cZ.init(e,t),nn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function WY(e,t){return new YY({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const XY=pe("ZodPrefault",(e,t)=>{uZ.init(e,t),nn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function QY(e,t){return new XY({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const ZD=pe("ZodNonOptional",(e,t)=>{dZ.init(e,t),nn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function JY(e,t){return new ZD({type:"nonoptional",innerType:e,...Ve(t)})}const eW=pe("ZodCatch",(e,t)=>{fZ.init(e,t),nn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tW(e,t){return new eW({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const nW=pe("ZodPipe",(e,t)=>{hZ.init(e,t),nn.init(e,t),e.in=t.in,e.out=t.out});function fR(e,t){return new nW({type:"pipe",in:e,out:t})}const rW=pe("ZodReadonly",(e,t)=>{mZ.init(e,t),nn.init(e,t)});function iW(e){return new rW({type:"readonly",innerType:e})}const oW=pe("ZodCustom",(e,t)=>{pZ.init(e,t),nn.init(e,t)});function aW(e){const t=new qr({check:"custom"});return t._zod.check=e,t}function sW(e,t={}){return rY(oW,e,t)}function lW(e){const t=aW(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Lc(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Lc(o))}},e(n.value,n)));return t}function _i(e){return Array.isArray?Array.isArray(e):XD(e)==="[object Array]"}function cW(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function uW(e){return e==null?"":cW(e)}function jr(e){return typeof e=="string"}function YD(e){return typeof e=="number"}function dW(e){return e===!0||e===!1||fW(e)&&XD(e)=="[object Boolean]"}function WD(e){return typeof e=="object"}function fW(e){return WD(e)&&e!==null}function Hn(e){return e!=null}function sy(e){return!e.trim().length}function XD(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const hW="Incorrect 'index' type",mW=e=>`Invalid value for key ${e}`,pW=e=>`Pattern length exceeds max of ${e}.`,gW=e=>`Missing ${e} property in key`,yW=e=>`Property 'weight' in key '${e}' must be a positive integer`,hR=Object.prototype.hasOwnProperty;class vW{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=QD(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.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 QD(e){let t=null,n=null,r=null,o=1,s=null;if(jr(e)||_i(e))r=e,t=mR(e),n=Tv(e);else{if(!hR.call(e,"name"))throw new Error(gW("name"));const l=e.name;if(r=l,hR.call(e,"weight")&&(o=e.weight,o<=0))throw new Error(yW(l));t=mR(l),n=Tv(l),s=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:s}}function mR(e){return _i(e)?e:e.split(".")}function Tv(e){return _i(e)?e.join("."):e}function bW(e,t){let n=[],r=!1;const o=(s,l,u)=>{if(Hn(s))if(!l[u])n.push(s);else{let d=l[u];const h=s[d];if(!Hn(h))return;if(u===l.length-1&&(jr(h)||YD(h)||dW(h)))n.push(uW(h));else if(_i(h)){r=!0;for(let m=0,g=h.length;m<g;m+=1)o(h[m],l,u+1)}else l.length&&o(h,l,u+1)}};return o(e,jr(t)?t.split("."):t,0),r?n:n[0]}const _W={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},EW={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},xW={location:0,threshold:.6,distance:100},SW={useExtendedSearch:!1,getFn:bW,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ze={...EW,..._W,...xW,...SW};const AW=/[^ ]+/g;function wW(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(o){const s=o.match(AW).length;if(n.has(s))return n.get(s);const l=1/Math.pow(s,.5*e),u=parseFloat(Math.round(l*r)/r);return n.set(s,u),u},clear(){n.clear()}}}class M0{constructor({getFn:t=ze.getFn,fieldNormWeight:n=ze.fieldNormWeight}={}){this.norm=wW(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,jr(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();jr(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(!Hn(t)||sy(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((o,s)=>{let l=o.getFn?o.getFn(t):this.getFn(t,o.path);if(Hn(l)){if(_i(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:h,value:m}=d.pop();if(Hn(m))if(jr(m)&&!sy(m)){let g={v:m,i:h,n:this.norm.get(m)};u.push(g)}else _i(m)&&m.forEach((g,v)=>{d.push({nestedArrIndex:v,value:g})})}r.$[s]=u}else if(jr(l)&&!sy(l)){let u={v:l,n:this.norm.get(l)};r.$[s]=u}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function JD(e,t,{getFn:n=ze.getFn,fieldNormWeight:r=ze.fieldNormWeight}={}){const o=new M0({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(QD)),o.setSources(t),o.create(),o}function TW(e,{getFn:t=ze.getFn,fieldNormWeight:n=ze.fieldNormWeight}={}){const{keys:r,records:o}=e,s=new M0({getFn:t,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(o),s}function Hd(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=ze.distance,ignoreLocation:s=ze.ignoreLocation}={}){const l=t/e.length;if(s)return l;const u=Math.abs(r-n);return o?l+u/o:u?1:l}function RW(e=[],t=ze.minMatchCharLength){let n=[],r=-1,o=-1,s=0;for(let l=e.length;s<l;s+=1){let u=e[s];u&&r===-1?r=s:!u&&r!==-1&&(o=s-1,o-r+1>=t&&n.push([r,o]),r=-1)}return e[s-1]&&s-r>=t&&n.push([r,s-1]),n}const Go=32;function CW(e,t,n,{location:r=ze.location,distance:o=ze.distance,threshold:s=ze.threshold,findAllMatches:l=ze.findAllMatches,minMatchCharLength:u=ze.minMatchCharLength,includeMatches:d=ze.includeMatches,ignoreLocation:h=ze.ignoreLocation}={}){if(t.length>Go)throw new Error(pW(Go));const m=t.length,g=e.length,v=Math.max(0,Math.min(r,g));let _=s,A=v;const w=u>1||d,R=w?Array(g):[];let S;for(;(S=e.indexOf(t,A))>-1;){let I=Hd(t,{currentLocation:S,expectedLocation:v,distance:o,ignoreLocation:h});if(_=Math.min(I,_),A=S+m,w){let M=0;for(;M<m;)R[S+M]=1,M+=1}}A=-1;let x=[],T=1,O=m+g;const C=1<<m-1;for(let I=0;I<m;I+=1){let M=0,H=O;for(;M<H;)Hd(t,{errors:I,currentLocation:v+H,expectedLocation:v,distance:o,ignoreLocation:h})<=_?M=H:O=H,H=Math.floor((O-M)/2+M);O=H;let K=Math.max(1,v-H+1),Z=l?g:Math.min(v+H,g)+m,J=Array(Z+2);J[Z+1]=(1<<I)-1;for(let Y=Z;Y>=K;Y-=1){let re=Y-1,j=n[e.charAt(re)];if(w&&(R[re]=+!!j),J[Y]=(J[Y+1]<<1|1)&j,I&&(J[Y]|=(x[Y+1]|x[Y])<<1|1|x[Y+1]),J[Y]&C&&(T=Hd(t,{errors:I,currentLocation:re,expectedLocation:v,distance:o,ignoreLocation:h}),T<=_)){if(_=T,A=re,A<=v)break;K=Math.max(1,2*v-A)}}if(Hd(t,{errors:I+1,currentLocation:v,expectedLocation:v,distance:o,ignoreLocation:h})>_)break;x=J}const D={isMatch:A>=0,score:Math.max(.001,T)};if(w){const I=RW(R,u);I.length?d&&(D.indices=I):D.isMatch=!1}return D}function NW(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const o=e.charAt(n);t[o]=(t[o]||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 eI{constructor(t,{location:n=ze.location,threshold:r=ze.threshold,distance:o=ze.distance,includeMatches:s=ze.includeMatches,findAllMatches:l=ze.findAllMatches,minMatchCharLength:u=ze.minMatchCharLength,isCaseSensitive:d=ze.isCaseSensitive,ignoreDiacritics:h=ze.ignoreDiacritics,ignoreLocation:m=ze.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:s,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:m},t=d?t:t.toLowerCase(),t=h?$f(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const g=(_,A)=>{this.chunks.push({pattern:_,alphabet:NW(_),startIndex:A})},v=this.pattern.length;if(v>Go){let _=0;const A=v%Go,w=v-A;for(;_<w;)g(this.pattern.substr(_,Go),_),_+=Go;if(A){const R=v-Go;g(this.pattern.substr(R),R)}}else g(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o}=this.options;if(t=n?t:t.toLowerCase(),t=r?$f(t):t,this.pattern===t){let w={isMatch:!0,score:0};return o&&(w.indices=[[0,t.length-1]]),w}const{location:s,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:h,ignoreLocation:m}=this.options;let g=[],v=0,_=!1;this.chunks.forEach(({pattern:w,alphabet:R,startIndex:S})=>{const{isMatch:x,score:T,indices:O}=CW(t,w,R,{location:s+S,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:h,includeMatches:o,ignoreLocation:m});x&&(_=!0),v+=T,x&&O&&(g=[...g,...O])});let A={isMatch:_,score:_?v/this.chunks.length:1};return _&&o&&(A.indices=g),A}}class bo{constructor(t){this.pattern=t}static isMultiMatch(t){return pR(t,this.multiRegex)}static isSingleMatch(t){return pR(t,this.singleRegex)}search(){}}function pR(e,t){const n=e.match(t);return n?n[1]:null}class OW extends bo{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 kW extends bo{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 DW extends bo{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 IW extends bo{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 LW extends bo{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 jW extends bo{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 tI extends bo{constructor(t,{location:n=ze.location,threshold:r=ze.threshold,distance:o=ze.distance,includeMatches:s=ze.includeMatches,findAllMatches:l=ze.findAllMatches,minMatchCharLength:u=ze.minMatchCharLength,isCaseSensitive:d=ze.isCaseSensitive,ignoreDiacritics:h=ze.ignoreDiacritics,ignoreLocation:m=ze.ignoreLocation}={}){super(t),this._bitapSearch=new eI(t,{location:n,threshold:r,distance:o,includeMatches:s,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:m})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class nI extends bo{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const o=[],s=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+s,o.push([r,n-1]);const l=!!o.length;return{isMatch:l,score:l?0:1,indices:o}}}const Rv=[OW,nI,DW,IW,jW,LW,kW,tI],gR=Rv.length,PW=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,MW="|";function zW(e,t={}){return e.split(MW).map(n=>{let r=n.trim().split(PW).filter(s=>s&&!!s.trim()),o=[];for(let s=0,l=r.length;s<l;s+=1){const u=r[s];let d=!1,h=-1;for(;!d&&++h<gR;){const m=Rv[h];let g=m.isMultiMatch(u);g&&(o.push(new m(g,t)),d=!0)}if(!d)for(h=-1;++h<gR;){const m=Rv[h];let g=m.isSingleMatch(u);if(g){o.push(new m(g,t));break}}}return o})}const VW=new Set([tI.type,nI.type]);class UW{constructor(t,{isCaseSensitive:n=ze.isCaseSensitive,ignoreDiacritics:r=ze.ignoreDiacritics,includeMatches:o=ze.includeMatches,minMatchCharLength:s=ze.minMatchCharLength,ignoreLocation:l=ze.ignoreLocation,findAllMatches:u=ze.findAllMatches,location:d=ze.location,threshold:h=ze.threshold,distance:m=ze.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o,minMatchCharLength:s,findAllMatches:u,ignoreLocation:l,location:d,threshold:h,distance:m},t=n?t:t.toLowerCase(),t=r?$f(t):t,this.pattern=t,this.query=zW(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:o,ignoreDiacritics:s}=this.options;t=o?t:t.toLowerCase(),t=s?$f(t):t;let l=0,u=[],d=0;for(let h=0,m=n.length;h<m;h+=1){const g=n[h];u.length=0,l=0;for(let v=0,_=g.length;v<_;v+=1){const A=g[v],{isMatch:w,indices:R,score:S}=A.search(t);if(w){if(l+=1,d+=S,r){const x=A.constructor.type;VW.has(x)?u=[...u,...R]:u.push(R)}}else{d=0,l=0,u.length=0;break}}if(l){let v={isMatch:!0,score:d/l};return r&&(v.indices=u),v}}return{isMatch:!1,score:1}}}const Cv=[];function BW(...e){Cv.push(...e)}function Nv(e,t){for(let n=0,r=Cv.length;n<r;n+=1){let o=Cv[n];if(o.condition(e,t))return new o(e,t)}return new eI(e,t)}const Hf={AND:"$and",OR:"$or"},Ov={PATH:"$path",PATTERN:"$val"},kv=e=>!!(e[Hf.AND]||e[Hf.OR]),$W=e=>!!e[Ov.PATH],HW=e=>!_i(e)&&WD(e)&&!kv(e),yR=e=>({[Hf.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function rI(e,t,{auto:n=!0}={}){const r=o=>{let s=Object.keys(o);const l=$W(o);if(!l&&s.length>1&&!kv(o))return r(yR(o));if(HW(o)){const d=l?o[Ov.PATH]:s[0],h=l?o[Ov.PATTERN]:o[d];if(!jr(h))throw new Error(mW(d));const m={keyId:Tv(d),pattern:h};return n&&(m.searcher=Nv(h,t)),m}let u={children:[],operator:s[0]};return s.forEach(d=>{const h=o[d];_i(h)&&h.forEach(m=>{u.children.push(r(m))})}),u};return kv(e)||(e=yR(e)),r(e)}function FW(e,{ignoreFieldNorm:t=ze.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:s,score:l})=>{const u=o?o.weight:null;r*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(t?1:s))}),n.score=r})}function GW(e,t){const n=e.matches;t.matches=[],Hn(n)&&n.forEach(r=>{if(!Hn(r.indices)||!r.indices.length)return;const{indices:o,value:s}=r;let l={indices:o,value:s};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),t.matches.push(l)})}function KW(e,t){t.score=e.score}function qW(e,t,{includeMatches:n=ze.includeMatches,includeScore:r=ze.includeScore}={}){const o=[];return n&&o.push(GW),r&&o.push(KW),e.map(s=>{const{idx:l}=s,u={item:t[l],refIndex:l};return o.length&&o.forEach(d=>{d(s,u)}),u})}class $s{constructor(t,n={},r){this.options={...ze,...n},this.options.useExtendedSearch,this._keyStore=new vW(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof M0))throw new Error(hW);this._myIndex=n||JD(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Hn(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,o=this._docs.length;r<o;r+=1){const s=this._docs[r];t(s,r)&&(this.removeAt(r),r-=1,o-=1,n.push(s))}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:o,shouldSort:s,sortFn:l,ignoreFieldNorm:u}=this.options;let d=jr(t)?jr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return FW(d,{ignoreFieldNorm:u}),s&&d.sort(l),YD(n)&&n>-1&&(d=d.slice(0,n)),qW(d,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){const n=Nv(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:s,i:l,n:u})=>{if(!Hn(s))return;const{isMatch:d,score:h,indices:m}=n.searchIn(s);d&&o.push({item:s,idx:l,matches:[{score:h,value:s,norm:u,indices:m}]})}),o}_searchLogical(t){const n=rI(t,this.options),r=(u,d,h)=>{if(!u.children){const{keyId:g,searcher:v}=u,_=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(d,g),searcher:v});return _&&_.length?[{idx:h,item:d,matches:_}]:[]}const m=[];for(let g=0,v=u.children.length;g<v;g+=1){const _=u.children[g],A=r(_,d,h);if(A.length)m.push(...A);else if(u.operator===Hf.AND)return[]}return m},o=this._myIndex.records,s={},l=[];return o.forEach(({$:u,i:d})=>{if(Hn(u)){let h=r(n,u,d);h.length&&(s[d]||(s[d]={idx:d,item:u,matches:[]},l.push(s[d])),h.forEach(({matches:m})=>{s[d].matches.push(...m)}))}}),l}_searchObjectList(t){const n=Nv(t,this.options),{keys:r,records:o}=this._myIndex,s=[];return o.forEach(({$:l,i:u})=>{if(!Hn(l))return;let d=[];r.forEach((h,m)=>{d.push(...this._findMatches({key:h,value:l[m],searcher:n}))}),d.length&&s.push({idx:u,item:l,matches:d})}),s}_findMatches({key:t,value:n,searcher:r}){if(!Hn(n))return[];let o=[];if(_i(n))n.forEach(({v:s,i:l,n:u})=>{if(!Hn(s))return;const{isMatch:d,score:h,indices:m}=r.searchIn(s);d&&o.push({score:h,key:t,value:s,idx:l,norm:u,indices:m})});else{const{v:s,n:l}=n,{isMatch:u,score:d,indices:h}=r.searchIn(s);u&&o.push({score:d,key:t,value:s,norm:l,indices:h})}return o}}$s.version="7.1.0";$s.createIndex=JD;$s.parseIndex=TW;$s.config=ze;$s.parseQuery=rI;BW(UW);const bc=({children:e,className:t,identifier:n,...r})=>y.jsx("div",{className:Se("group/dropdown relative flex",t),"aria-label":`DropDown ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),ZW=({children:e,identifier:t,className:n,label:r,...o})=>y.jsx(st,{className:Se("w-full cursor-pointer",n),label:r??`Open panel ${t}`,onClick:s=>{s.currentTarget.focus()},onBlur:s=>s.currentTarget.blur(),variant:"none",...o,children:e}),YW=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:o="start",identifier:s,className:l,...u})=>y.jsx("div",{className:Se("absolute top-[calc(100%+0.5rem)] z-[1000] min-w-full",o==="start"&&"left-0",o==="end"&&"right-0",l),"aria-hidden":t,role:"region","aria-labelledby":`unrollable-panel-button-${s}`,id:`unrollable-panel-${s}`,children:y.jsx(ab,{isHidden:t,className:Se("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})});bc.Trigger=ZW;bc.Panel=YW;const WW={key:"locale-switcher-content",content:{localeSwitcherLabel:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:"Показать только выбранные языки"})}}},_c=(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?.getItem(e);if(u)try{return JSON.parse(u)}catch(d){console.error(d)}return l}});E.useEffect(()=>{const l=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 o=E.useCallback(l=>{r(u=>{const d=typeof l=="function"?l(u):l;return localStorage?.setItem(e,JSON.stringify(d)),d})},[e,r]),s=E.useCallback(()=>{const l=localStorage?.getItem(e);l&&r(JSON.parse(l))},[e,r]);return E.useMemo(()=>[n,o,s],[n,o,s])},iI=E.createContext({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),oI=()=>E.useContext(iI),XW=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{const{locale:r}=Qv(),[o,s]=_c("locale-content-selector-selected-locales",t??[r]);return y.jsx(iI,{value:{availableLocales:e,selectedLocales:o,setSelectedLocales:s},children:n})},ly="locale-switcher-content",QW=({panelProps:e,isMultilingual:t=!0})=>{const{switchTo:n,searchInput:r,localeSwitcherLabel:o,languageListLabel:s,seeAllLocalesSwitch:l}=Pt(WW),u=E.useRef(null),{locale:d}=Qv(),{availableLocales:h,selectedLocales:m,setSelectedLocales:g}=oI(),v=E.useMemo(()=>h.map(C=>{const D=Jd(C,V.ENGLISH),I=Jd(C,d),M=Jd(C);return{locale:C,englishName:D,currentLocaleName:I,ownLocaleName:M}}),[h,d]),[_,A]=E.useState(v),[w,R]=_c("locale-content-selector-see-all-locales",!1),S=E.useMemo(()=>{const C={keys:[{name:"ownLocaleName",weight:.4},{name:"englishName",weight:.2},{name:"currentLocaleName",weight:.2},{name:"locale",weight:.2}],threshold:.02};return new $s(v,C)},[v]),x=E.useCallback(C=>{if(C){const D=S.search(C).map(I=>I.item);A(D)}else A(v)},[S,v]),T=C=>{t?m.includes(C)?m.length>1&&g(D=>D.filter(I=>I!==C)):g(D=>[...D,C]):g([C])},O=C=>{R(C),g(C?h:[d])};return y.jsx("div",{className:"border-text text-text rounded-xl border transition-colors","aria-label":o.value,children:y.jsxs(bc,{identifier:ly,children:[y.jsx(bc.Trigger,{identifier:ly,children:y.jsxs("div",{className:"flex w-full items-center justify-between",children:[y.jsx("div",{className:"px-2 py-1",children:y.jsx(wU,{size:18})}),y.jsx(NU,{className:"self-center",size:18})]})}),y.jsx(bc.Panel,{identifier:ly,isOverable:!0,isFocusable:!0,className:"left-auto right-0",...e,children:y.jsxs(Er,{className:"max-h-[80vh] min-w-28",separator:"y",role:"listbox",transparency:"sm",border:!0,roundedSize:"2xl",borderColor:"text","aria-label":s.value,children:[t&&y.jsx("div",{className:"m-auto p-2",children:y.jsx(au,{defaultValue:!1,onChange:O,color:iu.TEXT,size:ou.SM,className:"!w-60",choices:[{content:l.true.value,value:!0},{content:l.false.value,value:!1}]})}),!(t&&w)&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"p-3",children:y.jsx(zs,{type:"search","aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:C=>x(C.target.value),ref:u})}),y.jsx("ol",{className:"divide-text/20 divide-y divide-dashed overflow-y-auto p-1",children:_.map(({locale:C,currentLocaleName:D,ownLocaleName:I})=>y.jsx("li",{className:"px-1.5 py-1",children:y.jsx(st,{onClick:()=>T(C),label:`${n} ${D}`,disabled:!(h??h).includes(C),isActive:m.includes(C),variant:at.HOVERABLE,color:ot.TEXT,isFullWidth:!0,textAlign:Es.LEFT,size:Fn.SM,children:y.jsxs("div",{className:"flex flex-row items-center justify-between gap-3 px-2 py-1",children:[t&&y.jsx("div",{className:"w-4",children:m.includes(C)&&y.jsx(Ds,{className:"size-full"})}),y.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1",children:[y.jsxs("div",{className:"flex flex-col text-nowrap",children:[y.jsx("span",{dir:DM(C),lang:C,children:I}),y.jsx("span",{className:"text-neutral text-xs",children:D})]}),y.jsx("span",{className:"text-neutral text-sm",children:C.toUpperCase()})]})]})})},C))})]})]})})]})})},JW=(e,t,n)=>{const r={...e};for(const o of Object.keys(e))o===t?(r[n]=e[t],delete r[t]):r[o]=e[o];return r},Dv=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:o,...s})=>{const[l,u]=E.useState(e),[d,h]=E.useState(0),m=l!==e,g=()=>{u(e),h(w=>w+1)},v=()=>{t(l)},_=w=>{u(w.currentTarget.value)};E.useEffect(()=>{u(e)},[e]);const A=r?.(l)??!0;return y.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[y.jsx(zs,{onChange:_,"aria-label":"value",variant:ao.INVISIBLE,className:"size-full",defaultValue:e,...s},d),(m||o)&&y.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[m&&y.jsxs(y.Fragment,{children:[y.jsx(st,{Icon:Ds,label:"Validate",variant:at.HOVERABLE,color:ot.TEXT,size:Fn.ICON_SM,className:"cursor-pointer hover:scale-110",disabled:n||!A,onClick:v}),y.jsx(st,{Icon:la,label:"Cancel",variant:at.HOVERABLE,size:Fn.ICON_SM,color:ot.TEXT,className:"cursor-pointer hover:scale-110",onClick:g})]}),o]})]},String(e))},eX=()=>{const{session:e,revalidateSession:t,setSession:n}=tu(),{logout:r}=V5(),o=e?.user?"authenticated":"unauthenticated",s=o==="authenticated",l=o==="unauthenticated",u=e?.user;return{isAuthenticated:s,isUnauthenticated:l,user:u,revalidateSession:t,logout:async()=>{n(null),await r()}}},tX=(e,t)=>{const[n,r]=E.useState(e);return E.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>clearTimeout(o)},[e,t]),n},nX=({isActive:e=!0,suggestion:t,...n})=>{const r=String(n.value??n.defaultValue??""),{autocomplete:o}=q5(),s=Hr(),[l,u]=E.useState(!1),[d,h]=E.useState(r),[m,g]=E.useState(""),v=E.useRef(null),_=E.useRef(null),A=E.useRef(null),[w,R]=E.useState(null),[S,x]=E.useState(-1),T=tX(d,200);E.useEffect(()=>{typeof n.value>"u"||h(r)},[n.value,n.defaultValue]),E.useEffect(()=>{if(!e||!l)return;const C=async()=>{try{const D=v.current?.selectionStart??T.length,I=T.slice(0,D),M=T.slice(D),H=5,K=I.split(`
293
- `),J=K.slice(Math.max(0,K.length-H-1),-1).join(`
294
- `),ae=K[K.length-1]??"",re=M.split(`
295
- `).slice(1,H+1).join(`
296
- `),X=(await o({text:I,contextBefore:J,currentLine:ae,contextAfter:re,aiOptions:{apiKey:s.ai?.apiKey,model:s.ai?.model,temperature:s.ai?.temperature}}))?.data?.autocompletion??"";g(X),x(D)}catch(D){console.error("Autocomplete error:",D)}};T.length>3?(g(""),C()):g("")},[T,e,o,s]),E.useEffect(()=>{if(!m||S===-1||!_.current||!A.current){R(null);return}const C=_.current.getBoundingClientRect(),D=A.current.getBoundingClientRect();R({left:C.left-D.left,top:C.top-D.top})},[m,S,d]);const O=()=>{const C=v.current?.selectionStart??S;if(C!==S)return;const D=d.slice(0,C)+m+d.slice(C);h(D),g(""),x(-1),setTimeout(()=>{v.current?.focus();const I=C+m.length;v.current?.setSelectionRange(I,I)},0)};return y.jsxs("div",{className:"relative w-full",children:[y.jsxs("div",{ref:A,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:[m&&S!==-1?y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"align-text-top text-transparent",children:d.slice(0,S)}),y.jsx("span",{ref:_,style:{visibility:"hidden"},"aria-hidden":"true",children:m}),y.jsx("span",{className:"align-text-top text-transparent",children:d.slice(S)})]}):y.jsx("span",{className:"align-text-top text-transparent",children:d}),t&&y.jsx("span",{className:"text-neutral align-text-top",children:t})]}),m&&w&&y.jsx("div",{className:"pointer-events-none text-neutral whitespace-pre-wrap break-words text-base leading-[1.45rem] md:text-sm md:leading-[1.23rem]",style:{position:"absolute",left:w.left,top:w.top},children:m}),y.jsx(v0,{...n,ref:v,value:d,onChange:C=>{u(!0),h(C.target.value),g(""),n.onChange?.(C)},onKeyDown:C=>{C.key==="Tab"&&m&&(C.preventDefault(),O()),n.onKeyDown?.(C)},onSelect:C=>{m&&C.target.selectionStart!==S&&(g(""),x(-1)),n.onSelect?.(C)}})]})},rX=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:o,...s})=>{const{isAuthenticated:l}=eX(),[u,d]=E.useState(e),[h,m]=E.useState(0),g=u!==e,v=()=>{d(e),m(R=>R+1)},_=()=>{t(u)},A=R=>d(R.currentTarget.value??"");E.useEffect(()=>{d(e)},[e]);const w=r?.(u)??!0;return y.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[y.jsx(nX,{onChange:A,variant:"invisible",className:"size-full",defaultValue:e,isActive:l,...s},h),(g||o)&&y.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[g&&y.jsxs(y.Fragment,{children:[y.jsx(st,{Icon:Ds,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!w,onClick:_}),y.jsx(st,{Icon:la,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:v})]}),o]})]},e)};function Ko(){return Ko=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},Ko.apply(this,arguments)}const iX=["children","options"],vR=["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"}),bR={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},oX=["style","script","pre"],aX=["src","href","data","formAction","srcDoc","action"],sX=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,lX=/mailto:/i,cX=/\n{2,}$/,_R=/^(\s*>[\s\S]*?)(?=\n\n|$)/,uX=/^ *> ?/gm,dX=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,fX=/^ {2,}\n/,hX=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,ER=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,xR=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,mX=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,pX=/^(?:\n *)*\n/,gX=/\r\n?/g,yX=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,vX=/^\[\^([^\]]+)]/,bX=/\f/g,_X=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,EX=/^\s*?\[(x|\s)\]/,SR=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,AR=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,wR=/^([^\n]+)\n *(=|-){3,} *\n/,cy=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,xX=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,TR=/^<!--[\s\S]*?(?:-->)/,SX=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,uy=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,AX=/^\{.*\}$/,wX=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,TX=/^<([^ >]+@[^ >]+)>/,RX=/^<([^ >]+:\/[^ >]+)>/,CX=/-([a-z])?/gi,RR=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,NX=/^[^\n]+(?: \n|\n{2,})/,OX=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,kX=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,DX=/^\[([^\]]*)\] ?\[([^\]]*)\]/,IX=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,LX=/\t/g,jX=/(^ *\||\| *$)/g,PX=/^ *:-+: *$/,MX=/^ *:-+ *$/,zX=/^ *-+: *$/,jh=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,Ph="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",VX=RegExp(`^([*_])\\1${jh(1)}${Ph}\\1\\1(?!\\1)`),UX=RegExp(`^([*_])${jh(0)}${Ph}\\1(?!\\1)`),BX=RegExp(`^(==)${jh(0)}${Ph}\\1`),$X=RegExp(`^(~~)${jh(0)}${Ph}\\1`),HX=/^(:[a-zA-Z0-9-_]+:)/,FX=/^\\([^0-9A-Za-z\s])/,GX=/\\([^0-9A-Za-z\s])/g,KX=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,qX=/^\n+/,ZX=/^([ \t]*)/,YX=/(?:^|\n)( *)$/,z0="(?:\\d+\\.)",V0="(?:[*+-])";function aI(e){return"( *)("+(e===1?z0:V0)+") +"}const sI=aI(1),lI=aI(2);function cI(e){return RegExp("^"+(e===1?sI:lI))}const WX=cI(1),XX=cI(2);function uI(e){return RegExp("^"+(e===1?sI:lI)+"[^\\n]*(?:\\n(?!\\1"+(e===1?z0:V0)+" )[^\\n]*)*(\\n|$)","gm")}const QX=uI(1),JX=uI(2);function dI(e){const t=e===1?z0:V0;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const fI=dI(1),hI=dI(2);function CR(e,t){const n=t===1,r=n?fI:hI,o=n?QX:JX,s=n?WX:XX;return{t:l=>s.test(l),o:Ts(function(l,u){const d=YX.exec(u.prevCapture);return d&&(u.list||!u.inline&&!u.simple)?r.exec(l=d[1]+l):null}),i:1,u(l,u,d){const h=n?+l[2]:void 0,m=l[0].replace(cX,`
297
- `).match(o);let g=!1;return{items:m.map(function(v,_){const A=s.exec(v)[0].length,w=RegExp("^ {1,"+A+"}","gm"),R=v.replace(w,"").replace(s,""),S=_===m.length-1,x=R.indexOf(`
298
-
299
- `)!==-1||S&&g;g=x;const T=d.inline,O=d.list;let C;d.list=!0,x?(d.inline=!1,C=Ec(R)+`
300
-
301
- `):(d.inline=!0,C=Ec(R));const D=u(C,d);return d.inline=T,d.list=O,D}),ordered:n,start:h}},l:(l,u,d)=>e(l.ordered?"ol":"ul",{key:d.key,start:l.type==="20"?l.start:void 0},l.items.map(function(h,m){return e("li",{key:m},u(h,d))}))}}const eQ=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),tQ=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Ec(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function pf(e,t){return e.startsWith(t)}function nQ(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(pf(e,n[r]))return!0;return!1}return n(e,t)}function ic(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 rQ(e){return zX.test(e)?"right":PX.test(e)?"center":MX.test(e)?"left":null}function NR(e,t,n,r){const o=n.inTable;n.inTable=!0;let s=[[]],l="";function u(){if(!l)return;const d=s[s.length-1];d.push.apply(d,t(l,n)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,h,m)=>{d.trim()==="|"&&(u(),r)?h!==0&&h!==m.length-1&&s.push([]):l+=d}),u(),n.inTable=o,s}function iQ(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(jX,"").split("|").map(rQ):[],o=e[3]?(function(l,u,d){return l.trim().split(`
302
- `).map(function(h){return NR(h,u,d,!0)})})(e[3],t,n):[],s=NR(e[1],t,n,!!o.length);return n.inline=!1,o.length?{align:r,cells:o,header:s,type:"25"}:{children:s,type:"21"}}function OR(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Ts(e){return e.inline=1,e}function Wi(e){return Ts(function(t,n){return n.inline?e.exec(t):null})}function Xi(e){return Ts(function(t,n){return n.inline||n.simple?e.exec(t):null})}function fi(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Fd(e){return Ts(function(t){return e.exec(t)})}const oQ=/(javascript|vbscript|data(?!:image)):/i;function aQ(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(oQ.test(t))return null}catch{return null}return e}function Cr(e){return e&&e.replace(GX,"$1")}function gf(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=o,s}function sQ(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=o,s}function lQ(e,t,n){const r=n.inline||!1;n.inline=!1;const o=e(t,n);return n.inline=r,o}const dy=(e,t,n)=>({children:gf(t,e[2],n)});function fy(){return{}}function hy(){return null}function cQ(...e){return e.filter(Boolean).join(" ")}function my(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],r!==void 0);)o.shift();return r||n}function uQ(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Ko({},bR,t.namedCodesToUnicode):bR;const n=t.slugify||ic,r=t.sanitizer||aQ,o=t.createElement||E.createElement,s=[_R,ER,xR,t.enforceAtxHeadings?AR:SR,wR,RR,fI,hI],l=[...s,NX,cy,TR,uy];function u(S,x,...T){const O=my(t.overrides,S+".props",{});return o((function(C,D){const I=my(D,C);return I?typeof I=="function"||typeof I=="object"&&"render"in I?I:my(D,C+".component",C):C})(S,t.overrides),Ko({},x,O,{className:cQ(x?.className,O.className)||void 0}),...T)}function d(S){S=S.replace(_X,"");let x=!1;t.forceInline?x=!0:t.forceBlock||(x=IX.test(S)===!1);const T=A(_(x?S:Ec(S).replace(qX,"")+`
303
-
304
- `,{inline:x}));for(;typeof T[T.length-1]=="string"&&!T[T.length-1].trim();)T.pop();if(t.wrapper===null)return T;const O=t.wrapper||(x?"span":"div");let C;if(T.length>1||t.forceWrapper)C=T;else{if(T.length===1)return C=T[0],typeof C=="string"?u("span",{key:"outer"},C):C;C=null}return o(O,{key:"outer"},C)}function h(S,x){if(!x||!x.trim())return null;const T=x.match(sX);return T?T.reduce(function(O,C){const D=C.indexOf("=");if(D!==-1){const I=(function(Z){return Z.indexOf("-")!==-1&&Z.match(SX)===null&&(Z=Z.replace(CX,function(J,ae){return ae.toUpperCase()})),Z})(C.slice(0,D)).trim(),M=(function(Z){const J=Z[0];return(J==='"'||J==="'")&&Z.length>=2&&Z[Z.length-1]===J?Z.slice(1,-1):Z})(C.slice(D+1).trim()),H=vR[I]||I;if(H==="ref")return O;const K=O[H]=(function(Z,J,ae,Y){return J==="style"?(function(re){const j=[];let X="",F=!1,ve=!1,P="";if(!re)return j;for(let B=0;B<re.length;B++){const W=re[B];if(W!=='"'&&W!=="'"||F||(ve?W===P&&(ve=!1,P=""):(ve=!0,P=W)),W==="("&&X.endsWith("url")?F=!0:W===")"&&F&&(F=!1),W!==";"||ve||F)X+=W;else{const se=X.trim();if(se){const he=se.indexOf(":");if(he>0){const ye=se.slice(0,he).trim(),ue=se.slice(he+1).trim();j.push([ye,ue])}}X=""}}const oe=X.trim();if(oe){const B=oe.indexOf(":");if(B>0){const W=oe.slice(0,B).trim(),se=oe.slice(B+1).trim();j.push([W,se])}}return j})(ae).reduce(function(re,[j,X]){return re[j.replace(/(-[a-z])/g,F=>F[1].toUpperCase())]=Y(X,Z,j),re},{}):aX.indexOf(J)!==-1?Y(Cr(ae),Z,J):(ae.match(AX)&&(ae=Cr(ae.slice(1,ae.length-1))),ae==="true"||ae!=="false"&&ae)})(S,I,M,r);typeof K=="string"&&(cy.test(K)||uy.test(K))&&(O[H]=d(K.trim()))}else C!=="style"&&(O[vR[C]||C]=!0);return O},{}):null}const m=[],g={},v={0:{t:[">"],o:fi(_R),i:1,u(S,x,T){const[,O,C]=S[0].replace(uX,"").match(dX);return{alert:O,children:x(C,T)}},l(S,x,T){const O={key:T.key};return S.alert&&(O.className="markdown-alert-"+n(S.alert.toLowerCase(),ic),S.children.unshift({attrs:{},children:[{type:"27",text:S.alert}],noInnerParse:!0,type:"11",tag:"header"})),u("blockquote",O,x(S.children,T))}},1:{o:Fd(fX),i:1,u:fy,l:(S,x,T)=>u("br",{key:T.key})},2:{t:S=>{const x=S[0];return x==="-"||x==="*"||x==="_"},o:fi(hX),i:1,u:fy,l:(S,x,T)=>u("hr",{key:T.key})},3:{t:[" "],o:fi(xR),i:0,u:S=>({lang:void 0,text:Cr(Ec(S[0].replace(/^ {4}/gm,"")))}),l:(S,x,T)=>u("pre",{key:T.key},u("code",Ko({},S.attrs,{className:S.lang?"lang-"+S.lang:""}),S.text))},4:{t:["```","~~~"],o:fi(ER),i:0,u:S=>({attrs:h("code",S[3]||""),lang:S[2]||void 0,text:S[4],type:"3"})},5:{t:["`"],o:Xi(mX),i:3,u:S=>({text:Cr(S[2])}),l:(S,x,T)=>u("code",{key:T.key},S.text)},6:{t:["[^"],o:fi(yX),i:0,u:S=>(m.push({footnote:S[2],identifier:S[1]}),{}),l:hy},7:{t:["[^"],o:Wi(vX),i:1,u:S=>({target:"#"+n(S[1],ic),text:S[1]}),l:(S,x,T)=>u("a",{key:T.key,href:r(S.target,"a","href")},u("sup",{key:T.key},S.text))},8:{t:["[ ]","[x]"],o:Wi(EX),i:1,u:S=>({completed:S[1].toLowerCase()==="x"}),l:(S,x,T)=>u("input",{checked:S.completed,key:T.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:fi(t.enforceAtxHeadings?AR:SR),i:1,u:(S,x,T)=>({children:gf(x,S[2],T),id:n(S[2],ic),level:S[1].length}),l:(S,x,T)=>u("h"+S.level,{id:S.id,key:T.key},x(S.children,T))},10:{o:fi(wR),i:0,u:(S,x,T)=>({children:gf(x,S[1],T),level:S[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Fd(cy),i:1,u(S,x,T){const[,O]=S[3].match(ZX),C=RegExp("^"+O,"gm"),D=S[3].replace(C,""),I=(M=D,l.some(ae=>ae.test(M))?lQ:gf);var M;const H=S[1].toLowerCase(),K=oX.indexOf(H)!==-1,Z=(K?H:S[1]).trim(),J={attrs:h(Z,S[2]),noInnerParse:K,tag:Z};if(T.inAnchor=T.inAnchor||H==="a",K)J.text=S[3];else{const ae=T.inHTML;T.inHTML=!0,J.children=I(x,D,T),T.inHTML=ae}return T.inAnchor=!1,J},l:(S,x,T)=>u(S.tag,Ko({key:T.key},S.attrs),S.text||(S.children?x(S.children,T):""))},13:{t:["<"],o:Fd(uy),i:1,u(S){const x=S[1].trim();return{attrs:h(x,S[2]||""),tag:x}},l:(S,x,T)=>u(S.tag,Ko({},S.attrs,{key:T.key}))},12:{t:["<!--"],o:Fd(TR),i:1,u:()=>({}),l:hy},14:{t:["!["],o:Xi(tQ),i:1,u:S=>({alt:Cr(S[1]),target:Cr(S[2]),title:Cr(S[3])}),l:(S,x,T)=>u("img",{key:T.key,alt:S.alt||void 0,title:S.title||void 0,src:r(S.target,"img","src")})},15:{t:["["],o:Wi(eQ),i:3,u:(S,x,T)=>({children:sQ(x,S[1],T),target:Cr(S[2]),title:Cr(S[3])}),l:(S,x,T)=>u("a",{key:T.key,href:r(S.target,"a","href"),title:S.title},x(S.children,T))},16:{t:["<"],o:Wi(RX),i:0,u:S=>({children:[{text:S[1],type:"27"}],target:S[1],type:"15"})},17:{t:(S,x)=>!x.inAnchor&&!t.disableAutoLink&&(pf(S,"http://")||pf(S,"https://")),o:Wi(wX),i:0,u:S=>({children:[{text:S[1],type:"27"}],target:S[1],title:void 0,type:"15"})},18:{t:["<"],o:Wi(TX),i:0,u(S){let x=S[1],T=S[1];return lX.test(T)||(T="mailto:"+T),{children:[{text:x.replace("mailto:",""),type:"27"}],target:T,type:"15"}}},20:CR(u,1),33:CR(u,2),19:{o:fi(pX),i:3,u:fy,l:()=>`
305
- `},21:{o:Ts(function(S,x){if(x.inline||x.simple||x.inHTML&&S.indexOf(`
306
-
307
- `)===-1&&x.prevCapture.indexOf(`
308
-
309
- `)===-1)return null;let T="";S.split(`
310
- `).every(C=>(C+=`
311
- `,!s.some(D=>D.test(C))&&(T+=C,!!C.trim())));const O=Ec(T);return O===""?null:[T,,O]}),i:3,u:dy,l:(S,x,T)=>u("p",{key:T.key},x(S.children,T))},22:{t:["["],o:Wi(OX),i:0,u:S=>(g[S[1]]={target:S[2],title:S[4]},{}),l:hy},23:{t:["!["],o:Xi(kX),i:0,u:S=>({alt:S[1]?Cr(S[1]):void 0,ref:S[2]}),l:(S,x,T)=>g[S.ref]?u("img",{key:T.key,alt:S.alt,src:r(g[S.ref].target,"img","src"),title:g[S.ref].title}):null},24:{t:S=>S[0]==="["&&S.indexOf("](")===-1,o:Wi(DX),i:0,u:(S,x,T)=>({children:x(S[1],T),fallbackChildren:S[0],ref:S[2]}),l:(S,x,T)=>g[S.ref]?u("a",{key:T.key,href:r(g[S.ref].target,"a","href"),title:g[S.ref].title},x(S.children,T)):u("span",{key:T.key},S.fallbackChildren)},25:{t:["|"],o:fi(RR),i:1,u:iQ,l(S,x,T){const O=S;return u("table",{key:T.key},u("thead",null,u("tr",null,O.header.map(function(C,D){return u("th",{key:D,style:OR(O,D)},x(C,T))}))),u("tbody",null,O.cells.map(function(C,D){return u("tr",{key:D},C.map(function(I,M){return u("td",{key:M,style:OR(O,M)},x(I,T))}))})))}},27:{o:Ts(function(S,x){let T;return pf(S,":")&&(T=HX.exec(S)),T||KX.exec(S)}),i:4,u(S){const x=S[0];return{text:x.indexOf("&")===-1?x:x.replace(xX,(T,O)=>t.namedCodesToUnicode[O]||T)}},l:S=>S.text},28:{t:["**","__"],o:Xi(VX),i:2,u:(S,x,T)=>({children:x(S[2],T)}),l:(S,x,T)=>u("strong",{key:T.key},x(S.children,T))},29:{t:S=>{const x=S[0];return(x==="*"||x==="_")&&S[1]!==x},o:Xi(UX),i:3,u:(S,x,T)=>({children:x(S[2],T)}),l:(S,x,T)=>u("em",{key:T.key},x(S.children,T))},30:{t:["\\"],o:Xi(FX),i:1,u:S=>({text:S[1],type:"27"})},31:{t:["=="],o:Xi(BX),i:3,u:dy,l:(S,x,T)=>u("mark",{key:T.key},x(S.children,T))},32:{t:["~~"],o:Xi($X),i:3,u:dy,l:(S,x,T)=>u("del",{key:T.key},x(S.children,T))}};t.disableParsingRawHTML===!0&&(delete v[11],delete v[13]);const _=(function(S){var x=Object.keys(S);function T(O,C){var D=[];if(C.prevCapture=C.prevCapture||"",O.trim())for(;O;)for(var I=0;I<x.length;){var M=x[I],H=S[M];if(!H.t||nQ(O,C,H.t)){var K=H.o(O,C);if(K&&K[0]){O=O.substring(K[0].length);var Z=H.u(K,T,C);C.prevCapture+=K[0],Z.type||(Z.type=M),D.push(Z);break}I++}else I++}return C.prevCapture="",D}return x.sort(function(O,C){return S[O].i-S[C].i||(O<C?-1:1)}),function(O,C){return T((function(D){return D.replace(gX,`
312
- `).replace(bX,"").replace(LX," ")})(O),C)}})(v),A=(w=(function(S,x){return function(T,O,C){const D=S[T.type].l;return x?x(()=>D(T,O,C),T,O,C):D(T,O,C)}})(v,t.renderRule),function S(x,T={}){if(Array.isArray(x)){const O=T.key,C=[];let D=!1;for(let I=0;I<x.length;I++){T.key=I;const M=S(x[I],T),H=typeof M=="string";H&&D?C[C.length-1]+=M:M!==null&&C.push(M),D=H}return T.key=O,C}return w(x,S,T)});var w;const R=d(e);return m.length?u("div",null,R,u("footer",{key:"footer"},m.map(function(S){return u("div",{id:n(S.identifier,ic),key:S.identifier},S.identifier,A(_(S.footnote,{inline:!0})))}))):R}const dQ=e=>{let{children:t="",options:n}=e,r=(function(o,s){if(o==null)return{};var l,u,d={},h=Object.keys(o);for(u=0;u<h.length;u++)s.indexOf(l=h[u])>=0||(d[l]=o[l]);return d})(e,iX);return E.cloneElement(uQ(t,n),r)},fQ=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function hQ(e,t,n){const r=[];for(const o of e){if(n==="v3"){const u=o.children.flatMap((d,h)=>{if(d.type!=="element")return d;const m=d.children[0];if(m.type!=="text")return d;const g=h===o.children.length-1;if(!DR(m.value,g))return d;const _=m.value.split(/(\s+\/\/)/);if(_.length<=1)return d;let A=[_[0]];for(let w=1;w<_.length;w+=2)A.push(_[w]+(_[w+1]||""));return A=A.filter(Boolean),A.length<=1?d:A.map(w=>({...d,children:[{type:"text",value:w}]}))});u.length!==o.children.length&&(o.children=u)}const s=o.children;let l=s.length-1;n==="v1"?l=0:t&&(l=s.length-2);for(let u=Math.max(l,0);u<s.length;u++){const d=s[u];if(d.type!=="element")continue;const h=d.children.at(0);if(h?.type!=="text")continue;const m=u===s.length-1,g=DR(h.value,m);if(g)if(t&&!m&&u!==0){const v=kR(s[u-1],"{")&&kR(s[u+1],"}");r.push({info:g,line:o,token:d,isLineCommentOnly:s.length===3&&d.children.length===1,isJsxStyle:v})}else r.push({info:g,line:o,token:d,isLineCommentOnly:s.length===1&&d.children.length===1,isJsxStyle:!1})}}return r}function kR(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function DR(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const o=e.length-n.length-r;for(const[s,l]of fQ){if(l&&!t)continue;const u=s.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(o):void 0]}}function mQ(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function mI(e,t,n,r){return r==null&&(r="v3"),{name:e,code(o){const s=o.children.filter(h=>h.type==="element"),l=[];o.data??={};const u=o.data;u._shiki_notation??=hQ(s,["jsx","tsx"].includes(this.options.lang),r);const d=u._shiki_notation;for(const h of d){if(h.info[1].length===0)continue;let m=s.indexOf(h.line);h.isLineCommentOnly&&r!=="v1"&&m++;let g=!1;if(h.info[1]=h.info[1].replace(t,(..._)=>n.call(this,_,h.line,h.token,s,m)?(g=!0,""):_[0]),!g)continue;r==="v1"&&(h.info[1]=mQ(h.info[1]));const v=h.info[1].trim().length===0;if(v&&(h.info[1]=""),v&&h.isLineCommentOnly)l.push(h.line);else if(v&&h.isJsxStyle)h.line.children.splice(h.line.children.indexOf(h.token)-1,3);else if(v)h.line.children.splice(h.line.children.indexOf(h.token),1);else{const _=h.token.children[0];_.type==="text"&&(_.value=h.info.join(""))}}for(const h of l){const m=o.children.indexOf(h),g=o.children[m+1];let v=1;g?.type==="text"&&g?.value===`
313
- `&&(v=2),o.children.splice(m,v)}}}}function pQ(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const o=r.split("-").map(s=>Number.parseInt(s,10));return o.length===1?[o[0]]:Array.from({length:o[1]-o[0]+1},(s,l)=>l+o[0])}):null}const IR=Symbol("highlighted-lines");function gQ(e={}){const{className:t="highlighted"}=e;return{name:"@shikijs/transformers:meta-highlight",line(n,r){if(!this.options.meta?.__raw)return;const o=this.meta;return o[IR]??=pQ(this.options.meta.__raw),(o[IR]??[]).includes(r)&&this.addClassToHast(n,t),n}}}function yQ(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(n=>n[1].replace(/\\(.)/g,"$1")):[]}function vQ(e={}){const{className:t="highlighted-word"}=e;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(n,r){if(!this.options.meta?.__raw)return;const o=yQ(this.options.meta.__raw);r.decorations||=[];for(const s of o){const l=bQ(n,s);for(const u of l)r.decorations.push({start:u,end:u+s.length,properties:{class:t}})}}}}function bQ(e,t){const n=[];let r=0;for(;;){const o=e.indexOf(t,r);if(o===-1||o>=e.length||o<r)break;n.push(o),r=o+t.length}return n}function _Q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U0(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0}=e;return mI(t,new RegExp(`\\s*\\[!code (${Object.keys(n).map(_Q).join("|")})(:\\d+)?\\]`),function([o,s,l=":1"],u,d,h,m){const g=Number.parseInt(l.slice(1),10);for(let v=m;v<Math.min(m+g,h.length);v++)this.addClassToHast(h[v],n[s]);return r&&this.addClassToHast(this.pre,r),!0},e.matchAlgorithm)}function EQ(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff"}=e;return U0({classMap:{"++":t,"--":n},classActivePre:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function xQ(e={}){const{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:n="has-highlighted"}=e;return U0({classMap:t,classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function SQ(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted"}=e;return U0({classMap:{highlight:t,hl:t},classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function AQ(e,t,n,r){const o=pI(e);let s=o.indexOf(n);for(;s!==-1;)wQ.call(this,e.children,t,s,n.length,r),s=o.indexOf(n,s+1)}function pI(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(pI).join(""):""}function wQ(e,t,n,r,o){let s=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(TQ([s,s+d.value.length-1],[n,n+r])){const h=Math.max(0,n-s),m=r-Math.max(0,s-n);if(m===0)continue;const g=RQ(u,d,h,m);this.addClassToHast(g[1],o);const v=g.filter(Boolean);e.splice(l,1,...v),l+=v.length-1}s+=d.value.length}}}function TQ(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function RQ(e,t,n,r){const o=t.value,s=l=>CQ(e,{children:[{type:"text",value:l}]});return[n>0?s(o.slice(0,n)):void 0,s(o.slice(n,n+r)),n+r<o.length?s(o.slice(n+r)):void 0]}function CQ(e,t){return{...e,properties:{...e.properties},...t}}function NQ(e={}){const{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return mI("@shikijs/transformers:notation-highlight-word",/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,function([r,o,s],l,u,d,h){const m=s?Number.parseInt(s.slice(1),10):d.length;o=o.replace(/\\(.)/g,"$1");for(let g=h;g<Math.min(h+m,d.length);g++)AQ.call(this,d[g],u,o,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}const OQ="modulepreload",kQ=function(e){return"/"+e},LR={},L=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let h=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};var l=h;document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");o=h(n.map(m=>{if(m=kQ(m),m in LR)return;LR[m]=!0;const g=m.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${v}`))return;const _=document.createElement("link");if(_.rel=g?"stylesheet":OQ,g||(_.as="script"),_.crossOrigin="",_.href=m,d&&_.setAttribute("nonce",d),document.head.appendChild(_),g)return new Promise((A,w)=>{_.addEventListener("load",A),_.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${m}`)))})}))}function s(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&s(d.reason);return t().catch(s)})};let $t=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function DQ(e){return B0(e)}function B0(e){return Array.isArray(e)?IQ(e):e instanceof RegExp?e:typeof e=="object"?LQ(e):e}function IQ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=B0(e[n]);return t}function LQ(e){let t={};for(let n in e)t[n]=B0(e[n]);return t}function gI(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function yI(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?yI(e.substring(0,e.length-1)):e.substr(~t+1)}var py=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gd=class{static hasCaptures(e){return e===null?!1:(py.lastIndex=0,py.test(e))}static replaceCaptures(e,t,n){return e.replace(py,(r,o,s,l)=>{let u=n[parseInt(o||s,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 vI(e,t){return e<t?-1:e>t?1:0}function bI(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 o=0;o<n;o++){let s=vI(e[o],t[o]);if(s!==0)return s}return 0}return n-r}function jR(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 _I(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var EI=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ff=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(MQ(e),t)}static createFromParsedTheme(e,t){return VQ(e,t)}_cachedMatchRoot=new EI(e=>this._root.match(e));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(o=>jQ(e.parent,o.parentScopes));return r?new xI(r.fontStyle,r.foreground,r.background):null}},gy=class yf{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new yf(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new yf(n,t[r]);return n}push(t){return new yf(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 jQ(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!PQ(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function PQ(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var xI=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function MQ(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let o=0,s=t.length;o<s;o++){let l=t[o];if(!l.settings)continue;let u;if(typeof l.scope=="string"){let g=l.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),u=g.split(",")}else Array.isArray(l.scope)?u=l.scope:u=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let g=l.settings.fontStyle.split(" ");for(let v=0,_=g.length;v<_;v++)switch(g[v]){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 h=null;typeof l.settings.foreground=="string"&&jR(l.settings.foreground)&&(h=l.settings.foreground);let m=null;typeof l.settings.background=="string"&&jR(l.settings.background)&&(m=l.settings.background);for(let g=0,v=u.length;g<v;g++){let A=u[g].trim().split(" "),w=A[A.length-1],R=null;A.length>1&&(R=A.slice(0,A.length-1),R.reverse()),n[r++]=new zQ(w,R,o,d,h,m)}}return n}var zQ=class{constructor(e,t,n,r,o,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=s}},gn=(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))(gn||{});function VQ(e,t){e.sort((d,h)=>{let m=vI(d.scope,h.scope);return m!==0||(m=bI(d.parentScopes,h.parentScopes),m!==0)?m:d.index-h.index});let n=0,r="#000000",o="#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&&(o=d.background)}let s=new UQ(t),l=new xI(n,s.getId(r),s.getId(o)),u=new $Q(new Iv(0,null,-1,0,0),[]);for(let d=0,h=e.length;d<h;d++){let m=e[d];u.insert(0,m.scope,m.parentScopes,m.fontStyle,s.getId(m.foreground),s.getId(m.background))}return new Ff(s,l,u)}var UQ=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){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)}},BQ=Object.freeze([]),Iv=class SI{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,o,s){this.scopeDepth=t,this.parentScopes=n||BQ,this.fontStyle=r,this.foreground=o,this.background=s}clone(){return new SI(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,o=t.length;r<o;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},$Q=class Lv{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,o=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[o]===">"&&o++,!(r>=t.parentScopes.length||o>=n.parentScopes.length);){const s=n.parentScopes[o].length-t.parentScopes[r].length;if(s!==0)return s;r++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),o,s;if(r===-1?(o=t,s=""):(o=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Lv._cmpBySpecificity),n}insert(t,n,r,o,s,l){if(n===""){this._doInsertHere(t,r,o,s,l);return}let u=n.indexOf("."),d,h;u===-1?(d=n,h=""):(d=n.substring(0,u),h=n.substring(u+1));let m;this._children.hasOwnProperty(d)?m=this._children[d]:(m=new Lv(this._mainRule.clone(),Iv.cloneArr(this._rulesWithParentScopes)),this._children[d]=m),m.insert(t+1,h,r,o,s,l)}_doInsertHere(t,n,r,o,s){if(n===null){this._mainRule.acceptOverwrite(t,r,o,s);return}for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let d=this._rulesWithParentScopes[l];if(bI(d.parentScopes,n)===0){d.acceptOverwrite(t,r,o,s);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Iv(t,n,r,o,s))}},Rs=class nr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=nr.getLanguageId(t),r=nr.getTokenType(t),o=nr.getFontStyle(t),s=nr.getForeground(t),l=nr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:s,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,o,s,l,u){let d=nr.getLanguageId(t),h=nr.getTokenType(t),m=nr.containsBalancedBrackets(t)?1:0,g=nr.getFontStyle(t),v=nr.getForeground(t),_=nr.getBackground(t);return n!==0&&(d=n),r!==8&&(h=r),o!==null&&(m=o?1:0),s!==-1&&(g=s),l!==0&&(v=l),u!==0&&(_=u),(d<<0|h<<8|m<<10|g<<11|v<<15|_<<24)>>>0}};function Gf(e,t){const n=[],r=HQ(e);let o=r.next();for(;o!==null;){let d=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let h=l();if(n.push({matcher:h,priority:d}),o!==",")break;o=r.next()}return n;function s(){if(o==="-"){o=r.next();const d=s();return h=>!!d&&!d(h)}if(o==="("){o=r.next();const d=u();return o===")"&&(o=r.next()),d}if(PR(o)){const d=[];do d.push(o),o=r.next();while(PR(o));return h=>t(d,h)}return null}function l(){const d=[];let h=s();for(;h;)d.push(h),h=s();return m=>d.every(g=>g(m))}function u(){const d=[];let h=l();for(;h&&(d.push(h),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");h=l()}return m=>d.some(g=>g(m))}}function PR(e){return!!e&&!!e.match(/[\w\.:]+/)}function HQ(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 AI(e){typeof e.dispose=="function"&&e.dispose()}var jc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},FQ=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},GQ=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},KQ=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new jc(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new GQ;for(const n of e)qQ(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof jc){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 qQ(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof jc?vf({baseGrammar:s,selfGrammar:o},r):jv(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},r);const l=n.injections(e.scopeName);if(l)for(const u of l)r.add(new jc(u))}function jv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Kf([r],t,n)}}function vf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Kf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Kf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Kf(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const o=r.repository?gI({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Kf(r.patterns,{...t,repository:o},n);const s=r.include;if(!s)continue;const l=wI(s);switch(l.kind){case 0:vf({...t,selfGrammar:t.baseGrammar},n);break;case 1:vf(t,n);break;case 2:jv(l.ruleName,{...t,repository:o},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:o};l.kind===4?jv(l.ruleName,d,n):vf(d,n)}else l.kind===4?n.add(new FQ(l.scopeName,l.ruleName)):n.add(new jc(l.scopeName));break}}}var ZQ=class{kind=0},YQ=class{kind=1},WQ=class{constructor(e){this.ruleName=e}kind=2},XQ=class{constructor(e){this.scopeName=e}kind=3},QQ=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function wI(e){if(e==="$base")return new ZQ;if(e==="$self")return new YQ;const t=e.indexOf("#");if(t===-1)return new XQ(e);if(t===0)return new WQ(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new QQ(n,r)}}var JQ=/\\(\d+)/,MR=/\\(\d+)/g,eJ=-1,TI=-2;var lu=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gd.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${yI(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:Gd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gd.replaceCaptures(this._contentName,e,t)}},tJ=class extends lu{retokenizeCapturedWithRuleId;constructor(e,t,n,r,o){super(e,t,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},nJ=class extends lu{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,null),this._match=new Pc(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Mc,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zR=class extends lu{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Mc,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pv=class extends lu{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o,s,l,u,d,h){super(e,t,n,r),this._begin=new Pc(o,this.id),this.beginCaptures=s,this._end=new Pc(l||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=u,this.applyEndPatternLast=d||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.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(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Mc;for(const n of this.patterns)e.getRule(n).collectPatterns(e,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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},qf=class extends lu{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,o,s,l,u,d){super(e,t,n,r),this._begin=new Pc(o,this.id),this.beginCaptures=s,this.whileCaptures=u,this._while=new Pc(l,TI),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.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(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Mc;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Mc,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},RI=class mn{static createCaptureRule(t,n,r,o,s){return t.registerRule(l=>new tJ(n,l,r,o,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new nJ(t.$vscodeTextmateLocation,t.id,t.name,t.match,mn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=gI({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new zR(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,mn._compilePatterns(s,n,r))}return t.while?new qf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,mn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,mn._compileCaptures(t.whileCaptures||t.captures,n,r),mn._compilePatterns(t.patterns,n,r)):new Pv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,mn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,mn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,mn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let s=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);u>s&&(s=u)}for(let l=0;l<=s;l++)o[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);let d=0;t[l].patterns&&(d=mn.getCompiledRuleId(t[l],n,r)),o[u]=mn.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let s=0,l=t.length;s<l;s++){const u=t[s];let d=-1;if(u.include){const h=wI(u.include);switch(h.kind){case 0:case 1:d=mn.getCompiledRuleId(r[u.include],n,r);break;case 2:let m=r[h.ruleName];m&&(d=mn.getCompiledRuleId(m,n,r));break;case 3:case 4:const g=h.scopeName,v=h.kind===4?h.ruleName:null,_=n.getExternalGrammar(g,r);if(_)if(v){let A=_.repository[v];A&&(d=mn.getCompiledRuleId(A,n,_.repository))}else d=mn.getCompiledRuleId(_.repository.$self,n,_.repository);break}}else d=mn.getCompiledRuleId(u,n,r);if(d!==-1){const h=n.getRule(d);let m=!1;if((h instanceof zR||h instanceof Pv||h instanceof qf)&&h.hasMissingPatterns&&h.patterns.length===0&&(m=!0),m)continue;o.push(d)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Pc=class CI{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let o=0,s=[],l=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const h=t.charAt(u+1);h==="z"?(s.push(t.substring(o,u)),s.push("$(?!\\n)(?<!\\n)"),o=u+2):(h==="A"||h==="G")&&(l=!0),u++}this.hasAnchor=l,o===0?this.source=t:(s.push(t.substring(o,r)),this.source=s.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=JQ.test(this.source):this.hasBackReferences=!1}clone(){return new CI(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(o=>t.substring(o.start,o.end));return MR.lastIndex=0,this.source.replace(MR,(o,s)=>_I(r[parseInt(s,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=[],o=[],s,l,u,d;for(s=0,l=this.source.length;s<l;s++)u=this.source.charAt(s),t[s]=u,n[s]=u,r[s]=u,o[s]=u,u==="\\"&&s+1<l&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="￿",n[s+1]="￿",r[s+1]="A",o[s+1]="A"):d==="G"?(t[s+1]="￿",n[s+1]="G",r[s+1]="￿",o[s+1]="G"):(t[s+1]=d,n[s+1]=d,r[s+1]=d,o[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:o.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}},Mc=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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 VR(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(o=>o.resolveAnchors(t,n));return new VR(e,r,this._items.map(o=>o.ruleId))}},VR=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;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(`
314
- `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},yy=class{constructor(e,t){this.languageId=e,this.tokenType=t}},rJ=class Mv{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new yy(t,8),this._embeddedLanguagesMatcher=new iJ(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Mv._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new yy(0,0);_getBasicScopeAttributes=new EI(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new yy(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Mv.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!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},iJ=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>_I(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])}},UR=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function NI(e,t,n,r,o,s,l,u){const d=t.content.length;let h=!1,m=-1;if(l){const _=oJ(e,t,n,r,o,s);o=_.stack,r=_.linePos,n=_.isFirstLine,m=_.anchorPosition}const g=Date.now();for(;!h;){if(u!==0&&Date.now()-g>u)return new UR(o,!0);v()}return new UR(o,!1);function v(){const _=aJ(e,t,n,r,o,m);if(!_){s.produce(o,d),h=!0;return}const A=_.captureIndices,w=_.matchedRuleId,R=A&&A.length>0?A[0].end>r:!1;if(w===eJ){const S=o.getRule(e);s.produce(o,A[0].start),o=o.withContentNameScopesList(o.nameScopesList),lc(e,t,n,o,s,S.endCaptures,A),s.produce(o,A[0].end);const x=o;if(o=o.parent,m=x.getAnchorPos(),!R&&x.getEnterPos()===r){o=x,s.produce(o,d),h=!0;return}}else{const S=e.getRule(w);s.produce(o,A[0].start);const x=o,T=S.getName(t.content,A),O=o.contentNameScopesList.pushAttributed(T,e);if(o=o.push(w,r,m,A[0].end===d,null,O,O),S instanceof Pv){const C=S;lc(e,t,n,o,s,C.beginCaptures,A),s.produce(o,A[0].end),m=A[0].end;const D=C.getContentName(t.content,A),I=O.pushAttributed(D,e);if(o=o.withContentNameScopesList(I),C.endHasBackReferences&&(o=o.withEndRule(C.getEndWithResolvedBackReferences(t.content,A))),!R&&x.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),h=!0;return}}else if(S instanceof qf){const C=S;lc(e,t,n,o,s,C.beginCaptures,A),s.produce(o,A[0].end),m=A[0].end;const D=C.getContentName(t.content,A),I=O.pushAttributed(D,e);if(o=o.withContentNameScopesList(I),C.whileHasBackReferences&&(o=o.withEndRule(C.getWhileWithResolvedBackReferences(t.content,A))),!R&&x.hasSameRuleAs(o)){o=o.pop(),s.produce(o,d),h=!0;return}}else if(lc(e,t,n,o,s,S.captures,A),s.produce(o,A[0].end),o=o.pop(),!R){o=o.safePop(),s.produce(o,d),h=!0;return}}A[0].end>r&&(r=A[0].end,n=!1)}}function oJ(e,t,n,r,o,s){let l=o.beginRuleCapturedEOL?0:-1;const u=[];for(let d=o;d;d=d.pop()){const h=d.getRule(e);h instanceof qf&&u.push({rule:h,stack:d})}for(let d=u.pop();d;d=u.pop()){const{ruleScanner:h,findOptions:m}=cJ(d.rule,e,d.stack.endRule,n,r===l),g=h.findNextMatchSync(t,r,m);if(g){if(g.ruleId!==TI){o=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(s.produce(d.stack,g.captureIndices[0].start),lc(e,t,n,d.stack,s,d.rule.whileCaptures,g.captureIndices),s.produce(d.stack,g.captureIndices[0].end),l=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{o=d.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:l,isFirstLine:n}}function aJ(e,t,n,r,o,s){const l=sJ(e,t,n,r,o,s),u=e.getInjections();if(u.length===0)return l;const d=lJ(u,e,t,n,r,o,s);if(!d)return l;if(!l)return d;const h=l.captureIndices[0].start,m=d.captureIndices[0].start;return m<h||d.priorityMatch&&m===h?d:l}function sJ(e,t,n,r,o,s){const l=o.getRule(e),{ruleScanner:u,findOptions:d}=OI(l,e,o.endRule,n,r===s),h=u.findNextMatchSync(t,r,d);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function lJ(e,t,n,r,o,s,l){let u=Number.MAX_VALUE,d=null,h,m=0;const g=s.contentNameScopesList.getScopeNames();for(let v=0,_=e.length;v<_;v++){const A=e[v];if(!A.matcher(g))continue;const w=t.getRule(A.ruleId),{ruleScanner:R,findOptions:S}=OI(w,t,null,r,o===l),x=R.findNextMatchSync(n,o,S);if(!x)continue;const T=x.captureIndices[0].start;if(!(T>=u)&&(u=T,d=x.captureIndices,h=x.ruleId,m=A.priority,u===o))break}return d?{priorityMatch:m===-1,captureIndices:d,matchedRuleId:h}:null}function OI(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function cJ(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function lc(e,t,n,r,o,s,l){if(s.length===0)return;const u=t.content,d=Math.min(s.length,l.length),h=[],m=l[0].end;for(let g=0;g<d;g++){const v=s[g];if(v===null)continue;const _=l[g];if(_.length===0)continue;if(_.start>m)break;for(;h.length>0&&h[h.length-1].endPos<=_.start;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?o.produceFromScopes(h[h.length-1].scopes,_.start):o.produce(r,_.start),v.retokenizeCapturedWithRuleId){const w=v.getName(u,l),R=r.contentNameScopesList.pushAttributed(w,e),S=v.getContentName(u,l),x=R.pushAttributed(S,e),T=r.push(v.retokenizeCapturedWithRuleId,_.start,-1,!1,null,R,x),O=e.createOnigString(u.substring(0,_.end));NI(e,O,n&&_.start===0,_.start,T,o,!1,0),AI(O);continue}const A=v.getName(u,l);if(A!==null){const R=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(A,e);h.push(new uJ(R,_.end))}}for(;h.length>0;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var uJ=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function dJ(e,t,n,r,o,s,l,u){return new hJ(e,t,n,r,o,s,l,u)}function BR(e,t,n,r,o){const s=Gf(t,Zf),l=RI.getCompiledRuleId(n,r,o.repository);for(const u of s)e.push({debugSelector:t,matcher:u.matcher,ruleId:l,grammar:o,priority:u.priority})}function Zf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let o=n;o<t.length;o++)if(fJ(t[o],r))return n=o+1,!0;return!1})}function fJ(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 hJ=class{constructor(e,t,n,r,o,s,l,u){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=u,this._basicScopeAttributesProvider=new rJ(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=$R(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const d of Object.keys(o)){const h=Gf(d,Zf);for(const m of h)this._tokenTypeMatchers.push({matcher:m.matcher,type:o[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;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:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const o=r.injections;if(o)for(let l in o)BR(t,l,o[l],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(l=>{const u=this.getExternalGrammar(l);if(u){const d=u.injectionSelector;d&&BR(t,d,u,this,u)}})}return t.sort((o,s)=>o.priority-s.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]=$R(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=RI.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===zv.NULL){o=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),g=Rs.set(0,h.languageId,h.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),v=this.getRule(this._rootId).getName(null,null);let _;v?_=xc.createRootAndLookUpScopeName(v,g,this):_=xc.createRoot("unknown",g),t=new zv(null,this._rootId,-1,-1,!1,null,_,_)}else o=!1,t.reset();e=e+`
315
- `;const s=this.createOnigString(e),l=s.content.length,u=new pJ(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=NI(this,s,o,0,t,u,!0,r);return AI(s),{lineLength:l,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function $R(e,t){return e=DQ(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 xc=class Nr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,o=t?.scopePath??null;for(const s of n)o=gy.push(o,s.scopeNames),r=new Nr(r,o,s.encodedTokenAttributes);return r}static createRoot(t,n){return new Nr(null,new gy(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),s=new gy(null,t),l=r.themeProvider.themeMatch(s),u=Nr.mergeAttributes(n,o,l);return new Nr(null,s,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Nr.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 o=-1,s=0,l=0;return r!==null&&(o=r.fontStyle,s=r.foregroundId,l=r.backgroundId),Rs.set(t,n.languageId,n.tokenType,null,o,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Nr._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const s of r)o=Nr._pushAttributed(o,s,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),s=t.scopePath.push(n),l=r.themeProvider.themeMatch(s),u=Nr.mergeAttributes(t.tokenAttributes,o,l);return new Nr(t,s,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},zv=class Fo{constructor(t,n,r,o,s,l,u,d){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=l,this.nameScopesList=u,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new Fo(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Fo._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?xc.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(){Fo._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,s,l,u){return new Fo(this,t,n,r,o,s,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){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.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 Fo(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(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=xc.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Fo(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,xc.fromExtension(r,n.contentNameScopesList))}},mJ=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Gf(n,Zf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Gf(n,Zf).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}},pJ=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(s)&&(r=Rs.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(r=Rs.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=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,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n}},gJ=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;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,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,dJ(e,s,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},yJ=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new gJ(Ff.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Ff.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 mJ(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,o,s){const l=new KQ(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(u=>this._loadSingleGrammar(u.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,o,s)}_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,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,o)}_grammarForScopeName(t,n=0,r=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,o,s)}},Vv=zv.NULL;const vJ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class cu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}cu.prototype.normal={};cu.prototype.property={};cu.prototype.space=void 0;function kI(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new cu(n,r,t)}function Uv(e){return e.toLowerCase()}class kn{constructor(t,n){this.attribute=n,this.property=t}}kn.prototype.attribute="";kn.prototype.booleanish=!1;kn.prototype.boolean=!1;kn.prototype.commaOrSpaceSeparated=!1;kn.prototype.commaSeparated=!1;kn.prototype.defined=!1;kn.prototype.mustUseProperty=!1;kn.prototype.number=!1;kn.prototype.overloadedBoolean=!1;kn.prototype.property="";kn.prototype.spaceSeparated=!1;kn.prototype.space=void 0;let bJ=0;const He=ua(),Ut=ua(),Bv=ua(),ge=ua(),yt=ua(),ys=ua(),Vn=ua();function ua(){return 2**++bJ}const $v=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:Ut,commaOrSpaceSeparated:Vn,commaSeparated:ys,number:ge,overloadedBoolean:Bv,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),vy=Object.keys($v);class $0 extends kn{constructor(t,n,r,o){let s=-1;if(super(t,n),HR(this,"space",o),typeof r=="number")for(;++s<vy.length;){const l=vy[s];HR(this,vy[s],(r&$v[l])===$v[l])}}}$0.prototype.defined=!0;function HR(e,t,n){n&&(e[t]=n)}function Hs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new $0(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Uv(r)]=r,n[Uv(s.attribute)]=r}return new cu(t,n,e.space)}const DI=Hs({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:yt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ge,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:yt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Ut,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function II(e,t){return t in e?e[t]:t}function LI(e,t){return II(e,t.toLowerCase())}const _J=Hs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ys,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:yt,autoFocus:He,autoPlay:He,blocking:yt,capture:null,charSet:null,checked:He,cite:null,className:yt,cols:ge,colSpan:null,content:null,contentEditable:Ut,controls:He,controlsList:yt,coords:ge|ys,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:Bv,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:yt,height:ge,hidden:Bv,high:ge,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:yt,itemRef:yt,itemScope:He,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,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:He,optimum:ge,pattern:null,ping:yt,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:yt,required:He,reversed:He,rows:ge,rowSpan:ge,sandbox:yt,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:Ut,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:LI}),EJ=Hs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",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:Vn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:yt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:ys,g2:ys,glyphName:ys,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vn,rev:Vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vn,requiredFeatures:Vn,requiredFonts:Vn,requiredFormats:Vn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:II}),jI=Hs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),PI=Hs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:LI}),MI=Hs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),xJ=/[A-Z]/g,FR=/-[a-z]/g,SJ=/^data[-\w.:]+$/i;function AJ(e,t){const n=Uv(t);let r=t,o=kn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&SJ.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(FR,TJ);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!FR.test(s)){let l=s.replace(xJ,wJ);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=$0}return new o(r,t)}function wJ(e){return"-"+e.toLowerCase()}function TJ(e){return e.charAt(1).toUpperCase()}const RJ=kI([DI,_J,jI,PI,MI],"html"),zI=kI([DI,EJ,jI,PI,MI],"svg"),GR={}.hasOwnProperty;function CJ(e,t){const n=t||{};function r(o,...s){let l=r.invalid;const u=r.handlers;if(o&&GR.call(o,e)){const d=String(o[e]);l=GR.call(u,d)?u[d]:r.unknown}if(l)return l.call(this,o,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const NJ=/["&'<>`]/g,OJ=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,kJ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,DJ=/[|\\{}()[\]^$+*?.]/g,KR=new WeakMap;function IJ(e,t){if(e=e.replace(t.subset?LJ(t.subset):NJ,r),t.subset||t.escapeOnly)return e;return e.replace(OJ,n).replace(kJ,r);function n(o,s,l){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function r(o,s,l){return t.format(o.charCodeAt(0),l.charCodeAt(s+1),t)}}function LJ(e){let t=KR.get(e);return t||(t=jJ(e),KR.set(e,t)),t}function jJ(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(DJ,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const PJ=/[\dA-Fa-f]/;function MJ(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!PJ.test(String.fromCharCode(t))?r:r+";"}const zJ=/\d/;function VJ(e,t,n){const r="&#"+String(e);return n&&t&&!zJ.test(String.fromCharCode(t))?r:r+";"}const UJ=["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"],by={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:"€"},BJ=["cent","copy","divide","gt","lt","not","para","times"],VI={}.hasOwnProperty,Hv={};let Kd;for(Kd in by)VI.call(by,Kd)&&(Hv[by[Kd]]=Kd);const $J=/[^\dA-Za-z]/;function HJ(e,t,n,r){const o=String.fromCharCode(e);if(VI.call(Hv,o)){const s=Hv[o],l="&"+s;return n&&UJ.includes(s)&&!BJ.includes(s)&&(!r||t&&t!==61&&$J.test(String.fromCharCode(t)))?l:l+";"}return""}function FJ(e,t,n){let r=MJ(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=HJ(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const s=VJ(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function vs(e,t){return IJ(e,Object.assign({format:FJ},t))}const GJ=/^>|^->|<!--|-->|--!>|<!-$/g,KJ=[">"],qJ=["<",">"];function ZJ(e,t,n,r){return r.settings.bogusComments?"<?"+vs(e.value,Object.assign({},r.settings.characterReferences,{subset:KJ}))+">":"<!--"+e.value.replace(GJ,o)+"-->";function o(s){return vs(s,Object.assign({},r.settings.characterReferences,{subset:qJ}))}}function YJ(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function qR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function WJ(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function XJ(e){return e.join(" ").trim()}const QJ=/[ \t\n\f\r]/g;function H0(e){return typeof e=="object"?e.type==="text"?ZR(e.value):!1:ZR(e)}function ZR(e){return e.replace(QJ,"")===""}const Yt=BI(1),UI=BI(-1),JJ=[];function BI(e){return t;function t(n,r,o){const s=n?n.children:JJ;let l=(r||0)+e,u=s[l];if(!o)for(;u&&H0(u);)l+=e,u=s[l];return u}}const eee={}.hasOwnProperty;function $I(e){return t;function t(n,r,o){return eee.call(e,n.tagName)&&e[n.tagName](n,r,o)}}const F0=$I({body:nee,caption:_y,colgroup:_y,dd:aee,dt:oee,head:_y,html:tee,li:iee,optgroup:see,option:lee,p:ree,rp:YR,rt:YR,tbody:uee,td:WR,tfoot:dee,th:WR,thead:cee,tr:fee});function _y(e,t,n){const r=Yt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&H0(r.value.charAt(0)))}function tee(e,t,n){const r=Yt(n,t);return!r||r.type!=="comment"}function nee(e,t,n){const r=Yt(n,t);return!r||r.type!=="comment"}function ree(e,t,n){const r=Yt(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 iee(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function oee(e,t,n){const r=Yt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function aee(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function YR(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function see(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function lee(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function cee(e,t,n){const r=Yt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function uee(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function dee(e,t,n){return!Yt(n,t)}function fee(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function WR(e,t,n){const r=Yt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const hee=$I({body:gee,colgroup:yee,head:pee,html:mee,tbody:vee});function mee(e){const t=Yt(e,-1);return!t||t.type!=="comment"}function pee(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 gee(e){const t=Yt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&H0(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function yee(e,t,n){const r=UI(n,t),o=Yt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&F0(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function vee(e,t,n){const r=UI(n,t),o=Yt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&F0(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const qd={name:[[`
316
- \f\r &/=>`.split(""),`
317
- \f\r "&'/=>\``.split("")],[`\0
318
- \f\r "&'/<=>`.split(""),`\0
319
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
320
- \f\r &>`.split(""),`\0
321
- \f\r "&'<=>\``.split("")],[`\0
322
- \f\r "&'<=>\``.split(""),`\0
323
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function bee(e,t,n,r){const o=r.schema,s=o.space==="svg"?!1:r.settings.omitOptionalTags;let l=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let d;o.space==="html"&&e.tagName==="svg"&&(r.schema=zI);const h=_ee(r,e.properties),m=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,m&&(l=!1),(h||!s||!hee(e,t,n))&&(u.push("<",e.tagName,h?" "+h:""),l&&(o.space==="svg"||r.settings.closeSelfClosing)&&(d=h.charAt(h.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(m),!l&&(!s||!F0(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function _ee(e,t){const n=[];let r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=Eee(e,o,t[o]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function Eee(e,t,n){const r=AJ(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=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=vs(r.attribute,Object.assign({},e.settings.characterReferences,{subset:qd.name[o][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?WJ:XJ)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(u=vs(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:qd.unquoted[o][s]}))),u!==n&&(e.settings.quoteSmart&&qR(n,l)>qR(n,e.alternative)&&(l=e.alternative),u=l+vs(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?qd.single:qd.double)[o][s],attribute:!0}))+l),d+(u&&"="+u))}const xee=["<","&"];function HI(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:vs(e.value,Object.assign({},r.settings.characterReferences,{subset:xee}))}function See(e,t,n,r){return r.settings.allowDangerousHtml?e.value:HI(e,t,n,r)}function Aee(e,t,n,r){return r.all(e)}const wee=CJ("type",{invalid:Tee,unknown:Ree,handlers:{comment:ZJ,doctype:YJ,element:bee,raw:See,root:Aee,text:HI}});function Tee(e){throw new Error("Expected node, not `"+e+"`")}function Ree(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Cee={},Nee={},Oee=[];function kee(e,t){const n=t||Cee,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Dee,all:Iee,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||vJ,characterReferences:n.characterReferences||Nee,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?zI:RJ,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Dee(e,t,n){return wee(e,t,n,this)}function Iee(e){const t=[],n=e&&e.children||Oee;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Yf(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[o]=s:o===r&&Object.assign(n,s);return n}function eo(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Lee(e){return Array.isArray(e)?e:[e]}async function FI(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function G0(e){return!e||["plaintext","txt","text","plain"].includes(e)}function GI(e){return e==="ansi"||G0(e)}function K0(e){return e==="none"}function KI(e){return K0(e)}function qI(e,t){if(!t)return e;e.properties||={},e.properties.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 r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function Mh(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const o=[];for(let s=0;s<n.length;s+=2){const l=t?n[s]+(n[s+1]||""):n[s];o.push([l,r]),r+=n[s].length,r+=n[s+1]?.length||0}return o}function jee(e){const t=Mh(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=o,l=0;for(const u of t){if(s<u.length)break;s-=u.length,l++}return{line:l,character:s}}function r(o,s){let l=0;for(let u=0;u<o;u++)l+=t[u].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:r}}function Pee(e,t,n){const r=new Set;for(const s of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(s[1]);for(const s of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(s[1]);for(const s of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(s[1]);if(!n)return Array.from(r);const o=n.getBundledLanguages();return Array.from(r).filter(s=>s&&o[s])}const q0="light-dark()",Mee=["color","background-color"];function zee(e,t){let n=0;const r=[];for(const o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Vee(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,o)=>r-o);return n.length?e.map(r=>r.flatMap(o=>{const s=n.filter(l=>o.offset<l&&l<o.offset+o.content.length).map(l=>l-o.offset).sort((l,u)=>l-u);return s.length?zee(o,s):o})):e}function Uee(e,t,n,r,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(m=>Wf(e.variants[m])),u=new Set(l.flatMap(m=>Object.keys(m))),d={},h=(m,g)=>{const v=g==="color"?"":g==="background-color"?"-bg":`-${g}`;return n+t[m]+(g==="color"?"":v)};return l.forEach((m,g)=>{for(const v of u){const _=m[v]||"inherit";if(g===0&&r&&Mee.includes(v))if(r===q0&&l.length>1){const A=t.findIndex(x=>x==="light"),w=t.findIndex(x=>x==="dark");if(A===-1||w===-1)throw new $t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const R=l[A][v]||"inherit",S=l[w][v]||"inherit";d[v]=`light-dark(${R}, ${S})`,o==="css-vars"&&(d[h(g,v)]=_)}else d[v]=_;else o==="css-vars"&&(d[h(g,v)]=_)}}),s.htmlStyle=d,s}function Wf(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&gn.Italic&&(t["font-style"]="italic"),e.fontStyle&gn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&gn.Underline&&n.push("underline"),e.fontStyle&gn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Fv(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const ZI=new WeakMap;function zh(e,t){ZI.set(e,t)}function zc(e){return ZI.get(e)}class Fs{_stacks={};lang;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 Fs(Object.fromEntries(Lee(n).map(r=>[r,Vv])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,o]=t;this.lang=r,this._stacks={[o]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Bee(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Bee(e){const t=[],n=new Set;function r(o){if(n.has(o))return;n.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&r(o.parent)}return r(e),t}function $ee(e,t){if(!(e instanceof Fs))throw new $t("Invalid grammar state");return e.getInternalStack(t)}function Hee(){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 $t(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...o.indexToPos(l),offset:l}}else{const u=o.lines[l.line];if(u===void 0)throw new $t(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${o.lines.length}`);let d=l.character;if(d<0&&(d=u.length+d),d<0||d>u.length)throw new $t(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${u.length}`);return{...l,character:d,offset:o.posToIndex(l.line,d)}}};const o=jee(n.source),s=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));Fee(s),e.set(n.meta,{decorations:s,converter:o,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return Vee(n,o)},code(n){if(!this.options.decorations?.length)return;const r=t(this),o=Array.from(n.children).filter(m=>m.type==="element"&&m.tagName==="span");if(o.length!==r.converter.lines.length)throw new $t(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(m,g,v,_){const A=o[m];let w="",R=-1,S=-1;if(g===0&&(R=0),v===0&&(S=0),v===Number.POSITIVE_INFINITY&&(S=A.children.length),R===-1||S===-1)for(let T=0;T<A.children.length;T++)w+=YI(A.children[T]),R===-1&&w.length===g&&(R=T+1),S===-1&&w.length===v&&(S=T+1);if(R===-1)throw new $t(`Failed to find start index for decoration ${JSON.stringify(_.start)}`);if(S===-1)throw new $t(`Failed to find end index for decoration ${JSON.stringify(_.end)}`);const x=A.children.slice(R,S);if(!_.alwaysWrap&&x.length===A.children.length)u(A,_,"line");else if(!_.alwaysWrap&&x.length===1&&x[0].type==="element")u(x[0],_,"token");else{const T={type:"element",tagName:"span",properties:{},children:x};u(T,_,"wrapper"),A.children.splice(R,x.length,T)}}function l(m,g){o[m]=u(o[m],g,"line")}function u(m,g,v){const _=g.properties||{},A=g.transform||(w=>w);return m.tagName=g.tagName||"span",m.properties={...m.properties,..._,class:m.properties.class},g.properties?.class&&qI(m,g.properties.class),m=A(m,v)||m,m}const d=[],h=r.decorations.sort((m,g)=>g.start.offset-m.start.offset||m.end.offset-g.end.offset);for(const m of h){const{start:g,end:v}=m;if(g.line===v.line)s(g.line,g.character,v.character,m);else if(g.line<v.line){s(g.line,g.character,Number.POSITIVE_INFINITY,m);for(let _=g.line+1;_<v.line;_++)d.unshift(()=>l(_,m));s(v.line,0,v.character,m)}}d.forEach(m=>m())}}}function Fee(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new $t(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const o=e[r],s=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,l=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,u=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,d=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(s||l||u||d){if(s&&l||u&&d||u&&n.start.offset===n.end.offset||l&&o.start.offset===o.end.offset)continue;throw new $t(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function YI(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(YI).join(""):""}const Gee=[Hee()];function Xf(e){return[...e.transformers||[],...Gee]}var Wo=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ey={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Kee(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 XR(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 qee(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)Ey[r]&&t.push({type:"setDecoration",value:Ey[r]});else if(r<=29){const o=Ey[r-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Wo[r-30]}});else if(r===38){const o=XR(e);o&&t.push({type:"setForegroundColor",value:o})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Wo[r-40]}});else if(r===48){const o=XR(e);o&&t.push({type:"setBackgroundColor",value:o})}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:Wo[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Wo[r-100+8]}})}return t}function Zee(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let s=0;do{const l=Kee(r,s),u=l.sequence?r.substring(s,l.startPosition):r.substring(s);if(u.length>0&&o.push({value:u,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=qee(l.sequence);for(const h of d)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of d)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}s=l.position}while(s<r.length);return o}}}var Yee={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 Wee(e=Yee){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 o(){if(r)return r;r=[];for(let h=0;h<Wo.length;h++)r.push(t(Wo[h]));let u=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let m=0;m<6;m++)for(let g=0;g<6;g++)r.push(n([u[h],u[m],u[g]]));let d=8;for(let h=0;h<24;h++,d+=10)r.push(n([d,d,d]));return r}function s(u){return o()[u]}function l(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return s(u.index)}}return{value:l}}function Xee(e,t,n){const r=Yf(e,n),o=Mh(t),s=Wee(Object.fromEntries(Wo.map(u=>[u,e.colors?.[`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`]]))),l=Zee();return o.map(u=>l.parse(u[0]).map(d=>{let h,m;d.decorations.has("reverse")?(h=d.background?s.value(d.background):e.bg,m=d.foreground?s.value(d.foreground):e.fg):(h=d.foreground?s.value(d.foreground):e.fg,m=d.background?s.value(d.background):void 0),h=eo(h,r),m=eo(m,r),d.decorations.has("dim")&&(h=Qee(h));let g=gn.None;return d.decorations.has("bold")&&(g|=gn.Bold),d.decorations.has("italic")&&(g|=gn.Italic),d.decorations.has("underline")&&(g|=gn.Underline),d.decorations.has("strikethrough")&&(g|=gn.Strikethrough),{content:d.value,offset:u[1],color:h,bgColor:m,fontStyle:g}}))}function Qee(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 Z0(e,t,n={}){const{lang:r="text",theme:o=e.getLoadedThemes()[0]}=n;if(G0(r)||K0(o))return Mh(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:l}=e.setTheme(o);if(r==="ansi")return Xee(s,t,n);const u=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==u.name)throw new $t(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(s.name))throw new $t(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return ete(t,u,s,l,n)}function Jee(...e){if(e.length===2)return zc(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=r;if(G0(o)||K0(s))throw new $t("Plain language does not have grammar state");if(o==="ansi")throw new $t("ANSI language does not have grammar state");const{theme:l,colorMap:u}=t.setTheme(s),d=t.getLanguage(o);return new Fs(Qf(n,d,l,u,r).stateStack,d.name,l.name)}function ete(e,t,n,r,o){const s=Qf(e,t,n,r,o),l=new Fs(Qf(e,t,n,r,o).stateStack,t.name,n.name);return zh(s.tokens,l),s.tokens}function Qf(e,t,n,r,o){const s=Yf(n,o),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:u=500}=o,d=Mh(e);let h=o.grammarState?$ee(o.grammarState,n.name)??Vv:o.grammarContextCode!=null?Qf(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Vv,m=[];const g=[];for(let v=0,_=d.length;v<_;v++){const[A,w]=d[v];if(A===""){m=[],g.push([]);continue}if(l>0&&A.length>=l){m=[],g.push([{content:A,offset:w,color:"",fontStyle:0}]);continue}let R,S,x;o.includeExplanation&&(R=t.tokenizeLine(A,h,u),S=R.tokens,x=0);const T=t.tokenizeLine2(A,h,u),O=T.tokens.length/2;for(let C=0;C<O;C++){const D=T.tokens[2*C],I=C+1<O?T.tokens[2*C+2]:A.length;if(D===I)continue;const M=T.tokens[2*C+1],H=eo(r[Rs.getForeground(M)],s),K=Rs.getFontStyle(M),Z={content:A.substring(D,I),offset:w+D,color:H,fontStyle:K};if(o.includeExplanation){const J=[];if(o.includeExplanation!=="scopeName")for(const Y of n.settings){let re;switch(typeof Y.scope){case"string":re=Y.scope.split(/,/).map(j=>j.trim());break;case"object":re=Y.scope;break;default:continue}J.push({settings:Y,selectors:re.map(j=>j.split(/ /))})}Z.explanation=[];let ae=0;for(;D+ae<I;){const Y=S[x],re=A.substring(Y.startIndex,Y.endIndex);ae+=re.length,Z.explanation.push({content:re,scopes:o.includeExplanation==="scopeName"?tte(Y.scopes):nte(J,Y.scopes)}),x+=1}}m.push(Z)}g.push(m),m=[],h=T.ruleStack}return{tokens:g,stateStack:h}}function tte(e){return e.map(t=>({scopeName:t}))}function nte(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const s=t[r];n[r]={scopeName:s,themeMatches:ite(e,s,t.slice(0,r))}}return n}function QR(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function rte(e,t,n){if(!QR(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)QR(e[r],n[o])&&(r-=1),o-=1;return r===-1}function ite(e,t,n){const r=[];for(const{selectors:o,settings:s}of e)for(const l of o)if(rte(l,t,n)){r.push(s);break}return r}function WI(e,t,n){const r=Object.entries(n.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),o=r.map(d=>{const h=Z0(e,t,{...n,theme:d.theme}),m=zc(h),g=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:h,state:m,theme:g}}),s=ote(...o.map(d=>d.tokens)),l=s[0].map((d,h)=>d.map((m,g)=>{const v={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(v.explanation=m.explanation),s.forEach((_,A)=>{const{content:w,explanation:R,offset:S,...x}=_[h][g];v.variants[r[A].color]=x}),v})),u=o[0].state?new Fs(Object.fromEntries(o.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),o[0].state.lang):void 0;return u&&zh(l,u),l}function ote(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(d=>d[r]),s=t.map(()=>[]);t.forEach((d,h)=>d.push(s[h]));const l=o.map(()=>0),u=o.map(d=>d[0]);for(;u.every(d=>d);){const d=Math.min(...u.map(h=>h.content.length));for(let h=0;h<n;h++){const m=u[h];m.content.length===d?(s[h].push(m),l[h]+=1,u[h]=o[h][l[h]]):(s[h].push({...m,content:m.content.slice(0,d)}),u[h]={...m,content:m.content.slice(d),offset:m.offset+d})}}}return t}function Jf(e,t,n){let r,o,s,l,u,d;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:m="--shiki-",colorsRendering:g="css-vars"}=n,v=Object.entries(n.themes).filter(S=>S[1]).map(S=>({color:S[0],theme:S[1]})).sort((S,x)=>S.color===h?-1:x.color===h?1:0);if(v.length===0)throw new $t("`themes` option must not be empty");const _=WI(e,t,n);if(d=zc(_),h&&q0!==h&&!v.find(S=>S.color===h))throw new $t(`\`themes\` option must contain the defaultColor key \`${h}\``);const A=v.map(S=>e.getTheme(S.theme)),w=v.map(S=>S.color);s=_.map(S=>S.map(x=>Uee(x,w,m,h,g))),d&&zh(s,d);const R=v.map(S=>Yf(S.theme,n));o=JR(v,A,R,m,h,"fg",g),r=JR(v,A,R,m,h,"bg",g),l=`shiki-themes ${A.map(S=>S.name).join(" ")}`,u=h?void 0:[o,r].join(";")}else if("theme"in n){const h=Yf(n.theme,n);s=Z0(e,t,n);const m=e.getTheme(n.theme);r=eo(m.bg,h),o=eo(m.fg,h),l=m.name,d=zc(s)}else throw new $t("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:r,themeName:l,rootStyle:u,grammarState:d}}function JR(e,t,n,r,o,s,l){return e.map((u,d)=>{const h=eo(t[d][s],n[d])||"inherit",m=`${r+u.color}${s==="bg"?"-bg":""}:${h}`;if(d===0&&o){if(o===q0&&e.length>1){const g=e.findIndex(w=>w.color==="light"),v=e.findIndex(w=>w.color==="dark");if(g===-1||v===-1)throw new $t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const _=eo(t[g][s],n[g])||"inherit",A=eo(t[v][s],n[v])||"inherit";return`light-dark(${_}, ${A});${m}`}return h}return l==="css-vars"?m:null}).filter(u=>!!u).join(";")}function eh(e,t,n,r={meta:{},options:n,codeToHast:(o,s)=>eh(e,o,s),codeToTokens:(o,s)=>Jf(e,o,s)}){let o=t;for(const A of Xf(n))o=A.preprocess?.call(r,o,n)||o;let{tokens:s,fg:l,bg:u,themeName:d,rootStyle:h,grammarState:m}=Jf(e,o,n);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:v=!1}=n;g===!0?s=ste(s):g==="never"&&(s=lte(s)),v&&(s=cte(s));const _={...r,get source(){return o}};for(const A of Xf(n))s=A.tokens?.call(_,s)||s;return ate(s,{...n,fg:l,bg:u,themeName:d,rootStyle:h},_,m)}function ate(e,t,n,r=zc(e)){const o=Xf(t),s=[],l={type:"root",children:[]},{structure:u="classic",tabindex:d="0"}=t;let h={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(([A])=>!A.startsWith("_")))},children:[]},m={type:"element",tagName:"code",properties:{},children:s};const g=[],v={...n,structure:u,addClassToHast:qI,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return h},get code(){return m},get lines(){return g}};if(e.forEach((A,w)=>{w&&(u==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&s.push({type:"text",value:`
324
- `}));let R={type:"element",tagName:"span",properties:{class:"line"},children:[]},S=0;for(const x of A){let T={type:"element",tagName:"span",properties:{...x.htmlAttrs},children:[{type:"text",value:x.content}]};const O=Fv(x.htmlStyle||Wf(x));O&&(T.properties.style=O);for(const C of o)T=C?.span?.call(v,T,w+1,S,R,x)||T;u==="inline"?l.children.push(T):u==="classic"&&R.children.push(T),S+=x.content.length}if(u==="classic"){for(const x of o)R=x?.line?.call(v,R,w+1)||R;g.push(R),s.push(R)}}),u==="classic"){for(const A of o)m=A?.code?.call(v,m)||m;h.children.push(m);for(const A of o)h=A?.pre?.call(v,h)||h;l.children.push(h)}let _=l;for(const A of o)_=A?.root?.call(v,_)||_;return r&&zh(_,r),_}function ste(e){return e.map(t=>{const n=[];let r="",o=0;return t.forEach((s,l)=>{const d=!(s.fontStyle&&(s.fontStyle&gn.Underline||s.fontStyle&gn.Strikethrough));d&&s.content.match(/^\s+$/)&&t[l+1]?(o||(o=s.offset),r+=s.content):r?(d?n.push({...s,offset:o,content:r+s.content}):n.push({content:r,offset:o},s),o=0,r=""):n.push(s)}),n})}function lte(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[,o,s,l]=r;if(!o&&!l)return n;const u=[{...n,offset:n.offset+o.length,content:s}];return o&&u.unshift({content:o,offset:n.offset}),l&&u.push({content:l,offset:n.offset+o.length+s.length}),u}))}function cte(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const o=n[n.length-1],s=Fv(o.htmlStyle||Wf(o)),l=Fv(r.htmlStyle||Wf(r)),u=o.fontStyle&&(o.fontStyle&gn.Underline||o.fontStyle&gn.Strikethrough),d=r.fontStyle&&(r.fontStyle&gn.Underline||r.fontStyle&gn.Strikethrough);!u&&!d&&s===l?o.content+=r.content:n.push({...r})}return n})}const ute=kee;function dte(e,t,n){const r={meta:{},options:n,codeToHast:(s,l)=>eh(e,s,l),codeToTokens:(s,l)=>Jf(e,s,l)};let o=ute(eh(e,t,n,r));for(const s of Xf(n))o=s.postprocess?.call(r,o,n)||o;return o}const e1={light:"#333333",dark:"#bbbbbb"},t1={light:"#fffffe",dark:"#1e1e1e"},n1="__shiki_resolved";function Y0(e){if(e?.[n1])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const u=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;u?.settings?.foreground&&(r=u.settings.foreground),u?.settings?.background&&(n=u.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?e1.light:e1.dark),n||(n=t.type==="light"?t1.light:t1.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 o=0;const s=new Map;function l(u){if(s.has(u))return s.get(u);o+=1;const d=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${d}`]?l(u):(s.set(u,d),d)}t.settings=t.settings.map(u=>{const d=u.settings?.foreground&&!u.settings.foreground.startsWith("#"),h=u.settings?.background&&!u.settings.background.startsWith("#");if(!d&&!h)return u;const m={...u,settings:{...u.settings}};if(d){const g=l(u.settings.foreground);t.colorReplacements[g]=u.settings.foreground,m.settings.foreground=g}if(h){const g=l(u.settings.background);t.colorReplacements[g]=u.settings.background,m.settings.background=g}return m});for(const u of Object.keys(t.colors||{}))if((u==="editor.foreground"||u==="editor.background"||u.startsWith("terminal.ansi"))&&!t.colors[u]?.startsWith("#")){const d=l(t.colors[u]);t.colorReplacements[d]=t.colors[u],t.colors[u]=d}return Object.defineProperty(t,n1,{enumerable:!1,writable:!1,value:!0}),t}async function XI(e){return Array.from(new Set((await Promise.all(e.filter(t=>!GI(t)).map(async t=>await FI(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function QI(e){return(await Promise.all(e.map(async n=>KI(n)?null:Y0(await FI(n))))).filter(n=>!!n)}let fte=3;function hte(e,t=3){t>fte||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let fs=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class mte extends yJ{constructor(t,n,r,o={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=o,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Y0(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Ff.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){if(this._alias[t]){const n=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],n.has(t))throw new fs(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),r=n.filter(([o,s])=>!s);if(r.length){const o=n.filter(([s,l])=>l&&l.embeddedLangs?.some(u=>r.map(([d])=>d).includes(u))).filter(s=>!r.includes(s));throw new fs(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${o.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[o,s]of n)this._resolver.addLanguage(s);for(const[o,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const n of t.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class pte{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){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 o=1;o<=n.length;o++){const s=n.slice(0,o).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let oc=0;function gte(e){oc+=1,e.warnings!==!1&&oc>=10&&oc%10===0&&console.warn(`[Shiki] ${oc} 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 fs("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Y0),o=new pte(e.engine,n),s=new mte(o,r,n,e.langAlias);let l;function u(x){R();const T=s.getGrammar(typeof x=="string"?x:x.name);if(!T)throw new fs(`Language \`${x}\` not found, you may need to load it first`);return T}function d(x){if(x==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};R();const T=s.getTheme(x);if(!T)throw new fs(`Theme \`${x}\` not found, you may need to load it first`);return T}function h(x){R();const T=d(x);l!==x&&(s.setTheme(T),l=x);const O=s.getColorMap();return{theme:T,colorMap:O}}function m(){return R(),s.getLoadedThemes()}function g(){return R(),s.getLoadedLanguages()}function v(...x){R(),s.loadLanguages(x.flat(1))}async function _(...x){return v(await XI(x))}function A(...x){R();for(const T of x.flat(1))s.loadTheme(T)}async function w(...x){return R(),A(await QI(x))}function R(){if(t)throw new fs("Shiki instance has been disposed")}function S(){t||(t=!0,s.dispose(),oc-=1)}return{setTheme:h,getTheme:d,getLanguage:u,getLoadedThemes:m,getLoadedLanguages:g,loadLanguage:_,loadLanguageSync:v,loadTheme:w,loadThemeSync:A,dispose:S,[Symbol.dispose]:S}}async function yte(e){e.engine||hte("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([QI(e.themes||[]),XI(e.langs||[]),e.engine]);return gte({...e,themes:t,langs:n,engine:r})}async function vte(e){const t=await yte(e);return{getLastGrammarState:(...n)=>Jee(t,...n),codeToTokensBase:(n,r)=>Z0(t,n,r),codeToTokensWithThemes:(n,r)=>WI(t,n,r),codeToTokens:(n,r)=>Jf(t,n,r),codeToHast:(n,r)=>eh(t,n,r),codeToHtml:(n,r)=>dte(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function bte(e){const t=e.langs,n=e.themes,r=e.engine;async function o(s){function l(g){if(typeof g=="string"){if(GI(g))return[];g=s.langAlias?.[g]||g;const v=t[g];if(!v)throw new $t(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return v}return g}function u(g){if(KI(g))return"none";if(typeof g=="string"){const v=n[g];if(!v)throw new $t(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return v}return g}const d=(s.themes??[]).map(g=>u(g)),h=(s.langs??[]).map(g=>l(g)),m=await vte({engine:s.engine??r(),...s,themes:d,langs:h});return{...m,loadLanguage(...g){return m.loadLanguage(...g.map(l))},loadTheme(...g){return m.loadTheme(...g.map(u))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return o}function _te(e){let t;async function n(r={}){if(t){const o=await t;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}function Ete(e,t){const n=_te(e);async function r(o,s){const l=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),u=await t?.guessEmbeddedLanguages?.(o,s.lang,l);return u&&await l.loadLanguage(...u),l}return{getSingletonHighlighter(o){return n(o)},async codeToHtml(o,s){return(await r(o,s)).codeToHtml(o,s)},async codeToHast(o,s){return(await r(o,s)).codeToHast(o,s)},async codeToTokens(o,s){return(await r(o,s)).codeToTokens(o,s)},async codeToTokensBase(o,s){return(await r(o,s)).codeToTokensBase(o,s)},async codeToTokensWithThemes(o,s){return(await r(o,s)).codeToTokensWithThemes(o,s)},async getLastGrammarState(o,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(o,s)}}}const JI=[{id:"abap",name:"ABAP",import:()=>L(()=>import("./abap-BdImnpbu.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>L(()=>import("./actionscript-3-CfeIJUat.js"),[])},{id:"ada",name:"Ada",import:()=>L(()=>import("./ada-bCR0ucgS.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>L(()=>import("./angular-html-Bbf3ZyxA.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>L(()=>import("./angular-ts-C26w9mnW.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>L(()=>import("./apache-Pmp26Uib.js"),[])},{id:"apex",name:"Apex",import:()=>L(()=>import("./apex-C7Pw0Ztw.js"),[])},{id:"apl",name:"APL",import:()=>L(()=>import("./apl-e980N3t4.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>L(()=>import("./applescript-Co6uUVPk.js"),[])},{id:"ara",name:"Ara",import:()=>L(()=>import("./ara-BRHolxvo.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>L(()=>import("./asciidoc-CdggvHu8.js"),[])},{id:"asm",name:"Assembly",import:()=>L(()=>import("./asm-D_Q5rh1f.js"),[])},{id:"astro",name:"Astro",import:()=>L(()=>import("./astro-CjFzhNUq.js"),__vite__mapDeps([10,9,2,11,3,12,13]))},{id:"awk",name:"AWK",import:()=>L(()=>import("./awk-DMzUqQB5.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>L(()=>import("./ballerina-BFfxhgS-.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>L(()=>import("./bat-BkioyH1T.js"),[])},{id:"beancount",name:"Beancount",import:()=>L(()=>import("./beancount-BoKiGodi.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>L(()=>import("./berry-D08WgyRC.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>L(()=>import("./bibtex-CHM0blh-.js"),[])},{id:"bicep",name:"Bicep",import:()=>L(()=>import("./bicep-6nHXG8SA.js"),[])},{id:"blade",name:"Blade",import:()=>L(()=>import("./blade-B2ZbN0F_.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>L(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18]))},{id:"c",name:"C",import:()=>L(()=>import("./c-BIGW1oBm.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>L(()=>import("./cadence-D2CYqzqI.js"),[])},{id:"cairo",name:"Cairo",import:()=>L(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20]))},{id:"clarity",name:"Clarity",import:()=>L(()=>import("./clarity-CHh-QcGE.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>L(()=>import("./clojure-P80f7IUj.js"),[])},{id:"cmake",name:"CMake",import:()=>L(()=>import("./cmake-D1j8_8rp.js"),[])},{id:"cobol",name:"COBOL",import:()=>L(()=>import("./cobol-CCPHrsME.js"),__vite__mapDeps([21,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>L(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>L(()=>import("./codeql-DsOJ9woJ.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>L(()=>import("./coffee-JUOWOZUj.js"),__vite__mapDeps([22,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>L(()=>import("./common-lisp-Cg-RD9OK.js"),[])},{id:"coq",name:"Coq",import:()=>L(()=>import("./coq-DkFqJrB1.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>L(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16]))},{id:"crystal",name:"Crystal",import:()=>L(()=>import("./crystal-DVs0tusA.js"),__vite__mapDeps([27,1,2,3,16,26,28]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>L(()=>import("./csharp-CHadp7IV.js"),[])},{id:"css",name:"CSS",import:()=>L(()=>import("./css-DPfMkruS.js"),[])},{id:"csv",name:"CSV",import:()=>L(()=>import("./csv-fuZLfV_i.js"),[])},{id:"cue",name:"CUE",import:()=>L(()=>import("./cue-D82EKSYY.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>L(()=>import("./cypher-COkxafJQ.js"),[])},{id:"d",name:"D",import:()=>L(()=>import("./d-85-TOEBH.js"),[])},{id:"dart",name:"Dart",import:()=>L(()=>import("./dart-CF10PKvl.js"),[])},{id:"dax",name:"DAX",import:()=>L(()=>import("./dax-CEL-wOlO.js"),[])},{id:"desktop",name:"Desktop",import:()=>L(()=>import("./desktop-BmXAJ9_W.js"),[])},{id:"diff",name:"Diff",import:()=>L(()=>import("./diff-D97Zzqfu.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>L(()=>import("./docker-BcOcwvcX.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>L(()=>import("./dotenv-Da5cRb03.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>L(()=>import("./dream-maker-BtqSS_iP.js"),[])},{id:"edge",name:"Edge",import:()=>L(()=>import("./edge-CKszZCnI.js"),__vite__mapDeps([29,11,1,2,3,15]))},{id:"elixir",name:"Elixir",import:()=>L(()=>import("./elixir-Cc7HHYVZ.js"),__vite__mapDeps([30,1,2,3]))},{id:"elm",name:"Elm",import:()=>L(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>L(()=>import("./emacs-lisp-C9XAeP06.js"),[])},{id:"erb",name:"ERB",import:()=>L(()=>import("./erb-C7QrGF_t.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>L(()=>import("./erlang-wwlo35G_.js"),__vite__mapDeps([39,40]))},{id:"fennel",name:"Fennel",import:()=>L(()=>import("./fennel-BYunw83y.js"),[])},{id:"fish",name:"Fish",import:()=>L(()=>import("./fish-Bl2oy6fF.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>L(()=>import("./fluent-C4IJs8-o.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>L(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([41,42]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>L(()=>import("./fortran-free-form-D22FLkUw.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>L(()=>import("./fsharp-JpbdA51a.js"),__vite__mapDeps([43,40]))},{id:"gdresource",name:"GDResource",import:()=>L(()=>import("./gdresource-CUnzuGD_.js"),__vite__mapDeps([44,45,46]))},{id:"gdscript",name:"GDScript",import:()=>L(()=>import("./gdscript-CU1B2r8a.js"),[])},{id:"gdshader",name:"GDShader",import:()=>L(()=>import("./gdshader-DkwncUOv.js"),[])},{id:"genie",name:"Genie",import:()=>L(()=>import("./genie-D0YGMca9.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>L(()=>import("./gherkin-DyxjwDmM.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>L(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>L(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28]))},{id:"gleam",name:"Gleam",import:()=>L(()=>import("./gleam-BspZqrRM.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>L(()=>import("./glimmer-js-Dz9X99Cm.js"),__vite__mapDeps([50,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>L(()=>import("./glimmer-ts-aQ3p29eY.js"),__vite__mapDeps([51,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>L(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26]))},{id:"gnuplot",name:"Gnuplot",import:()=>L(()=>import("./gnuplot-DdkO51Og.js"),[])},{id:"go",name:"Go",import:()=>L(()=>import("./go-Dn2_MT6a.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>L(()=>import("./graphql-Caa12_AY.js"),__vite__mapDeps([35,2,11,36,13]))},{id:"groovy",name:"Groovy",import:()=>L(()=>import("./groovy-gcz8RCvz.js"),[])},{id:"hack",name:"Hack",import:()=>L(()=>import("./hack-D_o3P2UH.js"),__vite__mapDeps([52,1,2,3,16]))},{id:"haml",name:"Ruby Haml",import:()=>L(()=>import("./haml-AZXGPtNI.js"),__vite__mapDeps([34,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>L(()=>import("./handlebars-YebKLiTq.js"),__vite__mapDeps([53,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>L(()=>import("./haskell-Df6bDoY_.js"),[])},{id:"haxe",name:"Haxe",import:()=>L(()=>import("./haxe-CzTSHFRz.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>L(()=>import("./hcl-BWvSN4gD.js"),[])},{id:"hjson",name:"Hjson",import:()=>L(()=>import("./hjson-D5-asLiD.js"),[])},{id:"hlsl",name:"HLSL",import:()=>L(()=>import("./hlsl-D3lLCCz7.js"),[])},{id:"html",name:"HTML",import:()=>L(()=>import("./html-B8pBdPMQ.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>L(()=>import("./html-derivative-ZQ8onl8Z.js"),__vite__mapDeps([15,1,2,3]))},{id:"http",name:"HTTP",import:()=>L(()=>import("./http-C38VWM-o.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13]))},{id:"hxml",name:"HXML",import:()=>L(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([55,56]))},{id:"hy",name:"Hy",import:()=>L(()=>import("./hy-DFXneXwc.js"),[])},{id:"imba",name:"Imba",import:()=>L(()=>import("./imba-DGztddWO.js"),[])},{id:"ini",name:"INI",aliases:["properties"],import:()=>L(()=>import("./ini-BEwlwnbL.js"),[])},{id:"java",name:"Java",import:()=>L(()=>import("./java-CylS5w8V.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>L(()=>import("./javascript-BMMyXqK5.js"),[])},{id:"jinja",name:"Jinja",import:()=>L(()=>import("./jinja-BJmZiE_F.js"),__vite__mapDeps([57,1,2,3]))},{id:"jison",name:"Jison",import:()=>L(()=>import("./jison-BCRtk9Os.js"),__vite__mapDeps([58,2]))},{id:"json",name:"JSON",import:()=>L(()=>import("./json-Cp-IABpG.js"),[])},{id:"json5",name:"JSON5",import:()=>L(()=>import("./json5-C9tS-k6U.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>L(()=>import("./jsonc-Des-eS-w.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>L(()=>import("./jsonl-DcaNXYhu.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>L(()=>import("./jsonnet-DFQXde-d.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>L(()=>import("./jssm-C2t-YnRu.js"),[])},{id:"jsx",name:"JSX",import:()=>L(()=>import("./jsx-g9-lgVsj.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>L(()=>import("./julia-353pQ8cl.js"),__vite__mapDeps([59,23,24,25,26,16,20,2,60]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>L(()=>import("./kotlin-BdnUsdx6.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>L(()=>import("./kusto-BvAqAH-y.js"),[])},{id:"latex",name:"LaTeX",import:()=>L(()=>import("./latex-DyVrc4Oz.js"),__vite__mapDeps([61,62,60]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>L(()=>import("./lean-qliWkHmV.js"),[])},{id:"less",name:"Less",import:()=>L(()=>import("./less-B1dDrJ26.js"),[])},{id:"liquid",name:"Liquid",import:()=>L(()=>import("./liquid-DFk8BABL.js"),__vite__mapDeps([63,1,2,3,9]))},{id:"llvm",name:"LLVM IR",import:()=>L(()=>import("./llvm-D32k8WzR.js"),[])},{id:"log",name:"Log file",import:()=>L(()=>import("./log-2UxHyX5q.js"),[])},{id:"logo",name:"Logo",import:()=>L(()=>import("./logo-BtOb2qkB.js"),[])},{id:"lua",name:"Lua",import:()=>L(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,26]))},{id:"luau",name:"Luau",import:()=>L(()=>import("./luau-irsrSlf-.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>L(()=>import("./make-CHLpvVh8.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>L(()=>import("./markdown-B_HjzqPZ.js"),[])},{id:"marko",name:"Marko",import:()=>L(()=>import("./marko-DIP14Aik.js"),__vite__mapDeps([64,3,65,5,11]))},{id:"matlab",name:"MATLAB",import:()=>L(()=>import("./matlab-D7o27uSR.js"),[])},{id:"mdc",name:"MDC",import:()=>L(()=>import("./mdc-Cpja7t1H.js"),__vite__mapDeps([66,40,38,15,1,2,3]))},{id:"mdx",name:"MDX",import:()=>L(()=>import("./mdx-Cmh6b_Ma.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>L(()=>import("./mermaid-DKYwYmdq.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>L(()=>import("./mipsasm-CKIfxQSi.js"),[])},{id:"mojo",name:"Mojo",import:()=>L(()=>import("./mojo-1DNp92w6.js"),[])},{id:"move",name:"Move",import:()=>L(()=>import("./move-BkPM1oy1.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>L(()=>import("./narrat-DRg8JJMk.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>L(()=>import("./nextflow-Bk5OV074.js"),[])},{id:"nginx",name:"Nginx",import:()=>L(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([67,37,26]))},{id:"nim",name:"Nim",import:()=>L(()=>import("./nim-IFkVVqAN.js"),__vite__mapDeps([68,26,1,2,3,7,8,25,40]))},{id:"nix",name:"Nix",import:()=>L(()=>import("./nix-BepWV7mh.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>L(()=>import("./nushell-I3RK9BU8.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>L(()=>import("./objective-c-DXmwc3jG.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>L(()=>import("./objective-cpp-CLxacb5B.js"),[])},{id:"ocaml",name:"OCaml",import:()=>L(()=>import("./ocaml-C0hk2d4L.js"),[])},{id:"pascal",name:"Pascal",import:()=>L(()=>import("./pascal-D93ZcfNL.js"),[])},{id:"perl",name:"Perl",import:()=>L(()=>import("./perl-g0D2lH3a.js"),__vite__mapDeps([69,1,2,3,7,8,16]))},{id:"php",name:"PHP",import:()=>L(()=>import("./php-Gk5eUrPQ.js"),__vite__mapDeps([70,1,2,3,7,8,16,9]))},{id:"plsql",name:"PL/SQL",import:()=>L(()=>import("./plsql-ChMvpjG-.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>L(()=>import("./po-BTJTHyun.js"),[])},{id:"polar",name:"Polar",import:()=>L(()=>import("./polar-C0HS_06l.js"),[])},{id:"postcss",name:"PostCSS",import:()=>L(()=>import("./postcss-CXtECtnM.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>L(()=>import("./powerquery-CEu0bR-o.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>L(()=>import("./powershell-Dpen1YoG.js"),[])},{id:"prisma",name:"Prisma",import:()=>L(()=>import("./prisma-Dd19v3D-.js"),[])},{id:"prolog",name:"Prolog",import:()=>L(()=>import("./prolog-CbFg5uaA.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>L(()=>import("./proto-DyJlTyXw.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>L(()=>import("./pug-Ch9lOoSd.js"),__vite__mapDeps([71,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>L(()=>import("./puppet-BMWR74SV.js"),[])},{id:"purescript",name:"PureScript",import:()=>L(()=>import("./purescript-CklMAg4u.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>L(()=>import("./python-B6aJPvgy.js"),[])},{id:"qml",name:"QML",import:()=>L(()=>import("./qml-CHzV51_b.js"),__vite__mapDeps([72,2]))},{id:"qmldir",name:"QML Directory",import:()=>L(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>L(()=>import("./qss-IeuSbFQv.js"),[])},{id:"r",name:"R",import:()=>L(()=>import("./r-DiinP2Uv.js"),[])},{id:"racket",name:"Racket",import:()=>L(()=>import("./racket-BqYA7rlc.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>L(()=>import("./raku-DXvB9xmW.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>L(()=>import("./razor-CNXmhs1n.js"),__vite__mapDeps([73,1,2,3,74]))},{id:"reg",name:"Windows Registry Script",import:()=>L(()=>import("./reg-C-SQnVFl.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>L(()=>import("./regexp-CDVJQ6XC.js"),[])},{id:"rel",name:"Rel",import:()=>L(()=>import("./rel-C3B-1QV4.js"),[])},{id:"riscv",name:"RISC-V",import:()=>L(()=>import("./riscv-BM1_JUlF.js"),[])},{id:"rst",name:"reStructuredText",import:()=>L(()=>import("./rst-DKdxLoXm.js"),__vite__mapDeps([75,15,1,2,3,23,24,25,26,16,20,28,38,76,33,34,7,8,35,11,36,13,37]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>L(()=>import("./ruby-W1VRIm2Q.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>L(()=>import("./rust-B1yitclQ.js"),[])},{id:"sas",name:"SAS",import:()=>L(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([77,16]))},{id:"sass",name:"Sass",import:()=>L(()=>import("./sass-Cj5Yp3dK.js"),[])},{id:"scala",name:"Scala",import:()=>L(()=>import("./scala-C151Ov-r.js"),[])},{id:"scheme",name:"Scheme",import:()=>L(()=>import("./scheme-C98Dy4si.js"),[])},{id:"scss",name:"SCSS",import:()=>L(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>L(()=>import("./sdbl-DVxCFoDh.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>L(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([78,79]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>L(()=>import("./shellscript-Yzrsuije.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>L(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([80,28]))},{id:"smalltalk",name:"Smalltalk",import:()=>L(()=>import("./smalltalk-BERRCDM3.js"),[])},{id:"solidity",name:"Solidity",import:()=>L(()=>import("./solidity-BbcW6ACK.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>L(()=>import("./soy-B_7ge1HE.js"),__vite__mapDeps([81,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>L(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([82,83]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>L(()=>import("./splunk-BtCnVYZw.js"),[])},{id:"sql",name:"SQL",import:()=>L(()=>import("./sql-BLtJtn59.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>L(()=>import("./ssh-config-_ykCGR6B.js"),[])},{id:"stata",name:"Stata",import:()=>L(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([84,16]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>L(()=>import("./stylus-BEDo0Tqx.js"),[])},{id:"svelte",name:"Svelte",import:()=>L(()=>import("./svelte-Dt5jNKfG.js"),__vite__mapDeps([85,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>L(()=>import("./swift-ByDN_Krv.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>L(()=>import("./system-verilog-CnnmHF94.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>L(()=>import("./systemd-4A_iFExJ.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>L(()=>import("./talonscript-CkByrt1z.js"),[])},{id:"tasl",name:"Tasl",import:()=>L(()=>import("./tasl-QIJgUcNo.js"),[])},{id:"tcl",name:"Tcl",import:()=>L(()=>import("./tcl-dwOrl1Do.js"),[])},{id:"templ",name:"Templ",import:()=>L(()=>import("./templ-Dh73Zvim.js"),__vite__mapDeps([86,87,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>L(()=>import("./terraform-BETggiCN.js"),[])},{id:"tex",name:"TeX",import:()=>L(()=>import("./tex-B5i3u9ba.js"),__vite__mapDeps([62,60]))},{id:"toml",name:"TOML",import:()=>L(()=>import("./toml-vGWfd6FD.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>L(()=>import("./ts-tags-B9XN6NYQ.js"),__vite__mapDeps([88,11,3,2,25,26,1,16,7,8]))},{id:"tsv",name:"TSV",import:()=>L(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>L(()=>import("./tsx-COt5Ahok.js"),[])},{id:"turtle",name:"Turtle",import:()=>L(()=>import("./turtle-BsS91CYL.js"),[])},{id:"twig",name:"Twig",import:()=>L(()=>import("./twig-B_ULif71.js"),__vite__mapDeps([89,3,2,5,70,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>L(()=>import("./typescript-DlfHMoPT.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>L(()=>import("./typespec-Df68jz8_.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>L(()=>import("./typst-DHCkPAjA.js"),[])},{id:"v",name:"V",import:()=>L(()=>import("./v-DljmTZ5-.js"),[])},{id:"vala",name:"Vala",import:()=>L(()=>import("./vala-CsfeWuGM.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>L(()=>import("./vb-D17OF-Vu.js"),[])},{id:"verilog",name:"Verilog",import:()=>L(()=>import("./verilog-BQ8w6xss.js"),[])},{id:"vhdl",name:"VHDL",import:()=>L(()=>import("./vhdl-CeAyd5Ju.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>L(()=>import("./viml-CJc9bBzg.js"),[])},{id:"vue",name:"Vue",import:()=>L(()=>import("./vue-BEetzCYT.js"),__vite__mapDeps([90,3,2,11,9,15,1]))},{id:"vue-html",name:"Vue HTML",import:()=>L(()=>import("./vue-html-BsD9fJC1.js"),__vite__mapDeps([91,90,3,2,11,9,15,1]))},{id:"vue-vine",name:"Vue Vine",import:()=>L(()=>import("./vue-vine-CCdTUzyM.js"),__vite__mapDeps([92,3,5,65,93,12,90,2,11,9,15,1]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>L(()=>import("./vyper-CDx5xZoG.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>L(()=>import("./wasm-MzD3tlZU.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>L(()=>import("./wenyan-BV7otONQ.js"),[])},{id:"wgsl",name:"WGSL",import:()=>L(()=>import("./wgsl-Dx-B1_4e.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>L(()=>import("./wikitext-BhOHFoWU.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>L(()=>import("./wit-5i3qLPDT.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>L(()=>import("./wolfram-lXgVvXCa.js"),[])},{id:"xml",name:"XML",import:()=>L(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>L(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([94,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>L(()=>import("./yaml-Buea-lGh.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>L(()=>import("./zenscript-DVFEvuxE.js"),[])},{id:"zig",name:"Zig",import:()=>L(()=>import("./zig-VOosw3JB.js"),[])}],xte=Object.fromEntries(JI.map(e=>[e.id,e.import])),Ste=Object.fromEntries(JI.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ate={...xte,...Ste},wte=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>L(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>L(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>L(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>L(()=>import("./catppuccin-frappe-Btyk0a-E.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>L(()=>import("./catppuccin-latte-q-j0iyEw.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>L(()=>import("./catppuccin-macchiato-brDaU2vB.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>L(()=>import("./catppuccin-mocha-BR7mELCv.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>L(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>L(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>L(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>L(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>L(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>L(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>L(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>L(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>L(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>L(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>L(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>L(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>L(()=>import("./gruvbox-dark-hard-D1uDOp7C.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>L(()=>import("./gruvbox-dark-medium-DkhsQLT2.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>L(()=>import("./gruvbox-dark-soft-CcyOm34o.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>L(()=>import("./gruvbox-light-hard-DKzvysjW.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>L(()=>import("./gruvbox-light-medium-DPcUKYIF.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>L(()=>import("./gruvbox-light-soft-CGqH5EJj.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>L(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>L(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>L(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>L(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>L(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>L(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>L(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>L(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>L(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>L(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>L(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>L(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>L(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>L(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>L(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>L(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>L(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>L(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>L(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>L(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>L(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>L(()=>import("./rose-pine-BHrmToEH.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>L(()=>import("./rose-pine-dawn-CnK8MTSM.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>L(()=>import("./rose-pine-moon-NleAzG8P.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>L(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>L(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>L(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>L(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>L(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>L(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>L(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>L(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>L(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>L(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>L(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],Tte=Object.fromEntries(wte.map(e=>[e.id,e.import]));class W0 extends Error{constructor(t){super(t),this.name="ShikiError"}}function Rte(){return 2147483648}function Cte(){return typeof performance<"u"?performance.now():Date.now()}const Nte=(e,t)=>e+(t-e%t)%t;async function Ote(e){let t,n;const r={};function o(_){n=_,r.HEAPU8=new Uint8Array(_),r.HEAPU32=new Uint32Array(_)}function s(_,A,w){r.HEAPU8.copyWithin(_,A,A+w)}function l(_){try{return t.grow(_-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}function u(_){const A=r.HEAPU8.length;_=_>>>0;const w=Rte();if(_>w)return!1;for(let R=1;R<=4;R*=2){let S=A*(1+.2/R);S=Math.min(S,_+100663296);const x=Math.min(w,Nte(Math.max(_,S),65536));if(l(x))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(_,A,w=1024){const R=A+w;let S=A;for(;_[S]&&!(S>=R);)++S;if(S-A>16&&_.buffer&&d)return d.decode(_.subarray(A,S));let x="";for(;A<S;){let T=_[A++];if(!(T&128)){x+=String.fromCharCode(T);continue}const O=_[A++]&63;if((T&224)===192){x+=String.fromCharCode((T&31)<<6|O);continue}const C=_[A++]&63;if((T&240)===224?T=(T&15)<<12|O<<6|C:T=(T&7)<<18|O<<12|C<<6|_[A++]&63,T<65536)x+=String.fromCharCode(T);else{const D=T-65536;x+=String.fromCharCode(55296|D>>10,56320|D&1023)}}return x}function m(_,A){return _?h(r.HEAPU8,_,A):""}const g={emscripten_get_now:Cte,emscripten_memcpy_big:s,emscripten_resize_heap:u,fd_write:()=>0};async function v(){const A=await e({env:g,wasi_snapshot_preview1:g});t=A.memory,o(t.buffer),Object.assign(r,A),r.UTF8ToString=m}return await v(),r}var kte=Object.defineProperty,Dte=(e,t,n)=>t in e?kte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zt=(e,t,n)=>Dte(e,typeof t!="symbol"?t+"":t,n);let tn=null;function Ite(e){throw new W0(e.UTF8ToString(e.getLastOnigError()))}class Vh{constructor(t){Zt(this,"utf16Length"),Zt(this,"utf8Length"),Zt(this,"utf16Value"),Zt(this,"utf8Value"),Zt(this,"utf16OffsetToUtf8"),Zt(this,"utf8OffsetToUtf16");const n=t.length,r=Vh._utf8ByteLength(t),o=r!==n,s=o?new Uint32Array(n+1):null;o&&(s[n]=r);const l=o?new Uint32Array(r+1):null;o&&(l[r]=n);const u=new Uint8Array(r);let d=0;for(let h=0;h<n;h++){const m=t.charCodeAt(h);let g=m,v=!1;if(m>=55296&&m<=56319&&h+1<n){const _=t.charCodeAt(h+1);_>=56320&&_<=57343&&(g=(m-55296<<10)+65536|_-56320,v=!0)}o&&(s[h]=d,v&&(s[h+1]=d),g<=127?l[d+0]=h:g<=2047?(l[d+0]=h,l[d+1]=h):g<=65535?(l[d+0]=h,l[d+1]=h,l[d+2]=h):(l[d+0]=h,l[d+1]=h,l[d+2]=h,l[d+3]=h)),g<=127?u[d++]=g:g<=2047?(u[d++]=192|(g&1984)>>>6,u[d++]=128|(g&63)>>>0):g<=65535?(u[d++]=224|(g&61440)>>>12,u[d++]=128|(g&4032)>>>6,u[d++]=128|(g&63)>>>0):(u[d++]=240|(g&1835008)>>>18,u[d++]=128|(g&258048)>>>12,u[d++]=128|(g&4032)>>>6,u[d++]=128|(g&63)>>>0),v&&h++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=u,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,o=t.length;r<o;r++){const s=t.charCodeAt(r);let l=s,u=!1;if(s>=55296&&s<=56319&&r+1<o){const d=t.charCodeAt(r+1);d>=56320&&d<=57343&&(l=(s-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 Uh=class Or{constructor(t){if(Zt(this,"id",++Or.LAST_ID),Zt(this,"_onigBinding"),Zt(this,"content"),Zt(this,"utf16Length"),Zt(this,"utf8Length"),Zt(this,"utf16OffsetToUtf8"),Zt(this,"utf8OffsetToUtf16"),Zt(this,"ptr"),!tn)throw new W0("Must invoke loadWasm first.");this._onigBinding=tn,this.content=t;const n=new Vh(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Or._sharedPtrInUse?(Or._sharedPtr||(Or._sharedPtr=tn.omalloc(1e4)),Or._sharedPtrInUse=!0,tn.HEAPU8.set(n.utf8Value,Or._sharedPtr),this.ptr=Or._sharedPtr):this.ptr=n.createString(tn)}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===Or._sharedPtr?Or._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Zt(Uh,"LAST_ID",0);Zt(Uh,"_sharedPtr",0);Zt(Uh,"_sharedPtrInUse",!1);let eL=Uh;class Lte{constructor(t){if(Zt(this,"_onigBinding"),Zt(this,"_ptr"),!tn)throw new W0("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,d=t.length;u<d;u++){const h=new Vh(t[u]);n[u]=h.createString(tn),r[u]=h.utf8Length}const o=tn.omalloc(4*t.length);tn.HEAPU32.set(n,o/4);const s=tn.omalloc(4*t.length);tn.HEAPU32.set(r,s/4);const l=tn.createOnigScanner(o,s,t.length);for(let u=0,d=t.length;u<d;u++)tn.ofree(n[u]);tn.ofree(s),tn.ofree(o),l===0&&Ite(tn),this._onigBinding=tn,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let o=0;if(typeof r=="number"&&(o=r),typeof t=="string"){t=new eL(t);const s=this._findNextMatchSync(t,n,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,o)}_findNextMatchSync(t,n,r,o){const s=this._onigBinding,l=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),o);if(l===0)return null;const u=s.HEAPU32;let d=l/4;const h=u[d++],m=u[d++],g=[];for(let v=0;v<m;v++){const _=t.convertUtf8OffsetToUtf16(u[d++]),A=t.convertUtf8OffsetToUtf16(u[d++]);g[v]={start:_,end:A,length:A-_}}return{index:h,captureIndices:g}}}function jte(e){return typeof e.instantiator=="function"}function Pte(e){return typeof e.default=="function"}function Mte(e){return typeof e.data<"u"}function zte(e){return typeof Response<"u"&&e instanceof Response}function Vte(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Zd;function Ute(e){if(Zd)return Zd;async function t(){tn=await Ote(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),jte(r)?r=await r.instantiator(n):Pte(r)?r=await r.default(n):(Mte(r)&&(r=r.data),zte(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Bte(r)(n):r=await $te(r)(n):Vte(r)?r=await xy(r)(n):r instanceof WebAssembly.Module?r=await xy(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await xy(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Zd=t(),Zd}function xy(e){return t=>WebAssembly.instantiate(e,t)}function Bte(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $te(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Hte(e){return e&&await Ute(e),{createScanner(t){return new Lte(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new eL(t)}}}const Fte=bte({langs:Ate,themes:Tte,engine:()=>Hte(L(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:Gte}=Ete(Fte,{guessEmbeddedLanguages:Pee}),Kte=({children:e})=>y.jsx("div",{children:y.jsx("pre",{children:y.jsx("code",{children:e.split(`
325
- `).map((t,n)=>y.jsx("span",{className:"line block w-full",children:t},n))})})}),qte=(({children:e,lang:t,isDarkMode:n,onChange:r,...o})=>{const[s,l]=E.useState(null),u=E.useMemo(()=>({lang:t,theme:n?"github-dark":"github-light",transformers:[EQ(),SQ(),NQ(),xQ(),gQ(),vQ()]}),[t,n]);return E.useEffect(()=>{Gte(e,u).then(d=>l(d)).catch(d=>console.error(d))},[u,e]),s?y.jsx("div",{dangerouslySetInnerHTML:{__html:s},...o,style:{backgroundColor:"transparent"}}):y.jsx(Kte,{children:e})}),Zte=({className:e,onChange:t,isEditable:n,...r})=>y.jsx(qte,{className:Se("flex w-full",e),contentEditable:n,onInput:o=>t?.(o.currentTarget.textContent??""),...r}),tL=E.createContext({packageManager:"npm",setPackageManager:()=>{},codeFormat:"typescript",setCodeFormat:()=>{},contentDeclarationFormat:"typescript",setContentDeclarationFormat:()=>{}}),Bh=()=>E.useContext(tL),Yte=({children:e})=>{const[t,n]=_c("packageManager","npm"),[r,o]=_c("codeFormat","typescript"),[s,l]=_c("contentDeclarationFormat","typescript");return y.jsx(tL,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:l},children:e})},Wte=({children:e,...t})=>{const{packageManager:n,codeFormat:r,contentDeclarationFormat:o}=Bh(),s=typeof t.packageManager>"u",l=n===t.packageManager,u=typeof t.codeFormat>"u",d=r===t.codeFormat,h=typeof t.contentDeclarationFormat>"u",m=o===t.contentDeclarationFormat;return(s||l)&&(u||d)&&(h||m)?e:y.jsx(y.Fragment,{})},Xte=()=>{const{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=Bh();return y.jsxs(Ne,{value:e,onValueChange:r=>{t(r),n(r)},children:[y.jsx(Ne.Trigger,{children:y.jsx(Ne.Value,{placeholder:"Code Format"})}),y.jsxs(Ne.Content,{children:[y.jsx(Ne.Item,{value:"typescript",children:"TypeScript"}),y.jsx(Ne.Item,{value:"esm",children:"ESM"}),y.jsx(Ne.Item,{value:"commonjs",children:"CommonJS"})]})]})},Qte=()=>{const{contentDeclarationFormat:e,setContentDeclarationFormat:t}=Bh();return y.jsxs(Ne,{value:e,onValueChange:t,children:[y.jsx(Ne.Trigger,{children:y.jsx(Ne.Value,{placeholder:"Dictionary Format"})}),y.jsxs(Ne.Content,{children:[y.jsx(Ne.Item,{value:"typescript",children:"TypeScript"}),y.jsx(Ne.Item,{value:"commonjs",children:"CommonJS"}),y.jsx(Ne.Item,{value:"esm",children:"ESM"}),y.jsx(Ne.Item,{value:"json",children:"JSON"})]})]})},Gv=({children:e,className:t,identifier:n,...r})=>y.jsx("div",{className:Se("group/popover relative flex cursor-pointer",t),"aria-label":`Popover ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e});var nL=(e=>(e.START="start",e.END="end",e))(nL||{});const Jte=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:o="start",yAlign:s="bellow",identifier:l,className:u,displayArrow:d=!0,...h})=>y.jsx(Er,{transparency:"sm","aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${l}`,id:`unrollable-panel-${l}`,className:Se("absolute z-[1000] min-w-full ring-neutral ring-1 rounded-md",o==="start"&&"left-0",o==="end"&&"right-0",s==="bellow"&&"top-[calc(100%+1rem)]",s==="above"&&"bottom-[calc(100%+1rem)]",d&&'before:absolute before:z-[999] before:content-[""] before:w-0 before:h-0',d&&o==="start"&&"before:left-2",d&&o==="end"&&"before:right-2",d&&s==="bellow"&&"before:-top-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral",d&&s==="above"&&"before:-bottom-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-t-[10px] before:border-t-neutral","overflow-x-visible transition-all duration-400 ease-in-out opacity-0",t!==!1?"invisible":"delay-800 visible opacity-100",n&&"group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800",r&&"group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800",u),...h,children:e});Gv.Detail=Jte;const ene={key:"code",content:{title:me({en:"Copy code",es:"Copiar código",pt:"Copiar código",fr:"Copier le code",de:"Code kopieren",it:"Copiare il codice",ja:"コードをコピー",ko:"코드 복사",zh:"复制代码",hi:"कोड कॉपी करें","en-GB":"Copy code",ru:"Копировать код",ar:"نسخ الكود"}),description:me({en:"Copy the code to the clipboard",es:"Copiar el código al portapapeles",pt:"Copiar o código para a área de transferência",fr:"Copier le code dans le presse-papiers",de:"Kopieren Sie den Code in die Zwischenablage",it:"Copiare il codice nella clipboard",ja:"コードをクリップボードにコピー",ko:"코드를 클립보드에 복사",zh:"复制代码到剪贴板",hi:"कोड को क्लिपबोर्ड पर कॉपी करें","en-GB":"Copy the code to the clipboard",ru:"Копировать код в буфер обмена",ar:"نسخ الكود إلى الحافظة"})}},tne=({code:e})=>{const{title:t,description:n}=Pt(ene);return y.jsxs(Gv,{identifier:"copy",children:[y.jsx(tN,{content:e}),y.jsxs(Gv.Detail,{identifier:"copy",className:"flex flex-col gap-3 p-3 min-w-64 text-sm",xAlign:nL.END,children:[y.jsx("strong",{children:t}),y.jsx("p",{className:"text-neutral",children:n})]})]})},nne=()=>{const{packageManager:e,setPackageManager:t}=Bh();return y.jsxs(Ne,{value:e,onValueChange:t,children:[y.jsx(Ne.Trigger,{children:y.jsx(Ne.Value,{placeholder:"Package Manager"})}),y.jsxs(Ne.Content,{children:[y.jsx(Ne.Item,{value:"npm",children:"npm"}),y.jsx(Ne.Item,{value:"pnpm",children:"pnpm"}),y.jsx(Ne.Item,{value:"yarn",children:"yarn"})]})]})},rne=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:o=!0,className:s,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:h,...m})=>{const g=e.endsWith(`
326
- `)?e.slice(0,-1):e,v=u||d||h;return y.jsx(Wte,{packageManager:u,codeFormat:d,contentDeclarationFormat:h,children:y.jsxs(Er,{className:Se("relative text-sm leading-6",o&&"with-line-number ml-0",s),transparency:"lg",...m,children:[r&&y.jsxs(y.Fragment,{children:[y.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:[y.jsx("span",{className:"truncate",children:l??t}),y.jsxs("div",{className:"flex items-center gap-2",children:[u&&y.jsx(nne,{}),d&&y.jsx(Xte,{}),h&&y.jsx(Qte,{})]})]}),y.jsx("div",{className:"sticky top-48",children:y.jsx("div",{className:Se("absolute bottom-0 right-2 flex h-7 items-center",v&&"h-11"),children:y.jsx(tne,{code:g})})})]}),y.jsx("div",{className:"grid size-full grid-cols-[0px] overflow-auto p-3",children:y.jsx(Zte,{lang:t,isDarkMode:n,children:g})})]})})},ine={key:"table",content:{show:me({en:"Show all table content",fr:"Afficher tout le contenu du tableau",es:"Mostrar todo el contenido de la tabla","en-GB":"Show all table content",de:"Alle Tabellendaten anzeigen",ja:"テーブルのすべての内容を表示",ko:"테이블의 모든 내용 표시",zh:"显示表格的所有内容",it:"Mostra tutto il contenuto della tabella",pt:"Mostrar todo o conteúdo da tabela",hi:"सभी तालिका सामग्री दिखाएं",ar:"اظهار جميع محتويات الجدول",ru:"Показать все данные таблицы"}),hide:me({en:"Hide table content",fr:"Masquer le contenu du tableau",es:"Ocultar el contenido de la tabla","en-GB":"Hide table content",de:"Tabellendaten ausblenden",ja:"テーブルの内容を非表示",ko:"테이블 내용 숨기기",zh:"隐藏表格内容",it:"Nasconde tutto il contenuto della tabella",pt:"Ocultar o conteúdo da tabela",hi:"टेबल सामग्री छुपाएं",ar:"اخفاء جميع محتويات الجدول",ru:"Скрыть все данные таблицы"}),extend:me({en:"Extend table",fr:"Étendre le tableau",es:"Extender la tabla","en-GB":"Extend table",de:"Tabellendaten erweitern",ja:"テーブルを拡張",ko:"테이블 확장",zh:"扩展表格",it:"Espandere la tabella",pt:"Expandir a tabela",hi:"टेबल विस्तारित करें",ar:"توسيع الجدول",ru:"Расширить таблицу"})}},r1=700,one=({className:e,...t})=>{const[n,r]=E.useState(!1),[o,s]=E.useState(!1),{show:l,hide:u}=Pt(ine),[d,h]=E.useState(0),m=E.useRef(null),g=(d??0)>r1;return E.useEffect(()=>{m.current&&h(m.current.clientHeight)},[]),y.jsxs("div",{className:"relative",children:[y.jsx("div",{className:"sticky top-48 z-10",children:y.jsx("div",{className:"absolute top-4 right-2",children:y.jsx(st,{variant:"hoverable",size:"icon-md",onClick:()=>{s(!0)},label:"Move",Icon:RU})})}),g?y.jsxs(ab,{isHidden:!n,minHeight:r1,className:"w-full overflow-x-scroll overflow-y-hidden",children:[y.jsx("table",{className:Se("max-w-full table-auto text-left min-w-full",e),ref:m,...t}),y.jsx("button",{className:Se("absolute bottom-0 right-0 flex justify-center cursor-pointer w-full px-2 py-0.5 hover:py-1 transition-all duration-300 text-md text-neutral-700 dark:text-neutral-400 items-center shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent",n&&"w-auto"),onClick:()=>r(v=>!v),children:n?u:l})]}):y.jsx("table",{className:Se("max-w-full table-auto text-left min-w-full",e),ref:m,...t}),y.jsx(a0,{isOpen:o,onClose:()=>s(!1),size:o0.XL,hasCloseButton:!0,children:o?y.jsx("div",{className:"grid",children:y.jsx("table",{className:Se("max-w-full table-auto text-left min-w-full",e),ref:m,...t})}):y.jsx(y.Fragment,{})})]})},ane=e=>{const t=e.split(/\r?\n/),n=t.find(s=>s.trim()!=="");if(!n||n.trim()!=="---")return e;let r=!1,o=-1;for(let s=0;s<t.length;s++)if(t[s].trim()==="---")if(r){o=s;break}else{r=!0;continue}return o>-1?t.slice(o+1).join(`
327
- `):e},sne=({children:e,isDarkMode:t,locale:n,options:r})=>{const{overrides:o,...s}=r??{},l=ane(e);return y.jsx(Yte,{children:y.jsx(dQ,{options:{overrides:{h1:u=>y.jsx(x6,{isClickable:!0,...u}),h2:u=>y.jsx(S6,{isClickable:!0,...u}),h3:u=>y.jsx(i0,{isClickable:!0,...u}),h4:u=>y.jsx(A6,{isClickable:!0,...u}),code:u=>typeof u.className>"u"?y.jsx("strong",{className:"bg-card/60 rounded p-1 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur",children:u.children}):y.jsx(rne,{isDarkMode:t,language:u.className?.replace("lang-",""),...u}),blockquote:({className:u,...d})=>y.jsx("blockquote",{className:Se("border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5",u),...d}),ul:({className:u,...d})=>y.jsx("ul",{className:Se("mt-5 flex flex-col gap-3 pl-5 list-disc",u),...d}),ol:({className:u,...d})=>y.jsx("ol",{className:Se("mt-5 flex flex-col gap-3 pl-5 list-decimal",u),...d}),li:({className:u,...d})=>y.jsx("li",{className:Se("",u),...d}),img:({className:u,...d})=>y.jsx("img",{...d,loading:"lazy",className:Se("max-w-full rounded-md",u),src:`${d.src}?raw=true`}),a:u=>y.jsx(sb,{color:"neutral",isExternalLink:u.href?.startsWith("http"),underlined:!0,locale:n,...u}),pre:u=>u.children,table:u=>y.jsx(one,{...u}),th:({className:u,...d})=>y.jsx("th",{className:Se("border-neutral bg-neutral/10 border-b p-4",u),...d}),tr:({className:u,...d})=>y.jsx("tr",{className:Se("hover:bg-neutral/10 hover:/10",u),...d}),td:({className:u,...d})=>y.jsx("td",{className:Se("border-b border-neutral-500/50 p-4",u),...d}),...o},...s},children:l??""})})},lne=e=>{let t,n;if(typeof e=="number"||!isNaN(Number(e)))t="=",n=e.toString();else if(typeof e=="string"){const o=["<=",">=","<",">","="].find(s=>e.startsWith(s));o&&(t=o,n=e.slice(o.length))}return{comparator:t,numberValue:n}},cne=({value:e,onChange:t})=>{const{comparator:n,numberValue:r}=E.useMemo(()=>lne(e),[e]),[o,s]=E.useState(n??null),[l,u]=E.useState(r??null);return E.useEffect(()=>{if(o&&l&&(o!==n||l!==r)){const d=`${o}${l}`;t(d)}},[o,n,r,l,t]),y.jsxs("div",{className:"flex gap-1",children:[y.jsxs(Ne,{onValueChange:s,defaultValue:n,children:[y.jsx(Ne.Trigger,{className:"w-20",children:y.jsx(Ne.Value,{placeholder:"Select a comparator"})}),y.jsxs(Ne.Content,{children:[y.jsx(Ne.Item,{value:"<",children:"<"}),y.jsx(Ne.Item,{value:"<=",children:"<="}),y.jsx(Ne.Item,{value:"=",children:"="}),y.jsx(Ne.Item,{value:">=",children:">="}),y.jsx(Ne.Item,{value:">",children:">"})]})]}),y.jsx(zs,{type:"number","aria-label":"Quantity",defaultValue:l??void 0,onChange:d=>u(d.target.value),className:"min-w-4"})]})},$h={key:"navigation-view",content:{tsxNotEditable:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:"Добавить новое условие"})}}},une=({keyPath:e,dictionary:t,...n})=>{const{editedContent:r,addEditedContent:o}=xn(),s=Hr(),{auditContentDeclarationField:l,isLoading:u}=K5();return y.jsx(rX,{variant:ao.DEFAULT,onContentChange:d=>o(t.key,d,e),additionalButtons:y.jsx(st,{Icon:nC,label:"Audit",variant:at.HOVERABLE,size:Fn.ICON_SM,color:ot.TEXT,className:"cursor-pointer hover:scale-110",isLoading:u,onClick:()=>{l({fileContent:JSON.stringify({...t,...r?.[t.key]??{}}),keyPath:e,locales:s.internationalization.locales??[],aiOptions:{apiKey:s.ai?.apiKey,model:s.ai?.model,temperature:s.ai?.temperature}}).then(d=>{if(d?.data)try{const h=d.data.fileContent;o(t.key,h,e)}catch(h){console.error(h)}})}}),...n})},dne=({keyPath:e,dictionary:t,...n})=>{const{addEditedContent:r}=xn();return y.jsx(Dv,{variant:ao.DEFAULT,onContentChange:o=>r(t.key,o,e),...n})},fne=[{content:"False",value:!1},{content:"True",value:!0}],hne=({dictionary:e,keyPath:t,...n})=>{const{addEditedContent:r}=xn();return y.jsx(au,{choices:fne,value:!0,onChange:o=>r(e.key,o,t),color:iu.TEXT,size:ou.SM,...n})},mne=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{locale:o,defaultLocale:s}=Qv(),{selectedLocales:l,availableLocales:u}=oI(),d=e[G.Translation],h=Object.keys(d),g=u.length>l.length?l:[...new Set([...u,...h])],v=e[G.Translation];return y.jsx("table",{className:"w-full",children:y.jsx("tbody",{className:"flex w-full flex-col gap-2",children:g.map(_=>y.jsxs(E.Fragment,{children:[y.jsx("tr",{className:"mt-2 w-full p-2 text-xs",children:Jd(_,o)}),y.jsx("tr",{children:y.jsx(da,{section:v[_]??ir(v[s]),keyPath:[...t,{type:G.Translation,key:_}],dictionary:n,renderSection:r})})]},_))})})},pne=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:o}=xn(),{addNewEnumeration:s,removeEnumeration:l}=Pt($h),u=e[G.Enumeration],d=Object.keys(u)[0];return y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("table",{className:"w-full",children:y.jsx("tbody",{className:"flex w-full flex-col gap-2",children:Object.keys(e[G.Enumeration]).map(h=>{const m=[...t,{type:G.Enumeration}];return y.jsxs(E.Fragment,{children:[y.jsx("tr",{className:"mt-2 w-full",children:y.jsx("div",{className:"flex flex-1",children:y.jsx(st,{label:l.label.value,variant:at.HOVERABLE,color:ot.TEXT,Icon:lh,className:"ml-auto",onClick:()=>o(n.key,void 0,m),children:l.text})})}),y.jsx("tr",{className:"w-full p-2",children:y.jsx(cne,{value:h,onChange:g=>{const v=e[G.Enumeration],_=JW(v,h,g),A={...e,[G.Enumeration]:_};o(n.key,A,t)}})}),y.jsx("tr",{className:"block w-full",children:y.jsx(X0,{section:u[h]??ir(u[d]),keyPath:m,dictionary:n,renderSection:r})})]},h)})})}),y.jsx(st,{label:s.label.value,variant:at.HOVERABLE,color:ot.NEUTRAL,textAlign:Es.LEFT,isFullWidth:!0,onClick:()=>o(n.key,ir(u[d])??"",[...t,{type:G.Enumeration,key:"unknown"}]),Icon:sh,className:"m-2",children:s.text})]})},gne=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const o=e[G.Condition];return y.jsx("table",{className:"w-full",children:y.jsx("tbody",{className:"flex w-full flex-col gap-2",children:["true","false","fallback"].map(s=>y.jsxs(E.Fragment,{children:[y.jsx("tr",{className:"mt-2 block w-full p-2 text-xs",children:String(s)},s),y.jsx("tr",{className:"block w-full",children:y.jsx(da,{section:o[s]??ir(o.true),keyPath:[...t,{type:G.Condition,key:s}],dictionary:n,renderSection:r})},s)]},s))})})},yne=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:o}=xn(),{addNewElement:s,removeElement:l}=Pt($h);return y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("table",{className:"w-full",children:y.jsx("tbody",{className:"flex w-full flex-col gap-2",children:e.map((u,d)=>y.jsxs(E.Fragment,{children:[y.jsxs("tr",{className:"mt-2 flex w-full justify-between gap-2 p-2",children:[y.jsx("span",{className:"text-xs",children:String(d)}),y.jsx(st,{label:l.label.value,variant:at.HOVERABLE,color:ot.NEUTRAL,className:"ml-auto",textAlign:Es.LEFT,onClick:()=>{const h=[...t,{type:G.Array,key:e.length}];o(n.key,void 0,h)},Icon:lh,children:l.text})]}),y.jsx("tr",{className:"block w-full",children:y.jsx(da,{section:u??ir(e[0]),keyPath:[...t,{type:G.Array,key:d}],dictionary:n,renderSection:r})})]},JSON.stringify(u)))})}),y.jsx(st,{label:s.label.value,variant:at.HOVERABLE,color:ot.NEUTRAL,textAlign:Es.LEFT,isFullWidth:!0,onClick:()=>{const u=[...t,{type:G.Array,key:e.length}];o(n.key,ir(e[0])??"",u,!1)},Icon:sh,children:s.text})]})},vne=({section:e,keyPath:t,dictionary:n,renderSection:r})=>y.jsx(y.Fragment,{children:y.jsx("table",{className:"w-full",children:y.jsx("tbody",{className:"flex flex-col gap-2",children:Object.keys(e).map(o=>{const s=[...t,{type:G.Object,key:o}],l=e,u=Object.keys(l)[0],d=l[o]??ir(l[u]);return y.jsxs(E.Fragment,{children:[y.jsx("tr",{className:"mt-2 p-2 text-xs",children:String(o)},JSON.stringify(d)),y.jsx("tr",{className:"block w-full",children:y.jsx(X0,{section:d,keyPath:s,dictionary:n,renderSection:r})},JSON.stringify(d))]},o)})})})}),bne=({section:e,keyPath:t,dictionary:n,isDarkMode:r,onContentChange:o})=>{const[s,l]=E.useState(0),u=[{content:"Edit",value:0},{content:"Preview",value:1}],d=[...t,{type:G.Markdown}],h=e[G.Markdown];return y.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[y.jsx(au,{choices:u,value:s,onChange:l,color:iu.TEXT,size:ou.SM,className:"ml-auto"}),y.jsx(da,{section:h,keyPath:d,dictionary:n,renderSection:s===1?m=>y.jsx(sne,{isDarkMode:r,children:m}):void 0,onContentChange:o})]})},_ne=({section:e,keyPath:t,...n})=>{const r=[...t,{type:G.Insertion}],o=e[G.Insertion];return y.jsx("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:y.jsx(da,{section:o,keyPath:r,...n})})},Ene=({section:e,keyPath:t,...n})=>{const r=[...t,{type:G.File}],o=e[G.File],{content:s}=e;return y.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[y.jsxs("span",{className:"text-neutral text-sm",children:[o," "]}),y.jsx(da,{section:s,keyPath:r,...n})]})},xne=({keyPath:e,dictionary:t,renderSection:n,section:r,...o})=>{const{addEditedContent:s}=xn(),l=r[G.Nested],u=[...e,{type:G.Nested}];return y.jsxs("div",{className:"w-full p-2",children:[y.jsx(fv,{children:"Dictionary key"}),y.jsx(Dv,{"aria-label":"Edit field",type:"text",variant:ao.DEFAULT,...o,onContentChange:d=>{s(t.key,{...l,dictionaryKey:String(d)},u)},children:l.dictionaryKey??""}),y.jsx(fv,{children:"Path (optional)"}),y.jsx(Dv,{"aria-label":"Edit field",type:"text",variant:ao.DEFAULT,...o,onContentChange:d=>{s(t.key,{...l,path:d!==""?d:void 0},u)},children:l.path??""})]})},X0=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:o})=>{const{tsxNotEditable:s}=Pt($h),l=Cs(e);return l===G.ReactNode?y.jsxs(y.Fragment,{children:[y.jsx("span",{children:"[React Node]"}),y.jsx("span",{className:"text-neutral text-xs",children:s})]}):l===G.Nested?y.jsx(xne,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Translation?y.jsx(mne,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Enumeration?y.jsx(pne,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Condition?y.jsx(gne,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Insertion?y.jsx(_ne,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Markdown?y.jsx(bne,{dictionary:n,keyPath:t,section:e,isDarkMode:o}):l===G.File?y.jsx(Ene,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Array?y.jsx(yne,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Object?y.jsx(vne,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===G.Number?y.jsx("div",{className:"w-full p-2",children:y.jsx(dne,{dictionary:n,keyPath:t,type:"number","aria-label":"Edit field",children:e})}):l===G.Text?y.jsx("div",{className:"w-full p-2",children:typeof r=="function"?r(e):y.jsx(une,{variant:ao.DEFAULT,"aria-label":"Edit field",keyPath:t,dictionary:n,children:e})}):l===G.Boolean?y.jsx("div",{className:"w-full p-2",children:y.jsx(hne,{dictionary:n,keyPath:t,value:e})}):y.jsxs("div",{className:"w-full p-2",children:["Error. Format not supported.",JSON.stringify(e,null,2),JSON.stringify(t,null,2),"NodeType : ",l]})},da=e=>y.jsx(Er,{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:y.jsx(X0,{...e})}),Vc=e=>{const t=m1(e),n=Cs(e);return t&&(n===G.ReactNode||n===G.File)?!0:t&&typeof t.nodeType=="string"?Vc(t[t.nodeType]):typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"},Sne=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r})=>{const o=[{text:t,onClick:()=>n([])},...e.map((s,l)=>({onClick:()=>n(e.slice(0,l+1)),text:s.key?.toString()??""}))];return y.jsx(CB,{links:o,locale:r,elementType:"location"})},bf=e=>String(e).replace(/([A-Z])/g," $1").toLowerCase().trim(),as=({section:e,keyPath:t,dictionaryKey:n})=>{const{locales:r}=tt?.internationalization,o=Pr(e,t),{addEditedContent:s}=Ns(),{setFocusedContentKeyPath:l,focusedContent:u}=co(),{addNewElement:d,goToField:h}=Pt($h),m=Cs(o),g=_=>(u?.keyPath?.length??0)>0&&$c(_,u?.keyPath??[]),v=Vc(o);if(!o)return y.jsx(y.Fragment,{});if(v)return y.jsx(st,{label:h.label.value,variant:at.HOVERABLE,color:ot.TEXT,className:"w-full",onClick:()=>l(t),IconRight:Sf,children:bf(t[t.length-1].key)});if(typeof o=="object"){if(m===G.ReactNode)return y.jsx(y.Fragment,{children:"React Node"});if(m===G.Translation)return y.jsx("div",{className:"flex flex-col justify-between gap-2",children:r.map(A=>{const w=[...t,{type:G.Translation,key:A}];return y.jsx(as,{keyPath:w,section:e,dictionaryKey:n},A)})});if(m===G.Enumeration||m===G.Condition)return y.jsx("div",{className:"flex flex-col justify-between gap-2",children:Object.keys(o[m]).map(A=>{const w=[...t,{type:m,key:A}];return y.jsx(as,{keyPath:w,section:e,dictionaryKey:n},A)})});if(m===G.Array)return y.jsxs("div",{className:"flex flex-col justify-between gap-2",children:[o.map((A,w)=>{const R=[...t,{type:G.Array,key:w}];return y.jsx(as,{keyPath:R,section:e,dictionaryKey:n},JSON.stringify(R))}),y.jsx(st,{label:d.label.value,variant:at.HOVERABLE,color:ot.NEUTRAL,textAlign:Es.LEFT,onClick:()=>{const A=[...t,{type:G.Array,key:o.length}],w=o,R=ir(w[w.length-1])??"";s(n,R,A,!1),l(A)},Icon:sh,children:d.text})]});if(typeof o.nodeType=="string"){const A=[...t,{type:o.nodeType}];return y.jsx(as,{keyPath:A,section:e,dictionaryKey:n})}const _=Object.keys(o);return y.jsx("div",{className:"flex w-full max-w-full flex-col justify-between gap-2",children:_.map(A=>{const w=[...t,{type:G.Object,key:A}],R=Pr(e,w);return Vc(R)?y.jsx(st,{label:`${h.label.value} ${A}`,isActive:g(w),variant:at.HOVERABLE,color:ot.TEXT,className:"w-full",onClick:()=>l(w),IconRight:Sf,children:bf(A)},A):y.jsx(pC,{label:`${h.label.value} ${A}`,isActive:g(w),onClick:()=>l(w),header:bf(A),children:y.jsx("div",{className:"mt-2 flex w-full max-w-full",children:y.jsx("div",{className:"flex-1 pl-10",children:y.jsx(as,{keyPath:w,section:e,dictionaryKey:n})})})},A)})})}return y.jsxs(y.Fragment,{children:["Error loading section --",m,"--",JSON.stringify(o),"--",JSON.stringify(t)]})},Ane=({dictionary:e,isDarkMode:t})=>{const{content:n,key:r}=e,{editedContent:o}=xn(),{focusedContent:s,setFocusedContentKeyPath:l}=co(),u=s?.keyPath,d=typeof o?.[e.key]?.content>"u"?n:o?.[r]?.content,h=Pr(d,u??[]),m=Vc(d),g=Vc(h);return E.useEffect(()=>{typeof h>"u"&&l(s?.keyPath?.slice(0,-1)??[])},[]),y.jsxs("div",{children:[y.jsxs("div",{className:"mb-6 flex items-center justify-between gap-2",children:[y.jsx(Sne,{dictionaryKey:r,keyPath:u??[],onClickKeyPath:l}),y.jsx("div",{className:"flex items-center gap-2",children:y.jsx(QW,{})})]}),y.jsxs("div",{className:"flex gap-2 max-md:flex-col",children:[typeof d=="object"&&d&&!m&&Object.keys(d).length>0&&y.jsx(Er,{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:y.jsx(as,{keyPath:[],section:d,dictionaryKey:r})}),(g||(u??[]).length>0)&&y.jsx(da,{keyPath:u??[],section:h,dictionary:e,isDarkMode:t})]})]})},wne={key:"dictionary-details",content:{titleInput:{label:me({en:"Title","en-GB":"Title",fr:"Titre",es:"Título",de:"Titel",ja:"タイトル",ko:"제목",zh:"标题",it:"Titolo",pt:"Título",hi:"शीर्षक",ar:"العنوان",ru:"Заголовок"}),description:me({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:me({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:me({en:"Key","en-GB":"Key",fr:"Clé",es:"Clave",de:"Schlüssel",ja:"キー",ko:"키",zh:"键",it:"Chiave",pt:"Chave",hi:"कुंजी",ar:"مفتاح",ru:"Ключ"}),description:me({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:me({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:me({en:"Description","en-GB":"Description",fr:"Description",es:"Descripción",de:"Beschreibung",ja:"説明",ko:"설명",zh:"描述",it:"Descrizione",pt:"Descrição",hi:"विवरण",ar:"الوصف",ru:"Описание"}),placeholder:me({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:me({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:me({en:"Projects","en-GB":"Projects",fr:"Projets",es:"Proyectos",de:"Projekte",ja:"プロジェクト",ko:"프로젝트",zh:"项目",it:"Progetti",pt:"Projetos",hi:"परियोजनाएँ",ar:"المشاريع",ru:"Проекты"}),description:me({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:me({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:me({en:"Tags","en-GB":"Tags",fr:"Tags",es:"Etiquetas",de:"Tags",ja:"タグ",ko:"태그",zh:"标签",it:"Tag",pt:"Tags",hi:"टैग",ar:"الوسوم",ru:"Теги"}),description:me({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:me({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:me({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"}),text:me({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"})}}},Tne={key:"dictionary-detail-schema",content:{titleRequiredError:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:me({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:"Пожалуйста, введите действительный тег"})}},Rne=e=>{const{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:o,keyInvalidTypeError:s,keySpaceError:l,keyMinLengthError:u,descriptionRequiredError:d,descriptionInvalidTypeError:h,requiredErrorProjectId:m,invalidTypeErrorProjectId:g,invalidTypeErrorTags:v}=Pt(Tne);return UY({title:rc({error:_=>_.input===void 0?t.value:n.value}).refine(_=>_.length===0||_.length>=4,{error:r.value}).optional(),key:rc({error:_=>_.input===void 0?o.value:s.value}).min(4,{error:u.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:l.value}).default(""),description:rc({error:_=>_.input===void 0?d.value:h.value}).optional(),projectIds:Av(rc({error:_=>_.input===void 0?m.value:g.value})).default([e]),tags:Av(rc({error:()=>v.value})).default([])})},Cne=({dictionary:e})=>{const{session:t}=tu(),{project:n}=t??{},{data:r,isLoading:o}=U5(),{data:s}=F5(),l=Rne(String(n?.id)),{form:u,isSubmitting:d}=_7(l,{defaultValues:e}),{editedContent:h,setEditedDictionary:m}=xn(),{titleInput:g,keyInput:v,descriptionInput:_,projectInput:A,tagsSelect:w,auditButton:R}=Pt(wne),{auditContentDeclaration:S,isLoading:x}=G5(),T=h?.[e.key];E.useEffect(()=>{u.reset(e)},[e,u?.reset]),E.useEffect(()=>{typeof T>"u"&&u.reset(e)},[T]);const O=async()=>{const C={...e,...T};await S({fileContent:JSON.stringify(C)}).then(D=>{if(D?.data)try{const I=JSON.parse(D.data.fileContent);m(M=>({...M,...C,...I})),u.reset({...C,...I})}catch(I){console.error(I)}})};return y.jsx(Er,{background:"none",border:!0,roundedSize:"2xl",className:"w-full px-5 pb-3 pt-5",children:y.jsxs(Fe,{className:"flex w-full flex-col gap-8",...u,schema:l,onChange:C=>m(D=>({...D,...C})),children:[y.jsxs("div",{className:"flex w-full flex-1 gap-8 max-md:flex-col",children:[y.jsx(Fe.EditableFieldInput,{name:"key",label:v.label,placeholder:v.label.value,description:v.description,disabled:d,isRequired:!0,onSave:C=>{u.setValue("key",C),m(D=>({...e,...D??{},key:C}))}}),y.jsx(Fe.EditableFieldInput,{name:"title",label:g.label,placeholder:g.placeholder.value,description:g.description,disabled:d,onSave:C=>{u.setValue("title",C),m(D=>({...e,...D??{},title:C}))}})]}),y.jsx(Fe.EditableFieldTextArea,{name:"description",label:_.label,placeholder:_.placeholder.value,description:_.description,disabled:d,onSave:C=>{u.setValue("description",C),m(D=>({...e,...D??{},description:C}))}}),y.jsxs("div",{className:"flex size-full flex-1 gap-8 max-md:flex-col",children:[y.jsxs(Fe.MultiSelect,{name:"projectIds",label:A.label.value,description:A.description.value,onValueChange:C=>{const D=[C].flat();u.setValue("projectIds",D),m(I=>({...e,...I??{},projectIds:D}))},children:[y.jsx(pn.Trigger,{getBadgeValue:C=>r?.data?.find(D=>String(D.id)===C)?.name??C,children:y.jsx(pn.Input,{placeholder:A.placeholder.value})}),y.jsx(pn.Content,{children:y.jsx(_s,{isLoading:o,children:y.jsx(pn.List,{children:r?.data?.map(C=>y.jsx(pn.Item,{value:String(C.id),children:C.name},String(C.id)))})})})]}),y.jsxs(Fe.MultiSelect,{name:"tags",label:w.label.value,description:w.description.value,onValueChange:C=>{u.setValue("tags",[C].flat()),m(D=>({...e,...D??{},tags:[C].flat()}))},children:[y.jsx(pn.Trigger,{getBadgeValue:C=>r?.data?.find(D=>String(D.id)===C)?.name??C,children:y.jsx(pn.Input,{placeholder:w.placeholder.value})}),y.jsx(pn.Content,{children:y.jsx(_s,{isLoading:o,children:y.jsx(pn.List,{children:s?.data?.map(C=>y.jsx(pn.Item,{value:String(C.key),children:C.name??C.key},String(C.key)))})})})]})]}),y.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 max-md:flex-col",children:y.jsx(Fe.Button,{type:"button",label:R.label.value,Icon:nC,variant:at.OUTLINE,color:ot.TEXT,className:"max-md:w-full",onClick:O,disabled:d||x,isLoading:x,children:R.text})})]})})},Nne={key:"dictionary-field-editor",content:{returnToDictionaryList:{label:me({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:me({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 One(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function o1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i1(Object(n),!0).forEach(function(r){One(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kne(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Dne(e,t){if(e==null)return{};var n=kne(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ine(e,t){return Lne(e)||jne(e,t)||Pne(e,t)||Mne()}function Lne(e){if(Array.isArray(e))return e}function jne(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,s=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){o=!0,s=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(o)throw s}}return n}}function Pne(e,t){if(e){if(typeof e=="string")return a1(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 a1(e,t)}}function a1(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 Mne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
328
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function l1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s1(Object(n),!0).forEach(function(r){zne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vne(){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(o,s){return s(o)},r)}}function cc(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(o,u))}}}function th(e){return{}.toString.call(e).includes("Object")}function Une(e){return!Object.keys(e).length}function Uc(e){return typeof e=="function"}function Bne(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $ne(e,t){return th(t)||to("changeType"),Object.keys(t).some(function(n){return!Bne(e,n)})&&to("changeField"),t}function Hne(e){Uc(e)||to("selectorType")}function Fne(e){Uc(e)||th(e)||to("handlerType"),th(e)&&Object.values(e).some(function(t){return!Uc(t)})&&to("handlersType")}function Gne(e){e||to("initialIsRequired"),th(e)||to("initialType"),Une(e)&&to("initialContent")}function Kne(e,t){throw new Error(e[t]||e.default)}var qne={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"},to=cc(Kne)(qne),Yd={changes:$ne,selector:Hne,handler:Fne,initial:Gne};function Zne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Yd.initial(e),Yd.handler(t);var n={current:e},r=cc(Xne)(n,t),o=cc(Wne)(n),s=cc(Yd.changes)(e),l=cc(Yne)(n);function u(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return Yd.selector(h),h(n.current)}function d(h){Vne(r,o,s,l)(h)}return[u,d]}function Yne(e,t){return Uc(t)?t(e.current):t}function Wne(e,t){return e.current=l1(l1({},e.current),t),t}function Xne(e,t,n){return Uc(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var Qne={create:Zne},Jne={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function ere(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(o,u))}}}function tre(e){return{}.toString.call(e).includes("Object")}function nre(e){return e||c1("configIsRequired"),tre(e)||c1("configType"),e.urls?(rre(),{paths:{vs:e.urls.monacoBase}}):e}function rre(){console.warn(rL.deprecation)}function ire(e,t){throw new Error(e[t]||e.default)}var rL={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!
329
- You are using deprecated way of configuration.
330
-
331
- Instead of using
332
- monaco.config({ urls: { monacoBase: '...' } })
333
- use
334
- monaco.config({ paths: { vs: '...' } })
335
-
336
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
337
- `},c1=ere(ire)(rL),ore={config:nre},are=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(s,l){return l(s)},o)}};function iL(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],iL(e[n],t[n]))}),o1(o1({},e),t)}var sre={type:"cancelation",msg:"operation is manually canceled"};function Sy(e){var t=!1,n=new Promise(function(r,o){e.then(function(s){return t?o(sre):r(s)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var lre=Qne.create({config:Jne,isInitialized:!1,resolve:null,reject:null,monaco:null}),oL=Ine(lre,2),uu=oL[0],Hh=oL[1];function cre(e){var t=ore.config(e),n=t.monaco,r=Dne(t,["monaco"]);Hh(function(o){return{config:iL(o.config,r),monaco:n}})}function ure(){var e=uu(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Hh({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Sy(Ay);if(window.monaco&&window.monaco.editor)return aL(window.monaco),e.resolve(window.monaco),Sy(Ay);are(dre,hre)(mre)}return Sy(Ay)}function dre(e){return document.body.appendChild(e)}function fre(e){var t=document.createElement("script");return e&&(t.src=e),t}function hre(e){var t=uu(function(r){var o=r.config,s=r.reject;return{config:o,reject:s}}),n=fre("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function mre(){var e=uu(function(n){var r=n.config,o=n.resolve,s=n.reject;return{config:r,resolve:o,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){aL(n),e.resolve(n)},function(n){e.reject(n)})}function aL(e){uu().monaco||Hh({monaco:e})}function pre(){return uu(function(e){var t=e.monaco;return t})}var Ay=new Promise(function(e,t){return Hh({resolve:e,reject:t})}),sL={config:cre,init:ure,__getMonacoInstance:pre},gre={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},wy=gre,yre={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},vre=yre;function bre({children:e}){return De.createElement("div",{style:vre.container},e)}var _re=bre,Ere=_re;function xre({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:s,wrapperProps:l}){return De.createElement("section",{style:{...wy.wrapper,width:e,height:t},...l},!n&&De.createElement(Ere,null,r),De.createElement("div",{ref:o,style:{...wy.fullWidth,...!n&&wy.hide},className:s}))}var Sre=xre,lL=E.memo(Sre);function Are(e){E.useEffect(e,[])}var cL=Are;function wre(e,t,n=!0){let r=E.useRef(!0);E.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Bn=wre;function Sc(){}function hs(e,t,n,r){return Tre(e,r)||Rre(e,t,n,r)}function Tre(e,t){return e.editor.getModel(uL(e,t))}function Rre(e,t,n,r){return e.editor.createModel(t,n,r?uL(e,r):void 0)}function uL(e,t){return e.Uri.parse(t)}function Cre({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:s,modifiedModelPath:l,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:d=!1,theme:h="light",loading:m="Loading...",options:g={},height:v="100%",width:_="100%",className:A,wrapperProps:w={},beforeMount:R=Sc,onMount:S=Sc}){let[x,T]=E.useState(!1),[O,C]=E.useState(!0),D=E.useRef(null),I=E.useRef(null),M=E.useRef(null),H=E.useRef(S),K=E.useRef(R),Z=E.useRef(!1);cL(()=>{let re=sL.init();return re.then(j=>(I.current=j)&&C(!1)).catch(j=>j?.type!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>D.current?Y():re.cancel()}),Bn(()=>{if(D.current&&I.current){let re=D.current.getOriginalEditor(),j=hs(I.current,e||"",r||n||"text",s||"");j!==re.getModel()&&re.setModel(j)}},[s],x),Bn(()=>{if(D.current&&I.current){let re=D.current.getModifiedEditor(),j=hs(I.current,t||"",o||n||"text",l||"");j!==re.getModel()&&re.setModel(j)}},[l],x),Bn(()=>{let re=D.current.getModifiedEditor();re.getOption(I.current.editor.EditorOption.readOnly)?re.setValue(t||""):t!==re.getValue()&&(re.executeEdits("",[{range:re.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),re.pushUndoStop())},[t],x),Bn(()=>{D.current?.getModel()?.original.setValue(e||"")},[e],x),Bn(()=>{let{original:re,modified:j}=D.current.getModel();I.current.editor.setModelLanguage(re,r||n||"text"),I.current.editor.setModelLanguage(j,o||n||"text")},[n,r,o],x),Bn(()=>{I.current?.editor.setTheme(h)},[h],x),Bn(()=>{D.current?.updateOptions(g)},[g],x);let J=E.useCallback(()=>{if(!I.current)return;K.current(I.current);let re=hs(I.current,e||"",r||n||"text",s||""),j=hs(I.current,t||"",o||n||"text",l||"");D.current?.setModel({original:re,modified:j})},[n,t,o,e,r,s,l]),ae=E.useCallback(()=>{!Z.current&&M.current&&(D.current=I.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...g}),J(),I.current?.editor.setTheme(h),T(!0),Z.current=!0)},[g,h,J]);E.useEffect(()=>{x&&H.current(D.current,I.current)},[x]),E.useEffect(()=>{!O&&!x&&ae()},[O,x,ae]);function Y(){let re=D.current?.getModel();u||re?.original?.dispose(),d||re?.modified?.dispose(),D.current?.dispose()}return De.createElement(lL,{width:_,height:v,isEditorReady:x,loading:m,_ref:M,className:A,wrapperProps:w})}var Nre=Cre;E.memo(Nre);function Ore(e){let t=E.useRef();return E.useEffect(()=>{t.current=e},[e]),t.current}var kre=Ore,Wd=new Map;function Dre({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:s,theme:l="light",line:u,loading:d="Loading...",options:h={},overrideServices:m={},saveViewState:g=!0,keepCurrentModel:v=!1,width:_="100%",height:A="100%",className:w,wrapperProps:R={},beforeMount:S=Sc,onMount:x=Sc,onChange:T,onValidate:O=Sc}){let[C,D]=E.useState(!1),[I,M]=E.useState(!0),H=E.useRef(null),K=E.useRef(null),Z=E.useRef(null),J=E.useRef(x),ae=E.useRef(S),Y=E.useRef(),re=E.useRef(r),j=kre(s),X=E.useRef(!1),F=E.useRef(!1);cL(()=>{let oe=sL.init();return oe.then(B=>(H.current=B)&&M(!1)).catch(B=>B?.type!=="cancelation"&&console.error("Monaco initialization: error:",B)),()=>K.current?P():oe.cancel()}),Bn(()=>{let oe=hs(H.current,e||r||"",t||o||"",s||n||"");oe!==K.current?.getModel()&&(g&&Wd.set(j,K.current?.saveViewState()),K.current?.setModel(oe),g&&K.current?.restoreViewState(Wd.get(s)))},[s],C),Bn(()=>{K.current?.updateOptions(h)},[h],C),Bn(()=>{!K.current||r===void 0||(K.current.getOption(H.current.editor.EditorOption.readOnly)?K.current.setValue(r):r!==K.current.getValue()&&(F.current=!0,K.current.executeEdits("",[{range:K.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),K.current.pushUndoStop(),F.current=!1))},[r],C),Bn(()=>{let oe=K.current?.getModel();oe&&o&&H.current?.editor.setModelLanguage(oe,o)},[o],C),Bn(()=>{u!==void 0&&K.current?.revealLine(u)},[u],C),Bn(()=>{H.current?.editor.setTheme(l)},[l],C);let ve=E.useCallback(()=>{if(!(!Z.current||!H.current)&&!X.current){ae.current(H.current);let oe=s||n,B=hs(H.current,r||e||"",t||o||"",oe||"");K.current=H.current?.editor.create(Z.current,{model:B,automaticLayout:!0,...h},m),g&&K.current.restoreViewState(Wd.get(oe)),H.current.editor.setTheme(l),u!==void 0&&K.current.revealLine(u),D(!0),X.current=!0}},[e,t,n,r,o,s,h,m,g,l,u]);E.useEffect(()=>{C&&J.current(K.current,H.current)},[C]),E.useEffect(()=>{!I&&!C&&ve()},[I,C,ve]),re.current=r,E.useEffect(()=>{C&&T&&(Y.current?.dispose(),Y.current=K.current?.onDidChangeModelContent(oe=>{F.current||T(K.current.getValue(),oe)}))},[C,T]),E.useEffect(()=>{if(C){let oe=H.current.editor.onDidChangeMarkers(B=>{let W=K.current.getModel()?.uri;if(W&&B.find(se=>se.path===W.path)){let se=H.current.editor.getModelMarkers({resource:W});O?.(se)}});return()=>{oe?.dispose()}}return()=>{}},[C,O]);function P(){Y.current?.dispose(),v?g&&Wd.set(s,K.current.saveViewState()):K.current.getModel()?.dispose(),K.current.dispose()}return De.createElement(lL,{width:_,height:A,isEditorReady:C,loading:d,_ref:Z,className:w,wrapperProps:R})}var Ire=Dre,Lre=E.memo(Ire);const jre=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:o=!0,isReadOnly:s=!1,onChange:l})=>{const u=E.useRef(null),d=E.useRef(null),[h,m]=E.useState({height:0,width:0}),g=E.useMemo(()=>n?"vs-dark-transparent":"hc-light-theme",[n]),v=(A,w)=>{d.current=A;const R=(A.getContentHeight()??0)+25;w.editor.defineTheme("vs-dark-transparent",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),w.editor.defineTheme("hc-light-theme",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),w.editor.setTheme(g),w.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),w.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),w.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),w.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),m({height:R,width:u.current?.clientWidth??0})},_=r??e.split(`
338
- `).length>1;return y.jsxs("div",{className:Se("relative h-full w-full text-sm",r&&"ml-0"),children:[o&&y.jsx("div",{className:"sticky top-5 z-10",children:y.jsx("div",{className:Se("absolute bottom-0 right-2 flex h-7 items-center"),children:y.jsx(tN,{content:e})})}),y.jsx("div",{className:"z-0 grid size-full grid-cols-[0px] overflow-auto",ref:u,children:y.jsx(Lre,{...h,defaultLanguage:"typescript",language:t,loading:y.jsx(_s,{}),defaultValue:String(e).replace(/\n$/,""),onMount:v,onChange:l,options:{readOnly:s,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:_?"on":"off"},theme:g,className:"my-2 rounded-md"})})]})},Pre=({dictionary:e,isDarkMode:t})=>{const{setEditedContent:n,editedContent:r}=xn(),o=l=>{try{return JSON.parse(l),!0}catch{return!1}},s=E.useMemo(()=>r?.[e.key]?.content??e?.content??{},[e]);return y.jsx(Er,{background:"none",border:!0,roundedSize:"xl",className:"w-full overflow-hidden p-3",children:y.jsx(jre,{language:"json",onChange:l=>{o(l??"{}")&&n(e.key,JSON.parse(l??"{}"))},isDarkMode:t,children:JSON.stringify(s,null,2)})})},Mre={key:"node-type-selector",content:{triggerPlaceHolder:me({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:me({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:me({en:"Text","en-GB":"Text",fr:"Texte",es:"Texto",de:"Text",ja:"テキスト",ko:"텍스트",zh:"文本",it:"Testo",pt:"Texto",hi:"पाठ",ar:"نص",ru:"Текст"}),number:me({en:"Number","en-GB":"Number",fr:"Nombre",es:"Número",de:"Zahl",ja:"数字",ko:"숫자",zh:"数字",it:"Numero",pt:"Número",hi:"संख्या",ar:"رقم",ru:"Число"}),boolean:me({en:"Boolean","en-GB":"Boolean",fr:"Booléen",es:"Booleano",de:"Bool",ja:"ブール",ko:"불리언",zh:"布尔",it:"Booleano",pt:"Booleano",hi:"बूलियन",ar:"منطقي",ru:"Булево"}),node:me({en:"Object","en-GB":"Object",fr:"Objet",es:"Objeto",de:"Objekt",ja:"オブジェクト",ko:"객체",zh:"对象",it:"Oggetto",pt:"Objeto",hi:"ऑब्जेक्ट",ar:"كائن",ru:"Объект"}),array:me({en:"Array","en-GB":"Array",fr:"Tableau",es:"Arreglo",de:"Array",ja:"配列",ko:"배열",zh:"数组",it:"Array",pt:"Array",hi:"ऐरे",ar:"مصفوفة",ru:"Массив"}),enumeration:me({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:me({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:me({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:me({en:"Condition","en-GB":"Condition",fr:"Condition",es:"Condición",de:"Bedingung",ja:"条件",ko:"조건",zh:"条件",it:"Condizione",pt:"Condição",hi:"शर्त्ता",ar:"شرط",ru:"Условие"}),file:me({en:"File","en-GB":"File",fr:"Fichier",es:"Archivo",de:"Datei",ja:"ファイル",ko:"파일",zh:"文件",it:"File",pt:"Arquivo",hi:"फ़ाइल",ar:"ملف",ru:"Файл"}),markdown:me({en:"Markdown","en-GB":"Markdown",fr:"Markdown",es:"Markdown",de:"Markdown",ja:"マークダウン",ko:"마크다운",zh:"Markdown",it:"Markdown",pt:"Markdown",hi:"मार्कडाउन",ar:"مارك داون",ru:"Markdown"}),reactNode:me({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:"Реакт узел"})}},Xd=({section:e,onValueChange:t})=>{const{multilingual:n,text:r,number:o,boolean:s,node:l,array:u,enumeration:d,triggerPlaceHolder:h,nest:m,condition:g,markdown:v,insertion:_,reactNode:A,file:w}=Pt(Mre),R=Cs(e),[S,x]=E.useState(R),T=O=>{x(O),t(O)};return y.jsxs(Ne,{value:S,onValueChange:T,children:[y.jsx(Ne.Trigger,{children:y.jsx(Ne.Value,{placeholder:h})}),y.jsxs(Ne.Content,{children:[y.jsx(Ne.Item,{value:G.Translation,children:n}),y.jsx(Ne.Item,{value:G.Text,children:r}),y.jsx(Ne.Item,{value:G.Number,children:o}),y.jsx(Ne.Item,{value:G.Boolean,children:s}),y.jsx(Ne.Item,{value:G.Object,children:l}),y.jsx(Ne.Item,{value:G.Array,children:u}),y.jsx(Ne.Item,{value:G.Enumeration,children:d}),y.jsx(Ne.Item,{value:G.Insertion,children:_}),y.jsx(Ne.Item,{value:G.Markdown,children:v}),y.jsx(Ne.Item,{value:G.Nested,children:m}),y.jsx(Ne.Item,{value:G.Condition,children:g}),y.jsx(Ne.Item,{value:G.ReactNode,disabled:!0,children:A}),y.jsx(Ne.Item,{value:G.File,children:w})]})]})},dL={key:"editor-view",content:{titleInput:{placeholder:me({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:me({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:me({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:me({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:"Добавить новый узел"})}}},Kv=({section:e,dictionaryKey:t,keyPath:n,onNodeTypeChange:r})=>{const o=Hr()?.internationalization.locales??[],s=Cs(e),l=m1(e),u=d=>{const h=Hl(s,o,d);r(h)};if(s===G.Translation||s===G.Condition||s===G.Enumeration){const d=Object.keys(e[s])[0],h=[...n,{type:s,key:d}];return y.jsxs("div",{className:"flex w-full flex-col gap-1",children:[y.jsx(Xd,{section:e,onValueChange:m=>r(Hl(m,o))}),y.jsx(Kv,{section:l,keyPath:h,dictionaryKey:t,onNodeTypeChange:u})]})}if(s===G.Array){const d=[...n,{type:s,key:0}];return y.jsxs("div",{className:"flex w-full flex-col gap-1",children:[y.jsx(Xd,{section:e,onValueChange:h=>r(Hl(h,o))}),y.jsx(Kv,{section:l,keyPath:d,dictionaryKey:t,onNodeTypeChange:u})]})}return s===G.Object?y.jsxs(y.Fragment,{children:[y.jsx(Xd,{section:e,onValueChange:d=>r(Hl(d,o))}),y.jsx("div",{className:"ml-10 mt-6",children:y.jsx(Vre,{keyPath:n,section:e,dictionaryKey:t})})]}):y.jsx(Xd,{section:e,onValueChange:d=>r(Hl(d,o))})},Q0=({sectionKey:e,section:t,keyPath:n,dictionaryKey:r})=>{const{focusedContent:o,setFocusedContentKeyPath:s}=co(),{renameEditedContent:l,addEditedContent:u}=Ns(),{titleInput:d,deleteButton:h}=Pt(dL),m=g=>{l(r,g,n);const v=n.slice(0,-1),_=n[n.length-1],A=[...v,{..._,key:g}];s(A)};return y.jsx(Er,{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":$c(n,o?.keyPath??[]),onClick:()=>s(n),children:y.jsxs("div",{className:"flex w-full flex-col items-start justify-between gap-3",children:[typeof e=="string"&&y.jsxs("div",{className:"w-full",children:[y.jsxs("div",{className:"flex w-full items-center justify-between gap-10",children:[y.jsx(Tk,{name:"key","aria-label":"Key",placeholder:d.placeholder.value,defaultValue:e,onSave:g=>m(g),variant:ao.INVISIBLE}),y.jsx(st,{label:h.label.value,variant:at.HOVERABLE,size:Fn.ICON_SM,color:ot.TEXT,className:"translate-x-2",Icon:lh,onClick:()=>{u(r,void 0,n);const g=n.slice(0,-1);s(g)}})]}),y.jsxs("span",{className:"text-neutral ml-3 text-sm",children:["( ",bf(e)," )"]})]}),y.jsx(Kv,{keyPath:n,dictionaryKey:r,section:t,onNodeTypeChange:g=>{u(r,g,n)}})]})})},zre=({section:e,keyPath:t,dictionaryKey:n})=>{const{addNodeButton:r}=Pt(dL),{setFocusedContentKeyPath:o}=Wv(),{addEditedContent:s}=Ns();return!e||typeof e!="object"?y.jsx("div",{children:"Not an object"}):y.jsxs("div",{className:"flex flex-col gap-2 overflow-y-auto",children:[y.jsx("ul",{className:"mr-auto flex flex-col gap-4",children:Object.keys(e).map(l=>y.jsx("li",{className:"flex w-full",children:y.jsx(Q0,{sectionKey:l,section:e?.[l],keyPath:[...t,{type:G.Object,key:l}],dictionaryKey:n})},l))}),y.jsx(st,{label:r.label.value,variant:at.HOVERABLE,size:Fn.MD,color:ot.TEXT,Icon:sh,className:"flex-1",onClick:()=>{const u=[...t,{type:G.Object,key:"newKey"}];s(n,"",u),o(u)},children:r.text})]})},Vre=({section:e,keyPath:t,dictionaryKey:n})=>!e||typeof e!="object"||typeof e.nodeType=="string"?y.jsx(Q0,{sectionKey:"content",section:e,keyPath:t,dictionaryKey:n}):y.jsx(zre,{section:e,keyPath:t,dictionaryKey:n}),Ure=({dictionary:e})=>{const{content:t,key:n}=e,{editedContent:r}=xn(),o=typeof r?.[n]?.content>"u"?t:r?.[n]?.content;return y.jsx(Q0,{section:o,keyPath:[],dictionaryKey:e.key})},Bre=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:o})=>{const s=Hr(),[l,u]=E.useState(1),{returnToDictionaryList:d}=Pt(Nne),{setFocusedContent:h}=Wv(),{setLocaleDictionaries:m}=rh();return E.useEffect(()=>{h(g=>({...g??{},dictionaryKey:e.key})),m(g=>({...g,[e.key]:e}))},[]),y.jsx(XW,{availableLocales:s?.internationalization.locales??[],children:y.jsxs("div",{className:"flex size-full flex-col gap-6 px-2",children:[y.jsx(st,{onClick:t,variant:at.HOVERABLE,className:"z-10 ml-5 mr-auto",color:ot.TEXT,Icon:eU,label:d.label.value,children:d.text}),y.jsx(au,{defaultValue:l,onChange:g=>u(g),color:iu.TEXT,size:ou.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:g})=>!(!r.includes("remote")&&g===0))}),l===0&&y.jsx(Cne,{dictionary:e}),l===2&&y.jsx(Ure,{dictionary:e}),l===1&&y.jsx(Ane,{dictionary:e,isDarkMode:n}),l===3&&y.jsx(Pre,{dictionary:e,isDarkMode:n}),y.jsx(MD,{dictionary:e,mode:r,onDelete:()=>{h(null),o?.()}})]})})},$re=({children:e,isHidden:t,minWidth:n=0,align:r="left",className:o,...s})=>y.jsx("div",{className:Se("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out",t?"":"grid-cols-[1fr]",o),"aria-hidden":t,...s,children:y.jsx("div",{style:{minWidth:`${n}px`},tabIndex:t!==!1?void 0:-1,className:Se(r==="right"&&"ml-auto"),children:e})}),Hre=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}},Fre=()=>{if(typeof window>"u")return;const e=window.navigator?.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)},Gre=e=>{if(!(typeof window>"u"))return(window?.innerWidth??0)<=e},u1=(e="md")=>{const t=Hre(e),n=Fre(),r=Gre(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n}},Kre=(e="md")=>{const[t,n]=E.useState(u1(e));return E.useEffect(()=>{const r=()=>{n(u1(e))};return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[e]),t},qre=e=>{const t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){const s=t.left+t.width/2,l=t.top+10,u=document.elementFromPoint(s,l);return e===u||e.contains(u)}return!1},Fh=JO((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})),fL=({title:e,identifier:t,children:n,header:r,closeOnOutsideClick:o=!0,backButton:s,isOpen:l,onClose:u})=>{const{isMobile:d}=Kre("md"),h=E.useRef(null),m=E.useRef(null),{close:g,open:v,isOpen:_}=Fh(ek(w=>({close:()=>w.close(t),open:()=>w.open(t),isOpen:w.isOpen(t)})));tk({disableScroll:_,key:t?`right_drawer_${t}`:"right_drawer"}),E.useEffect(()=>{const w=R=>{try{if(!h.current)return;const S=_&&o,x=R.target&&!h.current.contains(R.target),T=qre(h.current);(S&&x&&T||!R.target)&&(g(),u?.())}catch{g(),u?.()}};return window.addEventListener("mousedown",w),()=>window.removeEventListener("mousedown",w)},[_,g,u,o,t]),E.useEffect(()=>{l!==void 0&&(l?v():(g(),u?.()))},[g,v,u,l,t]);const A=w=>{w.target===w.currentTarget&&d&&(g(),u?.())};return y.jsx("div",{className:"fixed right-0 top-0 z-50 flex h-full justify-end",children:y.jsx($re,{isHidden:!_,align:"right",children:y.jsxs(Er,{className:"text-text relative flex h-screen w-screen flex-col md:w-[400px]",ref:h,roundedSize:"none",children:[y.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[y.jsxs("div",{className:"flex justify-between gap-3",children:[y.jsx("div",{children:s&&y.jsx(st,{variant:at.HOVERABLE,color:ot.TEXT,label:s.text??"Go back",onClick:s.onBack,Icon:aU,children:s?.text})}),y.jsx("div",{children:y.jsx(st,{variant:at.HOVERABLE,color:ot.TEXT,label:"Close",className:"ml-auto",onClick:g,Icon:la,size:Fn.ICON_MD})})]}),e&&y.jsx("h2",{className:"flex items-center justify-center text-lg font-bold",children:e}),r]}),y.jsx("div",{className:"flex h-full flex-col overflow-y-auto p-2",children:y.jsx("div",{className:"flex flex-1 flex-col",onClick:A,ref:m,children:n})})]})})})},Zre=()=>{const{toasts:e}=nk();return y.jsxs(UG.Provider,{children:[e.map(({id:t,title:n,description:r,action:o,...s})=>y.jsxs(HG,{...s,children:[y.jsxs("div",{className:"grid gap-1",children:[n&&y.jsx(GG,{children:n}),r&&y.jsx(KG,{children:r})]}),o,y.jsx(FG,{})]},t)),y.jsx(BG,{})]})},hL=(...e)=>{const{localeDictionaries:t}=S1(),{data:n,isWaitingData:r}=B5(...e),o=E.useMemo(()=>(n?.data??[]).reduce((l,u)=>(l[u.key]=u,l),{}),[n]),s=E.useMemo(()=>QG(o??{},t),[o,t]);return{online:o,locale:t,all:s,isLoading:r}},Yre=({children:e})=>y.jsx(B3,{features:gG,children:e}),Wre=({children:e})=>y.jsx(Yre,{children:y.jsxs(ZG,{children:[y.jsx(Zre,{}),e]})}),Xre=({children:e})=>y.jsx(MV,{children:y.jsx(mV,{children:y.jsx(K1,{path:"*",element:e})})}),qv="dictionaryList",mL={key:"dictionary-edition-drawer",content:{openDictionaryEditor:{label:me({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:me({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:me({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:me({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"}),focusedDictionaryNotFound:me({en:"Focused dictionary not found",fr:"Dictionnaire focalisé non trouvé",es:"Diccionario enfocado no encontrado",de:"Ausgewähltes Wörterbuch nicht gefunden",ja:"フォーカスされた辞書が見つかりません",ko:"포커스가 있는 사전이 없습니다",zh:"没有聚焦的词典",it:"Nessun dizionario selezionato",pt:"Nenhum dicionário focalizado",hi:"कोई फोकस शब्दकोश नहीं है",ar:"لا يوجد قاموس مرتبط",ru:"Нет фокусированного словаря","en-GB":"Focused dictionary not found"})}},J0=e=>`dictionary_edition_${e}`,pL=e=>{const t=J0(e),{isOpen:n,open:r,close:o}=Fh(),{getEditedContentValue:s}=Ns(),{focusedContent:l,setFocusedContent:u}=co();return E.useEffect(()=>{l&&(l.keyPath?.length??0)>0&&r(t)},[l,r,t]),{isOpen:n(t),focusedContent:l,getEditedContentValue:s,close:()=>{o(t),u(d=>d?.dictionaryKey?{...d,keyPath:[]}:d)}}},Qre=({locale:e,identifier:t,handleOnBack:n,isDarkMode:r})=>{const{modalTitle:o,openDictionaryEditor:s,noDictionaryFocused:l,focusedDictionaryNotFound:u}=Pt(mL),[d,h]=E.useState(!1),{all:m}=hL(),{focusedContent:g}=pL(t),v=E.useCallback(()=>{h(!1),n()},[n]),_=g?.dictionaryKey;if(!_)return y.jsx("span",{className:"mx-auto my-10 text-sm text-neutral",children:l});const A=m[_];return A?y.jsxs(y.Fragment,{children:[y.jsx(a0,{isOpen:d,onClose:()=>h(!1),hasCloseButton:!0,title:o.value,size:"xl",transparency:"lg",children:y.jsx("div",{className:"size-full px-3 pt-5",children:y.jsx(Bre,{dictionary:A,onClickDictionaryList:v,isDarkMode:r,mode:["local","remote"],onDelete:()=>{h(!1),n()}})})}),y.jsxs("div",{className:"border-text/20 /20 mb-5 flex w-full border-b border-dashed px-3 pb-2",children:[y.jsx("h3",{className:"w-full text-center text-lg",children:A.title?A.title:A.key}),y.jsx(st,{variant:"hoverable",color:"text",size:"icon-md",IconRight:tC,label:s.label.value,onClick:()=>h(!0)})]}),y.jsx(G7,{dictionary:A,locale:e,mode:["local","remote"]})]}):y.jsx("span",{className:"mx-auto my-10 text-sm text-neutral",children:u})},Jre=({locale:e,dictionaryKey:t,isDarkMode:n})=>{const{backButtonText:r}=Pt(mL),o=J0(t),{focusedContent:s,close:l}=pL(t),{openDictionaryListDrawer:u}=Fh(h=>({openDictionaryListDrawer:()=>h.open(qv)})),d=()=>{l(),u()};return y.jsx(fL,{identifier:o,backButton:{onBack:d,text:r.value},onClose:l,children:s&&y.jsx(Qre,{focusedContent:s,locale:e,identifier:o,handleOnBack:d,isDarkMode:n})})},eie=({locale:e,isDarkMode:t})=>{const{focusedContent:n}=co(),r=n?.dictionaryKey;return r?y.jsx(Jre,{locale:e,dictionaryKey:r,isDarkMode:t}):y.jsx(y.Fragment,{})},tie=()=>{const{all:e}=hL(),t=Object.keys(e),{close:n,open:r}=Fh(),{editedContent:o}=xn(),{setFocusedContent:s}=co(),l=d=>{n(qv);const{filePath:h}=e[d];s({dictionaryKey:d,dictionaryPath:h}),r(J0(d))},u=d=>Object.keys(o??{}).includes(d);return y.jsx(fL,{title:"Dictionary list",identifier:qv,children:t.map(d=>y.jsx("div",{children:y.jsx(st,{label:`Open dictionary editor ${d}`,onClick:()=>l(d),variant:"hoverable",color:"text",IconRight:Sf,size:"md",isFullWidth:!0,children:u(d)?`✎ ${d}`:d})},d))})},gL=(...e)=>mC(ch(e)),nie={key:"long-press-message",content:{message:MM(me({en:'Long press to edit the "{{dictionaryKey}}" dictionary',fr:'Long press pour éditer le dictionnaire "{{dictionaryKey}}"',es:'Presiona largo para editar el diccionario "{{dictionaryKey}}"',de:'Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"',it:'Premi a lungo per modificare il dizionario "{{dictionaryKey}}"',pt:'Pressione longa para editar o dicionário "{{dictionaryKey}}"',ru:'Длительное нажатие для редактирования словаря "{{dictionaryKey}}"',ja:'長押しして編集 "{{dictionaryKey}}" 辞書',ko:'길게 눌러 편집 "{{dictionaryKey}}" 사전',zh:'长按编辑 "{{dictionaryKey}}" 字典',"en-GB":'Long press to edit the "{{dictionaryKey}}" dictionary',ar:'اضغط طويلاً للتعديل "{{dictionaryKey}}"',hi:'लंग प्रेस करें टू एडिट "{{dictionaryKey}}"'}))}},rie=e=>{const{message:t}=Pt(nie);return y.jsx("div",{className:gL("bg-neutral/30 py-1 px-3 rounded-2xl font-bold text-text text-sm transition-opacity duration-100",e?.dictionaryKey?"opacity-100":"opacity-0"),children:e?.dictionaryKey?t({dictionaryKey:e.dictionaryKey}):""})},iie=({children:e})=>{const[t]=no(En.INTLAYER_CURRENT_LOCALE,void 0,{receive:!0,emit:!1}),[n]=no(En.INTLAYER_HOVERED_CONTENT_CHANGED,null),{data:r}=Y5({autoFetch:!0}),{setLocaleDictionaries:o}=rh();return E.useEffect(()=>{r&&o(r)},[r]),y.jsxs("div",{className:"bg-card relative size-full p-3",children:[e,y.jsx("div",{className:"absolute bottom-2 right-2",children:y.jsx(rie,{...n})}),y.jsx(eie,{locale:t}),y.jsx(tie,{})]})},oie=()=>{const[e,t]=E.useState();return E.useEffect(()=>{fetch("/api/config").then(n=>n.json()).then(n=>t(n.data))},[]),e},aie=({children:e,iframeRef:t})=>{const n=oie(),r=n?.editor.applicationURL?n?.editor.applicationURL:"*",o=n?.editor.editorURL??"*";return n?y.jsx(rz,{postMessage:s=>{window?.postMessage(s,o),t.current?.contentWindow?.postMessage(s,r)},allowedOrigins:[r,o],mode:"editor",configuration:n,children:e}):y.jsx(_s,{})},sie=()=>{const{editedContent:e,setEditedContentState:t}=xn(),n=()=>{const r=localStorage?.getItem("INTLAYER_EDITED_CONTENT_CHANGED");if(r)try{const o=JSON.parse(r);t(o)}catch(o){console.error(o)}};return E.useEffect(()=>{typeof e>"u"||localStorage?.setItem("INTLAYER_EDITED_CONTENT_CHANGED",JSON.stringify(e))},[e]),E.useEffect(()=>{typeof e<"u"||n()},[]),n},lie={key:"no-application-url-view",content:{title:me({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:me({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:me({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:me({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:"查看如何配置编辑器"})}}},cie=()=>{const{title:e,description:t,documentationLink:n}=Pt(lie);return y.jsxs("div",{className:"flex flex-col gap-6",children:[y.jsx(i0,{className:"mb-8",children:e}),y.jsx("strong",{className:"text-neutral block",children:t}),y.jsx(sb,{label:n.label.value,href:"https://intlayer.org/doc/concept/configuration#editor-configuration",color:"text",children:n.text})]})},uie=({iframeRef:e,applicationPath:t})=>{const{editor:n}=Hr(),r=()=>o(n.enabled),o=QM();R1(r),sie(),oz();const[s,l]=E.useState(!0),[u]=iz(void 0,{receive:!0,emit:!1});return E.useEffect(()=>{typeof u=="string"&&window.history.replaceState({},"",u)},[u]),n.applicationURL?y.jsxs("div",{className:"size-full overflow-hidden rounded-lg",children:[y.jsx(_s,{isLoading:s}),y.jsx("iframe",{src:`${n.applicationURL}${t}`,title:"Intlayer Application",className:gL("size-full",s&&"hidden"),ref:e,onLoad:()=>{l(!1),r()}})]}):y.jsx("div",{className:"flex size-full items-center justify-center",children:y.jsx(Er,{className:"flex max-w-xl flex-col gap-4 p-6",children:y.jsx(cie,{})})})},die=()=>{const e=E.useRef(null),t=uo();return y.jsx(aie,{iframeRef:e,children:y.jsx(uz,{disableEditor:!0,children:y.jsx(iie,{children:y.jsx(uie,{iframeRef:e,applicationPath:t.pathname})})})})},fie=()=>y.jsx(Xre,{children:y.jsx(Wre,{children:y.jsx(die,{})})});zP.createRoot(document.getElementById("root")).render(y.jsx(E.StrictMode,{children:y.jsx(fie,{})}));