intlayer-editor 5.5.11 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,316 +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-DAp1zUbp.js","assets/typescript-DlfHMoPT.js","assets/postcss-CXtECtnM.js","assets/blade-DGJDb2eD.js","assets/html-derivative-ZQ8onl8Z.js","assets/sql-B9xm8XSJ.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-CCPHrsME.js","assets/coffee-JUOWOZUj.js","assets/cpp-ChttZZSa.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-CfkhwHAQ.js","assets/shellscript-Yzrsuije.js","assets/edge-CKszZCnI.js","assets/elixir-Cc7HHYVZ.js","assets/elm-DbKCFpqz.js","assets/erb-D3EuUlpm.js","assets/ruby-C5MNRm7z.js","assets/haml-AZXGPtNI.js","assets/graphql-Caa12_AY.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-DQy8In2x.js","assets/markdown-RrBGtqGR.js","assets/gdresource-BSDf9Pz1.js","assets/gdshader-DkwncUOv.js","assets/gdscript-Bty6elJm.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Dz9X99Cm.js","assets/glimmer-ts-aQ3p29eY.js","assets/hack-C1oSbnf3.js","assets/handlebars-YebKLiTq.js","assets/http-C38VWM-o.js","assets/hxml-B2Z6b3nn.js","assets/haxe-BP3HzMA6.js","assets/jinja-BJmZiE_F.js","assets/jison-BCRtk9Os.js","assets/julia-Dn4fBTUU.js","assets/r-DyVeJk2s.js","assets/latex-DoYF_zFQ.js","assets/tex-BTEcxGmc.js","assets/liquid-DFk8BABL.js","assets/marko-C0z8HR23.js","assets/less-B1dDrJ26.js","assets/mdc-02rxpBA4.js","assets/nginx-DknmC5AR.js","assets/nim-ANgMEeb1.js","assets/perl-EWVMYlR0.js","assets/php-9PMsNEzE.js","assets/pug-Ch9lOoSd.js","assets/qml-CHzV51_b.js","assets/razor-CNXmhs1n.js","assets/csharp-CHadp7IV.js","assets/rst-DHpKpUMA.js","assets/cmake-D1j8_8rp.js","assets/sas-Dlf3BogE.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-B_7ge1HE.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-C5TGba-T.js","assets/svelte-Dt5jNKfG.js","assets/templ-DN2Co29m.js","assets/go-ByKsyG03.js","assets/ts-tags-CHnADXob.js","assets/twig-febACT8g.js","assets/vue-CqZX_ekU.js","assets/vue-html-DJL_i-Ck.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- var uj=Object.defineProperty;var dj=(e,t,n)=>t in e?uj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ce=(e,t,n)=>dj(e,typeof t!="symbol"?t+"":t,n);function fj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)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(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function Hf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pp={exports:{}},Ml={};/**
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 GE;function hj(){if(GE)return Ml;GE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var u in a)u!=="key"&&(s[u]=a[u])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:s}}return Ml.Fragment=t,Ml.jsx=n,Ml.jsxs=n,Ml}var KE;function mj(){return KE||(KE=1,Pp.exports=hj()),Pp.exports}var b=mj(),zp={exports:{}},Ge={};/**
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 ZE;function pj(){if(ZE)return Ge;ZE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),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 E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,x={};function A(P,X,$){this.props=P,this.context=X,this.refs=x,this.updater=$||E}A.prototype.isReactComponent={},A.prototype.setState=function(P,X){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,X,"setState")},A.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function T(){}T.prototype=A.prototype;function w(P,X,$){this.props=P,this.context=X,this.refs=x,this.updater=$||E}var C=w.prototype=new T;C.constructor=w,y(C,A.prototype),C.isPureReactComponent=!0;var O=Array.isArray,N={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function D(P,X,$,Q,ne,he){return $=he.ref,{$$typeof:e,type:P,key:X,ref:$!==void 0?$:null,props:he}}function L(P,X){return D(P.type,X,void 0,void 0,void 0,P.props)}function z(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function U(P){var X={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function($){return X[$]})}var fe=/\/+/g;function ie(P,X){return typeof P=="object"&&P!==null&&P.key!=null?U(""+P.key):X.toString(36)}function le(){}function W(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(le,le):(P.status="pending",P.then(function(X){P.status==="pending"&&(P.status="fulfilled",P.value=X)},function(X){P.status==="pending"&&(P.status="rejected",P.reason=X)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function ee(P,X,$,Q,ne){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var Ee=!1;if(P===null)Ee=!0;else switch(he){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(P.$$typeof){case e:case t:Ee=!0;break;case m:return Ee=P._init,ee(Ee(P._payload),X,$,Q,ne)}}if(Ee)return ne=ne(P),Ee=Q===""?"."+ie(P,0):Q,O(ne)?($="",Ee!=null&&($=Ee.replace(fe,"$&/")+"/"),ee(ne,X,$,"",function(Oe){return Oe})):ne!=null&&(z(ne)&&(ne=L(ne,$+(ne.key==null||P&&P.key===ne.key?"":(""+ne.key).replace(fe,"$&/")+"/")+Ee)),X.push(ne)),1;Ee=0;var ue=Q===""?".":Q+":";if(O(P))for(var _e=0;_e<P.length;_e++)Q=P[_e],he=ue+ie(Q,_e),Ee+=ee(Q,X,$,he,ne);else if(_e=v(P),typeof _e=="function")for(P=_e.call(P),_e=0;!(Q=P.next()).done;)Q=Q.value,he=ue+ie(Q,_e++),Ee+=ee(Q,X,$,he,ne);else if(he==="object"){if(typeof P.then=="function")return ee(W(P),X,$,Q,ne);throw X=String(P),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function H(P,X,$){if(P==null)return P;var Q=[],ne=0;return ee(P,Q,"","",function(he){return X.call($,he,ne++)}),Q}function re(P){if(P._status===-1){var X=P._result;X=X(),X.then(function($){(P._status===0||P._status===-1)&&(P._status=1,P._result=$)},function($){(P._status===0||P._status===-1)&&(P._status=2,P._result=$)}),P._status===-1&&(P._status=0,P._result=X)}if(P._status===1)return P._result.default;throw P._result}var Z=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function ve(){}return Ge.Children={map:H,forEach:function(P,X,$){H(P,function(){X.apply(this,arguments)},$)},count:function(P){var X=0;return H(P,function(){X++}),X},toArray:function(P){return H(P,function(X){return X})||[]},only:function(P){if(!z(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ge.Component=A,Ge.Fragment=n,Ge.Profiler=a,Ge.PureComponent=w,Ge.StrictMode=r,Ge.Suspense=d,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ge.act=function(){throw Error("act(...) is not supported in production builds of React.")},Ge.cache=function(P){return function(){return P.apply(null,arguments)}},Ge.cloneElement=function(P,X,$){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var Q=y({},P.props),ne=P.key,he=void 0;if(X!=null)for(Ee in X.ref!==void 0&&(he=void 0),X.key!==void 0&&(ne=""+X.key),X)!j.call(X,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&X.ref===void 0||(Q[Ee]=X[Ee]);var Ee=arguments.length-2;if(Ee===1)Q.children=$;else if(1<Ee){for(var ue=Array(Ee),_e=0;_e<Ee;_e++)ue[_e]=arguments[_e+2];Q.children=ue}return D(P.type,ne,void 0,void 0,he,Q)},Ge.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},Ge.createElement=function(P,X,$){var Q,ne={},he=null;if(X!=null)for(Q in X.key!==void 0&&(he=""+X.key),X)j.call(X,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ne[Q]=X[Q]);var Ee=arguments.length-2;if(Ee===1)ne.children=$;else if(1<Ee){for(var ue=Array(Ee),_e=0;_e<Ee;_e++)ue[_e]=arguments[_e+2];ne.children=ue}if(P&&P.defaultProps)for(Q in Ee=P.defaultProps,Ee)ne[Q]===void 0&&(ne[Q]=Ee[Q]);return D(P,he,void 0,void 0,null,ne)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(P){return{$$typeof:u,render:P}},Ge.isValidElement=z,Ge.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:re}},Ge.memo=function(P,X){return{$$typeof:f,type:P,compare:X===void 0?null:X}},Ge.startTransition=function(P){var X=N.T,$={};N.T=$;try{var Q=P(),ne=N.S;ne!==null&&ne($,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(ve,Z)}catch(he){Z(he)}finally{N.T=X}},Ge.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ge.use=function(P){return N.H.use(P)},Ge.useActionState=function(P,X,$){return N.H.useActionState(P,X,$)},Ge.useCallback=function(P,X){return N.H.useCallback(P,X)},Ge.useContext=function(P){return N.H.useContext(P)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(P,X){return N.H.useDeferredValue(P,X)},Ge.useEffect=function(P,X){return N.H.useEffect(P,X)},Ge.useId=function(){return N.H.useId()},Ge.useImperativeHandle=function(P,X,$){return N.H.useImperativeHandle(P,X,$)},Ge.useInsertionEffect=function(P,X){return N.H.useInsertionEffect(P,X)},Ge.useLayoutEffect=function(P,X){return N.H.useLayoutEffect(P,X)},Ge.useMemo=function(P,X){return N.H.useMemo(P,X)},Ge.useOptimistic=function(P,X){return N.H.useOptimistic(P,X)},Ge.useReducer=function(P,X,$){return N.H.useReducer(P,X,$)},Ge.useRef=function(P){return N.H.useRef(P)},Ge.useState=function(P){return N.H.useState(P)},Ge.useSyncExternalStore=function(P,X,$){return N.H.useSyncExternalStore(P,X,$)},Ge.useTransition=function(){return N.H.useTransition()},Ge.version="19.0.0",Ge}var qE;function Ic(){return qE||(qE=1,zp.exports=pj()),zp.exports}var S=Ic();const Be=Hf(S),YT=fj({__proto__:null,default:Be},[S]);var Vp={exports:{}},Pl={},Bp={exports:{}},Up={};/**
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 WE;function gj(){return WE||(WE=1,function(e){function t(H,re){var Z=H.length;H.push(re);e:for(;0<Z;){var ve=Z-1>>>1,P=H[ve];if(0<a(P,re))H[ve]=re,H[Z]=P,Z=ve;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var re=H[0],Z=H.pop();if(Z!==re){H[0]=Z;e:for(var ve=0,P=H.length,X=P>>>1;ve<X;){var $=2*(ve+1)-1,Q=H[$],ne=$+1,he=H[ne];if(0>a(Q,Z))ne<P&&0>a(he,Q)?(H[ve]=he,H[ne]=Z,ve=ne):(H[ve]=Q,H[$]=Z,ve=$);else if(ne<P&&0>a(he,Z))H[ve]=he,H[ne]=Z,ve=ne;else break e}}return re}function a(H,re){var Z=H.sortIndex-re.sortIndex;return Z!==0?Z:H.id-re.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=[],f=[],m=1,g=null,v=3,E=!1,y=!1,x=!1,A=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function C(H){for(var re=n(f);re!==null;){if(re.callback===null)r(f);else if(re.startTime<=H)r(f),re.sortIndex=re.expirationTime,t(d,re);else break;re=n(f)}}function O(H){if(x=!1,C(H),!y)if(n(d)!==null)y=!0,W();else{var re=n(f);re!==null&&ee(O,re.startTime-H)}}var N=!1,j=-1,D=5,L=-1;function z(){return!(e.unstable_now()-L<D)}function U(){if(N){var H=e.unstable_now();L=H;var re=!0;try{e:{y=!1,x&&(x=!1,T(j),j=-1),E=!0;var Z=v;try{t:{for(C(H),g=n(d);g!==null&&!(g.expirationTime>H&&z());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var P=ve(g.expirationTime<=H);if(H=e.unstable_now(),typeof P=="function"){g.callback=P,C(H),re=!0;break t}g===n(d)&&r(d),C(H)}else r(d);g=n(d)}if(g!==null)re=!0;else{var X=n(f);X!==null&&ee(O,X.startTime-H),re=!1}}break e}finally{g=null,v=Z,E=!1}re=void 0}}finally{re?fe():N=!1}}}var fe;if(typeof w=="function")fe=function(){w(U)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,le=ie.port2;ie.port1.onmessage=U,fe=function(){le.postMessage(null)}}else fe=function(){A(U,0)};function W(){N||(N=!0,fe())}function ee(H,re){j=A(function(){H(e.unstable_now())},re)}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(H){H.callback=null},e.unstable_continueExecution=function(){y||E||(y=!0,W())},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var re=3;break;default:re=v}var Z=v;v=re;try{return H()}finally{v=Z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,re){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var Z=v;v=H;try{return re()}finally{v=Z}},e.unstable_scheduleCallback=function(H,re,Z){var ve=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ve+Z:ve):Z=ve,H){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=Z+P,H={id:m++,callback:re,priorityLevel:H,startTime:Z,expirationTime:P,sortIndex:-1},Z>ve?(H.sortIndex=Z,t(f,H),n(d)===null&&H===n(f)&&(x?(T(j),j=-1):x=!0,ee(O,Z-ve))):(H.sortIndex=P,t(d,H),y||E||(y=!0,W())),H},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(H){var re=v;return function(){var Z=v;v=re;try{return H.apply(this,arguments)}finally{v=Z}}}}(Up)),Up}var YE;function yj(){return YE||(YE=1,Bp.exports=gj()),Bp.exports}var $p={exports:{}},fn={};/**
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 XE;function vj(){if(XE)return fn;XE=1;var e=Ic();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(d,f,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,fn.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,m)},fn.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},fn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},fn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},fn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,g=u(m,f.crossOrigin),v=typeof f.integrity=="string"?f.integrity:void 0,E=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:E}):m==="script"&&r.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:E,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},fn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},fn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,g=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},fn.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},fn.requestFormReset=function(d){r.d.r(d)},fn.unstable_batchedUpdates=function(d,f){return d(f)},fn.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},fn.useFormStatus=function(){return l.H.useHostTransitionStatus()},fn.version="19.0.0",fn}var QE;function XT(){if(QE)return $p.exports;QE=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(),$p.exports=vj(),$p.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 JE;function bj(){if(JE)return Pl;JE=1;var e=yj(),t=Ic(),n=XT();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}var s=Symbol.for("react.element"),l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),v=Symbol.for("react.consumer"),E=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),O=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function j(i){return i===null||typeof i!="object"?null:(i=N&&i[N]||i["@@iterator"],typeof i=="function"?i:null)}var D=Symbol.for("react.client.reference");function L(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===D?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case d:return"Fragment";case u:return"Portal";case m:return"Profiler";case f:return"StrictMode";case x:return"Suspense";case A:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case E:return(i.displayName||"Context")+".Provider";case v:return(i._context.displayName||"Context")+".Consumer";case y:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case T:return o=i.displayName||null,o!==null?o:L(i.type)||"Memo";case w:o=i._payload,i=i._init;try{return L(i(o))}catch{}}return null}var z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.assign,fe,ie;function le(i){if(fe===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);fe=o&&o[1]||"",ie=-1<c.stack.indexOf(`
43
- at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
44
- `+fe+i+ie}var W=!1;function ee(i,o){if(!i||W)return"";W=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(o){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ae){var te=ae}Reflect.construct(i,[],me)}else{try{me.call()}catch(ae){te=ae}i.call(me.prototype)}}else{try{throw Error()}catch(ae){te=ae}(me=i())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),R=_[0],k=_[1];if(R&&k){var M=R.split(`
45
- `),G=k.split(`
46
- `);for(p=h=0;h<M.length&&!M[h].includes("DetermineComponentFrameRoot");)h++;for(;p<G.length&&!G[p].includes("DetermineComponentFrameRoot");)p++;if(h===M.length||p===G.length)for(h=M.length-1,p=G.length-1;1<=h&&0<=p&&M[h]!==G[p];)p--;for(;1<=h&&0<=p;h--,p--)if(M[h]!==G[p]){if(h!==1||p!==1)do if(h--,p--,0>p||M[h]!==G[p]){var oe=`
47
- `+M[h].replace(" at new "," at ");return i.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",i.displayName)),oe}while(1<=h&&0<=p);break}}}finally{W=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?le(c):""}function H(i){switch(i.tag){case 26:case 27:case 5:return le(i.type);case 16:return le("Lazy");case 13:return le("Suspense");case 19:return le("SuspenseList");case 0:case 15:return i=ee(i.type,!1),i;case 11:return i=ee(i.type.render,!1),i;case 1:return i=ee(i.type,!0),i;default:return""}}function re(i){try{var o="";do o+=H(i),i=i.return;while(i);return o}catch(c){return`
48
- Error generating stack: `+c.message+`
49
- `+c.stack}}function Z(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function ve(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function P(i){if(Z(i)!==i)throw Error(r(188))}function X(i){var o=i.alternate;if(!o){if(o=Z(i),o===null)throw Error(r(188));return o!==i?null:i}for(var c=i,h=o;;){var p=c.return;if(p===null)break;var _=p.alternate;if(_===null){if(h=p.return,h!==null){c=h;continue}break}if(p.child===_.child){for(_=p.child;_;){if(_===c)return P(p),i;if(_===h)return P(p),o;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=p,h=_;else{for(var R=!1,k=p.child;k;){if(k===c){R=!0,c=p,h=_;break}if(k===h){R=!0,h=p,c=_;break}k=k.sibling}if(!R){for(k=_.child;k;){if(k===c){R=!0,c=_,h=p;break}if(k===h){R=!0,h=_,c=p;break}k=k.sibling}if(!R)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:o}function $(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=$(i),o!==null)return o;i=i.sibling}return null}var Q=Array.isArray,ne=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},Ee=[],ue=-1;function _e(i){return{current:i}}function Oe(i){0>ue||(i.current=Ee[ue],Ee[ue]=null,ue--)}function Re(i,o){ue++,Ee[ue]=i.current,i.current=o}var $e=_e(null),Fe=_e(null),pt=_e(null),Zt=_e(null);function On(i,o){switch(Re(pt,o),Re(Fe,i),Re($e,null),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)&&(o=o.namespaceURI)?_E(o):0;break;default:if(i=i===8?o.parentNode:o,o=i.tagName,i=i.namespaceURI)i=_E(i),o=xE(i,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}Oe($e),Re($e,o)}function Sn(){Oe($e),Oe(Fe),Oe(pt)}function ur(i){i.memoizedState!==null&&Re(Zt,i);var o=$e.current,c=xE(o,i.type);o!==c&&(Re(Fe,i),Re($e,c))}function ba(i){Fe.current===i&&(Oe($e),Oe(Fe)),Zt.current===i&&(Oe(Zt),Ol._currentValue=he)}var dr=Object.prototype.hasOwnProperty,B=e.unstable_scheduleCallback,J=e.unstable_cancelCallback,se=e.unstable_shouldYield,we=e.unstable_requestPaint,be=e.unstable_now,xe=e.unstable_getCurrentPriorityLevel,Le=e.unstable_ImmediatePriority,rt=e.unstable_UserBlockingPriority,ot=e.unstable_NormalPriority,An=e.unstable_LowPriority,_a=e.unstable_IdlePriority,Tr=e.log,kh=e.unstable_setDisableYieldValue,Yr=null,tn=null;function Oh(i){if(tn&&typeof tn.onCommitFiberRoot=="function")try{tn.onCommitFiberRoot(Yr,i,void 0,(i.current.flags&128)===128)}catch{}}function fr(i){if(typeof Tr=="function"&&kh(i),tn&&typeof tn.setStrictMode=="function")try{tn.setStrictMode(Yr,i)}catch{}}var yn=Math.clz32?Math.clz32:XD,nu=Math.log,YD=Math.LN2;function XD(i){return i>>>=0,i===0?32:31-(nu(i)/YD|0)|0}var ru=128,iu=4194304;function xa(i){var o=i&42;if(o!==0)return o;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function au(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,p=i.suspendedLanes,_=i.pingedLanes,R=i.warmLanes;i=i.finishedLanes!==0;var k=c&134217727;return k!==0?(c=k&~p,c!==0?h=xa(c):(_&=k,_!==0?h=xa(_):i||(R=k&~R,R!==0&&(h=xa(R))))):(k=c&~p,k!==0?h=xa(k):_!==0?h=xa(_):i||(R=c&~R,R!==0&&(h=xa(R)))),h===0?0:o!==0&&o!==h&&(o&p)===0&&(p=h&-h,R=o&-o,p>=R||p===32&&(R&4194176)!==0)?o:h}function Us(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function QD(i,o){switch(i){case 1:case 2:case 4:case 8:return o+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+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 f0(){var i=ru;return ru<<=1,(ru&4194176)===0&&(ru=128),i}function h0(){var i=iu;return iu<<=1,(iu&62914560)===0&&(iu=4194304),i}function Dh(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function $s(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function JD(i,o,c,h,p,_){var R=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,M=i.expirationTimes,G=i.hiddenUpdates;for(c=R&~c;0<c;){var oe=31-yn(c),me=1<<oe;k[oe]=0,M[oe]=-1;var te=G[oe];if(te!==null)for(G[oe]=null,oe=0;oe<te.length;oe++){var ae=te[oe];ae!==null&&(ae.lane&=-536870913)}c&=~me}h!==0&&m0(i,h,0),_!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=_&~(R&~o))}function m0(i,o,c){i.pendingLanes|=o,i.suspendedLanes&=~o;var h=31-yn(o);i.entangledLanes|=o,i.entanglements[h]=i.entanglements[h]|1073741824|c&4194218}function p0(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-yn(c),p=1<<h;p&o|i[h]&o&&(i[h]|=o),c&=~p}}function g0(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function y0(){var i=ne.p;return i!==0?i:(i=window.event,i===void 0?32:VE(i.type))}function eI(i,o){var c=ne.p;try{return ne.p=i,o()}finally{ne.p=c}}var Ci=Math.random().toString(36).slice(2),un="__reactFiber$"+Ci,wn="__reactProps$"+Ci,po="__reactContainer$"+Ci,Ih="__reactEvents$"+Ci,tI="__reactListeners$"+Ci,nI="__reactHandles$"+Ci,v0="__reactResources$"+Ci,Hs="__reactMarker$"+Ci;function Lh(i){delete i[un],delete i[wn],delete i[Ih],delete i[tI],delete i[nI]}function Ea(i){var o=i[un];if(o)return o;for(var c=i.parentNode;c;){if(o=c[po]||c[un]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=AE(i);i!==null;){if(c=i[un])return c;i=AE(i)}return o}i=c,c=i.parentNode}return null}function go(i){if(i=i[un]||i[po]){var o=i.tag;if(o===5||o===6||o===13||o===26||o===27||o===3)return i}return null}function Fs(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function yo(i){var o=i[v0];return o||(o=i[v0]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function qt(i){i[Hs]=!0}var b0=new Set,_0={};function Sa(i,o){vo(i,o),vo(i+"Capture",o)}function vo(i,o){for(_0[i]=o,i=0;i<o.length;i++)b0.add(o[i])}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rI=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]*$"),x0={},E0={};function iI(i){return dr.call(E0,i)?!0:dr.call(x0,i)?!1:rI.test(i)?E0[i]=!0:(x0[i]=!0,!1)}function ou(i,o,c){if(iI(o))if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var h=o.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+c)}}function su(i,o,c){if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+c)}}function Qr(i,o,c,h){if(h===null)i.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(o,c,""+h)}}function Hn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function S0(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function aI(i){var o=S0(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,_=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return p.call(this)},set:function(R){h=""+R,_.call(this,R)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(R){h=""+R},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function lu(i){i._valueTracker||(i._valueTracker=aI(i))}function A0(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=S0(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function cu(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 oI=/[\n"\\]/g;function Fn(i){return i.replace(oI,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function jh(i,o,c,h,p,_,R,k){i.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?i.type=R:i.removeAttribute("type"),o!=null?R==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+Hn(o)):i.value!==""+Hn(o)&&(i.value=""+Hn(o)):R!=="submit"&&R!=="reset"||i.removeAttribute("value"),o!=null?Mh(i,R,Hn(o)):c!=null?Mh(i,R,Hn(c)):h!=null&&i.removeAttribute("value"),p==null&&_!=null&&(i.defaultChecked=!!_),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Hn(k):i.removeAttribute("name")}function w0(i,o,c,h,p,_,R,k){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.type=_),o!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||o!=null))return;c=c!=null?""+Hn(c):"",o=o!=null?""+Hn(o):c,k||o===i.value||(i.value=o),i.defaultValue=o}h=h??p,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=k?i.checked:!!h,i.defaultChecked=!!h,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.name=R)}function Mh(i,o,c){o==="number"&&cu(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function bo(i,o,c,h){if(i=i.options,o){o={};for(var p=0;p<c.length;p++)o["$"+c[p]]=!0;for(c=0;c<i.length;c++)p=o.hasOwnProperty("$"+i[c].value),i[c].selected!==p&&(i[c].selected=p),p&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Hn(c),o=null,p=0;p<i.length;p++){if(i[p].value===c){i[p].selected=!0,h&&(i[p].defaultSelected=!0);return}o!==null||i[p].disabled||(o=i[p])}o!==null&&(o.selected=!0)}}function T0(i,o,c){if(o!=null&&(o=""+Hn(o),o!==i.value&&(i.value=o),c==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=c!=null?""+Hn(c):""}function R0(i,o,c,h){if(o==null){if(h!=null){if(c!=null)throw Error(r(92));if(Q(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),o=c}c=Hn(o),i.defaultValue=c,h=i.textContent,h===c&&h!==""&&h!==null&&(i.value=h)}function _o(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var sI=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 C0(i,o,c){var h=o.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":h?i.setProperty(o,c):typeof c!="number"||c===0||sI.has(o)?o==="float"?i.cssFloat=c:i[o]=(""+c).trim():i[o]=c+"px"}function N0(i,o,c){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||o!=null&&o.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var p in o)h=o[p],o.hasOwnProperty(p)&&c[p]!==h&&C0(i,p,h)}else for(var _ in o)o.hasOwnProperty(_)&&C0(i,_,o[_])}function Ph(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 lI=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"]]),cI=/^[\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 uu(i){return cI.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var zh=null;function Vh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xo=null,Eo=null;function k0(i){var o=go(i);if(o&&(i=o.stateNode)){var c=i[wn]||null;e:switch(i=o.stateNode,o.type){case"input":if(jh(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Fn(""+o)+'"][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==i&&h.form===i.form){var p=h[wn]||null;if(!p)throw Error(r(90));jh(h,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(o=0;o<c.length;o++)h=c[o],h.form===i.form&&A0(h)}break e;case"textarea":T0(i,c.value,c.defaultValue);break e;case"select":o=c.value,o!=null&&bo(i,!!c.multiple,o,!1)}}}var Bh=!1;function O0(i,o,c){if(Bh)return i(o,c);Bh=!0;try{var h=i(o);return h}finally{if(Bh=!1,(xo!==null||Eo!==null)&&(Zu(),xo&&(o=xo,i=Eo,Eo=xo=null,k0(o),i)))for(o=0;o<i.length;o++)k0(i[o])}}function Gs(i,o){var c=i.stateNode;if(c===null)return null;var h=c[wn]||null;if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,o,typeof c));return c}var Uh=!1;if(Xr)try{var Ks={};Object.defineProperty(Ks,"passive",{get:function(){Uh=!0}}),window.addEventListener("test",Ks,Ks),window.removeEventListener("test",Ks,Ks)}catch{Uh=!1}var Ni=null,$h=null,du=null;function D0(){if(du)return du;var i,o=$h,c=o.length,h,p="value"in Ni?Ni.value:Ni.textContent,_=p.length;for(i=0;i<c&&o[i]===p[i];i++);var R=c-i;for(h=1;h<=R&&o[c-h]===p[_-h];h++);return du=p.slice(i,1<h?1-h:void 0)}function fu(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function hu(){return!0}function I0(){return!1}function Tn(i){function o(c,h,p,_,R){this._reactName=c,this._targetInst=p,this.type=h,this.nativeEvent=_,this.target=R,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(c=i[k],this[k]=c?c(_):_[k]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?hu:I0,this.isPropagationStopped=I0,this}return U(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=hu)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=hu)},persist:function(){},isPersistent:hu}),o}var Aa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=Tn(Aa),Zs=U({},Aa,{view:0,detail:0}),uI=Tn(Zs),Hh,Fh,qs,pu=U({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kh,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"?(Hh=i.screenX-qs.screenX,Fh=i.screenY-qs.screenY):Fh=Hh=0,qs=i),Hh)},movementY:function(i){return"movementY"in i?i.movementY:Fh}}),L0=Tn(pu),dI=U({},pu,{dataTransfer:0}),fI=Tn(dI),hI=U({},Zs,{relatedTarget:0}),Gh=Tn(hI),mI=U({},Aa,{animationName:0,elapsedTime:0,pseudoElement:0}),pI=Tn(mI),gI=U({},Aa,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),yI=Tn(gI),vI=U({},Aa,{data:0}),j0=Tn(vI),bI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_I={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"},xI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function EI(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=xI[i])?!!o[i]:!1}function Kh(){return EI}var SI=U({},Zs,{key:function(i){if(i.key){var o=bI[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=fu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?_I[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kh,charCode:function(i){return i.type==="keypress"?fu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),AI=Tn(SI),wI=U({},pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),M0=Tn(wI),TI=U({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kh}),RI=Tn(TI),CI=U({},Aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),NI=Tn(CI),kI=U({},pu,{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}),OI=Tn(kI),DI=U({},Aa,{newState:0,oldState:0}),II=Tn(DI),LI=[9,13,27,32],Zh=Xr&&"CompositionEvent"in window,Ws=null;Xr&&"documentMode"in document&&(Ws=document.documentMode);var jI=Xr&&"TextEvent"in window&&!Ws,P0=Xr&&(!Zh||Ws&&8<Ws&&11>=Ws),z0=" ",V0=!1;function B0(i,o){switch(i){case"keyup":return LI.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function U0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var So=!1;function MI(i,o){switch(i){case"compositionend":return U0(o);case"keypress":return o.which!==32?null:(V0=!0,z0);case"textInput":return i=o.data,i===z0&&V0?null:i;default:return null}}function PI(i,o){if(So)return i==="compositionend"||!Zh&&B0(i,o)?(i=D0(),du=$h=Ni=null,So=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return P0&&o.locale!=="ko"?null:o.data;default:return null}}var zI={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 $0(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!zI[i.type]:o==="textarea"}function H0(i,o,c,h){xo?Eo?Eo.push(h):Eo=[h]:xo=h,o=Qu(o,"onChange"),0<o.length&&(c=new mu("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var Ys=null,Xs=null;function VI(i){pE(i,0)}function gu(i){var o=Fs(i);if(A0(o))return i}function F0(i,o){if(i==="change")return o}var G0=!1;if(Xr){var qh;if(Xr){var Wh="oninput"in document;if(!Wh){var K0=document.createElement("div");K0.setAttribute("oninput","return;"),Wh=typeof K0.oninput=="function"}qh=Wh}else qh=!1;G0=qh&&(!document.documentMode||9<document.documentMode)}function Z0(){Ys&&(Ys.detachEvent("onpropertychange",q0),Xs=Ys=null)}function q0(i){if(i.propertyName==="value"&&gu(Xs)){var o=[];H0(o,Xs,i,Vh(i)),O0(VI,o)}}function BI(i,o,c){i==="focusin"?(Z0(),Ys=o,Xs=c,Ys.attachEvent("onpropertychange",q0)):i==="focusout"&&Z0()}function UI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return gu(Xs)}function $I(i,o){if(i==="click")return gu(o)}function HI(i,o){if(i==="input"||i==="change")return gu(o)}function FI(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Dn=typeof Object.is=="function"?Object.is:FI;function Qs(i,o){if(Dn(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var p=c[h];if(!dr.call(o,p)||!Dn(i[p],o[p]))return!1}return!0}function W0(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Y0(i,o){var c=W0(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=o&&h>=o)return{node:c,offset:o-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=W0(c)}}function X0(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?X0(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Q0(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=cu(i.document);o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)i=o.contentWindow;else break;o=cu(i.document)}return o}function Yh(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function GI(i,o){var c=Q0(o);o=i.focusedElem;var h=i.selectionRange;if(c!==o&&o&&o.ownerDocument&&X0(o.ownerDocument.documentElement,o)){if(h!==null&&Yh(o)){if(i=h.start,c=h.end,c===void 0&&(c=i),"selectionStart"in o)o.selectionStart=i,o.selectionEnd=Math.min(c,o.value.length);else if(c=(i=o.ownerDocument||document)&&i.defaultView||window,c.getSelection){c=c.getSelection();var p=o.textContent.length,_=Math.min(h.start,p);h=h.end===void 0?_:Math.min(h.end,p),!c.extend&&_>h&&(p=h,h=_,_=p),p=Y0(o,_);var R=Y0(o,h);p&&R&&(c.rangeCount!==1||c.anchorNode!==p.node||c.anchorOffset!==p.offset||c.focusNode!==R.node||c.focusOffset!==R.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),c.removeAllRanges(),_>h?(c.addRange(i),c.extend(R.node,R.offset)):(i.setEnd(R.node,R.offset),c.addRange(i)))}}for(i=[],c=o;c=c.parentNode;)c.nodeType===1&&i.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<i.length;o++)c=i[o],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var KI=Xr&&"documentMode"in document&&11>=document.documentMode,Ao=null,Xh=null,Js=null,Qh=!1;function J0(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Qh||Ao==null||Ao!==cu(h)||(h=Ao,"selectionStart"in h&&Yh(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Js&&Qs(Js,h)||(Js=h,h=Qu(Xh,"onSelect"),0<h.length&&(o=new mu("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Ao)))}function wa(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var wo={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},Jh={},e_={};Xr&&(e_=document.createElement("div").style,"AnimationEvent"in window||(delete wo.animationend.animation,delete wo.animationiteration.animation,delete wo.animationstart.animation),"TransitionEvent"in window||delete wo.transitionend.transition);function Ta(i){if(Jh[i])return Jh[i];if(!wo[i])return i;var o=wo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in e_)return Jh[i]=o[c];return i}var t_=Ta("animationend"),n_=Ta("animationiteration"),r_=Ta("animationstart"),ZI=Ta("transitionrun"),qI=Ta("transitionstart"),WI=Ta("transitioncancel"),i_=Ta("transitionend"),a_=new Map,o_="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function hr(i,o){a_.set(i,o),Sa(o,[i])}var Gn=[],To=0,em=0;function yu(){for(var i=To,o=em=To=0;o<i;){var c=Gn[o];Gn[o++]=null;var h=Gn[o];Gn[o++]=null;var p=Gn[o];Gn[o++]=null;var _=Gn[o];if(Gn[o++]=null,h!==null&&p!==null){var R=h.pending;R===null?p.next=p:(p.next=R.next,R.next=p),h.pending=p}_!==0&&s_(c,p,_)}}function vu(i,o,c,h){Gn[To++]=i,Gn[To++]=o,Gn[To++]=c,Gn[To++]=h,em|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function tm(i,o,c,h){return vu(i,o,c,h),bu(i)}function ki(i,o){return vu(i,null,null,o),bu(i)}function s_(i,o,c){i.lanes|=c;var h=i.alternate;h!==null&&(h.lanes|=c);for(var p=!1,_=i.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.tag===22&&(i=_.stateNode,i===null||i._visibility&1||(p=!0)),i=_,_=_.return;p&&o!==null&&i.tag===3&&(_=i.stateNode,p=31-yn(c),_=_.hiddenUpdates,i=_[p],i===null?_[p]=[o]:i.push(o),o.lane=c|536870912)}function bu(i){if(50<Al)throw Al=0,sp=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Ro={},l_=new WeakMap;function Kn(i,o){if(typeof i=="object"&&i!==null){var c=l_.get(i);return c!==void 0?c:(o={value:i,source:o,stack:re(o)},l_.set(i,o),o)}return{value:i,source:o,stack:re(o)}}var Co=[],No=0,_u=null,xu=0,Zn=[],qn=0,Ra=null,Jr=1,ei="";function Ca(i,o){Co[No++]=xu,Co[No++]=_u,_u=i,xu=o}function c_(i,o,c){Zn[qn++]=Jr,Zn[qn++]=ei,Zn[qn++]=Ra,Ra=i;var h=Jr;i=ei;var p=32-yn(h)-1;h&=~(1<<p),c+=1;var _=32-yn(o)+p;if(30<_){var R=p-p%5;_=(h&(1<<R)-1).toString(32),h>>=R,p-=R,Jr=1<<32-yn(o)+p|c<<p|h,ei=_+i}else Jr=1<<_|c<<p|h,ei=i}function nm(i){i.return!==null&&(Ca(i,1),c_(i,1,0))}function rm(i){for(;i===_u;)_u=Co[--No],Co[No]=null,xu=Co[--No],Co[No]=null;for(;i===Ra;)Ra=Zn[--qn],Zn[qn]=null,ei=Zn[--qn],Zn[qn]=null,Jr=Zn[--qn],Zn[qn]=null}var vn=null,nn=null,it=!1,mr=null,Rr=!1,im=Error(r(519));function Na(i){var o=Error(r(418,""));throw nl(Kn(o,i)),im}function u_(i){var o=i.stateNode,c=i.type,h=i.memoizedProps;switch(o[un]=i,o[wn]=h,c){case"dialog":et("cancel",o),et("close",o);break;case"iframe":case"object":case"embed":et("load",o);break;case"video":case"audio":for(c=0;c<Tl.length;c++)et(Tl[c],o);break;case"source":et("error",o);break;case"img":case"image":case"link":et("error",o),et("load",o);break;case"details":et("toggle",o);break;case"input":et("invalid",o),w0(o,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0),lu(o);break;case"select":et("invalid",o);break;case"textarea":et("invalid",o),R0(o,h.value,h.defaultValue,h.children),lu(o)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||o.textContent===""+c||h.suppressHydrationWarning===!0||bE(o.textContent,c)?(h.popover!=null&&(et("beforetoggle",o),et("toggle",o)),h.onScroll!=null&&et("scroll",o),h.onScrollEnd!=null&&et("scrollend",o),h.onClick!=null&&(o.onclick=Ju),o=!0):o=!1,o||Na(i)}function d_(i){for(vn=i.return;vn;)switch(vn.tag){case 3:case 27:Rr=!0;return;case 5:case 13:Rr=!1;return;default:vn=vn.return}}function el(i){if(i!==vn)return!1;if(!it)return d_(i),it=!0,!1;var o=!1,c;if((c=i.tag!==3&&i.tag!==27)&&((c=i.tag===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Ap(i.type,i.memoizedProps)),c=!c),c&&(o=!0),o&&nn&&Na(i),d_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(o===0){nn=gr(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++;i=i.nextSibling}nn=null}}else nn=vn?gr(i.stateNode.nextSibling):null;return!0}function tl(){nn=vn=null,it=!1}function nl(i){mr===null?mr=[i]:mr.push(i)}var rl=Error(r(460)),f_=Error(r(474)),am={then:function(){}};function h_(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Eu(){}function m_(i,o,c){switch(c=i[c],c===void 0?i.push(o):c!==o&&(o.then(Eu,Eu),o=c),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,i===rl?Error(r(483)):i;default:if(typeof o.status=="string")o.then(Eu,Eu);else{if(i=ft,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(h){if(o.status==="pending"){var p=o;p.status="fulfilled",p.value=h}},function(h){if(o.status==="pending"){var p=o;p.status="rejected",p.reason=h}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,i===rl?Error(r(483)):i}throw il=o,rl}}var il=null;function p_(){if(il===null)throw Error(r(459));var i=il;return il=null,i}var ko=null,al=0;function Su(i){var o=al;return al+=1,ko===null&&(ko=[]),m_(ko,i,o)}function ol(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Au(i,o){throw o.$$typeof===s?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function g_(i){var o=i._init;return o(i._payload)}function y_(i){function o(q,F){if(i){var Y=q.deletions;Y===null?(q.deletions=[F],q.flags|=16):Y.push(F)}}function c(q,F){if(!i)return null;for(;F!==null;)o(q,F),F=F.sibling;return null}function h(q){for(var F=new Map;q!==null;)q.key!==null?F.set(q.key,q):F.set(q.index,q),q=q.sibling;return F}function p(q,F){return q=$i(q,F),q.index=0,q.sibling=null,q}function _(q,F,Y){return q.index=Y,i?(Y=q.alternate,Y!==null?(Y=Y.index,Y<F?(q.flags|=33554434,F):Y):(q.flags|=33554434,F)):(q.flags|=1048576,F)}function R(q){return i&&q.alternate===null&&(q.flags|=33554434),q}function k(q,F,Y,de){return F===null||F.tag!==6?(F=Jm(Y,q.mode,de),F.return=q,F):(F=p(F,Y),F.return=q,F)}function M(q,F,Y,de){var Ce=Y.type;return Ce===d?oe(q,F,Y.props.children,de,Y.key):F!==null&&(F.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===w&&g_(Ce)===F.type)?(F=p(F,Y.props),ol(F,Y),F.return=q,F):(F=$u(Y.type,Y.key,Y.props,null,q.mode,de),ol(F,Y),F.return=q,F)}function G(q,F,Y,de){return F===null||F.tag!==4||F.stateNode.containerInfo!==Y.containerInfo||F.stateNode.implementation!==Y.implementation?(F=ep(Y,q.mode,de),F.return=q,F):(F=p(F,Y.children||[]),F.return=q,F)}function oe(q,F,Y,de,Ce){return F===null||F.tag!==7?(F=Va(Y,q.mode,de,Ce),F.return=q,F):(F=p(F,Y),F.return=q,F)}function me(q,F,Y){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Jm(""+F,q.mode,Y),F.return=q,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case l:return Y=$u(F.type,F.key,F.props,null,q.mode,Y),ol(Y,F),Y.return=q,Y;case u:return F=ep(F,q.mode,Y),F.return=q,F;case w:var de=F._init;return F=de(F._payload),me(q,F,Y)}if(Q(F)||j(F))return F=Va(F,q.mode,Y,null),F.return=q,F;if(typeof F.then=="function")return me(q,Su(F),Y);if(F.$$typeof===E)return me(q,Vu(q,F),Y);Au(q,F)}return null}function te(q,F,Y,de){var Ce=F!==null?F.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Ce!==null?null:k(q,F,""+Y,de);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case l:return Y.key===Ce?M(q,F,Y,de):null;case u:return Y.key===Ce?G(q,F,Y,de):null;case w:return Ce=Y._init,Y=Ce(Y._payload),te(q,F,Y,de)}if(Q(Y)||j(Y))return Ce!==null?null:oe(q,F,Y,de,null);if(typeof Y.then=="function")return te(q,F,Su(Y),de);if(Y.$$typeof===E)return te(q,F,Vu(q,Y),de);Au(q,Y)}return null}function ae(q,F,Y,de,Ce){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return q=q.get(Y)||null,k(F,q,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case l:return q=q.get(de.key===null?Y:de.key)||null,M(F,q,de,Ce);case u:return q=q.get(de.key===null?Y:de.key)||null,G(F,q,de,Ce);case w:var Qe=de._init;return de=Qe(de._payload),ae(q,F,Y,de,Ce)}if(Q(de)||j(de))return q=q.get(Y)||null,oe(F,q,de,Ce,null);if(typeof de.then=="function")return ae(q,F,Y,Su(de),Ce);if(de.$$typeof===E)return ae(q,F,Y,Vu(F,de),Ce);Au(F,de)}return null}function De(q,F,Y,de){for(var Ce=null,Qe=null,je=F,Me=F=0,Xt=null;je!==null&&Me<Y.length;Me++){je.index>Me?(Xt=je,je=null):Xt=je.sibling;var at=te(q,je,Y[Me],de);if(at===null){je===null&&(je=Xt);break}i&&je&&at.alternate===null&&o(q,je),F=_(at,F,Me),Qe===null?Ce=at:Qe.sibling=at,Qe=at,je=Xt}if(Me===Y.length)return c(q,je),it&&Ca(q,Me),Ce;if(je===null){for(;Me<Y.length;Me++)je=me(q,Y[Me],de),je!==null&&(F=_(je,F,Me),Qe===null?Ce=je:Qe.sibling=je,Qe=je);return it&&Ca(q,Me),Ce}for(je=h(je);Me<Y.length;Me++)Xt=ae(je,q,Me,Y[Me],de),Xt!==null&&(i&&Xt.alternate!==null&&je.delete(Xt.key===null?Me:Xt.key),F=_(Xt,F,Me),Qe===null?Ce=Xt:Qe.sibling=Xt,Qe=Xt);return i&&je.forEach(function(Wi){return o(q,Wi)}),it&&Ca(q,Me),Ce}function He(q,F,Y,de){if(Y==null)throw Error(r(151));for(var Ce=null,Qe=null,je=F,Me=F=0,Xt=null,at=Y.next();je!==null&&!at.done;Me++,at=Y.next()){je.index>Me?(Xt=je,je=null):Xt=je.sibling;var Wi=te(q,je,at.value,de);if(Wi===null){je===null&&(je=Xt);break}i&&je&&Wi.alternate===null&&o(q,je),F=_(Wi,F,Me),Qe===null?Ce=Wi:Qe.sibling=Wi,Qe=Wi,je=Xt}if(at.done)return c(q,je),it&&Ca(q,Me),Ce;if(je===null){for(;!at.done;Me++,at=Y.next())at=me(q,at.value,de),at!==null&&(F=_(at,F,Me),Qe===null?Ce=at:Qe.sibling=at,Qe=at);return it&&Ca(q,Me),Ce}for(je=h(je);!at.done;Me++,at=Y.next())at=ae(je,q,Me,at.value,de),at!==null&&(i&&at.alternate!==null&&je.delete(at.key===null?Me:at.key),F=_(at,F,Me),Qe===null?Ce=at:Qe.sibling=at,Qe=at);return i&&je.forEach(function(cj){return o(q,cj)}),it&&Ca(q,Me),Ce}function Ct(q,F,Y,de){if(typeof Y=="object"&&Y!==null&&Y.type===d&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case l:e:{for(var Ce=Y.key;F!==null;){if(F.key===Ce){if(Ce=Y.type,Ce===d){if(F.tag===7){c(q,F.sibling),de=p(F,Y.props.children),de.return=q,q=de;break e}}else if(F.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===w&&g_(Ce)===F.type){c(q,F.sibling),de=p(F,Y.props),ol(de,Y),de.return=q,q=de;break e}c(q,F);break}else o(q,F);F=F.sibling}Y.type===d?(de=Va(Y.props.children,q.mode,de,Y.key),de.return=q,q=de):(de=$u(Y.type,Y.key,Y.props,null,q.mode,de),ol(de,Y),de.return=q,q=de)}return R(q);case u:e:{for(Ce=Y.key;F!==null;){if(F.key===Ce)if(F.tag===4&&F.stateNode.containerInfo===Y.containerInfo&&F.stateNode.implementation===Y.implementation){c(q,F.sibling),de=p(F,Y.children||[]),de.return=q,q=de;break e}else{c(q,F);break}else o(q,F);F=F.sibling}de=ep(Y,q.mode,de),de.return=q,q=de}return R(q);case w:return Ce=Y._init,Y=Ce(Y._payload),Ct(q,F,Y,de)}if(Q(Y))return De(q,F,Y,de);if(j(Y)){if(Ce=j(Y),typeof Ce!="function")throw Error(r(150));return Y=Ce.call(Y),He(q,F,Y,de)}if(typeof Y.then=="function")return Ct(q,F,Su(Y),de);if(Y.$$typeof===E)return Ct(q,F,Vu(q,Y),de);Au(q,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,F!==null&&F.tag===6?(c(q,F.sibling),de=p(F,Y),de.return=q,q=de):(c(q,F),de=Jm(Y,q.mode,de),de.return=q,q=de),R(q)):c(q,F)}return function(q,F,Y,de){try{al=0;var Ce=Ct(q,F,Y,de);return ko=null,Ce}catch(je){if(je===rl)throw je;var Qe=Qn(29,je,null,q.mode);return Qe.lanes=de,Qe.return=q,Qe}finally{}}}var ka=y_(!0),v_=y_(!1),Oo=_e(null),wu=_e(0);function b_(i,o){i=di,Re(wu,i),Re(Oo,o),di=i|o.baseLanes}function om(){Re(wu,di),Re(Oo,Oo.current)}function sm(){di=wu.current,Oe(Oo),Oe(wu)}var Wn=_e(null),Cr=null;function Oi(i){var o=i.alternate;Re(Ut,Ut.current&1),Re(Wn,i),Cr===null&&(o===null||Oo.current!==null||o.memoizedState!==null)&&(Cr=i)}function __(i){if(i.tag===22){if(Re(Ut,Ut.current),Re(Wn,i),Cr===null){var o=i.alternate;o!==null&&o.memoizedState!==null&&(Cr=i)}}else Di()}function Di(){Re(Ut,Ut.current),Re(Wn,Wn.current)}function ti(i){Oe(Wn),Cr===i&&(Cr=null),Oe(Ut)}var Ut=_e(0);function Tu(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var YI=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(c,h){i.push(h)}};this.abort=function(){o.aborted=!0,i.forEach(function(c){return c()})}},XI=e.unstable_scheduleCallback,QI=e.unstable_NormalPriority,$t={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lm(){return{controller:new YI,data:new Map,refCount:0}}function sl(i){i.refCount--,i.refCount===0&&XI(QI,function(){i.controller.abort()})}var ll=null,cm=0,Do=0,Io=null;function JI(i,o){if(ll===null){var c=ll=[];cm=0,Do=pp(),Io={status:"pending",value:void 0,then:function(h){c.push(h)}}}return cm++,o.then(x_,x_),o}function x_(){if(--cm===0&&ll!==null){Io!==null&&(Io.status="fulfilled");var i=ll;ll=null,Do=0,Io=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function eL(i,o){var c=[],h={status:"pending",value:null,reason:null,then:function(p){c.push(p)}};return i.then(function(){h.status="fulfilled",h.value=o;for(var p=0;p<c.length;p++)(0,c[p])(o)},function(p){for(h.status="rejected",h.reason=p,p=0;p<c.length;p++)(0,c[p])(void 0)}),h}var E_=z.S;z.S=function(i,o){typeof o=="object"&&o!==null&&typeof o.then=="function"&&JI(i,o),E_!==null&&E_(i,o)};var Oa=_e(null);function um(){var i=Oa.current;return i!==null?i:ft.pooledCache}function Ru(i,o){o===null?Re(Oa,Oa.current):Re(Oa,o.pool)}function S_(){var i=um();return i===null?null:{parent:$t._currentValue,pool:i}}var Ii=0,Ye=null,lt=null,Lt=null,Cu=!1,Lo=!1,Da=!1,Nu=0,cl=0,jo=null,tL=0;function kt(){throw Error(r(321))}function dm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!Dn(i[c],o[c]))return!1;return!0}function fm(i,o,c,h,p,_){return Ii=_,Ye=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,z.H=i===null||i.memoizedState===null?Ia:Li,Da=!1,_=c(h,p),Da=!1,Lo&&(_=w_(o,c,h,p)),A_(i),_}function A_(i){z.H=Nr;var o=lt!==null&&lt.next!==null;if(Ii=0,Lt=lt=Ye=null,Cu=!1,cl=0,jo=null,o)throw Error(r(300));i===null||Wt||(i=i.dependencies,i!==null&&zu(i)&&(Wt=!0))}function w_(i,o,c,h){Ye=i;var p=0;do{if(Lo&&(jo=null),cl=0,Lo=!1,25<=p)throw Error(r(301));if(p+=1,Lt=lt=null,i.updateQueue!=null){var _=i.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}z.H=La,_=o(c,h)}while(Lo);return _}function nL(){var i=z.H,o=i.useState()[0];return o=typeof o.then=="function"?ul(o):o,i=i.useState()[0],(lt!==null?lt.memoizedState:null)!==i&&(Ye.flags|=1024),o}function hm(){var i=Nu!==0;return Nu=0,i}function mm(i,o,c){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~c}function pm(i){if(Cu){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Cu=!1}Ii=0,Lt=lt=Ye=null,Lo=!1,cl=Nu=0,jo=null}function Rn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Ye.memoizedState=Lt=i:Lt=Lt.next=i,Lt}function jt(){if(lt===null){var i=Ye.alternate;i=i!==null?i.memoizedState:null}else i=lt.next;var o=Lt===null?Ye.memoizedState:Lt.next;if(o!==null)Lt=o,lt=i;else{if(i===null)throw Ye.alternate===null?Error(r(467)):Error(r(310));lt=i,i={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},Lt===null?Ye.memoizedState=Lt=i:Lt=Lt.next=i}return Lt}var ku;ku=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function ul(i){var o=cl;return cl+=1,jo===null&&(jo=[]),i=m_(jo,i,o),o=Ye,(Lt===null?o.memoizedState:Lt.next)===null&&(o=o.alternate,z.H=o===null||o.memoizedState===null?Ia:Li),i}function Ou(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return ul(i);if(i.$$typeof===E)return dn(i)}throw Error(r(438,String(i)))}function gm(i){var o=null,c=Ye.updateQueue;if(c!==null&&(o=c.memoCache),o==null){var h=Ye.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(o={data:h.data.map(function(p){return p.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),c===null&&(c=ku(),Ye.updateQueue=c),c.memoCache=o,c=o.data[o.index],c===void 0)for(c=o.data[o.index]=Array(i),h=0;h<i;h++)c[h]=O;return o.index++,c}function ni(i,o){return typeof o=="function"?o(i):o}function Du(i){var o=jt();return ym(o,lt,i)}function ym(i,o,c){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var p=i.baseQueue,_=h.pending;if(_!==null){if(p!==null){var R=p.next;p.next=_.next,_.next=R}o.baseQueue=p=_,h.pending=null}if(_=i.baseState,p===null)i.memoizedState=_;else{o=p.next;var k=R=null,M=null,G=o,oe=!1;do{var me=G.lane&-536870913;if(me!==G.lane?(nt&me)===me:(Ii&me)===me){var te=G.revertLane;if(te===0)M!==null&&(M=M.next={lane:0,revertLane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),me===Do&&(oe=!0);else if((Ii&te)===te){G=G.next,te===Do&&(oe=!0);continue}else me={lane:0,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},M===null?(k=M=me,R=_):M=M.next=me,Ye.lanes|=te,Hi|=te;me=G.action,Da&&c(_,me),_=G.hasEagerState?G.eagerState:c(_,me)}else te={lane:me,revertLane:G.revertLane,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},M===null?(k=M=te,R=_):M=M.next=te,Ye.lanes|=me,Hi|=me;G=G.next}while(G!==null&&G!==o);if(M===null?R=_:M.next=k,!Dn(_,i.memoizedState)&&(Wt=!0,oe&&(c=Io,c!==null)))throw c;i.memoizedState=_,i.baseState=R,i.baseQueue=M,h.lastRenderedState=_}return p===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function vm(i){var o=jt(),c=o.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var h=c.dispatch,p=c.pending,_=o.memoizedState;if(p!==null){c.pending=null;var R=p=p.next;do _=i(_,R.action),R=R.next;while(R!==p);Dn(_,o.memoizedState)||(Wt=!0),o.memoizedState=_,o.baseQueue===null&&(o.baseState=_),c.lastRenderedState=_}return[_,h]}function T_(i,o,c){var h=Ye,p=jt(),_=it;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=o();var R=!Dn((lt||p).memoizedState,c);if(R&&(p.memoizedState=c,Wt=!0),p=p.queue,xm(N_.bind(null,h,p,i),[i]),p.getSnapshot!==o||R||Lt!==null&&Lt.memoizedState.tag&1){if(h.flags|=2048,Mo(9,C_.bind(null,h,p,c,o),{destroy:void 0},null),ft===null)throw Error(r(349));_||(Ii&60)!==0||R_(h,o,c)}return c}function R_(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Ye.updateQueue,o===null?(o=ku(),Ye.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function C_(i,o,c,h){o.value=c,o.getSnapshot=h,k_(o)&&O_(i)}function N_(i,o,c){return c(function(){k_(o)&&O_(i)})}function k_(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!Dn(i,c)}catch{return!0}}function O_(i){var o=ki(i,2);o!==null&&bn(o,i,2)}function bm(i){var o=Rn();if(typeof i=="function"){var c=i;if(i=c(),Da){fr(!0);try{c()}finally{fr(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:i},o}function D_(i,o,c,h){return i.baseState=c,ym(i,lt,typeof h=="function"?h:ni)}function rL(i,o,c,h,p){if(ju(i))throw Error(r(485));if(i=o.action,i!==null){var _={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){_.listeners.push(R)}};z.T!==null?c(!0):_.isTransition=!1,h(_),c=o.pending,c===null?(_.next=o.pending=_,I_(o,_)):(_.next=c.next,o.pending=c.next=_)}}function I_(i,o){var c=o.action,h=o.payload,p=i.state;if(o.isTransition){var _=z.T,R={};z.T=R;try{var k=c(p,h),M=z.S;M!==null&&M(R,k),L_(i,o,k)}catch(G){_m(i,o,G)}finally{z.T=_}}else try{_=c(p,h),L_(i,o,_)}catch(G){_m(i,o,G)}}function L_(i,o,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){j_(i,o,h)},function(h){return _m(i,o,h)}):j_(i,o,c)}function j_(i,o,c){o.status="fulfilled",o.value=c,M_(o),i.state=c,o=i.pending,o!==null&&(c=o.next,c===o?i.pending=null:(c=c.next,o.next=c,I_(i,c)))}function _m(i,o,c){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do o.status="rejected",o.reason=c,M_(o),o=o.next;while(o!==h)}i.action=null}function M_(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function P_(i,o){return o}function z_(i,o){if(it){var c=ft.formState;if(c!==null){e:{var h=Ye;if(it){if(nn){t:{for(var p=nn,_=Rr;p.nodeType!==8;){if(!_){p=null;break t}if(p=gr(p.nextSibling),p===null){p=null;break t}}_=p.data,p=_==="F!"||_==="F"?p:null}if(p){nn=gr(p.nextSibling),h=p.data==="F!";break e}}Na(h)}h=!1}h&&(o=c[0])}}return c=Rn(),c.memoizedState=c.baseState=o,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P_,lastRenderedState:o},c.queue=h,c=nx.bind(null,Ye,h),h.dispatch=c,h=bm(!1),_=Tm.bind(null,Ye,!1,h.queue),h=Rn(),p={state:o,dispatch:null,action:i,pending:null},h.queue=p,c=rL.bind(null,Ye,p,_,c),p.dispatch=c,h.memoizedState=i,[o,c,!1]}function V_(i){var o=jt();return B_(o,lt,i)}function B_(i,o,c){o=ym(i,o,P_)[0],i=Du(ni)[0],o=typeof o=="object"&&o!==null&&typeof o.then=="function"?ul(o):o;var h=jt(),p=h.queue,_=p.dispatch;return c!==h.memoizedState&&(Ye.flags|=2048,Mo(9,iL.bind(null,p,c),{destroy:void 0},null)),[o,_,i]}function iL(i,o){i.action=o}function U_(i){var o=jt(),c=lt;if(c!==null)return B_(o,c,i);jt(),o=o.memoizedState,c=jt();var h=c.queue.dispatch;return c.memoizedState=i,[o,h,!1]}function Mo(i,o,c,h){return i={tag:i,create:o,inst:c,deps:h,next:null},o=Ye.updateQueue,o===null&&(o=ku(),Ye.updateQueue=o),c=o.lastEffect,c===null?o.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,o.lastEffect=i),i}function $_(){return jt().memoizedState}function Iu(i,o,c,h){var p=Rn();Ye.flags|=i,p.memoizedState=Mo(1|o,c,{destroy:void 0},h===void 0?null:h)}function Lu(i,o,c,h){var p=jt();h=h===void 0?null:h;var _=p.memoizedState.inst;lt!==null&&h!==null&&dm(h,lt.memoizedState.deps)?p.memoizedState=Mo(o,c,_,h):(Ye.flags|=i,p.memoizedState=Mo(1|o,c,_,h))}function H_(i,o){Iu(8390656,8,i,o)}function xm(i,o){Lu(2048,8,i,o)}function F_(i,o){return Lu(4,2,i,o)}function G_(i,o){return Lu(4,4,i,o)}function K_(i,o){if(typeof o=="function"){i=i();var c=o(i);return function(){typeof c=="function"?c():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Z_(i,o,c){c=c!=null?c.concat([i]):null,Lu(4,4,K_.bind(null,o,i),c)}function Em(){}function q_(i,o){var c=jt();o=o===void 0?null:o;var h=c.memoizedState;return o!==null&&dm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function W_(i,o){var c=jt();o=o===void 0?null:o;var h=c.memoizedState;if(o!==null&&dm(o,h[1]))return h[0];if(h=i(),Da){fr(!0);try{i()}finally{fr(!1)}}return c.memoizedState=[h,o],h}function Sm(i,o,c){return c===void 0||(Ii&1073741824)!==0?i.memoizedState=o:(i.memoizedState=c,i=Xx(),Ye.lanes|=i,Hi|=i,c)}function Y_(i,o,c,h){return Dn(c,o)?c:Oo.current!==null?(i=Sm(i,c,h),Dn(i,o)||(Wt=!0),i):(Ii&42)===0?(Wt=!0,i.memoizedState=c):(i=Xx(),Ye.lanes|=i,Hi|=i,o)}function X_(i,o,c,h,p){var _=ne.p;ne.p=_!==0&&8>_?_:8;var R=z.T,k={};z.T=k,Tm(i,!1,o,c);try{var M=p(),G=z.S;if(G!==null&&G(k,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var oe=eL(M,h);dl(i,o,oe,Mn(i))}else dl(i,o,h,Mn(i))}catch(me){dl(i,o,{then:function(){},status:"rejected",reason:me},Mn())}finally{ne.p=_,z.T=R}}function aL(){}function Am(i,o,c,h){if(i.tag!==5)throw Error(r(476));var p=Q_(i).queue;X_(i,p,o,he,c===null?aL:function(){return J_(i),c(h)})}function Q_(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:he},next:null};var c={};return o.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:c},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function J_(i){var o=Q_(i).next.queue;dl(i,o,{},Mn())}function wm(){return dn(Ol)}function ex(){return jt().memoizedState}function tx(){return jt().memoizedState}function oL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var c=Mn();i=Pi(c);var h=zi(o,i,c);h!==null&&(bn(h,o,c),ml(h,o,c)),o={cache:lm()},i.payload=o;return}o=o.return}}function sL(i,o,c){var h=Mn();c={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},ju(i)?rx(o,c):(c=tm(i,o,c,h),c!==null&&(bn(c,i,h),ix(c,o,h)))}function nx(i,o,c){var h=Mn();dl(i,o,c,h)}function dl(i,o,c,h){var p={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(ju(i))rx(o,p);else{var _=i.alternate;if(i.lanes===0&&(_===null||_.lanes===0)&&(_=o.lastRenderedReducer,_!==null))try{var R=o.lastRenderedState,k=_(R,c);if(p.hasEagerState=!0,p.eagerState=k,Dn(k,R))return vu(i,o,p,0),ft===null&&yu(),!1}catch{}finally{}if(c=tm(i,o,p,h),c!==null)return bn(c,i,h),ix(c,o,h),!0}return!1}function Tm(i,o,c,h){if(h={lane:2,revertLane:pp(),action:h,hasEagerState:!1,eagerState:null,next:null},ju(i)){if(o)throw Error(r(479))}else o=tm(i,c,h,2),o!==null&&bn(o,i,2)}function ju(i){var o=i.alternate;return i===Ye||o!==null&&o===Ye}function rx(i,o){Lo=Cu=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function ix(i,o,c){if((c&4194176)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,p0(i,c)}}var Nr={readContext:dn,use:Ou,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};Nr.useCacheRefresh=kt,Nr.useMemoCache=kt,Nr.useHostTransitionStatus=kt,Nr.useFormState=kt,Nr.useActionState=kt,Nr.useOptimistic=kt;var Ia={readContext:dn,use:Ou,useCallback:function(i,o){return Rn().memoizedState=[i,o===void 0?null:o],i},useContext:dn,useEffect:H_,useImperativeHandle:function(i,o,c){c=c!=null?c.concat([i]):null,Iu(4194308,4,K_.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Iu(4194308,4,i,o)},useInsertionEffect:function(i,o){Iu(4,2,i,o)},useMemo:function(i,o){var c=Rn();o=o===void 0?null:o;var h=i();if(Da){fr(!0);try{i()}finally{fr(!1)}}return c.memoizedState=[h,o],h},useReducer:function(i,o,c){var h=Rn();if(c!==void 0){var p=c(o);if(Da){fr(!0);try{c(o)}finally{fr(!1)}}}else p=o;return h.memoizedState=h.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},h.queue=i,i=i.dispatch=sL.bind(null,Ye,i),[h.memoizedState,i]},useRef:function(i){var o=Rn();return i={current:i},o.memoizedState=i},useState:function(i){i=bm(i);var o=i.queue,c=nx.bind(null,Ye,o);return o.dispatch=c,[i.memoizedState,c]},useDebugValue:Em,useDeferredValue:function(i,o){var c=Rn();return Sm(c,i,o)},useTransition:function(){var i=bm(!1);return i=X_.bind(null,Ye,i.queue,!0,!1),Rn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,c){var h=Ye,p=Rn();if(it){if(c===void 0)throw Error(r(407));c=c()}else{if(c=o(),ft===null)throw Error(r(349));(nt&60)!==0||R_(h,o,c)}p.memoizedState=c;var _={value:c,getSnapshot:o};return p.queue=_,H_(N_.bind(null,h,_,i),[i]),h.flags|=2048,Mo(9,C_.bind(null,h,_,c,o),{destroy:void 0},null),c},useId:function(){var i=Rn(),o=ft.identifierPrefix;if(it){var c=ei,h=Jr;c=(h&~(1<<32-yn(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=Nu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=tL++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},useCacheRefresh:function(){return Rn().memoizedState=oL.bind(null,Ye)}};Ia.useMemoCache=gm,Ia.useHostTransitionStatus=wm,Ia.useFormState=z_,Ia.useActionState=z_,Ia.useOptimistic=function(i){var o=Rn();o.memoizedState=o.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=c,o=Tm.bind(null,Ye,!0,c),c.dispatch=o,[i,o]};var Li={readContext:dn,use:Ou,useCallback:q_,useContext:dn,useEffect:xm,useImperativeHandle:Z_,useInsertionEffect:F_,useLayoutEffect:G_,useMemo:W_,useReducer:Du,useRef:$_,useState:function(){return Du(ni)},useDebugValue:Em,useDeferredValue:function(i,o){var c=jt();return Y_(c,lt.memoizedState,i,o)},useTransition:function(){var i=Du(ni)[0],o=jt().memoizedState;return[typeof i=="boolean"?i:ul(i),o]},useSyncExternalStore:T_,useId:ex};Li.useCacheRefresh=tx,Li.useMemoCache=gm,Li.useHostTransitionStatus=wm,Li.useFormState=V_,Li.useActionState=V_,Li.useOptimistic=function(i,o){var c=jt();return D_(c,lt,i,o)};var La={readContext:dn,use:Ou,useCallback:q_,useContext:dn,useEffect:xm,useImperativeHandle:Z_,useInsertionEffect:F_,useLayoutEffect:G_,useMemo:W_,useReducer:vm,useRef:$_,useState:function(){return vm(ni)},useDebugValue:Em,useDeferredValue:function(i,o){var c=jt();return lt===null?Sm(c,i,o):Y_(c,lt.memoizedState,i,o)},useTransition:function(){var i=vm(ni)[0],o=jt().memoizedState;return[typeof i=="boolean"?i:ul(i),o]},useSyncExternalStore:T_,useId:ex};La.useCacheRefresh=tx,La.useMemoCache=gm,La.useHostTransitionStatus=wm,La.useFormState=U_,La.useActionState=U_,La.useOptimistic=function(i,o){var c=jt();return lt!==null?D_(c,lt,i,o):(c.baseState=i,[i,c.queue.dispatch])};function Rm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:U({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Cm={isMounted:function(i){return(i=i._reactInternals)?Z(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=Mn(),p=Pi(h);p.payload=o,c!=null&&(p.callback=c),o=zi(i,p,h),o!==null&&(bn(o,i,h),ml(o,i,h))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=Mn(),p=Pi(h);p.tag=1,p.payload=o,c!=null&&(p.callback=c),o=zi(i,p,h),o!==null&&(bn(o,i,h),ml(o,i,h))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=Mn(),h=Pi(c);h.tag=2,o!=null&&(h.callback=o),o=zi(i,h,c),o!==null&&(bn(o,i,c),ml(o,i,c))}};function ax(i,o,c,h,p,_,R){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,_,R):o.prototype&&o.prototype.isPureReactComponent?!Qs(c,h)||!Qs(p,_):!0}function ox(i,o,c,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==i&&Cm.enqueueReplaceState(o,o.state,null)}function ja(i,o){var c=o;if("ref"in o){c={};for(var h in o)h!=="ref"&&(c[h]=o[h])}if(i=i.defaultProps){c===o&&(c=U({},c));for(var p in i)c[p]===void 0&&(c[p]=i[p])}return c}var Mu=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=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(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function sx(i){Mu(i)}function lx(i){console.error(i)}function cx(i){Mu(i)}function Pu(i,o){try{var c=i.onUncaughtError;c(o.value,{componentStack:o.stack})}catch(h){setTimeout(function(){throw h})}}function ux(i,o,c){try{var h=i.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Nm(i,o,c){return c=Pi(c),c.tag=3,c.payload={element:null},c.callback=function(){Pu(i,o)},c}function dx(i){return i=Pi(i),i.tag=3,i}function fx(i,o,c,h){var p=c.type.getDerivedStateFromError;if(typeof p=="function"){var _=h.value;i.payload=function(){return p(_)},i.callback=function(){ux(o,c,h)}}var R=c.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(i.callback=function(){ux(o,c,h),typeof p!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var k=h.stack;this.componentDidCatch(h.value,{componentStack:k!==null?k:""})})}function lL(i,o,c,h,p){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(o=c.alternate,o!==null&&hl(o,c,p,!0),c=Wn.current,c!==null){switch(c.tag){case 13:return Cr===null?up():c.alternate===null&&Rt===0&&(Rt=3),c.flags&=-257,c.flags|=65536,c.lanes=p,h===am?c.flags|=16384:(o=c.updateQueue,o===null?c.updateQueue=new Set([h]):o.add(h),fp(i,h,p)),!1;case 22:return c.flags|=65536,h===am?c.flags|=16384:(o=c.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=o):(c=o.retryQueue,c===null?o.retryQueue=new Set([h]):c.add(h)),fp(i,h,p)),!1}throw Error(r(435,c.tag))}return fp(i,h,p),up(),!1}if(it)return o=Wn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=p,h!==im&&(i=Error(r(422),{cause:h}),nl(Kn(i,c)))):(h!==im&&(o=Error(r(423),{cause:h}),nl(Kn(o,c))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,h=Kn(h,c),p=Nm(i.stateNode,h,p),Fm(i,p),Rt!==4&&(Rt=2)),!1;var _=Error(r(520),{cause:h});if(_=Kn(_,c),El===null?El=[_]:El.push(_),Rt!==4&&(Rt=2),o===null)return!0;h=Kn(h,c),c=o;do{switch(c.tag){case 3:return c.flags|=65536,i=p&-p,c.lanes|=i,i=Nm(c.stateNode,h,i),Fm(c,i),!1;case 1:if(o=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Fi===null||!Fi.has(_))))return c.flags|=65536,p&=-p,c.lanes|=p,p=dx(p),fx(p,i,c,h),Fm(c,p),!1}c=c.return}while(c!==null);return!1}var hx=Error(r(461)),Wt=!1;function rn(i,o,c,h){o.child=i===null?v_(o,null,c,h):ka(o,i.child,c,h)}function mx(i,o,c,h,p){c=c.render;var _=o.ref;if("ref"in h){var R={};for(var k in h)k!=="ref"&&(R[k]=h[k])}else R=h;return Pa(o),h=fm(i,o,c,R,_,p),k=hm(),i!==null&&!Wt?(mm(i,o,p),ri(i,o,p)):(it&&k&&nm(o),o.flags|=1,rn(i,o,h,p),o.child)}function px(i,o,c,h,p){if(i===null){var _=c.type;return typeof _=="function"&&!Qm(_)&&_.defaultProps===void 0&&c.compare===null?(o.tag=15,o.type=_,gx(i,o,_,h,p)):(i=$u(c.type,null,h,o,o.mode,p),i.ref=o.ref,i.return=o,o.child=i)}if(_=i.child,!zm(i,p)){var R=_.memoizedProps;if(c=c.compare,c=c!==null?c:Qs,c(R,h)&&i.ref===o.ref)return ri(i,o,p)}return o.flags|=1,i=$i(_,h),i.ref=o.ref,i.return=o,o.child=i}function gx(i,o,c,h,p){if(i!==null){var _=i.memoizedProps;if(Qs(_,h)&&i.ref===o.ref)if(Wt=!1,o.pendingProps=h=_,zm(i,p))(i.flags&131072)!==0&&(Wt=!0);else return o.lanes=i.lanes,ri(i,o,p)}return km(i,o,c,h,p)}function yx(i,o,c){var h=o.pendingProps,p=h.children,_=(o.stateNode._pendingVisibility&2)!==0,R=i!==null?i.memoizedState:null;if(fl(i,o),h.mode==="hidden"||_){if((o.flags&128)!==0){if(h=R!==null?R.baseLanes|c:c,i!==null){for(p=o.child=i.child,_=0;p!==null;)_=_|p.lanes|p.childLanes,p=p.sibling;o.childLanes=_&~h}else o.childLanes=0,o.child=null;return vx(i,o,h,c)}if((c&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Ru(o,R!==null?R.cachePool:null),R!==null?b_(o,R):om(),__(o);else return o.lanes=o.childLanes=536870912,vx(i,o,R!==null?R.baseLanes|c:c,c)}else R!==null?(Ru(o,R.cachePool),b_(o,R),Di(),o.memoizedState=null):(i!==null&&Ru(o,null),om(),Di());return rn(i,o,p,c),o.child}function vx(i,o,c,h){var p=um();return p=p===null?null:{parent:$t._currentValue,pool:p},o.memoizedState={baseLanes:c,cachePool:p},i!==null&&Ru(o,null),om(),__(o),i!==null&&hl(i,o,h,!0),null}function fl(i,o){var c=o.ref;if(c===null)i!==null&&i.ref!==null&&(o.flags|=2097664);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(o.flags|=2097664)}}function km(i,o,c,h,p){return Pa(o),c=fm(i,o,c,h,void 0,p),h=hm(),i!==null&&!Wt?(mm(i,o,p),ri(i,o,p)):(it&&h&&nm(o),o.flags|=1,rn(i,o,c,p),o.child)}function bx(i,o,c,h,p,_){return Pa(o),o.updateQueue=null,c=w_(o,h,c,p),A_(i),h=hm(),i!==null&&!Wt?(mm(i,o,_),ri(i,o,_)):(it&&h&&nm(o),o.flags|=1,rn(i,o,c,_),o.child)}function _x(i,o,c,h,p){if(Pa(o),o.stateNode===null){var _=Ro,R=c.contextType;typeof R=="object"&&R!==null&&(_=dn(R)),_=new c(h,_),o.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Cm,o.stateNode=_,_._reactInternals=o,_=o.stateNode,_.props=h,_.state=o.memoizedState,_.refs={},$m(o),R=c.contextType,_.context=typeof R=="object"&&R!==null?dn(R):Ro,_.state=o.memoizedState,R=c.getDerivedStateFromProps,typeof R=="function"&&(Rm(o,c,R,h),_.state=o.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(R=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),R!==_.state&&Cm.enqueueReplaceState(_,_.state,null),gl(o,h,_,p),pl(),_.state=o.memoizedState),typeof _.componentDidMount=="function"&&(o.flags|=4194308),h=!0}else if(i===null){_=o.stateNode;var k=o.memoizedProps,M=ja(c,k);_.props=M;var G=_.context,oe=c.contextType;R=Ro,typeof oe=="object"&&oe!==null&&(R=dn(oe));var me=c.getDerivedStateFromProps;oe=typeof me=="function"||typeof _.getSnapshotBeforeUpdate=="function",k=o.pendingProps!==k,oe||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k||G!==R)&&ox(o,_,h,R),Mi=!1;var te=o.memoizedState;_.state=te,gl(o,h,_,p),pl(),G=o.memoizedState,k||te!==G||Mi?(typeof me=="function"&&(Rm(o,c,me,h),G=o.memoizedState),(M=Mi||ax(o,c,M,h,te,G,R))?(oe||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(o.flags|=4194308)):(typeof _.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=G),_.props=h,_.state=G,_.context=R,h=M):(typeof _.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{_=o.stateNode,Hm(i,o),R=o.memoizedProps,oe=ja(c,R),_.props=oe,me=o.pendingProps,te=_.context,G=c.contextType,M=Ro,typeof G=="object"&&G!==null&&(M=dn(G)),k=c.getDerivedStateFromProps,(G=typeof k=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(R!==me||te!==M)&&ox(o,_,h,M),Mi=!1,te=o.memoizedState,_.state=te,gl(o,h,_,p),pl();var ae=o.memoizedState;R!==me||te!==ae||Mi||i!==null&&i.dependencies!==null&&zu(i.dependencies)?(typeof k=="function"&&(Rm(o,c,k,h),ae=o.memoizedState),(oe=Mi||ax(o,c,oe,h,te,ae,M)||i!==null&&i.dependencies!==null&&zu(i.dependencies))?(G||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ae,M),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ae,M)),typeof _.componentDidUpdate=="function"&&(o.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof _.componentDidUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ae),_.props=h,_.state=ae,_.context=M,h=oe):(typeof _.componentDidUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&te===i.memoizedState||(o.flags|=1024),h=!1)}return _=h,fl(i,o),h=(o.flags&128)!==0,_||h?(_=o.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),o.flags|=1,i!==null&&h?(o.child=ka(o,i.child,null,p),o.child=ka(o,null,c,p)):rn(i,o,c,p),o.memoizedState=_.state,i=o.child):i=ri(i,o,p),i}function xx(i,o,c,h){return tl(),o.flags|=256,rn(i,o,c,h),o.child}var Om={dehydrated:null,treeContext:null,retryLane:0};function Dm(i){return{baseLanes:i,cachePool:S_()}}function Im(i,o,c){return i=i!==null?i.childLanes&~c:0,o&&(i|=Jn),i}function Ex(i,o,c){var h=o.pendingProps,p=!1,_=(o.flags&128)!==0,R;if((R=_)||(R=i!==null&&i.memoizedState===null?!1:(Ut.current&2)!==0),R&&(p=!0,o.flags&=-129),R=(o.flags&32)!==0,o.flags&=-33,i===null){if(it){if(p?Oi(o):Di(),it){var k=nn,M;if(M=k){e:{for(M=k,k=Rr;M.nodeType!==8;){if(!k){k=null;break e}if(M=gr(M.nextSibling),M===null){k=null;break e}}k=M}k!==null?(o.memoizedState={dehydrated:k,treeContext:Ra!==null?{id:Jr,overflow:ei}:null,retryLane:536870912},M=Qn(18,null,null,0),M.stateNode=k,M.return=o,o.child=M,vn=o,nn=null,M=!0):M=!1}M||Na(o)}if(k=o.memoizedState,k!==null&&(k=k.dehydrated,k!==null))return k.data==="$!"?o.lanes=16:o.lanes=536870912,null;ti(o)}return k=h.children,h=h.fallback,p?(Di(),p=o.mode,k=jm({mode:"hidden",children:k},p),h=Va(h,p,c,null),k.return=o,h.return=o,k.sibling=h,o.child=k,p=o.child,p.memoizedState=Dm(c),p.childLanes=Im(i,R,c),o.memoizedState=Om,h):(Oi(o),Lm(o,k))}if(M=i.memoizedState,M!==null&&(k=M.dehydrated,k!==null)){if(_)o.flags&256?(Oi(o),o.flags&=-257,o=Mm(i,o,c)):o.memoizedState!==null?(Di(),o.child=i.child,o.flags|=128,o=null):(Di(),p=h.fallback,k=o.mode,h=jm({mode:"visible",children:h.children},k),p=Va(p,k,c,null),p.flags|=2,h.return=o,p.return=o,h.sibling=p,o.child=h,ka(o,i.child,null,c),h=o.child,h.memoizedState=Dm(c),h.childLanes=Im(i,R,c),o.memoizedState=Om,o=p);else if(Oi(o),k.data==="$!"){if(R=k.nextSibling&&k.nextSibling.dataset,R)var G=R.dgst;R=G,h=Error(r(419)),h.stack="",h.digest=R,nl({value:h,source:null,stack:null}),o=Mm(i,o,c)}else if(Wt||hl(i,o,c,!1),R=(c&i.childLanes)!==0,Wt||R){if(R=ft,R!==null){if(h=c&-c,(h&42)!==0)h=1;else switch(h){case 2:h=1;break;case 8:h=4;break;case 32:h=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:h=64;break;case 268435456:h=134217728;break;default:h=0}if(h=(h&(R.suspendedLanes|c))!==0?0:h,h!==0&&h!==M.retryLane)throw M.retryLane=h,ki(i,h),bn(R,i,h),hx}k.data==="$?"||up(),o=Mm(i,o,c)}else k.data==="$?"?(o.flags|=128,o.child=i.child,o=SL.bind(null,i),k._reactRetry=o,o=null):(i=M.treeContext,nn=gr(k.nextSibling),vn=o,it=!0,mr=null,Rr=!1,i!==null&&(Zn[qn++]=Jr,Zn[qn++]=ei,Zn[qn++]=Ra,Jr=i.id,ei=i.overflow,Ra=o),o=Lm(o,h.children),o.flags|=4096);return o}return p?(Di(),p=h.fallback,k=o.mode,M=i.child,G=M.sibling,h=$i(M,{mode:"hidden",children:h.children}),h.subtreeFlags=M.subtreeFlags&31457280,G!==null?p=$i(G,p):(p=Va(p,k,c,null),p.flags|=2),p.return=o,h.return=o,h.sibling=p,o.child=h,h=p,p=o.child,k=i.child.memoizedState,k===null?k=Dm(c):(M=k.cachePool,M!==null?(G=$t._currentValue,M=M.parent!==G?{parent:G,pool:G}:M):M=S_(),k={baseLanes:k.baseLanes|c,cachePool:M}),p.memoizedState=k,p.childLanes=Im(i,R,c),o.memoizedState=Om,h):(Oi(o),c=i.child,i=c.sibling,c=$i(c,{mode:"visible",children:h.children}),c.return=o,c.sibling=null,i!==null&&(R=o.deletions,R===null?(o.deletions=[i],o.flags|=16):R.push(i)),o.child=c,o.memoizedState=null,c)}function Lm(i,o){return o=jm({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function jm(i,o){return qx(i,o,0,null)}function Mm(i,o,c){return ka(o,i.child,null,c),i=Lm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function Sx(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),Bm(i.return,o,c)}function Pm(i,o,c,h,p){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:p}:(_.isBackwards=o,_.rendering=null,_.renderingStartTime=0,_.last=h,_.tail=c,_.tailMode=p)}function Ax(i,o,c){var h=o.pendingProps,p=h.revealOrder,_=h.tail;if(rn(i,o,h.children,c),h=Ut.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Sx(i,c,o);else if(i.tag===19)Sx(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}switch(Re(Ut,h),p){case"forwards":for(c=o.child,p=null;c!==null;)i=c.alternate,i!==null&&Tu(i)===null&&(p=c),c=c.sibling;c=p,c===null?(p=o.child,o.child=null):(p=c.sibling,c.sibling=null),Pm(o,!1,p,c,_);break;case"backwards":for(c=null,p=o.child,o.child=null;p!==null;){if(i=p.alternate,i!==null&&Tu(i)===null){o.child=p;break}i=p.sibling,p.sibling=c,c=p,p=i}Pm(o,!0,c,null,_);break;case"together":Pm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ri(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Hi|=o.lanes,(c&o.childLanes)===0)if(i!==null){if(hl(i,o,c,!1),(c&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,c=$i(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=$i(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function zm(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&zu(i)))}function cL(i,o,c){switch(o.tag){case 3:On(o,o.stateNode.containerInfo),ji(o,$t,i.memoizedState.cache),tl();break;case 27:case 5:ur(o);break;case 4:On(o,o.stateNode.containerInfo);break;case 10:ji(o,o.type,o.memoizedProps.value);break;case 13:var h=o.memoizedState;if(h!==null)return h.dehydrated!==null?(Oi(o),o.flags|=128,null):(c&o.child.childLanes)!==0?Ex(i,o,c):(Oi(o),i=ri(i,o,c),i!==null?i.sibling:null);Oi(o);break;case 19:var p=(i.flags&128)!==0;if(h=(c&o.childLanes)!==0,h||(hl(i,o,c,!1),h=(c&o.childLanes)!==0),p){if(h)return Ax(i,o,c);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Re(Ut,Ut.current),h)break;return null;case 22:case 23:return o.lanes=0,yx(i,o,c);case 24:ji(o,$t,i.memoizedState.cache)}return ri(i,o,c)}function wx(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps)Wt=!0;else{if(!zm(i,c)&&(o.flags&128)===0)return Wt=!1,cL(i,o,c);Wt=(i.flags&131072)!==0}else Wt=!1,it&&(o.flags&1048576)!==0&&c_(o,xu,o.index);switch(o.lanes=0,o.tag){case 16:e:{i=o.pendingProps;var h=o.elementType,p=h._init;if(h=p(h._payload),o.type=h,typeof h=="function")Qm(h)?(i=ja(h,i),o.tag=1,o=_x(null,o,h,i,c)):(o.tag=0,o=km(null,o,h,i,c));else{if(h!=null){if(p=h.$$typeof,p===y){o.tag=11,o=mx(null,o,h,i,c);break e}else if(p===T){o.tag=14,o=px(null,o,h,i,c);break e}}throw o=L(h)||h,Error(r(306,o,""))}}return o;case 0:return km(i,o,o.type,o.pendingProps,c);case 1:return h=o.type,p=ja(h,o.pendingProps),_x(i,o,h,p,c);case 3:e:{if(On(o,o.stateNode.containerInfo),i===null)throw Error(r(387));var _=o.pendingProps;p=o.memoizedState,h=p.element,Hm(i,o),gl(o,_,null,c);var R=o.memoizedState;if(_=R.cache,ji(o,$t,_),_!==p.cache&&Um(o,[$t],c,!0),pl(),_=R.element,p.isDehydrated)if(p={element:_,isDehydrated:!1,cache:R.cache},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){o=xx(i,o,_,c);break e}else if(_!==h){h=Kn(Error(r(424)),o),nl(h),o=xx(i,o,_,c);break e}else for(nn=gr(o.stateNode.containerInfo.firstChild),vn=o,it=!0,mr=null,Rr=!0,c=v_(o,null,_,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(tl(),_===h){o=ri(i,o,c);break e}rn(i,o,_,c)}o=o.child}return o;case 26:return fl(i,o),i===null?(c=CE(o.type,null,o.pendingProps,null))?o.memoizedState=c:it||(c=o.type,i=o.pendingProps,h=ed(pt.current).createElement(c),h[un]=o,h[wn]=i,an(h,c,i),qt(h),o.stateNode=h):o.memoizedState=CE(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return ur(o),i===null&&it&&(h=o.stateNode=wE(o.type,o.pendingProps,pt.current),vn=o,Rr=!0,nn=gr(h.firstChild)),h=o.pendingProps.children,i!==null||it?rn(i,o,h,c):o.child=ka(o,null,h,c),fl(i,o),o.child;case 5:return i===null&&it&&((p=h=nn)&&(h=VL(h,o.type,o.pendingProps,Rr),h!==null?(o.stateNode=h,vn=o,nn=gr(h.firstChild),Rr=!1,p=!0):p=!1),p||Na(o)),ur(o),p=o.type,_=o.pendingProps,R=i!==null?i.memoizedProps:null,h=_.children,Ap(p,_)?h=null:R!==null&&Ap(p,R)&&(o.flags|=32),o.memoizedState!==null&&(p=fm(i,o,nL,null,null,c),Ol._currentValue=p),fl(i,o),rn(i,o,h,c),o.child;case 6:return i===null&&it&&((i=c=nn)&&(c=BL(c,o.pendingProps,Rr),c!==null?(o.stateNode=c,vn=o,nn=null,i=!0):i=!1),i||Na(o)),null;case 13:return Ex(i,o,c);case 4:return On(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=ka(o,null,h,c):rn(i,o,h,c),o.child;case 11:return mx(i,o,o.type,o.pendingProps,c);case 7:return rn(i,o,o.pendingProps,c),o.child;case 8:return rn(i,o,o.pendingProps.children,c),o.child;case 12:return rn(i,o,o.pendingProps.children,c),o.child;case 10:return h=o.pendingProps,ji(o,o.type,h.value),rn(i,o,h.children,c),o.child;case 9:return p=o.type._context,h=o.pendingProps.children,Pa(o),p=dn(p),h=h(p),o.flags|=1,rn(i,o,h,c),o.child;case 14:return px(i,o,o.type,o.pendingProps,c);case 15:return gx(i,o,o.type,o.pendingProps,c);case 19:return Ax(i,o,c);case 22:return yx(i,o,c);case 24:return Pa(o),h=dn($t),i===null?(p=um(),p===null&&(p=ft,_=lm(),p.pooledCache=_,_.refCount++,_!==null&&(p.pooledCacheLanes|=c),p=_),o.memoizedState={parent:h,cache:p},$m(o),ji(o,$t,p)):((i.lanes&c)!==0&&(Hm(i,o),gl(o,null,null,c),pl()),p=i.memoizedState,_=o.memoizedState,p.parent!==h?(p={parent:h,cache:h},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),ji(o,$t,h)):(h=_.cache,ji(o,$t,h),h!==p.cache&&Um(o,[$t],c,!0))),rn(i,o,o.pendingProps.children,c),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}var Vm=_e(null),Ma=null,ii=null;function ji(i,o,c){Re(Vm,o._currentValue),o._currentValue=c}function ai(i){i._currentValue=Vm.current,Oe(Vm)}function Bm(i,o,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===c)break;i=i.return}}function Um(i,o,c,h){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var _=p.dependencies;if(_!==null){var R=p.child;_=_.firstContext;e:for(;_!==null;){var k=_;_=p;for(var M=0;M<o.length;M++)if(k.context===o[M]){_.lanes|=c,k=_.alternate,k!==null&&(k.lanes|=c),Bm(_.return,c,i),h||(R=null);break e}_=k.next}}else if(p.tag===18){if(R=p.return,R===null)throw Error(r(341));R.lanes|=c,_=R.alternate,_!==null&&(_.lanes|=c),Bm(R,c,i),R=null}else R=p.child;if(R!==null)R.return=p;else for(R=p;R!==null;){if(R===i){R=null;break}if(p=R.sibling,p!==null){p.return=R.return,R=p;break}R=R.return}p=R}}function hl(i,o,c,h){i=null;for(var p=o,_=!1;p!==null;){if(!_){if((p.flags&524288)!==0)_=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var R=p.alternate;if(R===null)throw Error(r(387));if(R=R.memoizedProps,R!==null){var k=p.type;Dn(p.pendingProps.value,R.value)||(i!==null?i.push(k):i=[k])}}else if(p===Zt.current){if(R=p.alternate,R===null)throw Error(r(387));R.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(Ol):i=[Ol])}p=p.return}i!==null&&Um(o,i,c,h),o.flags|=262144}function zu(i){for(i=i.firstContext;i!==null;){if(!Dn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Pa(i){Ma=i,ii=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function dn(i){return Tx(Ma,i)}function Vu(i,o){return Ma===null&&Pa(i),Tx(i,o)}function Tx(i,o){var c=o._currentValue;if(o={context:o,memoizedValue:c,next:null},ii===null){if(i===null)throw Error(r(308));ii=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else ii=ii.next=o;return c}var Mi=!1;function $m(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hm(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Pi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function zi(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(bt&2)!==0){var p=h.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),h.pending=o,o=bu(i),s_(i,null,c),o}return vu(i,h,o,c),bu(i)}function ml(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194176)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,p0(i,c)}}function Fm(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var p=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var R={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?p=_=R:_=_.next=R,c=c.next}while(c!==null);_===null?p=_=o:_=_.next=o}else p=_=o;c={baseState:h.baseState,firstBaseUpdate:p,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}var Gm=!1;function pl(){if(Gm){var i=Io;if(i!==null)throw i}}function gl(i,o,c,h){Gm=!1;var p=i.updateQueue;Mi=!1;var _=p.firstBaseUpdate,R=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var M=k,G=M.next;M.next=null,R===null?_=G:R.next=G,R=M;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,k=oe.lastBaseUpdate,k!==R&&(k===null?oe.firstBaseUpdate=G:k.next=G,oe.lastBaseUpdate=M))}if(_!==null){var me=p.baseState;R=0,oe=G=M=null,k=_;do{var te=k.lane&-536870913,ae=te!==k.lane;if(ae?(nt&te)===te:(h&te)===te){te!==0&&te===Do&&(Gm=!0),oe!==null&&(oe=oe.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var De=i,He=k;te=o;var Ct=c;switch(He.tag){case 1:if(De=He.payload,typeof De=="function"){me=De.call(Ct,me,te);break e}me=De;break e;case 3:De.flags=De.flags&-65537|128;case 0:if(De=He.payload,te=typeof De=="function"?De.call(Ct,me,te):De,te==null)break e;me=U({},me,te);break e;case 2:Mi=!0}}te=k.callback,te!==null&&(i.flags|=64,ae&&(i.flags|=8192),ae=p.callbacks,ae===null?p.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:k.tag,payload:k.payload,callback:k.callback,next:null},oe===null?(G=oe=ae,M=me):oe=oe.next=ae,R|=te;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);oe===null&&(M=me),p.baseState=M,p.firstBaseUpdate=G,p.lastBaseUpdate=oe,_===null&&(p.shared.lanes=0),Hi|=R,i.lanes=R,i.memoizedState=me}}function Rx(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Cx(i,o){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Rx(c[i],o)}function yl(i,o){try{var c=o.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&i)===i){h=void 0;var _=c.create,R=c.inst;h=_(),R.destroy=h}c=c.next}while(c!==p)}}catch(k){dt(o,o.return,k)}}function Vi(i,o,c){try{var h=o.updateQueue,p=h!==null?h.lastEffect:null;if(p!==null){var _=p.next;h=_;do{if((h.tag&i)===i){var R=h.inst,k=R.destroy;if(k!==void 0){R.destroy=void 0,p=o;var M=c;try{k()}catch(G){dt(p,M,G)}}}h=h.next}while(h!==_)}}catch(G){dt(o,o.return,G)}}function Nx(i){var o=i.updateQueue;if(o!==null){var c=i.stateNode;try{Cx(o,c)}catch(h){dt(i,i.return,h)}}}function kx(i,o,c){c.props=ja(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(h){dt(i,o,h)}}function za(i,o){try{var c=i.ref;if(c!==null){var h=i.stateNode;switch(i.tag){case 26:case 27:case 5:var p=h;break;default:p=h}typeof c=="function"?i.refCleanup=c(p):c.current=p}}catch(_){dt(i,o,_)}}function In(i,o){var c=i.ref,h=i.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(p){dt(i,o,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(p){dt(i,o,p)}else c.current=null}function Ox(i){var o=i.type,c=i.memoizedProps,h=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(p){dt(i,i.return,p)}}function Dx(i,o,c){try{var h=i.stateNode;LL(h,i.type,c,o),h[wn]=o}catch(p){dt(i,i.return,p)}}function Ix(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27||i.tag===4}function Km(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Ix(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==27&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Zm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=Ju));else if(h!==4&&h!==27&&(i=i.child,i!==null))for(Zm(i,o,c),i=i.sibling;i!==null;)Zm(i,o,c),i=i.sibling}function Bu(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&h!==27&&(i=i.child,i!==null))for(Bu(i,o,c),i=i.sibling;i!==null;)Bu(i,o,c),i=i.sibling}var oi=!1,Tt=!1,qm=!1,Lx=typeof WeakSet=="function"?WeakSet:Set,Yt=null,jx=!1;function uL(i,o){if(i=i.containerInfo,Ep=od,i=Q0(i),Yh(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var p=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var R=0,k=-1,M=-1,G=0,oe=0,me=i,te=null;t:for(;;){for(var ae;me!==c||p!==0&&me.nodeType!==3||(k=R+p),me!==_||h!==0&&me.nodeType!==3||(M=R+h),me.nodeType===3&&(R+=me.nodeValue.length),(ae=me.firstChild)!==null;)te=me,me=ae;for(;;){if(me===i)break t;if(te===c&&++G===p&&(k=R),te===_&&++oe===h&&(M=R),(ae=me.nextSibling)!==null)break;me=te,te=me.parentNode}me=ae}c=k===-1||M===-1?null:{start:k,end:M}}else c=null}c=c||{start:0,end:0}}else c=null;for(Sp={focusedElem:i,selectionRange:c},od=!1,Yt=o;Yt!==null;)if(o=Yt,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Yt=i;else for(;Yt!==null;){switch(o=Yt,_=o.alternate,i=o.flags,o.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&_!==null){i=void 0,c=o,p=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var De=ja(c.type,p,c.elementType===c.type);i=h.getSnapshotBeforeUpdate(De,_),h.__reactInternalSnapshotBeforeUpdate=i}catch(He){dt(c,c.return,He)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,c=i.nodeType,c===9)Rp(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Rp(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=o.sibling,i!==null){i.return=o.return,Yt=i;break}Yt=o.return}return De=jx,jx=!1,De}function Mx(i,o,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:li(i,c),h&4&&yl(5,c);break;case 1:if(li(i,c),h&4)if(i=c.stateNode,o===null)try{i.componentDidMount()}catch(k){dt(c,c.return,k)}else{var p=ja(c.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(p,o,i.__reactInternalSnapshotBeforeUpdate)}catch(k){dt(c,c.return,k)}}h&64&&Nx(c),h&512&&za(c,c.return);break;case 3:if(li(i,c),h&64&&(h=c.updateQueue,h!==null)){if(i=null,c.child!==null)switch(c.child.tag){case 27:case 5:i=c.child.stateNode;break;case 1:i=c.child.stateNode}try{Cx(h,i)}catch(k){dt(c,c.return,k)}}break;case 26:li(i,c),h&512&&za(c,c.return);break;case 27:case 5:li(i,c),o===null&&h&4&&Ox(c),h&512&&za(c,c.return);break;case 12:li(i,c);break;case 13:li(i,c),h&4&&Vx(i,c);break;case 22:if(p=c.memoizedState!==null||oi,!p){o=o!==null&&o.memoizedState!==null||Tt;var _=oi,R=Tt;oi=p,(Tt=o)&&!R?Bi(i,c,(c.subtreeFlags&8772)!==0):li(i,c),oi=_,Tt=R}h&512&&(c.memoizedProps.mode==="manual"?za(c,c.return):In(c,c.return));break;default:li(i,c)}}function Px(i){var o=i.alternate;o!==null&&(i.alternate=null,Px(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Lh(o)),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 Mt=null,Ln=!1;function si(i,o,c){for(c=c.child;c!==null;)zx(i,o,c),c=c.sibling}function zx(i,o,c){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(Yr,c)}catch{}switch(c.tag){case 26:Tt||In(c,o),si(i,o,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Tt||In(c,o);var h=Mt,p=Ln;for(Mt=c.stateNode,si(i,o,c),c=c.stateNode,o=c.attributes;o.length;)c.removeAttributeNode(o[0]);Lh(c),Mt=h,Ln=p;break;case 5:Tt||In(c,o);case 6:p=Mt;var _=Ln;if(Mt=null,si(i,o,c),Mt=p,Ln=_,Mt!==null)if(Ln)try{i=Mt,h=c.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)}catch(R){dt(c,o,R)}else try{Mt.removeChild(c.stateNode)}catch(R){dt(c,o,R)}break;case 18:Mt!==null&&(Ln?(o=Mt,c=c.stateNode,o.nodeType===8?Tp(o.parentNode,c):o.nodeType===1&&Tp(o,c),jl(o)):Tp(Mt,c.stateNode));break;case 4:h=Mt,p=Ln,Mt=c.stateNode.containerInfo,Ln=!0,si(i,o,c),Mt=h,Ln=p;break;case 0:case 11:case 14:case 15:Tt||Vi(2,c,o),Tt||Vi(4,c,o),si(i,o,c);break;case 1:Tt||(In(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"&&kx(c,o,h)),si(i,o,c);break;case 21:si(i,o,c);break;case 22:Tt||In(c,o),Tt=(h=Tt)||c.memoizedState!==null,si(i,o,c),Tt=h;break;default:si(i,o,c)}}function Vx(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{jl(i)}catch(c){dt(o,o.return,c)}}function dL(i){switch(i.tag){case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new Lx),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new Lx),o;default:throw Error(r(435,i.tag))}}function Wm(i,o){var c=dL(i);o.forEach(function(h){var p=AL.bind(null,i,h);c.has(h)||(c.add(h),h.then(p,p))})}function Yn(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var p=c[h],_=i,R=o,k=R;e:for(;k!==null;){switch(k.tag){case 27:case 5:Mt=k.stateNode,Ln=!1;break e;case 3:Mt=k.stateNode.containerInfo,Ln=!0;break e;case 4:Mt=k.stateNode.containerInfo,Ln=!0;break e}k=k.return}if(Mt===null)throw Error(r(160));zx(_,R,p),Mt=null,Ln=!1,_=p.alternate,_!==null&&(_.return=null),p.return=null}if(o.subtreeFlags&13878)for(o=o.child;o!==null;)Bx(o,i),o=o.sibling}var pr=null;function Bx(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Yn(o,i),Xn(i),h&4&&(Vi(3,i,i.return),yl(3,i),Vi(5,i,i.return));break;case 1:Yn(o,i),Xn(i),h&512&&(Tt||c===null||In(c,c.return)),h&64&&oi&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var p=pr;if(Yn(o,i),Xn(i),h&512&&(Tt||c===null||In(c,c.return)),h&4){var _=c!==null?c.memoizedState:null;if(h=i.memoizedState,c===null)if(h===null)if(i.stateNode===null){e:{h=i.type,c=i.memoizedProps,p=p.ownerDocument||p;t:switch(h){case"title":_=p.getElementsByTagName("title")[0],(!_||_[Hs]||_[un]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=p.createElement(h),p.head.insertBefore(_,p.querySelector("head > title"))),an(_,h,c),_[un]=i,qt(_),h=_;break e;case"link":var R=OE("link","href",p).get(h+(c.href||""));if(R){for(var k=0;k<R.length;k++)if(_=R[k],_.getAttribute("href")===(c.href==null?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){R.splice(k,1);break t}}_=p.createElement(h),an(_,h,c),p.head.appendChild(_);break;case"meta":if(R=OE("meta","content",p).get(h+(c.content||""))){for(k=0;k<R.length;k++)if(_=R[k],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){R.splice(k,1);break t}}_=p.createElement(h),an(_,h,c),p.head.appendChild(_);break;default:throw Error(r(468,h))}_[un]=i,qt(_),h=_}i.stateNode=h}else DE(p,i.type,i.stateNode);else i.stateNode=kE(p,h,i.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?DE(p,i.type,i.stateNode):kE(p,h,i.memoizedProps)):h===null&&i.stateNode!==null&&Dx(i,i.memoizedProps,c.memoizedProps)}break;case 27:if(h&4&&i.alternate===null){p=i.stateNode,_=i.memoizedProps;try{for(var M=p.firstChild;M;){var G=M.nextSibling,oe=M.nodeName;M[Hs]||oe==="HEAD"||oe==="BODY"||oe==="SCRIPT"||oe==="STYLE"||oe==="LINK"&&M.rel.toLowerCase()==="stylesheet"||p.removeChild(M),M=G}for(var me=i.type,te=p.attributes;te.length;)p.removeAttributeNode(te[0]);an(p,me,_),p[un]=i,p[wn]=_}catch(De){dt(i,i.return,De)}}case 5:if(Yn(o,i),Xn(i),h&512&&(Tt||c===null||In(c,c.return)),i.flags&32){p=i.stateNode;try{_o(p,"")}catch(De){dt(i,i.return,De)}}h&4&&i.stateNode!=null&&(p=i.memoizedProps,Dx(i,p,c!==null?c.memoizedProps:p)),h&1024&&(qm=!0);break;case 6:if(Yn(o,i),Xn(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,c=i.stateNode;try{c.nodeValue=h}catch(De){dt(i,i.return,De)}}break;case 3:if(rd=null,p=pr,pr=td(o.containerInfo),Yn(o,i),pr=p,Xn(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{jl(o.containerInfo)}catch(De){dt(i,i.return,De)}qm&&(qm=!1,Ux(i));break;case 4:h=pr,pr=td(i.stateNode.containerInfo),Yn(o,i),Xn(i),pr=h;break;case 12:Yn(o,i),Xn(i);break;case 13:Yn(o,i),Xn(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(ip=be()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Wm(i,h)));break;case 22:if(h&512&&(Tt||c===null||In(c,c.return)),M=i.memoizedState!==null,G=c!==null&&c.memoizedState!==null,oe=oi,me=Tt,oi=oe||M,Tt=me||G,Yn(o,i),Tt=me,oi=oe,Xn(i),o=i.stateNode,o._current=i,o._visibility&=-3,o._visibility|=o._pendingVisibility&2,h&8192&&(o._visibility=M?o._visibility&-2:o._visibility|1,M&&(o=oi||Tt,c===null||G||o||Po(i)),i.memoizedProps===null||i.memoizedProps.mode!=="manual"))e:for(c=null,o=i;;){if(o.tag===5||o.tag===26||o.tag===27){if(c===null){G=c=o;try{if(p=G.stateNode,M)_=p.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{R=G.stateNode,k=G.memoizedProps.style;var ae=k!=null&&k.hasOwnProperty("display")?k.display:null;R.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(De){dt(G,G.return,De)}}}else if(o.tag===6){if(c===null){G=o;try{G.stateNode.nodeValue=M?"":G.memoizedProps}catch(De){dt(G,G.return,De)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;c===o&&(c=null),o=o.return}c===o&&(c=null),o.sibling.return=o.return,o=o.sibling}h&4&&(h=i.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,Wm(i,c))));break;case 19:Yn(o,i),Xn(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Wm(i,h)));break;case 21:break;default:Yn(o,i),Xn(i)}}function Xn(i){var o=i.flags;if(o&2){try{if(i.tag!==27){e:{for(var c=i.return;c!==null;){if(Ix(c)){var h=c;break e}c=c.return}throw Error(r(160))}switch(h.tag){case 27:var p=h.stateNode,_=Km(i);Bu(i,_,p);break;case 5:var R=h.stateNode;h.flags&32&&(_o(R,""),h.flags&=-33);var k=Km(i);Bu(i,k,R);break;case 3:case 4:var M=h.stateNode.containerInfo,G=Km(i);Zm(i,G,M);break;default:throw Error(r(161))}}}catch(oe){dt(i,i.return,oe)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function Ux(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;Ux(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function li(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Mx(i,o.alternate,o),o=o.sibling}function Po(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Vi(4,o,o.return),Po(o);break;case 1:In(o,o.return);var c=o.stateNode;typeof c.componentWillUnmount=="function"&&kx(o,o.return,c),Po(o);break;case 26:case 27:case 5:In(o,o.return),Po(o);break;case 22:In(o,o.return),o.memoizedState===null&&Po(o);break;default:Po(o)}i=i.sibling}}function Bi(i,o,c){for(c=c&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var h=o.alternate,p=i,_=o,R=_.flags;switch(_.tag){case 0:case 11:case 15:Bi(p,_,c),yl(4,_);break;case 1:if(Bi(p,_,c),h=_,p=h.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){dt(h,h.return,G)}if(h=_,p=h.updateQueue,p!==null){var k=h.stateNode;try{var M=p.shared.hiddenCallbacks;if(M!==null)for(p.shared.hiddenCallbacks=null,p=0;p<M.length;p++)Rx(M[p],k)}catch(G){dt(h,h.return,G)}}c&&R&64&&Nx(_),za(_,_.return);break;case 26:case 27:case 5:Bi(p,_,c),c&&h===null&&R&4&&Ox(_),za(_,_.return);break;case 12:Bi(p,_,c);break;case 13:Bi(p,_,c),c&&R&4&&Vx(p,_);break;case 22:_.memoizedState===null&&Bi(p,_,c),za(_,_.return);break;default:Bi(p,_,c)}o=o.sibling}}function Ym(i,o){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&sl(c))}function Xm(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&sl(i))}function Ui(i,o,c,h){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)$x(i,o,c,h),o=o.sibling}function $x(i,o,c,h){var p=o.flags;switch(o.tag){case 0:case 11:case 15:Ui(i,o,c,h),p&2048&&yl(9,o);break;case 3:Ui(i,o,c,h),p&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&sl(i)));break;case 12:if(p&2048){Ui(i,o,c,h),i=o.stateNode;try{var _=o.memoizedProps,R=_.id,k=_.onPostCommit;typeof k=="function"&&k(R,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(M){dt(o,o.return,M)}}else Ui(i,o,c,h);break;case 23:break;case 22:_=o.stateNode,o.memoizedState!==null?_._visibility&4?Ui(i,o,c,h):vl(i,o):_._visibility&4?Ui(i,o,c,h):(_._visibility|=4,zo(i,o,c,h,(o.subtreeFlags&10256)!==0)),p&2048&&Ym(o.alternate,o);break;case 24:Ui(i,o,c,h),p&2048&&Xm(o.alternate,o);break;default:Ui(i,o,c,h)}}function zo(i,o,c,h,p){for(p=p&&(o.subtreeFlags&10256)!==0,o=o.child;o!==null;){var _=i,R=o,k=c,M=h,G=R.flags;switch(R.tag){case 0:case 11:case 15:zo(_,R,k,M,p),yl(8,R);break;case 23:break;case 22:var oe=R.stateNode;R.memoizedState!==null?oe._visibility&4?zo(_,R,k,M,p):vl(_,R):(oe._visibility|=4,zo(_,R,k,M,p)),p&&G&2048&&Ym(R.alternate,R);break;case 24:zo(_,R,k,M,p),p&&G&2048&&Xm(R.alternate,R);break;default:zo(_,R,k,M,p)}o=o.sibling}}function vl(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var c=i,h=o,p=h.flags;switch(h.tag){case 22:vl(c,h),p&2048&&Ym(h.alternate,h);break;case 24:vl(c,h),p&2048&&Xm(h.alternate,h);break;default:vl(c,h)}o=o.sibling}}var bl=8192;function Vo(i){if(i.subtreeFlags&bl)for(i=i.child;i!==null;)Hx(i),i=i.sibling}function Hx(i){switch(i.tag){case 26:Vo(i),i.flags&bl&&i.memoizedState!==null&&JL(pr,i.memoizedState,i.memoizedProps);break;case 5:Vo(i);break;case 3:case 4:var o=pr;pr=td(i.stateNode.containerInfo),Vo(i),pr=o;break;case 22:i.memoizedState===null&&(o=i.alternate,o!==null&&o.memoizedState!==null?(o=bl,bl=16777216,Vo(i),bl=o):Vo(i));break;default:Vo(i)}}function Fx(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function _l(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var h=o[c];Yt=h,Kx(h,i)}Fx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Gx(i),i=i.sibling}function Gx(i){switch(i.tag){case 0:case 11:case 15:_l(i),i.flags&2048&&Vi(9,i,i.return);break;case 3:_l(i);break;case 12:_l(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&4&&(i.return===null||i.return.tag!==13)?(o._visibility&=-5,Uu(i)):_l(i);break;default:_l(i)}}function Uu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var h=o[c];Yt=h,Kx(h,i)}Fx(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Vi(8,o,o.return),Uu(o);break;case 22:c=o.stateNode,c._visibility&4&&(c._visibility&=-5,Uu(o));break;default:Uu(o)}i=i.sibling}}function Kx(i,o){for(;Yt!==null;){var c=Yt;switch(c.tag){case 0:case 11:case 15:Vi(8,c,o);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:sl(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Yt=h;else e:for(c=i;Yt!==null;){h=Yt;var p=h.sibling,_=h.return;if(Px(h),h===c){Yt=null;break e}if(p!==null){p.return=_,Yt=p;break e}Yt=_}}}function fL(i,o,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(i,o,c,h){return new fL(i,o,c,h)}function Qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function $i(i,o){var c=i.alternate;return c===null?(c=Qn(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&31457280,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function Zx(i,o){i.flags&=31457282;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=o,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,o=c.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function $u(i,o,c,h,p,_){var R=0;if(h=i,typeof i=="function")Qm(i)&&(R=1);else if(typeof i=="string")R=XL(i,c,$e.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case d:return Va(c.children,p,_,o);case f:R=8,p|=24;break;case m:return i=Qn(12,c,o,p|2),i.elementType=m,i.lanes=_,i;case x:return i=Qn(13,c,o,p),i.elementType=x,i.lanes=_,i;case A:return i=Qn(19,c,o,p),i.elementType=A,i.lanes=_,i;case C:return qx(c,p,_,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case g:case E:R=10;break e;case v:R=9;break e;case y:R=11;break e;case T:R=14;break e;case w:R=16,h=null;break e}R=29,c=Error(r(130,i===null?"null":typeof i,"")),h=null}return o=Qn(R,c,o,p),o.elementType=i,o.type=h,o.lanes=_,o}function Va(i,o,c,h){return i=Qn(7,i,h,o),i.lanes=c,i}function qx(i,o,c,h){i=Qn(22,i,h,o),i.elementType=C,i.lanes=c;var p={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var _=p._current;if(_===null)throw Error(r(456));if((p._pendingVisibility&2)===0){var R=ki(_,2);R!==null&&(p._pendingVisibility|=2,bn(R,_,2))}},attach:function(){var _=p._current;if(_===null)throw Error(r(456));if((p._pendingVisibility&2)!==0){var R=ki(_,2);R!==null&&(p._pendingVisibility&=-3,bn(R,_,2))}}};return i.stateNode=p,i}function Jm(i,o,c){return i=Qn(6,i,null,o),i.lanes=c,i}function ep(i,o,c){return o=Qn(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function ci(i){i.flags|=4}function Wx(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!IE(o)){if(o=Wn.current,o!==null&&((nt&4194176)===nt?Cr!==null:(nt&62914560)!==nt&&(nt&536870912)===0||o!==Cr))throw il=am,f_;i.flags|=8192}}function Hu(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?h0():536870912,i.lanes|=o,Uo|=o)}function xl(i,o){if(!it)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function vt(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(o)for(var p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags&31457280,h|=p.flags&31457280,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)c|=p.lanes|p.childLanes,h|=p.subtreeFlags,h|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=h,i.childLanes=c,o}function hL(i,o,c){var h=o.pendingProps;switch(rm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(o),null;case 1:return vt(o),null;case 3:return c=o.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),o.memoizedState.cache!==h&&(o.flags|=2048),ai($t),Sn(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(el(o)?ci(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,mr!==null&&(lp(mr),mr=null))),vt(o),null;case 26:return c=o.memoizedState,i===null?(ci(o),c!==null?(vt(o),Wx(o,c)):(vt(o),o.flags&=-16777217)):c?c!==i.memoizedState?(ci(o),vt(o),Wx(o,c)):(vt(o),o.flags&=-16777217):(i.memoizedProps!==h&&ci(o),vt(o),o.flags&=-16777217),null;case 27:ba(o),c=pt.current;var p=o.type;if(i!==null&&o.stateNode!=null)i.memoizedProps!==h&&ci(o);else{if(!h){if(o.stateNode===null)throw Error(r(166));return vt(o),null}i=$e.current,el(o)?u_(o):(i=wE(p,h,c),o.stateNode=i,ci(o))}return vt(o),null;case 5:if(ba(o),c=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==h&&ci(o);else{if(!h){if(o.stateNode===null)throw Error(r(166));return vt(o),null}if(i=$e.current,el(o))u_(o);else{switch(p=ed(pt.current),i){case 1:i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":i=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":i=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":i=p.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?p.createElement("select",{is:h.is}):p.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?p.createElement(c,{is:h.is}):p.createElement(c)}}i[un]=o,i[wn]=h;e:for(p=o.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===o)break e;for(;p.sibling===null;){if(p.return===null||p.return===o)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}o.stateNode=i;e:switch(an(i,c,h),c){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ci(o)}}return vt(o),o.flags&=-16777217,null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==h&&ci(o);else{if(typeof h!="string"&&o.stateNode===null)throw Error(r(166));if(i=pt.current,el(o)){if(i=o.stateNode,c=o.memoizedProps,h=null,p=vn,p!==null)switch(p.tag){case 27:case 5:h=p.memoizedProps}i[un]=o,i=!!(i.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||bE(i.nodeValue,c)),i||Na(o)}else i=ed(i).createTextNode(h),i[un]=o,o.stateNode=i}return vt(o),null;case 13:if(h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=el(o),h!==null&&h.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[un]=o}else tl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;vt(o),p=!1}else mr!==null&&(lp(mr),mr=null),p=!0;if(!p)return o.flags&256?(ti(o),o):(ti(o),null)}if(ti(o),(o.flags&128)!==0)return o.lanes=c,o;if(c=h!==null,i=i!==null&&i.memoizedState!==null,c){h=o.child,p=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(p=h.alternate.memoizedState.cachePool.pool);var _=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==p&&(h.flags|=2048)}return c!==i&&c&&(o.child.flags|=8192),Hu(o,o.updateQueue),vt(o),null;case 4:return Sn(),i===null&&bp(o.stateNode.containerInfo),vt(o),null;case 10:return ai(o.type),vt(o),null;case 19:if(Oe(Ut),p=o.memoizedState,p===null)return vt(o),null;if(h=(o.flags&128)!==0,_=p.rendering,_===null)if(h)xl(p,!1);else{if(Rt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(_=Tu(i),_!==null){for(o.flags|=128,xl(p,!1),i=_.updateQueue,o.updateQueue=i,Hu(o,i),o.subtreeFlags=0,i=c,c=o.child;c!==null;)Zx(c,i),c=c.sibling;return Re(Ut,Ut.current&1|2),o.child}i=i.sibling}p.tail!==null&&be()>Fu&&(o.flags|=128,h=!0,xl(p,!1),o.lanes=4194304)}else{if(!h)if(i=Tu(_),i!==null){if(o.flags|=128,h=!0,i=i.updateQueue,o.updateQueue=i,Hu(o,i),xl(p,!0),p.tail===null&&p.tailMode==="hidden"&&!_.alternate&&!it)return vt(o),null}else 2*be()-p.renderingStartTime>Fu&&c!==536870912&&(o.flags|=128,h=!0,xl(p,!1),o.lanes=4194304);p.isBackwards?(_.sibling=o.child,o.child=_):(i=p.last,i!==null?i.sibling=_:o.child=_,p.last=_)}return p.tail!==null?(o=p.tail,p.rendering=o,p.tail=o.sibling,p.renderingStartTime=be(),o.sibling=null,i=Ut.current,Re(Ut,h?i&1|2:i&1),o):(vt(o),null);case 22:case 23:return ti(o),sm(),h=o.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(o.flags|=8192):h&&(o.flags|=8192),h?(c&536870912)!==0&&(o.flags&128)===0&&(vt(o),o.subtreeFlags&6&&(o.flags|=8192)):vt(o),c=o.updateQueue,c!==null&&Hu(o,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==c&&(o.flags|=2048),i!==null&&Oe(Oa),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),ai($t),vt(o),null;case 25:return null}throw Error(r(156,o.tag))}function mL(i,o){switch(rm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return ai($t),Sn(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return ba(o),null;case 13:if(ti(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));tl()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Oe(Ut),null;case 4:return Sn(),null;case 10:return ai(o.type),null;case 22:case 23:return ti(o),sm(),i!==null&&Oe(Oa),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return ai($t),null;case 25:return null;default:return null}}function Yx(i,o){switch(rm(o),o.tag){case 3:ai($t),Sn();break;case 26:case 27:case 5:ba(o);break;case 4:Sn();break;case 13:ti(o);break;case 19:Oe(Ut);break;case 10:ai(o.type);break;case 22:case 23:ti(o),sm(),i!==null&&Oe(Oa);break;case 24:ai($t)}}var pL={getCacheForType:function(i){var o=dn($t),c=o.data.get(i);return c===void 0&&(c=i(),o.data.set(i,c)),c}},gL=typeof WeakMap=="function"?WeakMap:Map,bt=0,ft=null,Je=null,nt=0,ht=0,jn=null,ui=!1,Bo=!1,tp=!1,di=0,Rt=0,Hi=0,Ba=0,np=0,Jn=0,Uo=0,El=null,kr=null,rp=!1,ip=0,Fu=1/0,Gu=null,Fi=null,Ku=!1,Ua=null,Sl=0,ap=0,op=null,Al=0,sp=null;function Mn(){if((bt&2)!==0&&nt!==0)return nt&-nt;if(z.T!==null){var i=Do;return i!==0?i:pp()}return y0()}function Xx(){Jn===0&&(Jn=(nt&536870912)===0||it?f0():536870912);var i=Wn.current;return i!==null&&(i.flags|=32),Jn}function bn(i,o,c){(i===ft&&ht===2||i.cancelPendingCommit!==null)&&($o(i,0),fi(i,nt,Jn,!1)),$s(i,c),((bt&2)===0||i!==ft)&&(i===ft&&((bt&2)===0&&(Ba|=c),Rt===4&&fi(i,nt,Jn,!1)),Or(i))}function Qx(i,o,c){if((bt&6)!==0)throw Error(r(327));var h=!c&&(o&60)===0&&(o&i.expiredLanes)===0||Us(i,o),p=h?bL(i,o):dp(i,o,!0),_=h;do{if(p===0){Bo&&!h&&fi(i,o,0,!1);break}else if(p===6)fi(i,o,0,!ui);else{if(c=i.current.alternate,_&&!yL(c)){p=dp(i,o,!1),_=!1;continue}if(p===2){if(_=o,i.errorRecoveryDisabledLanes&_)var R=0;else R=i.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){o=R;e:{var k=i;p=El;var M=k.current.memoizedState.isDehydrated;if(M&&($o(k,R).flags|=256),R=dp(k,R,!1),R!==2){if(tp&&!M){k.errorRecoveryDisabledLanes|=_,Ba|=_,p=4;break e}_=kr,kr=p,_!==null&&lp(_)}p=R}if(_=!1,p!==2)continue}}if(p===1){$o(i,0),fi(i,o,0,!0);break}e:{switch(h=i,p){case 0:case 1:throw Error(r(345));case 4:if((o&4194176)===o){fi(h,o,Jn,!ui);break e}break;case 2:kr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=c,h.finishedLanes=o,(o&62914560)===o&&(_=ip+300-be(),10<_)){if(fi(h,o,Jn,!ui),au(h,0)!==0)break e;h.timeoutHandle=EE(Jx.bind(null,h,c,kr,Gu,rp,o,Jn,Ba,Uo,ui,2,-0,0),_);break e}Jx(h,c,kr,Gu,rp,o,Jn,Ba,Uo,ui,0,-0,0)}}break}while(!0);Or(i)}function lp(i){kr===null?kr=i:kr.push.apply(kr,i)}function Jx(i,o,c,h,p,_,R,k,M,G,oe,me,te){var ae=o.subtreeFlags;if((ae&8192||(ae&16785408)===16785408)&&(kl={stylesheets:null,count:0,unsuspend:QL},Hx(o),o=ej(),o!==null)){i.cancelPendingCommit=o(oE.bind(null,i,c,h,p,R,k,M,1,me,te)),fi(i,_,R,!G);return}oE(i,c,h,p,R,k,M,oe,me,te)}function yL(i){for(var o=i;;){var c=o.tag;if((c===0||c===11||c===15)&&o.flags&16384&&(c=o.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var p=c[h],_=p.getSnapshot;p=p.value;try{if(!Dn(_(),p))return!1}catch{return!1}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function fi(i,o,c,h){o&=~np,o&=~Ba,i.suspendedLanes|=o,i.pingedLanes&=~o,h&&(i.warmLanes|=o),h=i.expirationTimes;for(var p=o;0<p;){var _=31-yn(p),R=1<<_;h[_]=-1,p&=~R}c!==0&&m0(i,c,o)}function Zu(){return(bt&6)===0?(wl(0),!1):!0}function cp(){if(Je!==null){if(ht===0)var i=Je.return;else i=Je,ii=Ma=null,pm(i),ko=null,al=0,i=Je;for(;i!==null;)Yx(i.alternate,i),i=i.return;Je=null}}function $o(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,ML(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),cp(),ft=i,Je=c=$i(i.current,null),nt=o,ht=0,jn=null,ui=!1,Bo=Us(i,o),tp=!1,Uo=Jn=np=Ba=Hi=Rt=0,kr=El=null,rp=!1,(o&8)!==0&&(o|=o&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=o;0<h;){var p=31-yn(h),_=1<<p;o|=i[p],h&=~_}return di=o,yu(),c}function eE(i,o){Ye=null,z.H=Nr,o===rl?(o=p_(),ht=3):o===f_?(o=p_(),ht=4):ht=o===hx?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,jn=o,Je===null&&(Rt=1,Pu(i,Kn(o,i.current)))}function tE(){var i=z.H;return z.H=Nr,i===null?Nr:i}function nE(){var i=z.A;return z.A=pL,i}function up(){Rt=4,ui||(nt&4194176)!==nt&&Wn.current!==null||(Bo=!0),(Hi&134217727)===0&&(Ba&134217727)===0||ft===null||fi(ft,nt,Jn,!1)}function dp(i,o,c){var h=bt;bt|=2;var p=tE(),_=nE();(ft!==i||nt!==o)&&(Gu=null,$o(i,o)),o=!1;var R=Rt;e:do try{if(ht!==0&&Je!==null){var k=Je,M=jn;switch(ht){case 8:cp(),R=6;break e;case 3:case 2:case 6:Wn.current===null&&(o=!0);var G=ht;if(ht=0,jn=null,Ho(i,k,M,G),c&&Bo){R=0;break e}break;default:G=ht,ht=0,jn=null,Ho(i,k,M,G)}}vL(),R=Rt;break}catch(oe){eE(i,oe)}while(!0);return o&&i.shellSuspendCounter++,ii=Ma=null,bt=h,z.H=p,z.A=_,Je===null&&(ft=null,nt=0,yu()),R}function vL(){for(;Je!==null;)rE(Je)}function bL(i,o){var c=bt;bt|=2;var h=tE(),p=nE();ft!==i||nt!==o?(Gu=null,Fu=be()+500,$o(i,o)):Bo=Us(i,o);e:do try{if(ht!==0&&Je!==null){o=Je;var _=jn;t:switch(ht){case 1:ht=0,jn=null,Ho(i,o,_,1);break;case 2:if(h_(_)){ht=0,jn=null,iE(o);break}o=function(){ht===2&&ft===i&&(ht=7),Or(i)},_.then(o,o);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:h_(_)?(ht=0,jn=null,iE(o)):(ht=0,jn=null,Ho(i,o,_,7));break;case 5:var R=null;switch(Je.tag){case 26:R=Je.memoizedState;case 5:case 27:var k=Je;if(!R||IE(R)){ht=0,jn=null;var M=k.sibling;if(M!==null)Je=M;else{var G=k.return;G!==null?(Je=G,qu(G)):Je=null}break t}}ht=0,jn=null,Ho(i,o,_,5);break;case 6:ht=0,jn=null,Ho(i,o,_,6);break;case 8:cp(),Rt=6;break e;default:throw Error(r(462))}}_L();break}catch(oe){eE(i,oe)}while(!0);return ii=Ma=null,z.H=h,z.A=p,bt=c,Je!==null?0:(ft=null,nt=0,yu(),Rt)}function _L(){for(;Je!==null&&!se();)rE(Je)}function rE(i){var o=wx(i.alternate,i,di);i.memoizedProps=i.pendingProps,o===null?qu(i):Je=o}function iE(i){var o=i,c=o.alternate;switch(o.tag){case 15:case 0:o=bx(c,o,o.pendingProps,o.type,void 0,nt);break;case 11:o=bx(c,o,o.pendingProps,o.type.render,o.ref,nt);break;case 5:pm(o);default:Yx(c,o),o=Je=Zx(o,di),o=wx(c,o,di)}i.memoizedProps=i.pendingProps,o===null?qu(i):Je=o}function Ho(i,o,c,h){ii=Ma=null,pm(o),ko=null,al=0;var p=o.return;try{if(lL(i,p,o,c,nt)){Rt=1,Pu(i,Kn(c,i.current)),Je=null;return}}catch(_){if(p!==null)throw Je=p,_;Rt=1,Pu(i,Kn(c,i.current)),Je=null;return}o.flags&32768?(it||h===1?i=!0:Bo||(nt&536870912)!==0?i=!1:(ui=i=!0,(h===2||h===3||h===6)&&(h=Wn.current,h!==null&&h.tag===13&&(h.flags|=16384))),aE(o,i)):qu(o)}function qu(i){var o=i;do{if((o.flags&32768)!==0){aE(o,ui);return}i=o.return;var c=hL(o.alternate,o,di);if(c!==null){Je=c;return}if(o=o.sibling,o!==null){Je=o;return}Je=o=i}while(o!==null);Rt===0&&(Rt=5)}function aE(i,o){do{var c=mL(i.alternate,i);if(c!==null){c.flags&=32767,Je=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!o&&(i=i.sibling,i!==null)){Je=i;return}Je=i=c}while(i!==null);Rt=6,Je=null}function oE(i,o,c,h,p,_,R,k,M,G){var oe=z.T,me=ne.p;try{ne.p=2,z.T=null,xL(i,o,c,h,me,p,_,R,k,M,G)}finally{z.T=oe,ne.p=me}}function xL(i,o,c,h,p,_,R,k){do Fo();while(Ua!==null);if((bt&6)!==0)throw Error(r(327));var M=i.finishedWork;if(h=i.finishedLanes,M===null)return null;if(i.finishedWork=null,i.finishedLanes=0,M===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0,i.cancelPendingCommit=null;var G=M.lanes|M.childLanes;if(G|=em,JD(i,h,G,_,R,k),i===ft&&(Je=ft=null,nt=0),(M.subtreeFlags&10256)===0&&(M.flags&10256)===0||Ku||(Ku=!0,ap=G,op=c,wL(ot,function(){return Fo(),null})),c=(M.flags&15990)!==0,(M.subtreeFlags&15990)!==0||c?(c=z.T,z.T=null,_=ne.p,ne.p=2,R=bt,bt|=4,uL(i,M),Bx(M,i),GI(Sp,i.containerInfo),od=!!Ep,Sp=Ep=null,i.current=M,Mx(i,M.alternate,M),we(),bt=R,ne.p=_,z.T=c):i.current=M,Ku?(Ku=!1,Ua=i,Sl=h):sE(i,G),G=i.pendingLanes,G===0&&(Fi=null),Oh(M.stateNode),Or(i),o!==null)for(p=i.onRecoverableError,M=0;M<o.length;M++)G=o[M],p(G.value,{componentStack:G.stack});return(Sl&3)!==0&&Fo(),G=i.pendingLanes,(h&4194218)!==0&&(G&42)!==0?i===sp?Al++:(Al=0,sp=i):Al=0,wl(0),null}function sE(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,sl(o)))}function Fo(){if(Ua!==null){var i=Ua,o=ap;ap=0;var c=g0(Sl),h=z.T,p=ne.p;try{if(ne.p=32>c?32:c,z.T=null,Ua===null)var _=!1;else{c=op,op=null;var R=Ua,k=Sl;if(Ua=null,Sl=0,(bt&6)!==0)throw Error(r(331));var M=bt;if(bt|=4,Gx(R.current),$x(R,R.current,k,c),bt=M,wl(0,!1),tn&&typeof tn.onPostCommitFiberRoot=="function")try{tn.onPostCommitFiberRoot(Yr,R)}catch{}_=!0}return _}finally{ne.p=p,z.T=h,sE(i,o)}}return!1}function lE(i,o,c){o=Kn(c,o),o=Nm(i.stateNode,o,2),i=zi(i,o,2),i!==null&&($s(i,2),Or(i))}function dt(i,o,c){if(i.tag===3)lE(i,i,c);else for(;o!==null;){if(o.tag===3){lE(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fi===null||!Fi.has(h))){i=Kn(c,i),c=dx(2),h=zi(o,c,2),h!==null&&(fx(c,h,o,i),$s(h,2),Or(h));break}}o=o.return}}function fp(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new gL;var p=new Set;h.set(o,p)}else p=h.get(o),p===void 0&&(p=new Set,h.set(o,p));p.has(c)||(tp=!0,p.add(c),i=EL.bind(null,i,o,c),o.then(i,i))}function EL(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,ft===i&&(nt&c)===c&&(Rt===4||Rt===3&&(nt&62914560)===nt&&300>be()-ip?(bt&2)===0&&$o(i,0):np|=c,Uo===nt&&(Uo=0)),Or(i)}function cE(i,o){o===0&&(o=h0()),i=ki(i,o),i!==null&&($s(i,o),Or(i))}function SL(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),cE(i,c)}function AL(i,o){var c=0;switch(i.tag){case 13:var h=i.stateNode,p=i.memoizedState;p!==null&&(c=p.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(o),cE(i,c)}function wL(i,o){return B(i,o)}var Wu=null,Go=null,hp=!1,Yu=!1,mp=!1,$a=0;function Or(i){i!==Go&&i.next===null&&(Go===null?Wu=Go=i:Go=Go.next=i),Yu=!0,hp||(hp=!0,RL(TL))}function wl(i,o){if(!mp&&Yu){mp=!0;do for(var c=!1,h=Wu;h!==null;){if(i!==0){var p=h.pendingLanes;if(p===0)var _=0;else{var R=h.suspendedLanes,k=h.pingedLanes;_=(1<<31-yn(42|i)+1)-1,_&=p&~(R&~k),_=_&201326677?_&201326677|1:_?_|2:0}_!==0&&(c=!0,fE(h,_))}else _=nt,_=au(h,h===ft?_:0),(_&3)===0||Us(h,_)||(c=!0,fE(h,_));h=h.next}while(c);mp=!1}}function TL(){Yu=hp=!1;var i=0;$a!==0&&(jL()&&(i=$a),$a=0);for(var o=be(),c=null,h=Wu;h!==null;){var p=h.next,_=uE(h,o);_===0?(h.next=null,c===null?Wu=p:c.next=p,p===null&&(Go=c)):(c=h,(i!==0||(_&3)!==0)&&(Yu=!0)),h=p}wl(i)}function uE(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,p=i.expirationTimes,_=i.pendingLanes&-62914561;0<_;){var R=31-yn(_),k=1<<R,M=p[R];M===-1?((k&c)===0||(k&h)!==0)&&(p[R]=QD(k,o)):M<=o&&(i.expiredLanes|=k),_&=~k}if(o=ft,c=nt,c=au(i,i===o?c:0),h=i.callbackNode,c===0||i===o&&ht===2||i.cancelPendingCommit!==null)return h!==null&&h!==null&&J(h),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||Us(i,c)){if(o=c&-c,o===i.callbackPriority)return o;switch(h!==null&&J(h),g0(c)){case 2:case 8:c=rt;break;case 32:c=ot;break;case 268435456:c=_a;break;default:c=ot}return h=dE.bind(null,i),c=B(c,h),i.callbackPriority=o,i.callbackNode=c,o}return h!==null&&h!==null&&J(h),i.callbackPriority=2,i.callbackNode=null,2}function dE(i,o){var c=i.callbackNode;if(Fo()&&i.callbackNode!==c)return null;var h=nt;return h=au(i,i===ft?h:0),h===0?null:(Qx(i,h,o),uE(i,be()),i.callbackNode!=null&&i.callbackNode===c?dE.bind(null,i):null)}function fE(i,o){if(Fo())return null;Qx(i,o,!0)}function RL(i){PL(function(){(bt&6)!==0?B(Le,i):i()})}function pp(){return $a===0&&($a=f0()),$a}function hE(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:uu(""+i)}function mE(i,o){var c=o.ownerDocument.createElement("input");return c.name=o.name,c.value=o.value,i.id&&c.setAttribute("form",i.id),o.parentNode.insertBefore(c,o),i=new FormData(i),c.parentNode.removeChild(c),i}function CL(i,o,c,h,p){if(o==="submit"&&c&&c.stateNode===p){var _=hE((p[wn]||null).action),R=h.submitter;R&&(o=(o=R[wn]||null)?hE(o.formAction):R.getAttribute("formAction"),o!==null&&(_=o,R=null));var k=new mu("action","action",null,h,p);i.push({event:k,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if($a!==0){var M=R?mE(p,R):new FormData(p);Am(c,{pending:!0,data:M,method:p.method,action:_},null,M)}}else typeof _=="function"&&(k.preventDefault(),M=R?mE(p,R):new FormData(p),Am(c,{pending:!0,data:M,method:p.method,action:_},_,M))},currentTarget:p}]})}}for(var gp=0;gp<o_.length;gp++){var yp=o_[gp],NL=yp.toLowerCase(),kL=yp[0].toUpperCase()+yp.slice(1);hr(NL,"on"+kL)}hr(t_,"onAnimationEnd"),hr(n_,"onAnimationIteration"),hr(r_,"onAnimationStart"),hr("dblclick","onDoubleClick"),hr("focusin","onFocus"),hr("focusout","onBlur"),hr(ZI,"onTransitionRun"),hr(qI,"onTransitionStart"),hr(WI,"onTransitionCancel"),hr(i_,"onTransitionEnd"),vo("onMouseEnter",["mouseout","mouseover"]),vo("onMouseLeave",["mouseout","mouseover"]),vo("onPointerEnter",["pointerout","pointerover"]),vo("onPointerLeave",["pointerout","pointerover"]),Sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="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(" "),OL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tl));function pE(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],p=h.event;h=h.listeners;e:{var _=void 0;if(o)for(var R=h.length-1;0<=R;R--){var k=h[R],M=k.instance,G=k.currentTarget;if(k=k.listener,M!==_&&p.isPropagationStopped())break e;_=k,p.currentTarget=G;try{_(p)}catch(oe){Mu(oe)}p.currentTarget=null,_=M}else for(R=0;R<h.length;R++){if(k=h[R],M=k.instance,G=k.currentTarget,k=k.listener,M!==_&&p.isPropagationStopped())break e;_=k,p.currentTarget=G;try{_(p)}catch(oe){Mu(oe)}p.currentTarget=null,_=M}}}}function et(i,o){var c=o[Ih];c===void 0&&(c=o[Ih]=new Set);var h=i+"__bubble";c.has(h)||(gE(o,i,2,!1),c.add(h))}function vp(i,o,c){var h=0;o&&(h|=4),gE(c,i,h,o)}var Xu="_reactListening"+Math.random().toString(36).slice(2);function bp(i){if(!i[Xu]){i[Xu]=!0,b0.forEach(function(c){c!=="selectionchange"&&(OL.has(c)||vp(c,!1,i),vp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Xu]||(o[Xu]=!0,vp("selectionchange",!1,o))}}function gE(i,o,c,h){switch(VE(o)){case 2:var p=rj;break;case 8:p=ij;break;default:p=Dp}c=p.bind(null,o,c,i),p=void 0,!Uh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),h?p!==void 0?i.addEventListener(o,c,{capture:!0,passive:p}):i.addEventListener(o,c,!0):p!==void 0?i.addEventListener(o,c,{passive:p}):i.addEventListener(o,c,!1)}function _p(i,o,c,h,p){var _=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var R=h.tag;if(R===3||R===4){var k=h.stateNode.containerInfo;if(k===p||k.nodeType===8&&k.parentNode===p)break;if(R===4)for(R=h.return;R!==null;){var M=R.tag;if((M===3||M===4)&&(M=R.stateNode.containerInfo,M===p||M.nodeType===8&&M.parentNode===p))return;R=R.return}for(;k!==null;){if(R=Ea(k),R===null)return;if(M=R.tag,M===5||M===6||M===26||M===27){h=_=R;continue e}k=k.parentNode}}h=h.return}O0(function(){var G=_,oe=Vh(c),me=[];e:{var te=a_.get(i);if(te!==void 0){var ae=mu,De=i;switch(i){case"keypress":if(fu(c)===0)break e;case"keydown":case"keyup":ae=AI;break;case"focusin":De="focus",ae=Gh;break;case"focusout":De="blur",ae=Gh;break;case"beforeblur":case"afterblur":ae=Gh;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=L0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=fI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=RI;break;case t_:case n_:case r_:ae=pI;break;case i_:ae=NI;break;case"scroll":case"scrollend":ae=uI;break;case"wheel":ae=OI;break;case"copy":case"cut":case"paste":ae=yI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=M0;break;case"toggle":case"beforetoggle":ae=II}var He=(o&4)!==0,Ct=!He&&(i==="scroll"||i==="scrollend"),q=He?te!==null?te+"Capture":null:te;He=[];for(var F=G,Y;F!==null;){var de=F;if(Y=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||Y===null||q===null||(de=Gs(F,q),de!=null&&He.push(Rl(F,de,Y))),Ct)break;F=F.return}0<He.length&&(te=new ae(te,De,null,c,oe),me.push({event:te,listeners:He}))}}if((o&7)===0){e:{if(te=i==="mouseover"||i==="pointerover",ae=i==="mouseout"||i==="pointerout",te&&c!==zh&&(De=c.relatedTarget||c.fromElement)&&(Ea(De)||De[po]))break e;if((ae||te)&&(te=oe.window===oe?oe:(te=oe.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(De=c.relatedTarget||c.toElement,ae=G,De=De?Ea(De):null,De!==null&&(Ct=Z(De),He=De.tag,De!==Ct||He!==5&&He!==27&&He!==6)&&(De=null)):(ae=null,De=G),ae!==De)){if(He=L0,de="onMouseLeave",q="onMouseEnter",F="mouse",(i==="pointerout"||i==="pointerover")&&(He=M0,de="onPointerLeave",q="onPointerEnter",F="pointer"),Ct=ae==null?te:Fs(ae),Y=De==null?te:Fs(De),te=new He(de,F+"leave",ae,c,oe),te.target=Ct,te.relatedTarget=Y,de=null,Ea(oe)===G&&(He=new He(q,F+"enter",De,c,oe),He.target=Y,He.relatedTarget=Ct,de=He),Ct=de,ae&&De)t:{for(He=ae,q=De,F=0,Y=He;Y;Y=Ko(Y))F++;for(Y=0,de=q;de;de=Ko(de))Y++;for(;0<F-Y;)He=Ko(He),F--;for(;0<Y-F;)q=Ko(q),Y--;for(;F--;){if(He===q||q!==null&&He===q.alternate)break t;He=Ko(He),q=Ko(q)}He=null}else He=null;ae!==null&&yE(me,te,ae,He,!1),De!==null&&Ct!==null&&yE(me,Ct,De,He,!0)}}e:{if(te=G?Fs(G):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var Ce=F0;else if($0(te))if(G0)Ce=HI;else{Ce=UI;var Qe=BI}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?G&&Ph(G.elementType)&&(Ce=F0):Ce=$I;if(Ce&&(Ce=Ce(i,G))){H0(me,Ce,c,oe);break e}Qe&&Qe(i,te,G),i==="focusout"&&G&&te.type==="number"&&G.memoizedProps.value!=null&&Mh(te,"number",te.value)}switch(Qe=G?Fs(G):window,i){case"focusin":($0(Qe)||Qe.contentEditable==="true")&&(Ao=Qe,Xh=G,Js=null);break;case"focusout":Js=Xh=Ao=null;break;case"mousedown":Qh=!0;break;case"contextmenu":case"mouseup":case"dragend":Qh=!1,J0(me,c,oe);break;case"selectionchange":if(KI)break;case"keydown":case"keyup":J0(me,c,oe)}var je;if(Zh)e:{switch(i){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else So?B0(i,c)&&(Me="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Me="onCompositionStart");Me&&(P0&&c.locale!=="ko"&&(So||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&So&&(je=D0()):(Ni=oe,$h="value"in Ni?Ni.value:Ni.textContent,So=!0)),Qe=Qu(G,Me),0<Qe.length&&(Me=new j0(Me,i,null,c,oe),me.push({event:Me,listeners:Qe}),je?Me.data=je:(je=U0(c),je!==null&&(Me.data=je)))),(je=jI?MI(i,c):PI(i,c))&&(Me=Qu(G,"onBeforeInput"),0<Me.length&&(Qe=new j0("onBeforeInput","beforeinput",null,c,oe),me.push({event:Qe,listeners:Me}),Qe.data=je)),CL(me,i,G,c,oe)}pE(me,o)})}function Rl(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Qu(i,o){for(var c=o+"Capture",h=[];i!==null;){var p=i,_=p.stateNode;p=p.tag,p!==5&&p!==26&&p!==27||_===null||(p=Gs(i,c),p!=null&&h.unshift(Rl(i,p,_)),p=Gs(i,o),p!=null&&h.push(Rl(i,p,_))),i=i.return}return h}function Ko(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function yE(i,o,c,h,p){for(var _=o._reactName,R=[];c!==null&&c!==h;){var k=c,M=k.alternate,G=k.stateNode;if(k=k.tag,M!==null&&M===h)break;k!==5&&k!==26&&k!==27||G===null||(M=G,p?(G=Gs(c,_),G!=null&&R.unshift(Rl(c,G,M))):p||(G=Gs(c,_),G!=null&&R.push(Rl(c,G,M)))),c=c.return}R.length!==0&&i.push({event:o,listeners:R})}var DL=/\r\n?/g,IL=/\u0000|\uFFFD/g;function vE(i){return(typeof i=="string"?i:""+i).replace(DL,`
50
- `).replace(IL,"")}function bE(i,o){return o=vE(o),vE(i)===o}function Ju(){}function ct(i,o,c,h,p,_){switch(c){case"children":typeof h=="string"?o==="body"||o==="textarea"&&h===""||_o(i,h):(typeof h=="number"||typeof h=="bigint")&&o!=="body"&&_o(i,""+h);break;case"className":su(i,"class",h);break;case"tabIndex":su(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":su(i,c,h);break;case"style":N0(i,h,_);break;case"data":if(o!=="object"){su(i,"data",h);break}case"src":case"href":if(h===""&&(o!=="a"||c!=="href")){i.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=uu(""+h),i.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(c==="formAction"?(o!=="input"&&ct(i,o,"name",p.name,p,null),ct(i,o,"formEncType",p.formEncType,p,null),ct(i,o,"formMethod",p.formMethod,p,null),ct(i,o,"formTarget",p.formTarget,p,null)):(ct(i,o,"encType",p.encType,p,null),ct(i,o,"method",p.method,p,null),ct(i,o,"target",p.target,p,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=uu(""+h),i.setAttribute(c,h);break;case"onClick":h!=null&&(i.onclick=Ju);break;case"onScroll":h!=null&&et("scroll",i);break;case"onScrollEnd":h!=null&&et("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}c=uu(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""+h):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":h===!0?i.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,h):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(c,h):i.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(c):i.setAttribute(c,h);break;case"popover":et("beforetoggle",i),et("toggle",i),ou(i,"popover",h);break;case"xlinkActuate":Qr(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Qr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Qr(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Qr(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Qr(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Qr(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Qr(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Qr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Qr(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":ou(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=lI.get(c)||c,ou(i,c,h))}}function xp(i,o,c,h,p,_){switch(c){case"style":N0(i,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof h=="string"?_o(i,h):(typeof h=="number"||typeof h=="bigint")&&_o(i,""+h);break;case"onScroll":h!=null&&et("scroll",i);break;case"onScrollEnd":h!=null&&et("scrollend",i);break;case"onClick":h!=null&&(i.onclick=Ju);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_0.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(p=c.endsWith("Capture"),o=c.slice(2,p?c.length-7:void 0),_=i[wn]||null,_=_!=null?_[c]:null,typeof _=="function"&&i.removeEventListener(o,_,p),typeof h=="function")){typeof _!="function"&&_!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(o,h,p);break e}c in i?i[c]=h:h===!0?i.setAttribute(c,""):ou(i,c,h)}}}function an(i,o,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",i),et("load",i);var h=!1,p=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var R=c[_];if(R!=null)switch(_){case"src":h=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:ct(i,o,_,R,c,null)}}p&&ct(i,o,"srcSet",c.srcSet,c,null),h&&ct(i,o,"src",c.src,c,null);return;case"input":et("invalid",i);var k=_=R=p=null,M=null,G=null;for(h in c)if(c.hasOwnProperty(h)){var oe=c[h];if(oe!=null)switch(h){case"name":p=oe;break;case"type":R=oe;break;case"checked":M=oe;break;case"defaultChecked":G=oe;break;case"value":_=oe;break;case"defaultValue":k=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,o));break;default:ct(i,o,h,oe,c,null)}}w0(i,_,k,M,G,R,p,!1),lu(i);return;case"select":et("invalid",i),h=R=_=null;for(p in c)if(c.hasOwnProperty(p)&&(k=c[p],k!=null))switch(p){case"value":_=k;break;case"defaultValue":R=k;break;case"multiple":h=k;default:ct(i,o,p,k,c,null)}o=_,c=R,i.multiple=!!h,o!=null?bo(i,!!h,o,!1):c!=null&&bo(i,!!h,c,!0);return;case"textarea":et("invalid",i),_=p=h=null;for(R in c)if(c.hasOwnProperty(R)&&(k=c[R],k!=null))switch(R){case"value":h=k;break;case"defaultValue":p=k;break;case"children":_=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:ct(i,o,R,k,c,null)}R0(i,h,p,_),lu(i);return;case"option":for(M in c)if(c.hasOwnProperty(M)&&(h=c[M],h!=null))switch(M){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:ct(i,o,M,h,c,null)}return;case"dialog":et("cancel",i),et("close",i);break;case"iframe":case"object":et("load",i);break;case"video":case"audio":for(h=0;h<Tl.length;h++)et(Tl[h],i);break;case"image":et("error",i),et("load",i);break;case"details":et("toggle",i);break;case"embed":case"source":case"link":et("error",i),et("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(G in c)if(c.hasOwnProperty(G)&&(h=c[G],h!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:ct(i,o,G,h,c,null)}return;default:if(Ph(o)){for(oe in c)c.hasOwnProperty(oe)&&(h=c[oe],h!==void 0&&xp(i,o,oe,h,c,void 0));return}}for(k in c)c.hasOwnProperty(k)&&(h=c[k],h!=null&&ct(i,o,k,h,c,null))}function LL(i,o,c,h){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,_=null,R=null,k=null,M=null,G=null,oe=null;for(ae in c){var me=c[ae];if(c.hasOwnProperty(ae)&&me!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":M=me;default:h.hasOwnProperty(ae)||ct(i,o,ae,null,h,me)}}for(var te in h){var ae=h[te];if(me=c[te],h.hasOwnProperty(te)&&(ae!=null||me!=null))switch(te){case"type":_=ae;break;case"name":p=ae;break;case"checked":G=ae;break;case"defaultChecked":oe=ae;break;case"value":R=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,o));break;default:ae!==me&&ct(i,o,te,ae,h,me)}}jh(i,R,k,M,G,oe,_,p);return;case"select":ae=R=k=te=null;for(_ in c)if(M=c[_],c.hasOwnProperty(_)&&M!=null)switch(_){case"value":break;case"multiple":ae=M;default:h.hasOwnProperty(_)||ct(i,o,_,null,h,M)}for(p in h)if(_=h[p],M=c[p],h.hasOwnProperty(p)&&(_!=null||M!=null))switch(p){case"value":te=_;break;case"defaultValue":k=_;break;case"multiple":R=_;default:_!==M&&ct(i,o,p,_,h,M)}o=k,c=R,h=ae,te!=null?bo(i,!!c,te,!1):!!h!=!!c&&(o!=null?bo(i,!!c,o,!0):bo(i,!!c,c?[]:"",!1));return;case"textarea":ae=te=null;for(k in c)if(p=c[k],c.hasOwnProperty(k)&&p!=null&&!h.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:ct(i,o,k,null,h,p)}for(R in h)if(p=h[R],_=c[R],h.hasOwnProperty(R)&&(p!=null||_!=null))switch(R){case"value":te=p;break;case"defaultValue":ae=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==_&&ct(i,o,R,p,h,_)}T0(i,te,ae);return;case"option":for(var De in c)if(te=c[De],c.hasOwnProperty(De)&&te!=null&&!h.hasOwnProperty(De))switch(De){case"selected":i.selected=!1;break;default:ct(i,o,De,null,h,te)}for(M in h)if(te=h[M],ae=c[M],h.hasOwnProperty(M)&&te!==ae&&(te!=null||ae!=null))switch(M){case"selected":i.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:ct(i,o,M,te,h,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var He in c)te=c[He],c.hasOwnProperty(He)&&te!=null&&!h.hasOwnProperty(He)&&ct(i,o,He,null,h,te);for(G in h)if(te=h[G],ae=c[G],h.hasOwnProperty(G)&&te!==ae&&(te!=null||ae!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,o));break;default:ct(i,o,G,te,h,ae)}return;default:if(Ph(o)){for(var Ct in c)te=c[Ct],c.hasOwnProperty(Ct)&&te!==void 0&&!h.hasOwnProperty(Ct)&&xp(i,o,Ct,void 0,h,te);for(oe in h)te=h[oe],ae=c[oe],!h.hasOwnProperty(oe)||te===ae||te===void 0&&ae===void 0||xp(i,o,oe,te,h,ae);return}}for(var q in c)te=c[q],c.hasOwnProperty(q)&&te!=null&&!h.hasOwnProperty(q)&&ct(i,o,q,null,h,te);for(me in h)te=h[me],ae=c[me],!h.hasOwnProperty(me)||te===ae||te==null&&ae==null||ct(i,o,me,te,h,ae)}var Ep=null,Sp=null;function ed(i){return i.nodeType===9?i:i.ownerDocument}function _E(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 xE(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function Ap(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var wp=null;function jL(){var i=window.event;return i&&i.type==="popstate"?i===wp?!1:(wp=i,!0):(wp=null,!1)}var EE=typeof setTimeout=="function"?setTimeout:void 0,ML=typeof clearTimeout=="function"?clearTimeout:void 0,SE=typeof Promise=="function"?Promise:void 0,PL=typeof queueMicrotask=="function"?queueMicrotask:typeof SE<"u"?function(i){return SE.resolve(null).then(i).catch(zL)}:EE;function zL(i){setTimeout(function(){throw i})}function Tp(i,o){var c=o,h=0;do{var p=c.nextSibling;if(i.removeChild(c),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(h===0){i.removeChild(p),jl(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=p}while(c);jl(o)}function Rp(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var c=o;switch(o=o.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Rp(c),Lh(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function VL(i,o,c,h){for(;i.nodeType===1;){var p=c;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Hs])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(_=i.getAttribute("rel"),_==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(_!==p.rel||i.getAttribute("href")!==(p.href==null?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(_=i.getAttribute("src"),(_!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&_&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var _=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===_)return i}else return i;if(i=gr(i.nextSibling),i===null)break}return null}function BL(i,o,c){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=gr(i.nextSibling),i===null))return null;return i}function gr(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="F!"||o==="F")break;if(o==="/$")return null}}return i}function AE(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}function wE(i,o,c){switch(o=ed(c),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}var er=new Map,TE=new Set;function td(i){return typeof i.getRootNode=="function"?i.getRootNode():i.ownerDocument}var hi=ne.d;ne.d={f:UL,r:$L,D:HL,C:FL,L:GL,m:KL,X:qL,S:ZL,M:WL};function UL(){var i=hi.f(),o=Zu();return i||o}function $L(i){var o=go(i);o!==null&&o.tag===5&&o.type==="form"?J_(o):hi.r(i)}var Zo=typeof document>"u"?null:document;function RE(i,o,c){var h=Zo;if(h&&typeof o=="string"&&o){var p=Fn(o);p='link[rel="'+i+'"][href="'+p+'"]',typeof c=="string"&&(p+='[crossorigin="'+c+'"]'),TE.has(p)||(TE.add(p),i={rel:i,crossOrigin:c,href:o},h.querySelector(p)===null&&(o=h.createElement("link"),an(o,"link",i),qt(o),h.head.appendChild(o)))}}function HL(i){hi.D(i),RE("dns-prefetch",i,null)}function FL(i,o){hi.C(i,o),RE("preconnect",i,o)}function GL(i,o,c){hi.L(i,o,c);var h=Zo;if(h&&i&&o){var p='link[rel="preload"][as="'+Fn(o)+'"]';o==="image"&&c&&c.imageSrcSet?(p+='[imagesrcset="'+Fn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(p+='[imagesizes="'+Fn(c.imageSizes)+'"]')):p+='[href="'+Fn(i)+'"]';var _=p;switch(o){case"style":_=qo(i);break;case"script":_=Wo(i)}er.has(_)||(i=U({rel:"preload",href:o==="image"&&c&&c.imageSrcSet?void 0:i,as:o},c),er.set(_,i),h.querySelector(p)!==null||o==="style"&&h.querySelector(Cl(_))||o==="script"&&h.querySelector(Nl(_))||(o=h.createElement("link"),an(o,"link",i),qt(o),h.head.appendChild(o)))}}function KL(i,o){hi.m(i,o);var c=Zo;if(c&&i){var h=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Fn(h)+'"][href="'+Fn(i)+'"]',_=p;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Wo(i)}if(!er.has(_)&&(i=U({rel:"modulepreload",href:i},o),er.set(_,i),c.querySelector(p)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Nl(_)))return}h=c.createElement("link"),an(h,"link",i),qt(h),c.head.appendChild(h)}}}function ZL(i,o,c){hi.S(i,o,c);var h=Zo;if(h&&i){var p=yo(h).hoistableStyles,_=qo(i);o=o||"default";var R=p.get(_);if(!R){var k={loading:0,preload:null};if(R=h.querySelector(Cl(_)))k.loading=5;else{i=U({rel:"stylesheet",href:i,"data-precedence":o},c),(c=er.get(_))&&Cp(i,c);var M=R=h.createElement("link");qt(M),an(M,"link",i),M._p=new Promise(function(G,oe){M.onload=G,M.onerror=oe}),M.addEventListener("load",function(){k.loading|=1}),M.addEventListener("error",function(){k.loading|=2}),k.loading|=4,nd(R,o,h)}R={type:"stylesheet",instance:R,count:1,state:k},p.set(_,R)}}}function qL(i,o){hi.X(i,o);var c=Zo;if(c&&i){var h=yo(c).hoistableScripts,p=Wo(i),_=h.get(p);_||(_=c.querySelector(Nl(p)),_||(i=U({src:i,async:!0},o),(o=er.get(p))&&Np(i,o),_=c.createElement("script"),qt(_),an(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(p,_))}}function WL(i,o){hi.M(i,o);var c=Zo;if(c&&i){var h=yo(c).hoistableScripts,p=Wo(i),_=h.get(p);_||(_=c.querySelector(Nl(p)),_||(i=U({src:i,async:!0,type:"module"},o),(o=er.get(p))&&Np(i,o),_=c.createElement("script"),qt(_),an(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(p,_))}}function CE(i,o,c,h){var p=(p=pt.current)?td(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"?(o=qo(c.href),c=yo(p).hoistableStyles,h=c.get(o),h||(h={type:"style",instance:null,count:0,state:null},c.set(o,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=qo(c.href);var _=yo(p).hoistableStyles,R=_.get(i);if(R||(p=p.ownerDocument||p,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(i,R),(_=p.querySelector(Cl(i)))&&!_._p&&(R.instance=_,R.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),_||YL(p,i,c,R.state))),o&&h===null)throw Error(r(528,""));return R}if(o&&h!==null)throw Error(r(529,""));return null;case"script":return o=c.async,c=c.src,typeof c=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Wo(c),c=yo(p).hoistableScripts,h=c.get(o),h||(h={type:"script",instance:null,count:0,state:null},c.set(o,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function qo(i){return'href="'+Fn(i)+'"'}function Cl(i){return'link[rel="stylesheet"]['+i+"]"}function NE(i){return U({},i,{"data-precedence":i.precedence,precedence:null})}function YL(i,o,c,h){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?h.loading=1:(o=i.createElement("link"),h.preload=o,o.addEventListener("load",function(){return h.loading|=1}),o.addEventListener("error",function(){return h.loading|=2}),an(o,"link",c),qt(o),i.head.appendChild(o))}function Wo(i){return'[src="'+Fn(i)+'"]'}function Nl(i){return"script[async]"+i}function kE(i,o,c){if(o.count++,o.instance===null)switch(o.type){case"style":var h=i.querySelector('style[data-href~="'+Fn(c.href)+'"]');if(h)return o.instance=h,qt(h),h;var p=U({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),qt(h),an(h,"style",p),nd(h,c.precedence,i),o.instance=h;case"stylesheet":p=qo(c.href);var _=i.querySelector(Cl(p));if(_)return o.state.loading|=4,o.instance=_,qt(_),_;h=NE(c),(p=er.get(p))&&Cp(h,p),_=(i.ownerDocument||i).createElement("link"),qt(_);var R=_;return R._p=new Promise(function(k,M){R.onload=k,R.onerror=M}),an(_,"link",h),o.state.loading|=4,nd(_,c.precedence,i),o.instance=_;case"script":return _=Wo(c.src),(p=i.querySelector(Nl(_)))?(o.instance=p,qt(p),p):(h=c,(p=er.get(_))&&(h=U({},c),Np(h,p)),i=i.ownerDocument||i,p=i.createElement("script"),qt(p),an(p,"link",h),i.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(h=o.instance,o.state.loading|=4,nd(h,c.precedence,i));return o.instance}function nd(i,o,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=h.length?h[h.length-1]:null,_=p,R=0;R<h.length;R++){var k=h[R];if(k.dataset.precedence===o)_=k;else if(_!==p)break}_?_.parentNode.insertBefore(i,_.nextSibling):(o=c.nodeType===9?c.head:c,o.insertBefore(i,o.firstChild))}function Cp(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Np(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var rd=null;function OE(i,o,c){if(rd===null){var h=new Map,p=rd=new Map;p.set(c,h)}else p=rd,h=p.get(c),h||(h=new Map,p.set(c,h));if(h.has(i))return h;for(h.set(i,null),c=c.getElementsByTagName(i),p=0;p<c.length;p++){var _=c[p];if(!(_[Hs]||_[un]||i==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var R=_.getAttribute(o)||"";R=i+R;var k=h.get(R);k?k.push(_):h.set(R,[_])}}return h}function DE(i,o,c){i=i.ownerDocument||i,i.head.insertBefore(c,o==="title"?i.querySelector("head > title"):null)}function XL(i,o,c){if(c===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return i=o.disabled,typeof o.precedence=="string"&&i==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function IE(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var kl=null;function QL(){}function JL(i,o,c){if(kl===null)throw Error(r(475));var h=kl;if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=qo(c.href),_=i.querySelector(Cl(p));if(_){i=_._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=id.bind(h),i.then(h,h)),o.state.loading|=4,o.instance=_,qt(_);return}_=i.ownerDocument||i,c=NE(c),(p=er.get(p))&&Cp(c,p),_=_.createElement("link"),qt(_);var R=_;R._p=new Promise(function(k,M){R.onload=k,R.onerror=M}),an(_,"link",c),o.instance=_}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(h.count++,o=id.bind(h),i.addEventListener("load",o),i.addEventListener("error",o))}}function ej(){if(kl===null)throw Error(r(475));var i=kl;return i.stylesheets&&i.count===0&&kp(i,i.stylesheets),0<i.count?function(o){var c=setTimeout(function(){if(i.stylesheets&&kp(i,i.stylesheets),i.unsuspend){var h=i.unsuspend;i.unsuspend=null,h()}},6e4);return i.unsuspend=o,function(){i.unsuspend=null,clearTimeout(c)}}:null}function id(){if(this.count--,this.count===0){if(this.stylesheets)kp(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var ad=null;function kp(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,ad=new Map,o.forEach(tj,i),ad=null,id.call(i))}function tj(i,o){if(!(o.state.loading&4)){var c=ad.get(i);if(c)var h=c.get(null);else{c=new Map,ad.set(i,c);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<p.length;_++){var R=p[_];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(c.set(R.dataset.precedence,R),h=R)}h&&c.set(null,h)}p=o.instance,R=p.getAttribute("data-precedence"),_=c.get(R)||h,_===h&&c.set(null,p),c.set(R,p),this.count++,h=id.bind(this),p.addEventListener("load",h),p.addEventListener("error",h),_?_.parentNode.insertBefore(p,_.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),o.state.loading|=4}}var Ol={$$typeof:E,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function nj(i,o,c,h,p,_,R,k){this.tag=1,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Dh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dh(0),this.hiddenUpdates=Dh(null),this.identifierPrefix=h,this.onUncaughtError=p,this.onCaughtError=_,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function LE(i,o,c,h,p,_,R,k,M,G,oe,me){return i=new nj(i,o,c,R,k,M,G,me),o=1,_===!0&&(o|=24),_=Qn(3,null,null,o),i.current=_,_.stateNode=i,o=lm(),o.refCount++,i.pooledCache=o,o.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:o},$m(_),i}function jE(i){return i?(i=Ro,i):Ro}function ME(i,o,c,h,p,_){p=jE(p),h.context===null?h.context=p:h.pendingContext=p,h=Pi(o),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=zi(i,h,o),c!==null&&(bn(c,i,o),ml(c,i,o))}function PE(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function Op(i,o){PE(i,o),(i=i.alternate)&&PE(i,o)}function zE(i){if(i.tag===13){var o=ki(i,67108864);o!==null&&bn(o,i,67108864),Op(i,67108864)}}var od=!0;function rj(i,o,c,h){var p=z.T;z.T=null;var _=ne.p;try{ne.p=2,Dp(i,o,c,h)}finally{ne.p=_,z.T=p}}function ij(i,o,c,h){var p=z.T;z.T=null;var _=ne.p;try{ne.p=8,Dp(i,o,c,h)}finally{ne.p=_,z.T=p}}function Dp(i,o,c,h){if(od){var p=Ip(h);if(p===null)_p(i,o,h,sd,c),BE(i,h);else if(oj(p,i,o,c,h))h.stopPropagation();else if(BE(i,h),o&4&&-1<aj.indexOf(i)){for(;p!==null;){var _=go(p);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var R=xa(_.pendingLanes);if(R!==0){var k=_;for(k.pendingLanes|=2,k.entangledLanes|=2;R;){var M=1<<31-yn(R);k.entanglements[1]|=M,R&=~M}Or(_),(bt&6)===0&&(Fu=be()+500,wl(0))}}break;case 13:k=ki(_,2),k!==null&&bn(k,_,2),Zu(),Op(_,2)}if(_=Ip(h),_===null&&_p(i,o,h,sd,c),_===p)break;p=_}p!==null&&h.stopPropagation()}else _p(i,o,h,null,c)}}function Ip(i){return i=Vh(i),Lp(i)}var sd=null;function Lp(i){if(sd=null,i=Ea(i),i!==null){var o=Z(i);if(o===null)i=null;else{var c=o.tag;if(c===13){if(i=ve(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return sd=i,null}function VE(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(xe()){case Le:return 2;case rt:return 8;case ot:case An:return 32;case _a:return 268435456;default:return 32}default:return 32}}var jp=!1,Gi=null,Ki=null,Zi=null,Dl=new Map,Il=new Map,qi=[],aj="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 BE(i,o){switch(i){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Ki=null;break;case"mouseover":case"mouseout":Zi=null;break;case"pointerover":case"pointerout":Dl.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Il.delete(o.pointerId)}}function Ll(i,o,c,h,p,_){return i===null||i.nativeEvent!==_?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[p]},o!==null&&(o=go(o),o!==null&&zE(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),i)}function oj(i,o,c,h,p){switch(o){case"focusin":return Gi=Ll(Gi,i,o,c,h,p),!0;case"dragenter":return Ki=Ll(Ki,i,o,c,h,p),!0;case"mouseover":return Zi=Ll(Zi,i,o,c,h,p),!0;case"pointerover":var _=p.pointerId;return Dl.set(_,Ll(Dl.get(_)||null,i,o,c,h,p)),!0;case"gotpointercapture":return _=p.pointerId,Il.set(_,Ll(Il.get(_)||null,i,o,c,h,p)),!0}return!1}function UE(i){var o=Ea(i.target);if(o!==null){var c=Z(o);if(c!==null){if(o=c.tag,o===13){if(o=ve(c),o!==null){i.blockedOn=o,eI(i.priority,function(){if(c.tag===13){var h=Mn(),p=ki(c,h);p!==null&&bn(p,c,h),Op(c,h)}});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function ld(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=Ip(i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);zh=h,c.target.dispatchEvent(h),zh=null}else return o=go(c),o!==null&&zE(o),i.blockedOn=c,!1;o.shift()}return!0}function $E(i,o,c){ld(i)&&c.delete(o)}function sj(){jp=!1,Gi!==null&&ld(Gi)&&(Gi=null),Ki!==null&&ld(Ki)&&(Ki=null),Zi!==null&&ld(Zi)&&(Zi=null),Dl.forEach($E),Il.forEach($E)}function cd(i,o){i.blockedOn===o&&(i.blockedOn=null,jp||(jp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,sj)))}var ud=null;function HE(i){ud!==i&&(ud=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ud===i&&(ud=null);for(var o=0;o<i.length;o+=3){var c=i[o],h=i[o+1],p=i[o+2];if(typeof h!="function"){if(Lp(h||c)===null)continue;break}var _=go(c);_!==null&&(i.splice(o,3),o-=3,Am(_,{pending:!0,data:p,method:c.method,action:h},h,p))}}))}function jl(i){function o(M){return cd(M,i)}Gi!==null&&cd(Gi,i),Ki!==null&&cd(Ki,i),Zi!==null&&cd(Zi,i),Dl.forEach(o),Il.forEach(o);for(var c=0;c<qi.length;c++){var h=qi[c];h.blockedOn===i&&(h.blockedOn=null)}for(;0<qi.length&&(c=qi[0],c.blockedOn===null);)UE(c),c.blockedOn===null&&qi.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var p=c[h],_=c[h+1],R=p[wn]||null;if(typeof _=="function")R||HE(c);else if(R){var k=null;if(_&&_.hasAttribute("formAction")){if(p=_,R=_[wn]||null)k=R.formAction;else if(Lp(p)!==null)continue}else k=R.action;typeof k=="function"?c[h+1]=k:(c.splice(h,3),h-=3),HE(c)}}}function Mp(i){this._internalRoot=i}dd.prototype.render=Mp.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var c=o.current,h=Mn();ME(c,h,i,o,null,null)},dd.prototype.unmount=Mp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;i.tag===0&&Fo(),ME(i.current,2,null,i,null,null),Zu(),o[po]=null}};function dd(i){this._internalRoot=i}dd.prototype.unstable_scheduleHydration=function(i){if(i){var o=y0();i={blockedOn:null,target:i,priority:o};for(var c=0;c<qi.length&&o!==0&&o<qi[c].priority;c++);qi.splice(c,0,i),c===0&&UE(i)}};var FE=t.version;if(FE!=="19.0.0")throw Error(r(527,FE,"19.0.0"));ne.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=X(o),i=i!==null?$(i):null,i=i===null?null:i.stateNode,i};var lj={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:z,findFiberByHostInstance:Ea,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fd.isDisabled&&fd.supportsFiber)try{Yr=fd.inject(lj),tn=fd}catch{}}return Pl.createRoot=function(i,o){if(!a(i))throw Error(r(299));var c=!1,h="",p=sx,_=lx,R=cx,k=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onUncaughtError!==void 0&&(p=o.onUncaughtError),o.onCaughtError!==void 0&&(_=o.onCaughtError),o.onRecoverableError!==void 0&&(R=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(k=o.unstable_transitionCallbacks)),o=LE(i,1,!1,null,null,c,h,p,_,R,k,null),i[po]=o.current,bp(i.nodeType===8?i.parentNode:i),new Mp(o)},Pl.hydrateRoot=function(i,o,c){if(!a(i))throw Error(r(299));var h=!1,p="",_=sx,R=lx,k=cx,M=null,G=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(R=c.onCaughtError),c.onRecoverableError!==void 0&&(k=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(M=c.unstable_transitionCallbacks),c.formState!==void 0&&(G=c.formState)),o=LE(i,1,!0,o,c??null,h,p,_,R,k,M,G),o.context=jE(null),c=o.current,h=Mn(),p=Pi(h),p.callback=null,zi(c,p,h),o.current.lanes=h,$s(o,h),Or(o),i[po]=o.current,bp(i),new dd(o)},Pl.version="19.0.0",Pl}var eS;function _j(){if(eS)return Vp.exports;eS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Vp.exports=bj(),Vp.exports}var xj=_j();const Ej={locales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],defaultLocale:"en"},Sj={cookieName:"INTLAYER_LOCALE",prefixDefault:!1},Aj={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},qe={internationalization:Ej,middleware:Sj,editor:Aj};var V=(e=>(e.AFRIKAANS="af",e.AFRIKAANS_SOUTH_AFRICA="af-ZA",e.ARABIC="ar",e.ARABIC_UNITED_ARAB_EMIRATES="ar-AE",e.ARABIC_BAHRAIN="ar-BH",e.ARABIC_ALGERIA="ar-DZ",e.ARABIC_EGYPT="ar-EG",e.ARABIC_IRAQ="ar-IQ",e.ARABIC_JORDAN="ar-JO",e.ARABIC_KUWAIT="ar-KW",e.ARABIC_LEBANON="ar-LB",e.ARABIC_LIBYA="ar-LY",e.ARABIC_MOROCCO="ar-MA",e.ARABIC_OMAN="ar-OM",e.ARABIC_QATAR="ar-QA",e.ARABIC_SAUDI_ARABIA="ar-SA",e.ARABIC_SYRIA="ar-SY",e.ARABIC_TUNISIA="ar-TN",e.ARABIC_YEMEN="ar-YE",e.AZERI_LATIN="az",e.AZERI_LATIN_AZERBAIJAN="az-AZ",e.BELARUSIAN="be",e.BELARUSIAN_BELARUS="be-BY",e.BULGARIAN="bg",e.BULGARIAN_BULGARIA="bg-BG",e.BOSNIAN="bs",e.BOSNIAN_BOSNIA_AND_HERZEGOVINA="bs-BA",e.CATALAN="ca",e.CATALAN_SPAIN="ca-ES",e.CZECH="cs",e.CZECH_CZECH_REPUBLIC="cs-CZ",e.WELSH="cy",e.WELSH_UNITED_KINGDOM="cy-GB",e.DANISH="da",e.DANISH_DENMARK="da-DK",e.GERMAN="de",e.GERMAN_AUSTRIA="de-AT",e.GERMAN_SWITZERLAND="de-CH",e.GERMAN_GERMANY="de-DE",e.GERMAN_LIECHTENSTEIN="de-LI",e.GERMAN_LUXEMBOURG="de-LU",e.DIVEHI="dv",e.DIVEHI_MALDIVES="dv-MV",e.GREEK="el",e.GREEK_GREECE="el-GR",e.ENGLISH="en",e.ENGLISH_AUSTRALIA="en-AU",e.ENGLISH_BELIZE="en-BZ",e.ENGLISH_CANADA="en-CA",e.ENGLISH_CARIBBEAN="en-CB",e.ENGLISH_UNITED_KINGDOM="en-GB",e.ENGLISH_IRELAND="en-IE",e.ENGLISH_JAMAICA="en-JM",e.ENGLISH_NEW_ZEALAND="en-NZ",e.ENGLISH_PHILIPPINES="en-PH",e.ENGLISH_TRINIDAD_AND_TOBAGO="en-TT",e.ENGLISH_UNITED_STATES="en-US",e.ENGLISH_SOUTH_AFRICA="en-ZA",e.ENGLISH_ZIMBABWE="en-ZW",e.ESPERANTO="eo",e.SPANISH="es",e.SPANISH_ARGENTINA="es-AR",e.SPANISH_BOLIVIA="es-BO",e.SPANISH_CHILE="es-CL",e.SPANISH_COLOMBIA="es-CO",e.SPANISH_COSTA_RICA="es-CR",e.SPANISH_DOMINICAN_REPUBLIC="es-DO",e.SPANISH_ECUADOR="es-EC",e.SPANISH_SPAIN="es-ES",e.SPANISH_GUATEMALA="es-GT",e.SPANISH_HONDURAS="es-HN",e.SPANISH_MEXICO="es-MX",e.SPANISH_NICARAGUA="es-NI",e.SPANISH_PANAMA="es-PA",e.SPANISH_PERU="es-PE",e.SPANISH_PUERTO_RICO="es-PR",e.SPANISH_PARAGUAY="es-PY",e.SPANISH_EL_SALVADOR="es-SV",e.SPANISH_URUGUAY="es-UY",e.SPANISH_VENEZUELA="es-VE",e.ESTONIAN="et",e.ESTONIAN_ESTONIA="et-EE",e.BASQUE="eu",e.BASQUE_SPAIN="eu-ES",e.FARSI="fa",e.FARSI_IRAN="fa-IR",e.FINNISH="fi",e.FINNISH_FINLAND="fi-FI",e.FAROESE="fo",e.FAROESE_FAROE_ISLANDS="fo-FO",e.FRENCH="fr",e.FRENCH_BELGIUM="fr-BE",e.FRENCH_CANADA="fr-CA",e.FRENCH_SWITZERLAND="fr-CH",e.FRENCH_FRANCE="fr-FR",e.FRENCH_LUXEMBOURG="fr-LU",e.FRENCH_PRINCIPALITY_OF_MONACO="fr-MC",e.GALICIAN="gl",e.GALICIAN_SPAIN="gl-ES",e.GUJARATI="gu",e.GUJARATI_INDIA="gu-IN",e.HEBREW="he",e.HEBREW_ISRAEL="he-IL",e.HINDI="hi",e.HINDI_INDIA="hi-IN",e.CROATIAN="hr",e.CROATIAN_BOSNIA_AND_HERZEGOVINA="hr-BA",e.CROATIAN_CROATIA="hr-HR",e.HUNGARIAN="hu",e.HUNGARIAN_HUNGARY="hu-HU",e.ARMENIAN="hy",e.ARMENIAN_ARMENIA="hy-AM",e.INDONESIAN="id",e.INDONESIAN_INDONESIA="id-ID",e.ICELANDIC="is",e.ICELANDIC_ICELAND="is-IS",e.ITALIAN="it",e.ITALIAN_SWITZERLAND="it-CH",e.ITALIAN_ITALY="it-IT",e.JAPANESE="ja",e.JAPANESE_JAPAN="ja-JP",e.GEORGIAN="ka",e.GEORGIAN_GEORGIA="ka-GE",e.KAZAKH="kk",e.KAZAKH_KAZAKHSTAN="kk-KZ",e.KANNADA="kn",e.KANNADA_INDIA="kn-IN",e.KOREAN="ko",e.KOREAN_KOREA="ko-KR",e.KONKANI="kok",e.KONKANI_INDIA="kok-IN",e.KYRGYZ="ky",e.KYRGYZ_KYRGYZSTAN="ky-KG",e.LITHUANIAN="lt",e.LITHUANIAN_LITHUANIA="lt-LT",e.LATVIAN="lv",e.LATVIAN_LATVIA="lv-LV",e.MAORI="mi",e.MAORI_NEW_ZEALAND="mi-NZ",e.FYRO_MACEDONIAN="mk",e.FYRO_MACEDONIAN_MACEDONIA="mk-MK",e.MONGOLIAN="mn",e.MONGOLIAN_MONGOLIA="mn-MN",e.MARATHI="mr",e.MARATHI_INDIA="mr-IN",e.MALAY="ms",e.MALAY_BRUNEI_DARUSSALAM="ms-BN",e.MALAY_MALAYSIA="ms-MY",e.MALTESE="mt",e.MALTESE_MALTA="mt-MT",e.NORWEGIAN_BOKMAL="nb",e.NORWEGIAN_BOKMAL_NORWAY="nb-NO",e.DUTCH="nl",e.DUTCH_BELGIUM="nl-BE",e.DUTCH_NETHERLANDS="nl-NL",e.NORWEGIAN_NYNORSK_NORWAY="nn-NO",e.NORTHERN_SOTHO="ns",e.NORTHERN_SOTHO_SOUTH_AFRICA="ns-ZA",e.PUNJABI="pa",e.PUNJABI_INDIA="pa-IN",e.POLISH="pl",e.POLISH_POLAND="pl-PL",e.PASHTO="ps",e.PASHTO_AFGHANISTAN="ps-AR",e.PORTUGUESE="pt",e.PORTUGUESE_BRAZIL="pt-BR",e.PORTUGUESE_PORTUGAL="pt-PT",e.QUECHUA="qu",e.QUECHUA_BOLIVIA="qu-BO",e.QUECHUA_ECUADOR="qu-EC",e.QUECHUA_PERU="qu-PE",e.ROMANIAN="ro",e.ROMANIAN_ROMANIA="ro-RO",e.RUSSIAN="ru",e.RUSSIAN_RUSSIA="ru-RU",e.SANSKRIT="sa",e.SANSKRIT_INDIA="sa-IN",e.SAMI_NORTHERN="se",e.SAMI_NORTHERN_FINLAND="se-FI",e.SAMI_NORTHERN_NORWAY="se-NO",e.SAMI_NORTHERN_SWEDEN="se-SE",e.SLOVAK="sk",e.SLOVAK_SLOVAKIA="sk-SK",e.SLOVENIAN="sl",e.SLOVENIAN_SLOVENIA="sl-SI",e.ALBANIAN="sq",e.ALBANIAN_ALBANIA="sq-AL",e.SERBIAN_LATIN="sr",e.SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA="sr-BA",e.SERBIAN_LATIN_SERBIA_AND_MONTENEGRO="sr-SP",e.SWEDISH="sv",e.SWEDISH_FINLAND="sv-FI",e.SWEDISH_SWEDEN="sv-SE",e.SWAHILI="sw",e.SWAHILI_KENYA="sw-KE",e.SYRIAC="syr",e.SYRIAC_SYRIA="syr-SY",e.TAMIL="ta",e.TAMIL_INDIA="ta-IN",e.TELUGU="te",e.TELUGU_INDIA="te-IN",e.THAI="th",e.THAI_THAILAND="th-TH",e.TAGALOG="tl",e.TAGALOG_PHILIPPINES="tl-PH",e.TSWANA="tn",e.TSWANA_SOUTH_AFRICA="tn-ZA",e.TURKISH="tr",e.TURKISH_TURKEY="tr-TR",e.TATAR="tt",e.TATAR_RUSSIA="tt-RU",e.TSOGA="ts",e.UKRAINIAN="uk",e.UKRAINIAN_UKRAINE="uk-UA",e.URDU="ur",e.URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN="ur-PK",e.UZBEK_LATIN="uz",e.UZBEK_LATIN_UZBEKISTAN="uz-UZ",e.VIETNAMESE="vi",e.VIETNAMESE_VIET_NAM="vi-VN",e.XHOSA="xh",e.XHOSA_SOUTH_AFRICA="xh-ZA",e.CHINESE="zh",e.CHINESE_SIMPLIFIED="zh-Hans",e.CHINESE_SIMPLIFIED_CHINA="zh-CN",e.CHINESE_HONG_KONG="zh-HK",e.CHINESE_MACAU="zh-MO",e.CHINESE_SINGAPORE="zh-SG",e.CHINESE_TRADITIONAL="zh-Hant",e.ZULU="zu",e.ZULU_SOUTH_AFRICA="zu-ZA",e))(V||{}),K=(e=>(e.Translation="translation",e.Enumeration="enumeration",e.Condition="condition",e.Insertion="insertion",e.File="file",e.Object="object",e.Array="array",e.Nested="nested",e.ReactNode="reactNode",e.Markdown="markdown",e.Text="text",e.Number="number",e.Boolean="boolean",e.Unknown="unknown",e))(K||{});const wj=(e,t,n)=>({...n,nodeType:e,[e]:t}),tS=(e,t,n)=>{let r=e,a=null,s=[];if(t.length===0)return n;for(let l=0;l<t.length;l++){const u=t[l];if(a=r,(u.type===K.Object||u.type===K.Array)&&(s=[u.key],(!r[u.key]||typeof r[u.key]!="object")&&(r[u.key]={}),r=r[u.key]),(u.type===K.Translation||u.type===K.Enumeration)&&(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===K.Enumeration||u.type===K.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===K.Markdown||u.type===K.Insertion)&&(s=[u.type],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]=""),r=r[u.type]),u.type===K.File&&(s=["content"],r=r.content),u.type&&(r=r),l===t.length-1&&a&&s.length>0){let d=a;for(const f of s.slice(0,-1))d=d[f];typeof n>"u"?delete d[s[s.length-1]]:d[s[s.length-1]]=n}}return e},zr=(e,t)=>{let n=structuredClone(e);for(const r of t)r.type===K.Object||r.type===K.Array?n=n==null?void 0:n[r.key]:r.type===K.Translation||r.type===K.Condition||r.type===K.Enumeration?n=n==null?void 0:n[r.type][r.key]:(r.type===K.Markdown||r.type===K.Insertion||r.type===K.File)&&(n=n==null?void 0:n[r.type]);return n},QT=e=>{if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof(e==null?void 0:e.nodeType)=="string"){const t=e,n=t[t.nodeType];if(t.nodeType===K.Translation||t.nodeType===K.Enumeration||t.nodeType===K.Condition||t.nodeType===K.Insertion||t.nodeType===K.File){const r=Object.keys(n)[0];return n[r]}return t.nodeType===K.Nested?void 0:n}return!e||typeof e!="object"?e:Array.isArray(e)?e[0]:e},Tj=(e,t,n)=>{let r=e,a=null,s=null;for(const l of n)a=r,(l.type===K.Object||l.type===K.Array)&&(s=l.key,r=r[l.key]),(l.type===K.Translation||l.type===K.Enumeration||l.type===K.Condition)&&(s=l.type,r=r[l.type][l.key]),(l.type===K.Markdown||l.type===K.ReactNode||l.type===K.Insertion||l.type===K.File)&&(s=l.type,r=r[l.type]);if(a&&s!==null)if(Array.isArray(a))a[s]=r;else{const l={};for(const u of Object.keys(a))u===s&&typeof t<"u"?l[t]=r:l[u]=a[u];Object.keys(a).forEach(u=>delete a[u]),Object.assign(a,l)}return e},Rj=e=>typeof e=="object"&&typeof(e==null?void 0:e.key)<"u"&&typeof(e==null?void 0:e.props)<"u",As=e=>typeof e=="string"?K.Text:typeof(e==null?void 0:e.nodeType)=="string"?e.nodeType:Array.isArray(e)?K.Array:Rj(e)?K.ReactNode:typeof e=="number"?K.Number:typeof e=="boolean"?K.Boolean:e&&typeof e=="object"?K.Object:K.Unknown,zl=(e,t,n)=>{const r=structuredClone(n);switch(e){case K.Translation:return{nodeType:K.Translation,[K.Translation]:Object.assign({},...t.map(a=>({[a]:structuredClone(r)??""})))};case K.Enumeration:return{nodeType:K.Enumeration,[K.Enumeration]:{1:r??""}};case K.Condition:return{nodeType:K.Condition,[K.Condition]:{true:r??"",false:r??""}};case K.Insertion:return{nodeType:K.Insertion,[K.Insertion]:{insertion:r??""}};case K.Nested:return{nodeType:K.Nested,[K.Nested]:{dictionaryKey:""}};case K.Markdown:return{nodeType:K.Markdown,[K.Markdown]:r??""};case K.File:return{nodeType:K.File,[K.File]:r??""};case K.Object:return{newKey:r??""};case K.Array:return[r??""];case K.Text:return r??"";case K.Number:return r??0;case K.Boolean:return r??!0;default:return r??""}},ar=e=>{if(typeof e=="string")return"";if(typeof e=="number")return 0;if(typeof e=="boolean")return!0;if(typeof(e==null?void 0:e.nodeType)=="string"){const r=e,a=r[r.nodeType];return r.nodeType===K.Translation||r.nodeType===K.Enumeration||r.nodeType===K.Condition||r.nodeType===K.Insertion?ar(a):r.nodeType===K.Nested?"dictionary-key":r.nodeType===K.File?"file/path":r.nodeType===K.Markdown?ar(r):a}if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(ar);const t=Object.entries(e).map(([r,a])=>[r,ar(a)]);return Object.fromEntries(t)},$d=(e,t)=>{for(const r of t.plugins??[])if(r.canHandle(e))return r.transform(e,t,(a,s)=>$d(a,s));if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map((r,a)=>{const s={...t,children:r,keyPath:[...t.keyPath,{type:K.Array,key:a}]};return $d(r,s)});const n={};for(const r in e){const a={...t,children:e[r],keyPath:[...t.keyPath,{type:K.Object,key:r}]};n[r]=$d(e[r],a)}return n},Cj=(e,t)=>{const n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},Nj=(e,t)=>{const n=Object.keys(e);for(const r of n){const a=!r.startsWith(">")&&!r.startsWith("<")&&!r.startsWith("=")&&parseFloat(r)===t||r.startsWith("=")&&parseFloat(r.slice(1))===t,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(a||s||l||u||d)return r}},kj=(e,t)=>{const n=Nj(e,t)??"fallback";return e[n]},Oj=(e,t)=>e.replace(/\{\{(.*?)\}\}/g,(n,r)=>(t[r]??"").toString()),nS={},JT=(e,t,n)=>{const r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return hv(e.content,r,t)},Dj=(e,t,n)=>{const r=nS[e];if(!r)throw new Error(`Dictionary ${e} not found`,nS);return JT(r,t,n)},Ij=(e,t,n)=>{const r=Dj(e,n==null?void 0:n.locale,n==null?void 0:n.plugins);if(typeof t=="string"){const a=t.split(".");let s=r;for(const l of a)if(s=s==null?void 0:s[l],s===void 0)return r;return s}return r},Lj=(e,t,n=!0)=>{const{defaultLocale:r}=qe==null?void 0:qe.internationalization;let a=e[t??r];return n&&!a&&(a=e[r]),a},jj=(e,t=!0)=>({id:"translation-plugin",canHandle:n=>typeof n=="object"&&(n==null?void 0:n.nodeType)===K.Translation,transform:(n,r,a)=>{const s=structuredClone(n[K.Translation]);for(const l in s){const u={...r,children:s[l],keyPath:[...r.keyPath,{type:K.Translation,key:l}]};s[l]=a(s[l],u)}return Lj(s,e,t)}}),Mj={id:"enumeration-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Enumeration,transform:(e,t,n)=>{const r=structuredClone(e[K.Enumeration]);for(const a in r){const s=r[a],l={...t,children:s,keyPath:[...t.keyPath,{type:K.Enumeration,key:a}]};r[a]=n(s,l)}return a=>kj(r,a)}},Pj={id:"condition-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Condition,transform:(e,t,n)=>{const r=structuredClone(e[K.Condition]);for(const a in r){const s=r[a],l={...t,children:s,keyPath:[...t.keyPath,{type:K.Condition,key:a}]};r[a]=n(s,l)}return a=>Cj(r,a)}},zj={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Insertion,transform:(e,t,n)=>{const r=[...t.keyPath,{type:K.Insertion}],a=e[K.Insertion];return n(a,{...t,children:a,keyPath:r,plugins:[{id:"insertion-string-plugin",canHandle:l=>typeof l=="string",transform:(l,u,d)=>{const f=d(l,{...u,children:l,plugins:[...(t.plugins??[]).filter(m=>m.id!=="intlayer-node-plugin")]});return m=>{const g=Oj(f,m);return d(g,{...u,plugins:t.plugins,children:g})}}},...t.plugins??[]]})}},Vj={id:"nested-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Nested,transform:(e,t)=>Ij(e.nested.dictionaryKey,e.nested.path,t)},Bj={id:"file-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.File,transform:(e,t,n)=>n(e.content,{...t,children:e.content})},hv=(e,t,n=qe.internationalization.defaultLocale)=>{const r=[zj,jj(n),Mj,Pj,Vj,Bj,...t.plugins??[]];return $d(e,{...t,plugins:r})},rS={method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"},Uj=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),hd=e=>e.reduce((t,n)=>{const r=t??{},a=Uj(n??{});return typeof r=="object"&&typeof a=="object"?{...r,...a}:a??r},{}),Te=async(e,...t)=>{const{signal:n}=new AbortController;let r="",a;const s=t.map(({body:E,params:y,headers:x,...A})=>A),l=hd([rS,...s]),u=hd([rS.headers,...t.map(E=>E.headers)]),d=hd(t.map(E=>E.params)),f=l.method;if(f!=="GET"&&f!=="HEAD"){const E=hd(t.map(y=>y.body));(u==null?void 0:u["Content-Type"])==="application/x-www-form-urlencoded"?a=new URLSearchParams(E).toString():a=JSON.stringify(E)}Object.entries(d).length>0&&(r=`?${new URLSearchParams(d).toString()}`);const m={...l,headers:u,body:a,signal:n},g=`${e}${r}`,v=await fetch(g,m);if(!v.ok){const E=await v.json();throw new Error(JSON.stringify(E.error)??"An error occurred")}return await v.json()},$j=(e={},t)=>{var N,j;const n=((N=t==null?void 0:t.editor)==null?void 0:N.backendURL)??((j=qe.editor)==null?void 0:j.backendURL),{clientId:r,clientSecret:a}=(t==null?void 0:t.editor)??{};if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const s=`${n}/api/auth`;return{login:async(D,L={})=>await Te(`${s}/login`,e,L,{method:"POST",body:D}),getLoginWithGitHubURL:D=>{const L=new URLSearchParams(D);return`${s}/login/github?${L.toString()}`},getLoginWithGoogleURL:D=>{const L=new URLSearchParams(D);return`${s}/login/google?${L.toString()}`},register:async(D,L={},z={})=>await Te(`${s}/register`,e,z,{method:"POST",body:D,params:L}),logout:async(D={})=>await Te(`${s}/logout`,e,D,{method:"POST"}),defineNewPassword:async(D,L={})=>await Te(`${s}/password/define`,e,L,{method:"POST",body:D}),askResetPassword:async(D,L={})=>await Te(`${s}/password/reset`,e,L,{method:"POST",body:{email:D}}),checkIfUserHasPassword:async(D={})=>await Te(`${s}/password/has`,e,D,{method:"GET"}),verifyEmail:async({userId:D,secret:L},z={})=>await Te(`${s}/active/${D}/${L}`,e,z,{method:"PUT"}),getVerifyEmailStatusURL:D=>`${s}/verify-email-status/${String(D)}`,changePassword:async(D,L={})=>await Te(`${s}/password`,e,L,{method:"PUT",body:D}),createSession:async(D,L={})=>await Te(`${s}/session`,e,L,{method:"POST",body:D}),getSession:async(D,L={})=>await Te(`${n}/session`,e,L,{params:{session_token:D}}),getCSRFToken:async(D={})=>await Te(`${n}/csrf-token`,e,D),getOAuth2AccessToken:async(D={})=>await Te(`${n}/oauth2/token`,e,D,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{grant_type:"client_credentials",client_id:r,client_secret:a}})}},Hj=(e={},t)=>{var g,v;const n=((g=t==null?void 0:t.editor)==null?void 0:g.backendURL)??((v=qe.editor)==null?void 0:v.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/dictionary`;return{getDictionaries:async(E,y={})=>await Te(r,e,y,{params:E}),getDictionariesKeys:async(E={})=>await Te(`${r}/keys`,e,E),getDictionary:async(E,y,x={})=>await Te(`${r}/${E}`,e,x,{params:y?{version:y.toString()}:void 0}),pushDictionaries:async(E,y={})=>await Te(`${r}`,e,y,{method:"PATCH",body:{dictionaries:E}}),addDictionary:async(E,y={})=>await Te(`${r}`,e,y,{method:"POST",body:E}),updateDictionary:async(E,y,x={})=>await Te(`${r}/${E}`,e,x,{method:"PUT",body:y}),deleteDictionary:async(E,y={})=>await Te(`${r}/${E}`,e,y,{method:"DELETE"})}},Fj=(e={},t)=>{var v,E;const n=((v=t==null?void 0:t.editor)==null?void 0:v.backendURL)??((E=qe.editor)==null?void 0:E.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/ai`;return{customQuery:async(y,x={})=>await Te(r,e,x,{method:"POST",body:y}),translateJSON:async(y,x={})=>await Te(`${r}/translate/json`,e,x,{method:"POST",body:y}),auditContentDeclaration:async(y,x={})=>await Te(`${r}/audit/dictionary`,e,x,{method:"POST",body:y}),auditContentDeclarationField:async(y,x={})=>await Te(`${r}/audit/dictionary/field`,e,x,{method:"POST",body:y}),auditContentDeclarationMetadata:async(y,x={})=>await Te(`${r}/audit/dictionary/metadata`,e,x,{method:"POST",body:y}),auditTag:async(y,x={})=>await Te(`${r}/audit/tag`,e,x,{method:"POST",body:y}),askDocQuestion:async(y,x={})=>{var O;if(!y)return;const{onMessage:A,onDone:T,...w}=y,C=new AbortController;try{const N=await fetch(`${r}/ask`,{method:"POST",headers:{"Content-Type":"application/json",...e.headers,...x.headers},body:JSON.stringify(w),signal:C.signal});if(!N.ok){const z=await N.json().catch(()=>({}));throw new Error(z.message||"Failed to fetch response")}const j=(O=N.body)==null?void 0:O.getReader();if(!j)throw new Error("No reader available");const D=new TextDecoder;let L="";for(;;){const{done:z,value:U}=await j.read();if(z)break;L+=D.decode(U,{stream:!0});const fe=L.split(`
51
- `);L=fe.pop()??"";for(const ie of fe)if(ie.startsWith("data: "))try{const le=JSON.parse(ie.slice(6));le.chunk&&(A==null||A(le.chunk)),le.done&&le.response&&(T==null||T(le.response))}catch(le){console.error("Failed to parse SSE data:",le)}}}catch(N){throw console.error("Error in askDocQuestion:",N),N}},autocomplete:async(y,x={})=>await Te(`${r}/autocomplete`,e,x,{method:"POST",body:y})}},Gj=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.editorURL)??((d=qe.editor)==null?void 0:d.editorURL);if(!n)throw new Error("Editor URL is not defined in the Intlayer configuration.");const r=`${n}/api`;return{getDictionaries:async(f={})=>(await Te(`${r}/dictionary`,e,f)).data,getConfiguration:async(f={})=>(await Te(`${r}/config`,e,f)).data,writeDictionary:async(f,m={})=>await Te(`${r}/dictionary`,e,m,{method:"POST",body:{dictionary:f}})}},Kj=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.backendURL)??((d=qe.editor)==null?void 0:d.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/newsletter`;return{subscribeToNewsletter:async(f,m={})=>await Te(`${r}/subscribe`,e,m,{method:"POST",body:f}),unsubscribeFromNewsletter:async(f,m={})=>await Te(`${r}/unsubscribe`,e,m,{method:"POST",body:f}),getNewsletterStatus:async(f={})=>await Te(`${r}/status`,e,f,{method:"GET"})}},Zj=(e={},t)=>{var E,y;const n=((E=t==null?void 0:t.editor)==null?void 0:E.backendURL)??((y=qe.editor)==null?void 0:y.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration--.");const r=`${n}/api/organization`;return{getOrganizations:async(x,A={})=>await Te(r,e,A,{params:x}),getOrganization:async(x,A={})=>await Te(`${r}/${String(x)}`,e,A),addOrganization:async(x,A={})=>await Te(r,e,A,{method:"POST",body:x}),addOrganizationMember:async(x,A={})=>Te(`${r}/member`,e,A,{method:"POST",body:x}),updateOrganization:async(x,A={})=>Te(r,e,A,{method:"PUT",body:x}),updateOrganizationMembers:async(x,A={})=>Te(`${r}/members`,e,A,{method:"PUT",body:x}),deleteOrganization:async(x={})=>await Te(r,e,x,{method:"DELETE"}),selectOrganization:async(x,A={})=>await Te(`${r}/${String(x)}`,e,A,{method:"PUT"}),unselectOrganization:async(x={})=>await Te(`${r}/logout`,e,x,{method:"POST"})}},qj=(e={},t)=>{var x,A;const n=((x=t==null?void 0:t.editor)==null?void 0:x.backendURL)??((A=qe.editor)==null?void 0:A.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/project`;return{getProjects:async(T,w={})=>await Te(r,e,w,{params:T}),addProject:async(T,w={})=>await Te(`${r}`,e,w,{method:"POST",body:T}),updateProject:async(T,w={})=>await Te(`${r}`,e,w,{method:"PUT",body:T}),updateProjectMembers:async(T,w={})=>await Te(`${r}/members`,e,w,{method:"PUT",body:T}),pushProjectConfiguration:async(T,w={})=>await Te(`${r}/configuration`,e,w,{method:"PUT",body:T}),deleteProject:async(T={})=>await Te(`${r}`,e,T,{method:"DELETE"}),selectProject:async(T,w={})=>await Te(`${r}/${String(T)}`,e,w,{method:"PUT"}),unselectProject:async(T={})=>await Te(`${r}/logout`,e,T,{method:"POST"}),addNewAccessKey:async(T,w={})=>await Te(`${r}/access_key`,e,w,{method:"POST",body:T}),deleteAccessKey:async(T,w={})=>await Te(`${r}/access_key`,e,w,{method:"DELETE",body:{clientId:T}}),refreshAccessKey:async(T,w={})=>await Te(`${r}/access_key`,e,w,{method:"PATCH",body:{clientId:T}})}},Wj=(e={},t)=>{var s,l;const n=((s=t==null?void 0:t.editor)==null?void 0:s.backendURL)??((l=qe.editor)==null?void 0:l.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/search`;return{searchDoc:async(u,d={})=>await Te(`${r}/doc`,e,d,{method:"GET",params:u})}},Yj=(e={},t)=>{var u,d;const n=((u=t==null?void 0:t.editor)==null?void 0:u.backendURL)??((d=qe.editor)==null?void 0:d.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/stripe`;return{getPricing:async(f,m={})=>await Te(`${r}/pricing`,e,m,{method:"POST",body:f}),getSubscription:async(f,m={})=>await Te(`${r}/create-subscription`,e,m,{method:"POST",body:f}),cancelSubscription:async(f={})=>await Te(`${r}/cancel-subscription`,e,f,{method:"POST"})}},Xj=(e={},t)=>{var d,f;const n=((d=t==null?void 0:t.editor)==null?void 0:d.backendURL)??((f=qe.editor)==null?void 0:f.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/tag`;return{getTags:async(m,g={})=>await Te(r,e,g,{params:m}),addTag:async(m,g={})=>await Te(`${r}`,e,g,{method:"POST",body:m}),updateTag:async(m,g,v={})=>await Te(`${r}/${m}`,e,v,{method:"PUT",body:g}),deleteTag:async(m,g={})=>await Te(`${r}/${m}`,e,g,{method:"DELETE"})}},Qj=(e={},t)=>{var g,v;const n=((g=t==null?void 0:t.editor)==null?void 0:g.backendURL)??((v=qe.editor)==null?void 0:v.backendURL);if(!n)throw new Error("Backend URL is not defined in the Intlayer configuration.");const r=`${n}/api/user`;return{createUser:async(E,y={})=>await Te(`${r}/`,e,y,{method:"POST",body:E}),getUsers:async(E,y={})=>await Te(r,e,y,{params:E}),getUserById:async(E,y={})=>await Te(`${r}/${E}`,e,y),getUserByAccount:async(E,y,x={})=>await Te(`${r}/account/${y}/${E}`,e,x),getUserByEmail:async(E,y={})=>await Te(`${r}/email/${E}`,e,y),updateUser:async(E,y={})=>await Te(`${r}`,e,y,{method:"PUT",body:E}),deleteUser:async(E,y={})=>await Te(`${r}/${E}`,e,y,{method:"DELETE"})}},Ff=(e={},t)=>({organization:Zj(e,t),project:qj(e,t),user:Qj(e,t),auth:$j(e,t),dictionary:Hj(e,t),stripe:Yj(e,t),ai:Fj(e,t),tag:Xj(e,t),search:Wj(e,t),editor:Gj(e,t),newsletter:Kj(e,t)}),Jj=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"}},e1=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),iS=new Map,Hd=(e,t=e)=>{if(typeof(Intl==null?void 0:Intl.DisplayNames)!="function")return e;let n=iS.get(t);return n||(n=new Intl.DisplayNames([t],{type:"language"}),iS.set(t,n)),n.of(e)??"Unknown locale"},eM=(e,t=qe.internationalization.locales)=>{const n=e1(e);let r=e;e.endsWith("/")&&(r=e.slice(0,-1));const a=n?new URL(r):new URL(r,"http://example.com"),s=a.pathname;s.startsWith("/")||(a.pathname=`/${s}`);const l=s.split("/"),u=l[1];if(t.includes(u)){l.splice(1,1);const d=l.join("/")??"/";a.pathname=d}return n?a.toString():a.toString().replace("http://example.com","")},tM=(e,t=qe.internationalization.locales,n=qe.internationalization.defaultLocale,r=qe.middleware.prefixDefault)=>{const a=eM(e,t),s=e1(a),l=s?new URL(a):new URL(a,"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 y=r||!v?`/${g}${u}`:u;y.length>1&&y.endsWith("/")&&(y=y.slice(0,-1));const x=s?`${d}${y}${l.search}${l.hash}`:`${y}${l.search}${l.hash}`;return m[g]=x,m},{})},nM=(e,t,n=qe.internationalization.locales,r=qe.internationalization.defaultLocale,a=qe.middleware.prefixDefault)=>tM(e,n,r,a)[t],rM=(e,t=qe.internationalization.locales,n=qe.internationalization.defaultLocale)=>{const r=[e].flat(),a=s=>s.trim().toLowerCase();try{for(const s of r){const l=a(s),u=t.find(m=>a(m)===l);if(u)return u;const[d]=l.split("-"),f=t.find(m=>a(m).split("-")[0]===d);if(f)return f}}catch{}return n},ge=e=>wj(K.Translation,e),iM=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)},t1=e=>{try{const t=e.split(/\r?\n/),n=t.find(u=>u.trim()!=="");if(!n||n.trim()!=="---")return{};const r={};let a=!1,s=null,l=[];for(let u=0;u<t.length;u++){const d=t[u];if(d.trim()==="---")if(a){s&&l.length>0&&(r[s]=l);break}else{a=!0;continue}if(a){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(),E=g[2].trim();if(E==="")s=v,l=[];else try{r[v]=iM(E)}catch{r[v]=E}}}}return r}catch{return{}}},Lc=(e,t)=>e.every((n,r)=>t[r]&&t[r].key===n.key&&t[r].type===n.type),aM=(e,t)=>{try{const n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;const a=n.pathname.replace(/\/$/,""),s=r.pathname.replace(/\/$/,"");return!(a!==""&&s!==""&&a!==s)}catch(n){return console.error("Invalid URL(s)",n),!1}},oM=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 lr=(e=>(e.INTLAYER_CONFIGURATION="INTLAYER_CONFIGURATION",e.INTLAYER_CURRENT_LOCALE="INTLAYER_CURRENT_LOCALE",e.INTLAYER_EDITOR_ENABLED="INTLAYER_EDITOR_ENABLED",e.INTLAYER_URL_CHANGE="INTLAYER_URL_CHANGE",e.INTLAYER_FOCUSED_CONTENT_CHANGED="INTLAYER_FOCUSED_CONTENT_CHANGED",e.INTLAYER_LOCALE_DICTIONARIES_CHANGED="INTLAYER_LOCALE_DICTIONARIES_CHANGED",e.INTLAYER_DISTANT_DICTIONARIES_CHANGED="INTLAYER_DISTANT_DICTIONARIES_CHANGED",e.INTLAYER_EDITED_CONTENT_CHANGED="INTLAYER_EDITED_CONTENT_CHANGED",e.INTLAYER_IFRAME_CLICKED="INTLAYER_IFRAME_CLICKED",e))(lr||{});const n1=S.createContext(void 0),r1=S.createContext(void 0),sM=({children:e})=>{const[t,n]=S.useState({}),r=(a,s)=>{n(l=>({...l,[a]:{...l==null?void 0:l[a],content:s}}))};return b.jsx(n1.Provider,{value:{changedContent:t},children:b.jsx(r1.Provider,{value:{setChangedContent:r},children:e})})},lM=()=>S.useContext(r1),cM=()=>{const e=S.useContext(n1),t=lM();return{...e,...t}},on=[];for(let e=0;e<256;++e)on.push((e+256).toString(16).slice(1));function uM(e,t=0){return(on[e[t+0]]+on[e[t+1]]+on[e[t+2]]+on[e[t+3]]+"-"+on[e[t+4]]+on[e[t+5]]+"-"+on[e[t+6]]+on[e[t+7]]+"-"+on[e[t+8]]+on[e[t+9]]+"-"+on[e[t+10]]+on[e[t+11]]+on[e[t+12]]+on[e[t+13]]+on[e[t+14]]+on[e[t+15]]).toLowerCase()}let Hp;const dM=new Uint8Array(16);function fM(){if(!Hp){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Hp=crypto.getRandomValues.bind(crypto)}return Hp(dM)}const hM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),aS={randomUUID:hM};function mM(e,t,n){var a;if(aS.randomUUID&&!e)return aS.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??fM();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,uM(r)}const{editor:mi}=qe,i1=S.createContext({postMessage:()=>null,allowedOrigins:[mi==null?void 0:mi.applicationURL,mi==null?void 0:mi.editorURL,mi==null?void 0:mi.cmsURL],senderId:""}),oS=({children:e,allowedOrigins:t,postMessage:n})=>{const r=S.useRef(mM()),a=S.useMemo(()=>({postMessage:n,allowedOrigins:t,senderId:r.current}),[n,t,r.current]);return b.jsx(i1.Provider,{value:a,children:e})},a1=()=>S.useContext(i1),gs=(e,t,n)=>{const{allowedOrigins:r,postMessage:a,senderId:s}=a1();return S.useEffect(()=>{if(t){const u=d=>{const{type:f,data:m,senderId:g}=d.data;f===e&&g!==s&&(typeof r>"u"||r!=null&&r.some(v=>aM(v,d.origin))||r!=null&&r.includes("*"))&&t(m)};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)}},[r,a,s,n]),u=>{a({type:e,data:u,senderId:s})}},pM=(e,t)=>typeof e=="function"?e(t):e,lo=(e,t,n)=>{const{postMessage:r,senderId:a}=a1(),{emit:s,receive:l}=n??{emit:!0,receive:!0},u=(E,y)=>{const x=pM(E,y);return s&&typeof r=="function"&&typeof x<"u"&&r({type:`${e}/post`,data:x,senderId:a}),x},d=()=>{typeof r=="function"&&r({type:`${e}/post`,data:f,senderId:a})},[f,m]=S.useState(()=>u(t)),g=E=>m(y=>u(E,y));gs(`${e}/post`,l?E=>{m(E)}:void 0);const v=(E,y)=>{s&&typeof r=="function"&&y!==a&&(typeof f>"u"||r({type:`${e}/post`,data:f,senderId:a}))};return gs(`${e}/get`,s?v:void 0,f),S.useEffect(()=>{l&&typeof r=="function"&&typeof f>"u"&&r({type:`${e}/get`,senderId:a})},[]),[f,g,d]},o1=S.createContext(void 0),gM=({children:e,configuration:t})=>b.jsx(o1.Provider,{value:t,children:e}),Gr=()=>S.useContext(o1),s1=S.createContext(void 0),l1=S.createContext(void 0),yM=({children:e})=>{const[t,n]=lo(lr.INTLAYER_LOCALE_DICTIONARIES_CHANGED,void 0),r=S.useMemo(()=>({localeDictionaries:t??{}}),[t]),a=S.useMemo(()=>({setLocaleDictionaries:n,setLocaleDictionary:s=>{n(l=>({...l,[s.key]:s}))}}),[n]);return b.jsx(s1.Provider,{value:r,children:b.jsx(l1.Provider,{value:a,children:e})})},Gf=()=>S.useContext(l1),c1=()=>{const e=Gf(),t=S.useContext(s1);if(!t)throw new Error("useDictionariesRecordStates must be used within a DictionariesRecordProvider");return{...t,...e}},u1=S.createContext(void 0),vM=e=>gs(`${lr.INTLAYER_EDITED_CONTENT_CHANGED}/get`,e),d1=S.createContext(void 0),sS=(e,t)=>typeof e=="function"?e(t):e,bM=({children:e})=>{const{localeDictionaries:t}=c1(),[n,r]=lo(lr.INTLAYER_EDITED_CONTENT_CHANGED),a=E=>{let y=sS(E);return r(x=>(y=sS(E,x==null?void 0:x[y.key]),{...x,[y.key]:y})),y},s=(E,y)=>{r(x=>({...x,[E]:{...x==null?void 0:x[E],content:y}}))},l=(E,y,x=[],A=!0)=>{r(T=>{var j,D;const w=(j=t[E])==null?void 0:j.content,C=structuredClone(((D=T==null?void 0:T[E])==null?void 0:D.content)??w);let O=x;if(!A){let L=0;const z=x.slice(0,-1),U=x[x.length-1];let fe=U.key;for(;typeof zr(C,O)<"u";)L++,fe=L===0?U.key:`${U.key} (${L})`,O=[...z,{...U,key:fe}]}const N=tS(C,O,y);return{...T,[E]:{...T==null?void 0:T[E],content:N}}})},u=(E,y,x=[])=>{r(A=>{var O,N;const T=(O=t[E])==null?void 0:O.content,w=structuredClone(((N=A==null?void 0:A[E])==null?void 0:N.content)??T),C=Tj(w,y,x);return{...A,[E]:{...A==null?void 0:A[E],content:C}}})},d=(E,y)=>{r(x=>{var O,N;const A=(O=t[E])==null?void 0:O.content,T=structuredClone(((N=x==null?void 0:x[E])==null?void 0:N.content)??A),w=zr(A,y),C=tS(T,y,w);return{...x,[E]:{...x==null?void 0:x[E],content:C}}})},f=E=>{r(y=>{const x={...y};return delete x[E],x})},m=E=>{r(y=>Object.entries(y).reduce((A,[T,w])=>T===E?A:{...A,[T]:w},{}))},g=()=>{r({})},v=(E,y)=>{var A;const x=((A=n==null?void 0:n[E])==null?void 0:A.content)??{};return zr(x,y)};return b.jsx(u1.Provider,{value:{editedContent:n},children:b.jsx(d1.Provider,{value:{setEditedContentState:r,setEditedDictionary:a,setEditedContent:s,addEditedContent:l,renameEditedContent:u,removeEditedContent:d,restoreEditedContent:f,clearEditedDictionaryContent:m,clearEditedContent:g,getEditedContentValue:v},children:e})})},ws=()=>S.useContext(d1),En=()=>{const e=S.useContext(u1),t=ws();return{...e,...t}},f1=S.createContext({enabled:!1}),_M=e=>lo(lr.INTLAYER_EDITOR_ENABLED,!1,e),xM=e=>gs(`${lr.INTLAYER_EDITOR_ENABLED}/post`,e),h1=e=>gs(`${lr.INTLAYER_EDITOR_ENABLED}/get`,e),EM=({children:e})=>{const[t]=_M({emit:!1,receive:!0});return b.jsx(f1.Provider,{value:{enabled:t},children:e})},m1=()=>S.useContext(f1),p1=S.createContext(void 0),g1=S.createContext(void 0),SM=({children:e})=>{const[t,n]=lo(lr.INTLAYER_FOCUSED_CONTENT_CHANGED,null),r=a=>{n(s=>s&&{...s,keyPath:a})};return b.jsx(p1.Provider,{value:{focusedContent:t},children:b.jsx(g1.Provider,{value:{setFocusedContent:n,setFocusedContentKeyPath:r},children:e})})},mv=()=>{const e=S.useContext(g1);if(e===void 0)throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");return e},ca=()=>{const e=mv(),t=S.useContext(p1);if(t===void 0)throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");return{...t,...e}},lS=({children:e})=>{const t=vM();return S.useEffect(()=>{t()},[]),b.jsx(yM,{children:b.jsx(bM,{children:b.jsx(SM,{children:e})})})},AM=({children:e,fallback:t})=>{const n=h1(),{enabled:r}=m1();return S.useEffect(()=>{r||n()},[r]),r?e:t},wM=({children:e,fallback:t})=>{const[n,r]=S.useState(!1);return S.useEffect(()=>{r(window.self!==window.top)},[]),n?e:t},TM=({children:e,configuration:t,...n})=>b.jsx(sM,{children:b.jsx(EM,{children:b.jsx(gM,{configuration:t,children:n.mode==="editor"?b.jsx(oS,{...n,children:b.jsx(lS,{children:e})}):b.jsx(wM,{fallback:e,children:b.jsx(oS,{...n,children:b.jsx(AM,{fallback:e,children:b.jsx(lS,{children:e})})})})})})}),RM=(e,t)=>lo(lr.INTLAYER_URL_CHANGE,e,t),CM=()=>gs(lr.INTLAYER_IFRAME_CLICKED,oM);/*! js-cookie v3.0.5 | MIT */function md(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 NM={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 Xg(e,t){function n(a,s,l){if(!(typeof document>"u")){l=md({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var d in l)l[d]&&(u+="; "+d,l[d]!==!0&&(u+="="+l[d].split(";")[0]));return document.cookie=a+"="+e.write(s,a)+u}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var s=document.cookie?document.cookie.split("; "):[],l={},u=0;u<s.length;u++){var d=s[u].split("="),f=d.slice(1).join("=");try{var m=decodeURIComponent(d[0]);if(l[m]=e.read(f,m),a===m)break}catch{}}return a?l[a]:l}}return Object.create({set:n,get:r,remove:function(a,s){n(a,"",md({},s,{expires:-1}))},withAttributes:function(a){return Xg(this.converter,md({},this.attributes,a))},withConverter:function(a){return Xg(md({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var y1=Xg(NM,{path:"/"});const{cookieName:v1}=qe.middleware,kM={path:"/",expires:void 0,domain:void 0,secure:!1,sameSite:"strict"},pv=y1.get(v1),b1=e=>{y1.set(v1,e,kM)},OM=()=>({localeCookie:pv,setLocaleCookie:b1});var WT;const Kf=S.createContext({locale:pv??((WT=qe==null?void 0:qe.internationalization)==null?void 0:WT.defaultLocale),setLocale:()=>null,disableEditor:!1}),DM=()=>S.useContext(Kf),IM=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:a})=>{const{internationalization:s}=qe??{},{defaultLocale:l,locales:u}=s??{},d=e??pv??t??l,[f,m]=lo(lr.INTLAYER_CURRENT_LOCALE,d),v=r??(y=>{if(f.toString()!==y.toString()){if(!(u!=null&&u.map(String).includes(y))){console.error(`Locale ${y} is not available`);return}m(y),b1(y)}}),E=rM(e??f);return b.jsx(Kf.Provider,{value:{locale:E,setLocale:v,disableEditor:a},children:n})},sf=({children:e,value:t,additionalProps:n})=>{const r=S.isValidElement(e)?e:b.jsx(b.Fragment,{children:e});return new Proxy(r,{get(a,s,l){return s==="value"?t:n&&Object.keys(n).includes(s)?n[s]:Reflect.get(a,s,l)}})},LM=250,jM=({children:e,onPress:t,onClickOutside:n,pressDuration:r=LM,isSelecting:a,...s})=>{const l=S.useRef(null),[u,d]=S.useState(!1),[f,m]=S.useState(a),g=S.useRef(null),v=typeof e=="string",E=()=>{m(!0),t()},y=()=>{g.current=setTimeout(()=>{E()},r)},x=()=>{g.current&&(clearTimeout(g.current),g.current=null)},A=()=>{x(),y()},T=()=>{d(!0)},w=()=>{d(!1),x()},C=S.useCallback(j=>{l.current&&!l.current.contains(j.target)&&(m(!1),n==null||n())},[n]);S.useEffect(()=>(document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}),[C]);const O=j=>{f&&(j.preventDefault(),j.stopPropagation())},N=()=>{m(!1)};return b.jsx("span",{style:{display:v?"inline":"inline-block",cursor:"pointer",userSelect:"none",borderRadius:"0.375rem",outlineWidth:"2px",outlineOffset:"4px",outlineStyle:"solid",outlineColor:a||f||u?"inherit":"transparent",transition:"all 100ms 50ms ease-in-out"},role:"button",tabIndex:0,onKeyUp:()=>null,onClick:O,onMouseDown:A,onMouseUp:w,onMouseLeave:w,onTouchStart:A,onTouchEnd:w,onTouchCancel:w,onBlur:N,onMouseEnter:T,ref:l,...s,children:e})},MM=({children:e,dictionaryKey:t,keyPath:n})=>{const{focusedContent:r,setFocusedContent:a}=ca(),s=S.useCallback(()=>a({dictionaryKey:t,keyPath:n}),[t,n]),l=S.useMemo(()=>{var u;return((r==null?void 0:r.dictionaryKey)===t&&(((u=r==null?void 0:r.keyPath)==null?void 0:u.length)??0)>0&&Lc((r==null?void 0:r.keyPath)??[],n))??!1},[r,n,t]);return b.jsx(jM,{onPress:s,isSelecting:l,children:e})},lf=({children:e,...t})=>{const{enabled:n}=m1(),{disableEditor:r}=DM();return n&&!r?b.jsx(MM,{...t,children:e}):e},gv=({dictionaryKey:e,keyPath:t,children:n})=>{const r=ws();return r?r.getEditedContentValue(e,t)??n:n},PM=e=>{const t=gv(e);if(typeof t=="object"){const n=hv(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},zM=S.createContext({renderMarkdown:e=>e}),VM=()=>S.useContext(zM),BM=({dictionaryKey:e,keyPath:t,children:n,locale:r})=>{const{renderMarkdown:a}=VM(),s=gv({dictionaryKey:e,keyPath:t,children:n});if(typeof s!="string"){const l=hv(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)}`),a(n)):a(l)}return a(s)},UM=({dictionaryKey:e,keyPath:t,children:n,metadataKeyPath:r})=>{const a=gv({dictionaryKey:e,keyPath:t,children:n}),s=t1(a);return zr(s,r)},_1=e=>{if(typeof e=="string")return e;const n=(s=>{var l;if(s!=null&&s.props&&typeof s.props.children=="object"){const u=[],{children:d}=s.props;return Object.keys(d??{}).forEach(f=>{u.push(_1((d??{})[f]))}),{...s,props:{...s.props,children:u}}}return{...s,props:{...s.props,children:((l=s.props)==null?void 0:l.children)??[]}}})(e),{type:r,props:a}=n;return S.createElement(r??"span",a,...a.children)},$M={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:t,...n})=>sf({...n,value:n.children,children:S.createElement(lf,{...n,key:n.children},b.jsx(PM,{...n,children:n.children}))})},HM={id:"react-node-plugin",canHandle:e=>typeof e=="object"&&typeof e.props<"u"&&typeof e.key<"u",transform:(e,{plugins:t,...n})=>sf({...n,value:"[[react-element]]",children:b.jsx(lf,{...n,children:_1(e)})})},FM={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,t,n)=>{const{plugins:r,...a}=t,s=t1(e),u=n(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:d=>typeof d=="string"||typeof d=="number"||typeof d=="boolean"||!d,transform:(d,f)=>sf({...f,value:d,children:b.jsx(lf,{...a,children:b.jsx(UM,{...a,metadataKeyPath:f.keyPath,children:e})})})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return sf({...t,value:e,children:b.jsx(lf,{...a,children:b.jsx(BM,{...a,children:e})}),additionalProps:{metadata:u}})}},GM={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Markdown,transform:(e,t,n)=>{const r=[...t.keyPath,{type:K.Markdown}],a=e[K.Markdown];return n(a,{...t,children:a,keyPath:r,plugins:[FM,...t.plugins??[]]})}},cS=(e,t,n)=>JT(e,t,[$M,HM,GM]),Jt=(e,t)=>{const{locale:n}=S.useContext(Kf),r=n,{changedContent:a}=cM();return a!=null&&a[e.key]?cS(a==null?void 0:a[e.key],r):cS(e,r)},yv=({onLocaleChange:e}={})=>{const{defaultLocale:t,locales:n}=(qe==null?void 0:qe.internationalization)??{},{locale:r,setLocale:a}=S.useContext(Kf),{setLocaleCookie:s}=OM();return{locale:r,defaultLocale:t,availableLocales:n,setLocale:u=>{if(!(n!=null&&n.map(String).includes(u))){console.error(`Locale ${u} is not available`);return}a(u),s(u),e==null||e(u)}}};var Vl={},uS;function KM(){if(uS)return Vl;uS=1,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.parse=l,Vl.serialize=f;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,s=(()=>{const v=function(){};return v.prototype=Object.create(null),v})();function l(v,E){const y=new s,x=v.length;if(x<2)return y;const A=(E==null?void 0:E.decode)||m;let T=0;do{const w=v.indexOf("=",T);if(w===-1)break;const C=v.indexOf(";",T),O=C===-1?x:C;if(w>O){T=v.lastIndexOf(";",w-1)+1;continue}const N=u(v,T,w),j=d(v,w,N),D=v.slice(N,j);if(y[D]===void 0){let L=u(v,w+1,O),z=d(v,O,L);const U=A(v.slice(L,z));y[D]=U}T=O+1}while(T<x);return y}function u(v,E,y){do{const x=v.charCodeAt(E);if(x!==32&&x!==9)return E}while(++E<y);return y}function d(v,E,y){for(;E>y;){const x=v.charCodeAt(--E);if(x!==32&&x!==9)return E+1}return y}function f(v,E,y){const x=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(v))throw new TypeError(`argument name is invalid: ${v}`);const A=x(E);if(!t.test(A))throw new TypeError(`argument val is invalid: ${E}`);let T=v+"="+A;if(!y)return T;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);T+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);T+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);T+="; Path="+y.path}if(y.expires){if(!g(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);T+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(T+="; HttpOnly"),y.secure&&(T+="; Secure"),y.partitioned&&(T+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":T+="; Priority=Low";break;case"medium":T+="; Priority=Medium";break;case"high":T+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":T+="; SameSite=Strict";break;case"lax":T+="; SameSite=Lax";break;case"none":T+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return T}function m(v){if(v.indexOf("%")===-1)return v;try{return decodeURIComponent(v)}catch{return v}}function g(v){return a.call(v)==="[object Date]"}return Vl}KM();var dS="popstate";function ZM(e={}){function t(r,a){let{pathname:s,search:l,hash:u}=r.location;return Qg("",{pathname:s,search:l,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:pc(a)}return WM(t,n,null,e)}function Et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qM(){return Math.random().toString(36).substring(2,10)}function fS(e,t){return{usr:e.state,key:e.key,idx:t}}function Qg(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ts(t):t,state:n,key:t&&t.key||r||qM()}}function pc({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 Ts(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 WM(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,l=a.history,u="POP",d=null,f=m();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function m(){return(l.state||{idx:null}).idx}function g(){u="POP";let A=m(),T=A==null?null:A-f;f=A,d&&d({action:u,location:x.location,delta:T})}function v(A,T){u="PUSH";let w=Qg(x.location,A,T);f=m()+1;let C=fS(w,f),O=x.createHref(w);try{l.pushState(C,"",O)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(O)}s&&d&&d({action:u,location:x.location,delta:1})}function E(A,T){u="REPLACE";let w=Qg(x.location,A,T);f=m();let C=fS(w,f),O=x.createHref(w);l.replaceState(C,"",O),s&&d&&d({action:u,location:x.location,delta:0})}function y(A){return YM(A)}let x={get action(){return u},get location(){return e(a,l)},listen(A){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(dS,g),d=A,()=>{a.removeEventListener(dS,g),d=null}},createHref(A){return t(a,A)},createURL:y,encodeLocation(A){let T=y(A);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:v,replace:E,go(A){return l.go(A)}};return x}function YM(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Et(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:pc(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function x1(e,t,n="/"){return XM(e,t,n,!1)}function XM(e,t,n,r){let a=typeof t=="string"?Ts(t):t,s=_i(a.pathname||"/",n);if(s==null)return null;let l=E1(e);QM(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=cP(s);u=sP(l[d],f,r)}return u}function E1(e,t=[],n=[],r=""){let a=(s,l,u)=>{let d={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};d.relativePath.startsWith("/")&&(Et(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let f=bi([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&(Et(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),E1(s.children,t,m,f)),!(s.path==null&&!s.index)&&t.push({path:f,score:aP(f,s.index),routesMeta:m})};return e.forEach((s,l)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))a(s,l);else for(let d of S1(s.path))a(s,l,d)}),t}function S1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let l=S1(r.join("/")),u=[];return u.push(...l.map(d=>d===""?s:[s,d].join("/"))),a&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function QM(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:oP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var JM=/^:[\w-]+$/,eP=3,tP=2,nP=1,rP=10,iP=-2,hS=e=>e==="*";function aP(e,t){let n=e.split("/"),r=n.length;return n.some(hS)&&(r+=iP),t&&(r+=tP),n.filter(a=>!hS(a)).reduce((a,s)=>a+(JM.test(s)?eP:s===""?nP:rP),r)}function oP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function sP(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",g=cf({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),v=d.route;if(!g&&f&&n&&!r[r.length-1].route.index&&(g=cf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(a,g.params),l.push({params:a,pathname:bi([s,g.pathname]),pathnameBase:hP(bi([s,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(s=bi([s,g.pathnameBase]))}return l}function cf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=lP(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let s=a[0],l=s.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:g},v)=>{if(m==="*"){let y=u[v]||"";l=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const E=u[v];return g&&!E?f[m]=void 0:f[m]=(E||"").replace(/%2F/g,"/"),f},{}),pathname:s,pathnameBase:l,pattern:e}}function lP(e,t=!1,n=!0){Hr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function cP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hr(!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 _i(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 uP(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Ts(e):e;return{pathname:n?n.startsWith("/")?n:dP(n,t):t,search:mP(r),hash:pP(a)}}function dP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Fp(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 fP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function A1(e){let t=fP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function w1(e,t,n,r=!1){let a;typeof e=="string"?a=Ts(e):(a={...e},Et(!a.pathname||!a.pathname.includes("?"),Fp("?","pathname","search",a)),Et(!a.pathname||!a.pathname.includes("#"),Fp("#","pathname","hash",a)),Et(!a.search||!a.search.includes("#"),Fp("#","search","hash",a)));let s=e===""||a.pathname==="",l=s?"/":a.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;a.pathname=v.join("/")}u=g>=0?t[g]:"/"}let d=uP(a,u),f=l&&l!=="/"&&l.endsWith("/"),m=(s||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var bi=e=>e.join("/").replace(/\/\/+/g,"/"),hP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function gP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var T1=["POST","PUT","PATCH","DELETE"];new Set(T1);var yP=["GET",...T1];new Set(yP);var Rs=S.createContext(null);Rs.displayName="DataRouter";var Zf=S.createContext(null);Zf.displayName="DataRouterState";var R1=S.createContext({isTransitioning:!1});R1.displayName="ViewTransition";var vP=S.createContext(new Map);vP.displayName="Fetchers";var bP=S.createContext(null);bP.displayName="Await";var Kr=S.createContext(null);Kr.displayName="Navigation";var jc=S.createContext(null);jc.displayName="Location";var Ti=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ti.displayName="Route";var vv=S.createContext(null);vv.displayName="RouteError";function _P(e,{relative:t}={}){Et(Mc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(Kr),{hash:a,pathname:s,search:l}=Pc(e,{relative:t}),u=s;return n!=="/"&&(u=s==="/"?n:bi([n,s])),r.createHref({pathname:u,search:l,hash:a})}function Mc(){return S.useContext(jc)!=null}function ua(){return Et(Mc(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(jc).location}var C1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function N1(e){S.useContext(Kr).static||S.useLayoutEffect(e)}function xP(){let{isDataRoute:e}=S.useContext(Ti);return e?LP():EP()}function EP(){Et(Mc(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Rs),{basename:t,navigator:n}=S.useContext(Kr),{matches:r}=S.useContext(Ti),{pathname:a}=ua(),s=JSON.stringify(A1(r)),l=S.useRef(!1);return N1(()=>{l.current=!0}),S.useCallback((d,f={})=>{if(Hr(l.current,C1),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=w1(d,JSON.parse(s),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:bi([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,s,a,e])}S.createContext(null);function Pc(e,{relative:t}={}){let{matches:n}=S.useContext(Ti),{pathname:r}=ua(),a=JSON.stringify(A1(n));return S.useMemo(()=>w1(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function SP(e,t){return k1(e,t)}function k1(e,t,n,r){var T;Et(Mc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=S.useContext(Kr),{matches:s}=S.useContext(Ti),l=s[s.length-1],u=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",m=l&&l.route;{let w=m&&m.path||"";O1(d,!m||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
52
-
53
- Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let g=ua(),v;if(t){let w=typeof t=="string"?Ts(t):t;Et(f==="/"||((T=w.pathname)==null?void 0:T.startsWith(f)),`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 "${f}" but pathname "${w.pathname}" was given in the \`location\` prop.`),v=w}else v=g;let E=v.pathname||"/",y=E;if(f!=="/"){let w=f.replace(/^\//,"").split("/");y="/"+E.replace(/^\//,"").split("/").slice(w.length).join("/")}let x=x1(e,{pathname:y});Hr(m||x!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Hr(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.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 A=CP(x&&x.map(w=>Object.assign({},w,{params:Object.assign({},u,w.params),pathname:bi([f,a.encodeLocation?a.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?f:bi([f,a.encodeLocation?a.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&A?S.createElement(jc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},A):A}function AP(){let e=IP(),t=gP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:s},"ErrorBoundary")," or"," ",S.createElement("code",{style:s},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:a},n):null,l)}var wP=S.createElement(AP,null),TP=class extends S.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?S.createElement(Ti.Provider,{value:this.props.routeContext},S.createElement(vv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RP({routeContext:e,match:t,children:n}){let r=S.useContext(Rs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Ti.Provider,{value:e},n)}function CP(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=n==null?void 0:n.errors;if(s!=null){let d=a.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);Et(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(n)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:g}=n,v=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||v){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,m)=>{let g,v=!1,E=null,y=null;n&&(g=s&&f.route.id?s[f.route.id]:void 0,E=f.route.errorElement||wP,l&&(u<0&&m===0?(O1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,y=null):u===m&&(v=!0,y=f.route.hydrateFallbackElement||null)));let x=t.concat(a.slice(0,m+1)),A=()=>{let T;return g?T=E:v?T=y:f.route.Component?T=S.createElement(f.route.Component,null):f.route.element?T=f.route.element:T=d,S.createElement(RP,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:T})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?S.createElement(TP,{location:n.location,revalidation:n.revalidation,component:E,error:g,children:A(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):A()},null)}function bv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function NP(e){let t=S.useContext(Rs);return Et(t,bv(e)),t}function kP(e){let t=S.useContext(Zf);return Et(t,bv(e)),t}function OP(e){let t=S.useContext(Ti);return Et(t,bv(e)),t}function _v(e){let t=OP(e),n=t.matches[t.matches.length-1];return Et(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DP(){return _v("useRouteId")}function IP(){var r;let e=S.useContext(vv),t=kP("useRouteError"),n=_v("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function LP(){let{router:e}=NP("useNavigate"),t=_v("useNavigate"),n=S.useRef(!1);return N1(()=>{n.current=!0}),S.useCallback(async(a,s={})=>{Hr(n.current,C1),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var mS={};function O1(e,t,n){!t&&!mS[e]&&(mS[e]=!0,Hr(!1,n))}S.memo(jP);function jP({routes:e,future:t,state:n}){return k1(e,void 0,n,t)}function D1(e){Et(!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 MP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1}){Et(!Mc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:l,navigator:a,static:s,future:{}}),[l,a,s]);typeof n=="string"&&(n=Ts(n));let{pathname:d="/",search:f="",hash:m="",state:g=null,key:v="default"}=n,E=S.useMemo(()=>{let y=_i(d,l);return y==null?null:{location:{pathname:y,search:f,hash:m,state:g,key:v},navigationType:r}},[l,d,f,m,g,v,r]);return Hr(E!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:S.createElement(Kr.Provider,{value:u},S.createElement(jc.Provider,{children:t,value:E}))}function PP({children:e,location:t}){return SP(Jg(e),t)}function Jg(e,t=[]){let n=[];return S.Children.forEach(e,(r,a)=>{if(!S.isValidElement(r))return;let s=[...t,a];if(r.type===S.Fragment){n.push.apply(n,Jg(r.props.children,s));return}Et(r.type===D1,`[${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>`),Et(!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=Jg(r.props.children,s)),n.push(l)}),n}var Fd="get",Gd="application/x-www-form-urlencoded";function qf(e){return e!=null&&typeof e.tagName=="string"}function zP(e){return qf(e)&&e.tagName.toLowerCase()==="button"}function VP(e){return qf(e)&&e.tagName.toLowerCase()==="form"}function BP(e){return qf(e)&&e.tagName.toLowerCase()==="input"}function UP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $P(e,t){return e.button===0&&(!t||t==="_self")&&!UP(e)}var pd=null;function HP(){if(pd===null)try{new FormData(document.createElement("form"),0),pd=!1}catch{pd=!0}return pd}var FP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gp(e){return e!=null&&!FP.has(e)?(Hr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gd}"`),null):e}function GP(e,t){let n,r,a,s,l;if(VP(e)){let u=e.getAttribute("action");r=u?_i(u,t):null,n=e.getAttribute("method")||Fd,a=Gp(e.getAttribute("enctype"))||Gd,s=new FormData(e)}else if(zP(e)||BP(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?_i(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Fd,a=Gp(e.getAttribute("formenctype"))||Gp(u.getAttribute("enctype"))||Gd,s=new FormData(u,e),!HP()){let{name:f,type:m,value:g}=e;if(m==="image"){let v=f?`${f}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else f&&s.append(f,g)}}else{if(qf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Fd,r=null,a=Gd,l=e}return s&&a==="text/plain"&&(l=s,s=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:s,body:l}}function xv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function KP(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 ZP(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 qP(e,t,n){let r=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let l=await KP(s,n);return l.links?l.links():[]}return[]}));return QP(r.flat(1).filter(ZP).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function pS(e,t,n,r,a,s){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var m;return n[f].pathname!==d.pathname||((m=n[f].route.path)==null?void 0:m.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return s==="assets"?t.filter((d,f)=>l(d,f)||u(d,f)):s==="data"?t.filter((d,f)=>{var g;let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let v=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function WP(e,t,{includeHydrateFallback:n}={}){return YP(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function YP(e){return[...new Set(e)]}function XP(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function QP(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let s=JSON.stringify(XP(a));return n.has(s)||(n.add(s),r.push({key:s,link:a})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var JP=new Set([100,101,204,205]);function ez(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&_i(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function I1(){let e=S.useContext(Rs);return xv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tz(){let e=S.useContext(Zf);return xv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ev=S.createContext(void 0);Ev.displayName="FrameworkContext";function L1(){let e=S.useContext(Ev);return xv(e,"You must render this element inside a <HydratedRouter> element"),e}function nz(e,t){let n=S.useContext(Ev),[r,a]=S.useState(!1),[s,l]=S.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:g}=t,v=S.useRef(null);S.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let x=T=>{T.forEach(w=>{l(w.isIntersecting)})},A=new IntersectionObserver(x,{threshold:.5});return v.current&&A.observe(v.current),()=>{A.disconnect()}}},[e]),S.useEffect(()=>{if(r){let x=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(x)}}},[r]);let E=()=>{a(!0)},y=()=>{a(!1),l(!1)};return n?e!=="intent"?[s,v,{}]:[s,v,{onFocus:Bl(u,E),onBlur:Bl(d,y),onMouseEnter:Bl(f,E),onMouseLeave:Bl(m,y),onTouchStart:Bl(g,E)}]:[!1,v,{}]}function Bl(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function rz({page:e,...t}){let{router:n}=I1(),r=S.useMemo(()=>x1(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?S.createElement(az,{page:e,matches:r,...t}):null}function iz(e){let{manifest:t,routeModules:n}=L1(),[r,a]=S.useState([]);return S.useEffect(()=>{let s=!1;return qP(e,t,n).then(l=>{s||a(l)}),()=>{s=!0}},[e,t,n]),r}function az({page:e,matches:t,...n}){let r=ua(),{manifest:a,routeModules:s}=L1(),{basename:l}=I1(),{loaderData:u,matches:d}=tz(),f=S.useMemo(()=>pS(e,t,d,a,r,"data"),[e,t,d,a,r]),m=S.useMemo(()=>pS(e,t,d,a,r,"assets"),[e,t,d,a,r]),g=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let y=new Set,x=!1;if(t.forEach(T=>{var C;let w=a.routes[T.route.id];!w||!w.hasLoader||(!f.some(O=>O.route.id===T.route.id)&&T.route.id in u&&((C=s[T.route.id])!=null&&C.shouldRevalidate)||w.hasClientLoader?x=!0:y.add(T.route.id))}),y.size===0)return[];let A=ez(e,l);return x&&y.size>0&&A.searchParams.set("_routes",t.filter(T=>y.has(T.route.id)).map(T=>T.route.id).join(",")),[A.pathname+A.search]},[l,u,r,a,f,t,e,s]),v=S.useMemo(()=>WP(m,a),[m,a]),E=iz(m);return S.createElement(S.Fragment,null,g.map(y=>S.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),v.map(y=>S.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),E.map(({key:y,link:x})=>S.createElement("link",{key:y,...x})))}function oz(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var j1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{j1&&(window.__reactRouterVersion="7.6.2")}catch{}function sz({basename:e,children:t,window:n}){let r=S.useRef();r.current==null&&(r.current=ZM({window:n,v5Compat:!0}));let a=r.current,[s,l]=S.useState({action:a.action,location:a.location}),u=S.useCallback(d=>{S.startTransition(()=>l(d))},[l]);return S.useLayoutEffect(()=>a.listen(u),[a,u]),S.createElement(MP,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}var M1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,P1=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:l,state:u,target:d,to:f,preventScrollReset:m,viewTransition:g,...v},E){let{basename:y}=S.useContext(Kr),x=typeof f=="string"&&M1.test(f),A,T=!1;if(typeof f=="string"&&x&&(A=f,j1))try{let z=new URL(window.location.href),U=f.startsWith("//")?new URL(z.protocol+f):new URL(f),fe=_i(U.pathname,y);U.origin===z.origin&&fe!=null?f=fe+U.search+U.hash:T=!0}catch{Hr(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=_P(f,{relative:a}),[C,O,N]=nz(r,v),j=dz(f,{replace:l,state:u,target:d,preventScrollReset:m,relative:a,viewTransition:g});function D(z){t&&t(z),z.defaultPrevented||j(z)}let L=S.createElement("a",{...v,...N,href:A||w,onClick:T||s?t:D,ref:oz(E,O),target:d,"data-discover":!x&&n==="render"?"true":void 0});return C&&!x?S.createElement(S.Fragment,null,L,S.createElement(rz,{page:w})):L});P1.displayName="Link";var lz=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:l,viewTransition:u,children:d,...f},m){let g=Pc(l,{relative:f.relative}),v=ua(),E=S.useContext(Zf),{navigator:y,basename:x}=S.useContext(Kr),A=E!=null&&gz(g)&&u===!0,T=y.encodeLocation?y.encodeLocation(g).pathname:g.pathname,w=v.pathname,C=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(w=w.toLowerCase(),C=C?C.toLowerCase():null,T=T.toLowerCase()),C&&x&&(C=_i(C,x)||C);const O=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let N=w===T||!a&&w.startsWith(T)&&w.charAt(O)==="/",j=C!=null&&(C===T||!a&&C.startsWith(T)&&C.charAt(T.length)==="/"),D={isActive:N,isPending:j,isTransitioning:A},L=N?t:void 0,z;typeof r=="function"?z=r(D):z=[r,N?"active":null,j?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let U=typeof s=="function"?s(D):s;return S.createElement(P1,{...f,"aria-current":L,className:z,ref:m,style:U,to:l,viewTransition:u},typeof d=="function"?d(D):d)});lz.displayName="NavLink";var cz=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:l=Fd,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:g,...v},E)=>{let y=mz(),x=pz(u,{relative:f}),A=l.toLowerCase()==="get"?"get":"post",T=typeof u=="string"&&M1.test(u),w=C=>{if(d&&d(C),C.defaultPrevented)return;C.preventDefault();let O=C.nativeEvent.submitter,N=(O==null?void 0:O.getAttribute("formmethod"))||l;y(O||C.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:s,relative:f,preventScrollReset:m,viewTransition:g})};return S.createElement("form",{ref:E,method:A,action:x,onSubmit:r?d:w,...v,"data-discover":!T&&e==="render"?"true":void 0})});cz.displayName="Form";function uz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function z1(e){let t=S.useContext(Rs);return Et(t,uz(e)),t}function dz(e,{target:t,replace:n,state:r,preventScrollReset:a,relative:s,viewTransition:l}={}){let u=xP(),d=ua(),f=Pc(e,{relative:s});return S.useCallback(m=>{if($P(m,t)){m.preventDefault();let g=n!==void 0?n:pc(d)===pc(f);u(e,{replace:g,state:r,preventScrollReset:a,relative:s,viewTransition:l})}},[d,u,f,n,r,t,e,a,s,l])}var fz=0,hz=()=>`__${String(++fz)}__`;function mz(){let{router:e}=z1("useSubmit"),{basename:t}=S.useContext(Kr),n=DP();return S.useCallback(async(r,a={})=>{let{action:s,method:l,encType:u,formData:d,body:f}=GP(r,t);if(a.navigate===!1){let m=a.fetcherKey||hz();await e.fetch(m,n,a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,n])}function pz(e,{relative:t}={}){let{basename:n}=S.useContext(Kr),r=S.useContext(Ti);Et(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...Pc(e||".",{relative:t})},l=ua();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===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:bi([n,s.pathname])),pc(s)}function gz(e,t={}){let n=S.useContext(R1);Et(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=z1("useViewTransitionState"),a=Pc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=_i(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=_i(n.nextLocation.pathname,r)||n.nextLocation.pathname;return cf(a.pathname,l)!=null||cf(a.pathname,s)!=null}[...JP];var co=XT();const yz=Hf(co);/**
54
- * @license lucide-react v0.513.0 - ISC
55
- *
56
- * This source code is licensed under the ISC license.
57
- * See the LICENSE file in the root directory of this source tree.
58
- */const vz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),gS=e=>{const t=bz(e);return t.charAt(0).toUpperCase()+t.slice(1)},V1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),_z=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
59
- * @license lucide-react v0.513.0 - ISC
60
- *
61
- * This source code is licensed under the ISC license.
62
- * See the LICENSE file in the root directory of this source tree.
63
- */var xz={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
64
- * @license lucide-react v0.513.0 - ISC
65
- *
66
- * This source code is licensed under the ISC license.
67
- * See the LICENSE file in the root directory of this source tree.
68
- */const Ez=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:l,...u},d)=>S.createElement("svg",{ref:d,...xz,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:V1("lucide",a),...!s&&!_z(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,m])=>S.createElement(f,m)),...Array.isArray(s)?s:[s]]));/**
69
- * @license lucide-react v0.513.0 - ISC
70
- *
71
- * This source code is licensed under the ISC license.
72
- * See the LICENSE file in the root directory of this source tree.
73
- */const gt=(e,t)=>{const n=S.forwardRef(({className:r,...a},s)=>S.createElement(Ez,{ref:s,iconNode:t,className:V1(`lucide-${vz(gS(e))}`,`lucide-${e}`,r),...a}));return n.displayName=gS(e),n};/**
74
- * @license lucide-react v0.513.0 - ISC
75
- *
76
- * This source code is licensed under the ISC license.
77
- * See the LICENSE file in the root directory of this source tree.
78
- */const Sz=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Az=gt("arrow-left",Sz);/**
79
- * @license lucide-react v0.513.0 - ISC
80
- *
81
- * This source code is licensed under the ISC license.
82
- * See the LICENSE file in the root directory of this source tree.
83
- */const wz=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],Tz=gt("arrow-up-from-line",wz);/**
84
- * @license lucide-react v0.513.0 - ISC
85
- *
86
- * This source code is licensed under the ISC license.
87
- * See the LICENSE file in the root directory of this source tree.
88
- */const Rz=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cs=gt("check",Rz);/**
89
- * @license lucide-react v0.513.0 - ISC
90
- *
91
- * This source code is licensed under the ISC license.
92
- * See the LICENSE file in the root directory of this source tree.
93
- */const Cz=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],B1=gt("chevron-down",Cz);/**
94
- * @license lucide-react v0.513.0 - ISC
95
- *
96
- * This source code is licensed under the ISC license.
97
- * See the LICENSE file in the root directory of this source tree.
98
- */const Nz=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],kz=gt("chevron-left",Nz);/**
99
- * @license lucide-react v0.513.0 - ISC
100
- *
101
- * This source code is licensed under the ISC license.
102
- * See the LICENSE file in the root directory of this source tree.
103
- */const Oz=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],uf=gt("chevron-right",Oz);/**
104
- * @license lucide-react v0.513.0 - ISC
105
- *
106
- * This source code is licensed under the ISC license.
107
- * See the LICENSE file in the root directory of this source tree.
108
- */const Dz=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Iz=gt("chevron-up",Dz);/**
109
- * @license lucide-react v0.513.0 - ISC
110
- *
111
- * This source code is licensed under the ISC license.
112
- * See the LICENSE file in the root directory of this source tree.
113
- */const Lz=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],jz=gt("chevrons-up-down",Lz);/**
114
- * @license lucide-react v0.513.0 - ISC
115
- *
116
- * This source code is licensed under the ISC license.
117
- * See the LICENSE file in the root directory of this source tree.
118
- */const Mz=[["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"}]],Pz=gt("copy-check",Mz);/**
119
- * @license lucide-react v0.513.0 - ISC
120
- *
121
- * This source code is licensed under the ISC license.
122
- * See the LICENSE file in the root directory of this source tree.
123
- */const zz=[["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"}]],Vz=gt("copy",zz);/**
124
- * @license lucide-react v0.513.0 - ISC
125
- *
126
- * This source code is licensed under the ISC license.
127
- * See the LICENSE file in the root directory of this source tree.
128
- */const Bz=[["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"}]],Uz=gt("download",Bz);/**
129
- * @license lucide-react v0.513.0 - ISC
130
- *
131
- * This source code is licensed under the ISC license.
132
- * See the LICENSE file in the root directory of this source tree.
133
- */const $z=[["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"}]],Hz=gt("external-link",$z);/**
134
- * @license lucide-react v0.513.0 - ISC
135
- *
136
- * This source code is licensed under the ISC license.
137
- * See the LICENSE file in the root directory of this source tree.
138
- */const Fz=[["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"}]],Gz=gt("eye-off",Fz);/**
139
- * @license lucide-react v0.513.0 - ISC
140
- *
141
- * This source code is licensed under the ISC license.
142
- * See the LICENSE file in the root directory of this source tree.
143
- */const Kz=[["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"}]],Zz=gt("eye",Kz);/**
144
- * @license lucide-react v0.513.0 - ISC
145
- *
146
- * This source code is licensed under the ISC license.
147
- * See the LICENSE file in the root directory of this source tree.
148
- */const qz=[["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"}]],Wz=gt("globe",qz);/**
149
- * @license lucide-react v0.513.0 - ISC
150
- *
151
- * This source code is licensed under the ISC license.
152
- * See the LICENSE file in the root directory of this source tree.
153
- */const Yz=[["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"}]],Xz=gt("move-vertical",Yz);/**
154
- * @license lucide-react v0.513.0 - ISC
155
- *
156
- * This source code is licensed under the ISC license.
157
- * See the LICENSE file in the root directory of this source tree.
158
- */const Qz=[["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"}]],U1=gt("pencil",Qz);/**
159
- * @license lucide-react v0.513.0 - ISC
160
- *
161
- * This source code is licensed under the ISC license.
162
- * See the LICENSE file in the root directory of this source tree.
163
- */const Jz=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Wf=gt("plus",Jz);/**
164
- * @license lucide-react v0.513.0 - ISC
165
- *
166
- * This source code is licensed under the ISC license.
167
- * See the LICENSE file in the root directory of this source tree.
168
- */const eV=[["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"}]],tV=gt("rotate-ccw",eV);/**
169
- * @license lucide-react v0.513.0 - ISC
170
- *
171
- * This source code is licensed under the ISC license.
172
- * See the LICENSE file in the root directory of this source tree.
173
- */const nV=[["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"}]],yS=gt("save",nV);/**
174
- * @license lucide-react v0.513.0 - ISC
175
- *
176
- * This source code is licensed under the ISC license.
177
- * See the LICENSE file in the root directory of this source tree.
178
- */const rV=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],iV=gt("search",rV);/**
179
- * @license lucide-react v0.513.0 - ISC
180
- *
181
- * This source code is licensed under the ISC license.
182
- * See the LICENSE file in the root directory of this source tree.
183
- */const aV=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Yf=gt("trash",aV);/**
184
- * @license lucide-react v0.513.0 - ISC
185
- *
186
- * This source code is licensed under the ISC license.
187
- * See the LICENSE file in the root directory of this source tree.
188
- */const oV=[["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"}]],$1=gt("wand-sparkles",oV);/**
189
- * @license lucide-react v0.513.0 - ISC
190
- *
191
- * This source code is licensed under the ISC license.
192
- * See the LICENSE file in the root directory of this source tree.
193
- */const sV=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uo=gt("x",sV);function H1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=H1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xf(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=H1(e))&&(r&&(r+=" "),r+=t);return r}const Sv="-",lV=e=>{const t=uV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Sv);return u[0]===""&&u.length!==1&&u.shift(),F1(u,t)||cV(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},F1=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?F1(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(Sv);return(l=t.validators.find(({validator:u})=>u(s)))==null?void 0:l.classGroupId},vS=/^\[(.+)\]$/,cV=e=>{if(vS.test(e)){const t=vS.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},uV=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)ey(n[a],r,a,t);return r},ey=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:bS(t,a);s.classGroupId=n;return}if(typeof a=="function"){if(dV(a)){ey(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([s,l])=>{ey(l,bS(t,s),n,r)})})},bS=(e,t)=>{let n=e;return t.split(Sv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},dV=e=>e.isThemeGetter,fV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(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 a(s,l),l},set(s,l){n.has(s)?n.set(s,l):a(s,l)}}},ty="!",ny=":",hV=ny.length,mV=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const s=[];let l=0,u=0,d=0,f;for(let y=0;y<a.length;y++){let x=a[y];if(l===0&&u===0){if(x===ny){s.push(a.slice(d,y)),d=y+hV;continue}if(x==="/"){f=y;continue}}x==="["?l++:x==="]"?l--:x==="("?u++:x===")"&&u--}const m=s.length===0?a:a.substring(d),g=pV(m),v=g!==m,E=f&&f>d?f-d:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:E}};if(t){const a=t+ny,s=r;r=l=>l.startsWith(a)?s(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},pV=e=>e.endsWith(ty)?e.substring(0,e.length-1):e.startsWith(ty)?e.substring(1):e,gV=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const a=[];let s=[];return r.forEach(l=>{l[0]==="["||t[l]?(a.push(...s.sort(),l),s=[]):s.push(l)}),a.push(...s.sort()),a}},yV=e=>({cache:fV(e.cacheSize),parseClassName:mV(e),sortModifiers:gV(e),...lV(e)}),vV=/\s+/,bV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s}=t,l=[],u=e.trim().split(vV);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:g,modifiers:v,hasImportantModifier:E,baseClassName:y,maybePostfixModifierPosition:x}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let A=!!x,T=r(A?y.substring(0,x):y);if(!T){if(!A){d=m+(d.length>0?" "+d:d);continue}if(T=r(y),!T){d=m+(d.length>0?" "+d:d);continue}A=!1}const w=s(v).join(":"),C=E?w+ty:w,O=C+T;if(l.includes(O))continue;l.push(O);const N=a(T,A);for(let j=0;j<N.length;++j){const D=N[j];l.push(C+D)}d=m+(d.length>0?" "+d:d)}return d};function _V(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=G1(t))&&(r&&(r+=" "),r+=n);return r}const G1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=G1(e[r]))&&(n&&(n+=" "),n+=t);return n};function xV(e,...t){let n,r,a,s=l;function l(d){const f=t.reduce((m,g)=>g(m),e());return n=yV(f),r=n.cache.get,a=n.cache.set,s=u,u(d)}function u(d){const f=r(d);if(f)return f;const m=bV(d,n);return a(d,m),m}return function(){return s(_V.apply(null,arguments))}}const Ht=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},K1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Z1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,EV=/^\d+\/\d+$/,SV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yo=e=>EV.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Yi=e=>!!e&&Number.isInteger(Number(e)),Kp=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),pi=e=>SV.test(e),CV=()=>!0,NV=e=>AV.test(e)&&!wV.test(e),q1=()=>!1,kV=e=>TV.test(e),OV=e=>RV.test(e),DV=e=>!Ne(e)&&!ke(e),IV=e=>Ns(e,X1,q1),Ne=e=>K1.test(e),Ha=e=>Ns(e,Q1,NV),Zp=e=>Ns(e,zV,Xe),_S=e=>Ns(e,W1,q1),LV=e=>Ns(e,Y1,OV),gd=e=>Ns(e,J1,kV),ke=e=>Z1.test(e),Ul=e=>ks(e,Q1),jV=e=>ks(e,VV),xS=e=>ks(e,W1),MV=e=>ks(e,X1),PV=e=>ks(e,Y1),yd=e=>ks(e,J1,!0),Ns=(e,t,n)=>{const r=K1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ks=(e,t,n=!1)=>{const r=Z1.exec(e);return r?r[1]?t(r[1]):n:!1},W1=e=>e==="position"||e==="percentage",Y1=e=>e==="image"||e==="url",X1=e=>e==="length"||e==="size"||e==="bg-size",Q1=e=>e==="length",zV=e=>e==="number",VV=e=>e==="family-name",J1=e=>e==="shadow",BV=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),r=Ht("font-weight"),a=Ht("tracking"),s=Ht("leading"),l=Ht("breakpoint"),u=Ht("container"),d=Ht("spacing"),f=Ht("radius"),m=Ht("shadow"),g=Ht("inset-shadow"),v=Ht("text-shadow"),E=Ht("drop-shadow"),y=Ht("blur"),x=Ht("perspective"),A=Ht("aspect"),T=Ht("ease"),w=Ht("animate"),C=()=>["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"],N=()=>[...O(),ke,Ne],j=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],L=()=>[ke,Ne,d],z=()=>[Yo,"full","auto",...L()],U=()=>[Yi,"none","subgrid",ke,Ne],fe=()=>["auto",{span:["full",Yi,ke,Ne]},Yi,ke,Ne],ie=()=>[Yi,"auto",ke,Ne],le=()=>["auto","min","max","fr",ke,Ne],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...L()],re=()=>[Yo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],Z=()=>[e,ke,Ne],ve=()=>[...O(),xS,_S,{position:[ke,Ne]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",MV,IV,{size:[ke,Ne]}],$=()=>[Kp,Ul,Ha],Q=()=>["","none","full",f,ke,Ne],ne=()=>["",Xe,Ul,Ha],he=()=>["solid","dashed","dotted","double"],Ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Xe,Kp,xS,_S],_e=()=>["","none",y,ke,Ne],Oe=()=>["none",Xe,ke,Ne],Re=()=>["none",Xe,ke,Ne],$e=()=>[Xe,ke,Ne],Fe=()=>[Yo,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pi],breakpoint:[pi],color:[CV],container:[pi],"drop-shadow":[pi],ease:["in","out","in-out"],font:[DV],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pi],shadow:[pi],spacing:["px",Xe],text:[pi],"text-shadow":[pi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yo,Ne,ke,A]}],container:["container"],columns:[{columns:[Xe,Ne,ke,u]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Yi,"auto",ke,Ne]}],basis:[{basis:[Yo,"full","auto",u,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Yo,"auto","initial","none",Ne]}],grow:[{grow:["",Xe,ke,Ne]}],shrink:[{shrink:["",Xe,ke,Ne]}],order:[{order:[Yi,"first","last","none",ke,Ne]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],w:[{w:[u,"screen",...re()]}],"min-w":[{"min-w":[u,"screen","none",...re()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",n,Ul,Ha]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ke,Zp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kp,Ne]}],"font-family":[{font:[jV,Ne,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ke,Ne]}],"line-clamp":[{"line-clamp":[Xe,"none",ke,Zp]}],leading:[{leading:[s,...L()]}],"list-image":[{"list-image":["none",ke,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",ke,Ha]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Xe,"auto",ke,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yi,ke,Ne],radial:["",ke,Ne],conic:[Yi,ke,Ne]},PV,LV]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,ke,Ne]}],"outline-w":[{outline:["",Xe,Ul,Ha]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",m,yd,gd]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",g,yd,gd]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Xe,Ha]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",v,yd,gd]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Xe,ke,Ne]}],"mix-blend":[{"mix-blend":[...Ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ee()}],"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":[Xe]}],"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":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"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":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"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":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"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":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"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":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"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":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"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":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[ke,Ne]}],"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":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"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":[Xe]}],"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":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"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:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Ne]}],filter:[{filter:["","none",ke,Ne]}],blur:[{blur:_e()}],brightness:[{brightness:[Xe,ke,Ne]}],contrast:[{contrast:[Xe,ke,Ne]}],"drop-shadow":[{"drop-shadow":["","none",E,yd,gd]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Xe,ke,Ne]}],"hue-rotate":[{"hue-rotate":[Xe,ke,Ne]}],invert:[{invert:["",Xe,ke,Ne]}],saturate:[{saturate:[Xe,ke,Ne]}],sepia:[{sepia:["",Xe,ke,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Ne]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,ke,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,ke,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,ke,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,ke,Ne]}],"backdrop-invert":[{"backdrop-invert":["",Xe,ke,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,ke,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,ke,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,ke,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",ke,Ne]}],ease:[{ease:["linear","initial",T,ke,Ne]}],delay:[{delay:[Xe,ke,Ne]}],animate:[{animate:["none",w,ke,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ke,Ne]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[ke,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,Ne]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Xe,Ul,Ha,Zp]}],stroke:[{stroke:["none",...Z()]}],"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"]}},eR=xV(BV),Ae=(...e)=>eR(Xf(e)),ES=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,SS=Xf,cr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return SS(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:s}=t,l=Object.keys(a).map(f=>{const m=n==null?void 0:n[f],g=s==null?void 0:s[f];if(m===null)return null;const v=ES(m)||ES(g);return a[f][v]}),u=n&&Object.entries(n).reduce((f,m)=>{let[g,v]=m;return v===void 0||(f[g]=v),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:g,className:v,...E}=m;return Object.entries(E).every(y=>{let[x,A]=y;return Array.isArray(A)?A.includes({...s,...u}[x]):{...s,...u}[x]===A})?[...f,g,v]:f},[]);return SS(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},UV=({className:e,strokeWidth:t=4})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"44",viewBox:"0 0 44 44",stroke:"currentColor",className:Ae("size-full",e),children:b.jsxs("g",{fill:"none",fillRule:"evenodd",strokeWidth:t,children:[b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]}),b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]})]})}),ys=({children:e,isLoading:t=!0,className:n,...r})=>b.jsx(b.Fragment,{children:t?b.jsx("div",{className:Ae("flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center",n),role:"status","aria-label":"Animated icon, meaning that the website is processing",...r,children:b.jsx(UV,{className:"size-10 max-h-full max-w-full"})}):e??b.jsx(b.Fragment,{})}),qp=cr("",{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"}}),$V=cr("relative cursor-pointer truncate whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"min-h-7 px-3 max-md:py-1 text-xs",md:"min-h-8 px-6 max-md:py-2 text-sm",lg:"min-h-10 px-8 max-md:py-3 text-lg",xl:"min-h-11 px-10 max-md:py-4 text-xl","icon-sm":"p-1.5","icon-md":"p-1.5","icon-lg":"p-2","icon-xl":"p-3"},color:{primary:"text-primary *:text-text-light",secondary:"text-secondary *:text-text-light",destructive:"text-destructive *:text-text-light",neutral:"text-neutral *:text-text-light",light:"text-white *:text-text-light",dark:"text-neutral-800 *:text-text-light",text:"text-text *:text-text-opposite","text-inverse":"text-text-opposite *:text-text",error:"text-error *:text-text-light",success:"text-success *:text-text-light",custom:""},variant:{default:"rounded-lg bg-current",none:"border-none bg-current/0 text-inherit hover:bg-current/0",outline:"*:!text-current rounded-lg border-[1.5px] bg-current/0 hover:bg-current/30",link:"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline","invisible-link":"*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent",hoverable:"*:!text-current rounded-lg border-none bg-current/0 transition hover:bg-current/10 aria-[current]:bg-current/5",input:["*:!text-current w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error","disabled:opacity-50"]},textAlign:{left:"text-left",center:"text-center",right:"text-right"},isFullWidth:{true:"w-full",false:""},hasIconLeft:{true:"px-12",false:""},hasIconRight:{true:"pr-8",false:""}},defaultVariants:{variant:"default",size:"md",color:"primary",textAlign:"center",isFullWidth:!1,hasIconRight:!1,hasIconLeft:!1}}),ut=({variant:e,size:t,color:n,children:r,Icon:a,IconRight:s,iconClassName:l,isLoading:u,isActive:d,isFullWidth:f=!1,textAlign:m,disabled:g,label:v,className:E,type:y="button",...x})=>{const A=e==="link"||e==="invisible-link";return b.jsxs("button",{disabled:u||g,"aria-current":d?"page":void 0,"aria-label":v,"aria-busy":u,role:A?"link":void 0,type:y,className:$V({variant:e,size:t,color:n,isFullWidth:f,textAlign:m??(s?"left":"center"),hasIconLeft:typeof r<"u"&&(typeof a<"u"||typeof u<"u"),hasIconRight:typeof r<"u"&&typeof s<"u",className:E}),...x,children:[a&&!u&&b.jsx(a,{className:qp({size:t,className:l,position:"left"})}),b.jsx(ys,{className:qp({size:t,className:l,position:"left"}),isLoading:u??!1}),b.jsx("span",{children:r}),s&&b.jsx(s,{className:qp({size:t,className:l,position:"right"})})]})},tR=({children:e,isHidden:t,className:n="",isOverable:r=!1,isFocusable:a=!1,minHeight:s=0,...l})=>b.jsx("div",{"aria-hidden":a?t:void 0,tabIndex:a?0:void 0,role:a?"button":"none",className:Ae("group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out",typeof t<"u"&&!t&&"grid-rows-[1fr] overflow-x-auto",r&&"hover:grid-rows-[1fr] hover:overflow-x-auto",a&&"focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto",n),...l,children:b.jsx("div",{style:{minHeight:`${s}px`},className:Ae(r&&"group-hover/height-smoother:visible",a&&"group-focus/height-smoother:visible",n),children:e})}),nR=({children:e,header:t,isOpen:n=!1,onClick:r,...a})=>{const[s,l]=S.useState(n),u=s==null?void 0:!s;return S.useEffect(()=>{n!=null&&l(n)},[n]),b.jsxs("div",{className:"w-full",children:[b.jsx(ut,{variant:"hoverable",color:"text",onClick:d=>{l(f=>!f),r==null||r(d)},isFullWidth:!0,className:"flex items-center justify-between gap-2",IconRight:B1,iconClassName:Ae("transform transition-transform duration-500 ease-in-out",s?"rotate-0":"-rotate-180"),...a,children:t}),b.jsx(tR,{tabIndex:u!==!1?void 0:-1,isHidden:u,children:e})]})},ts=()=>({isFetched:!1,fetchedDateTime:null,isLoading:!1,isInvalidated:!1,error:null,isSuccess:!1,data:null,errorCount:0,isEnabled:!0}),Wp=(e,t)=>t.filter(n=>e.includes(n.split("/")[0])),HV=(e,t)=>{var n;switch(t.type){case"SET_QUERY_STATE":{const{key:r,value:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??ts(),...a}}}}case"MAKE_QUERY_IN_ERROR":{const{key:r,error:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??ts(),error:a,isFetched:!0,isSuccess:!1,errorCount:(((n=e.states[r])==null?void 0:n.errorCount)??0)+1,isLoading:!1,isInvalidated:!1}}}}case"SET_QUERIES_STATE":{const{keys:r,value:a}=t,s=[r].flat(),l=Object.keys(e.states),u=Wp(s,l);if(u.length===0)return e;const d=structuredClone(e.states);return u.forEach(f=>{d[f]={...e.states[f]??ts(),...a}}),{...e,states:d}}case"RESET_KEY_STATE":{const{keys:r}=t,a=[r].flat();if(a.length===0)return e;const s=Object.keys(e.states),l=Wp(a,s);if(l.length===0)return e;const u={...e.states};return l.forEach(d=>{u[d]=ts()}),{...e,states:u}}case"RESET_STATE":{const r=[t.excludeKeys].flat(),a=Object.keys(e.states),s=Wp(r,a),l={};return a.forEach(u=>{l[u]=s.includes(u)?e.states[u]:ts()}),{...e,states:l}}default:return e}},rR=S.createContext(null),FV=({children:e})=>{const[t,n]=S.useReducer(HV,{states:{}}),r=f=>t.states[f]??ts(),a=(f,m)=>{n({type:"SET_QUERY_STATE",key:f,value:m})},s=(f,m)=>{n({type:"SET_QUERIES_STATE",keys:f,value:m})},l=(f,m)=>{n({type:"MAKE_QUERY_IN_ERROR",key:f,error:m})},u=f=>{n({type:"RESET_KEY_STATE",keys:f})},d=f=>{n({type:"RESET_STATE",excludeKeys:f})};return b.jsx(rR.Provider,{value:{getStates:r,setQueryState:a,setQueriesState:s,makeQueryInError:l,resetKeyState:u,resetState:d},children:e})},GV=()=>{const e=S.useContext(rR);if(!e)throw new Error("useAsyncState must be used within an AsyncStateProvider");return e},vd=new Map,KV=!1,ZV=!1,qV=!0,WV=!1,YV=1,XV=!1,QV=5*60*1e3,JV=5*60*1e3,ry=e=>e?Array.isArray(e)?e:[e]:[],AS=(e,t)=>ry(t).length>0?`${e}/${JSON.stringify(t)}`:e,zc=(e,t,n)=>{const r=(n==null?void 0:n.retryLimit)??YV,a=(n==null?void 0:n.autoFetch)??WV,s=(n==null?void 0:n.retryTime)??JV,l=(n==null?void 0:n.cache)??KV,u=(n==null?void 0:n.store)??ZV,d=(n==null?void 0:n.enable)??qV,f=(n==null?void 0:n.revalidation)??XV,m=(n==null?void 0:n.revalidateTime)??QV,g=(n==null?void 0:n.updateQueries)??[],v=(n==null?void 0:n.invalidateQueries)??[],E=n==null?void 0:n.onSuccess,y=n==null?void 0:n.onError,x=ry((n==null?void 0:n.args)??[]),{getStates:A,setQueryState:T,setQueriesState:w,makeQueryInError:C}=GV(),O=S.useRef(x),N=S.useRef(null),j=AS(e,O.current),{isFetched:D,fetchedDateTime:L,isLoading:z,isEnabled:U,error:fe,isSuccess:ie,isInvalidated:le,data:W,errorCount:ee}=A(j),H=async(...$)=>{const Q=AS(e,$);N.current&&N.current.abort();const ne=new AbortController;if(N.current=ne,vd.has(Q))return vd.get(Q);const he=(async()=>{T(Q,{isLoading:!0});let Ee=null;try{const ue=t(...$);if(!ue||typeof ue.then!="function")throw new Error("asyncFunction must return a Promise");const _e=await ue;Ee=_e,T(Q,{data:_e,errorCount:0,isLoading:!1,isFetched:!0,fetchedDateTime:new Date,isSuccess:!0,isInvalidated:!1,error:null}),E==null||E(_e),v.length>0&&w(v,{isInvalidated:!0}),g.length>0&&w(g,{data:_e}),u&&localStorage.setItem(Q,JSON.stringify(_e))}catch(ue){console.error({error:ue});const _e=ue instanceof Error?ue.message:String(ue);C(Q,_e),y==null||y(_e)}finally{vd.delete(Q)}return Ee})();return vd.set(Q,he),await he},re=async(...$)=>{if(!(!U||!d))return $&&(O.current=ry($)),await H(...O.current)},Z=async(...$)=>!U||!d||z?void 0:!le&&ie&&l&&W?W:await re(...$);S.useEffect(()=>{d!==U&&T(j,{isEnabled:U})},[d,U,j]),S.useEffect(()=>{if(!U||!d||!u||le||D||W)return;const $=localStorage.getItem(j);try{$&&T(j,{data:JSON.parse($)})}catch(Q){console.error(Q)}},[u,j,D,le,U,d,W]),S.useEffect(()=>{a&&(!U||!d||D&&!le||z||H(...O.current))},[a,U,d,D,le,z,H]),S.useEffect(()=>{const $=ee>0&&r>0,Q=ee>r;if(!U||!d||!$||Q||z||ie)return;const ne=setTimeout(()=>{H(...O.current)},s);return()=>clearTimeout(ne)},[U,ee,r,d,s,ie,z,H]),S.useEffect(()=>{if(!f||m<=0||!U||!d||z||!ie||!L)return;const $=setTimeout(()=>{H(...O.current)},m);return()=>clearTimeout($)},[f,m,ie,L,z,U,d,H]);const ve=$=>{T(j,{data:$})},P=()=>{N.current&&N.current.abort()},X={isFetched:D,isInvalidated:le,error:fe,data:W,errorCount:ee,isSuccess:ie,isEnabled:U,isDisabled:!U,isLoading:z,isWaitingData:z&&!D&&!W,isRevalidating:z&&D,[e]:Z,revalidate:re,setData:ve,abort:P};return S.useEffect(()=>()=>{N.current&&N.current.abort()},[]),X},eB=e=>{var u;const t=Gr(),r=Ff(void 0,e??t??qe),{data:a,isFetched:s}=zc("getCSRFToken",r.auth.getCSRFToken,{cache:!0,autoFetch:!0});return{csrfToken:(u=a==null?void 0:a.data)==null?void 0:u.csrf_token,csrfTokenFetched:s}},tB=e=>{const t=Gr(),n=e??t??qe,r=Ff(void 0,n),{data:a}=zc("getOAuth2AccessToken",r.auth.getOAuth2AccessToken,{cache:!0,autoFetch:!0,enable:!!(n.editor.clientId&&n.editor.clientSecret)});return{oAuth2AccessToken:a==null?void 0:a.data}},nB=(e,t)=>{const n=Gr(),a=Ff(void 0,t??n??qe),{getSession:s,revalidate:l,data:u,setData:d,isFetched:f}=zc("getSession",async()=>{try{const g=await a.auth.getSession();if(g.data){const{user:v,organization:E,project:y}=g.data;return{user:v,organization:E,isOrganizationAdmin:(v&&((E==null?void 0:E.adminsIds)??[]).includes(v._id))??!1,project:y,isProjectAdmin:(v&&((y==null?void 0:y.adminsIds)??[]).includes(v._id))??!1}}}catch(g){console.error(g)}return null},{cache:!0,store:!0,autoFetch:!0,enable:!e,invalidateQueries:["getOrganizations","getProjects","getUsers","getDictionaries"]});return{session:S.useMemo(()=>u??(f?null:void 0),[u,f]),fetchSession:s,revalidateSession:l,setSession:d}},Vc=({session:e,intlayerConfiguration:t}={})=>{const{csrfToken:n,csrfTokenFetched:r}=eB(t),{session:a,fetchSession:s,revalidateSession:l,setSession:u}=nB(e,t),{oAuth2AccessToken:d}=tB(t);return{session:a,fetchSession:s,setSession:u,revalidateSession:l,csrfToken:n,csrfTokenFetched:r,oAuth2AccessToken:d,isAuthenticated:!!(a!=null&&a.user||d),isProjectAdmin:a==null?void 0:a.isProjectAdmin,isOrganizationAdmin:a==null?void 0:a.isOrganizationAdmin}};function tt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function wS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eo(...e){return t=>{let n=!1;const r=e.map(a=>{const s=wS(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():wS(e[a],null)}}}}function At(...e){return S.useCallback(eo(...e),e)}function rB(e,t){const n=S.createContext(t),r=s=>{const{children:l,...u}=s,d=S.useMemo(()=>u,Object.values(u));return b.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(s){const l=S.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,a]}function Bc(e,t=[]){let n=[];function r(s,l){const u=S.createContext(l),d=n.length;n=[...n,l];const f=g=>{var T;const{scope:v,children:E,...y}=g,x=((T=v==null?void 0:v[e])==null?void 0:T[d])||u,A=S.useMemo(()=>y,Object.values(y));return b.jsx(x.Provider,{value:A,children:E})};f.displayName=s+"Provider";function m(g,v){var x;const E=((x=v==null?void 0:v[e])==null?void 0:x[d])||u,y=S.useContext(E);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${s}\``)}return[f,m]}const a=()=>{const s=n.map(l=>S.createContext(l));return function(u){const d=(u==null?void 0:u[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,iB(a,...t)]}function iB(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const g=d(s)[`__scope${f}`];return{...u,...g}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function vs(e){const t=oB(e),n=S.forwardRef((r,a)=>{const{children:s,...l}=r,u=S.Children.toArray(s),d=u.find(lB);if(d){const f=d.props.children,m=u.map(g=>g===d?S.Children.count(f)>1?S.Children.only(null):S.isValidElement(f)?f.props.children:null:g);return b.jsx(t,{...l,ref:a,children:S.isValidElement(f)?S.cloneElement(f,void 0,m):null})}return b.jsx(t,{...l,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}var aB=vs("Slot");function oB(e){const t=S.forwardRef((n,r)=>{const{children:a,...s}=n;if(S.isValidElement(a)){const l=uB(a),u=cB(s,a.props);return a.type!==S.Fragment&&(u.ref=r?eo(r,l):l),S.cloneElement(a,u)}return S.Children.count(a)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sB=Symbol("radix.slottable");function lB(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sB}function cB(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...u)=>{const d=s(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function uB(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function iR(e){const t=e+"CollectionProvider",[n,r]=Bc(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=x=>{const{scope:A,children:T}=x,w=Be.useRef(null),C=Be.useRef(new Map).current;return b.jsx(a,{scope:A,itemMap:C,collectionRef:w,children:T})};l.displayName=t;const u=e+"CollectionSlot",d=vs(u),f=Be.forwardRef((x,A)=>{const{scope:T,children:w}=x,C=s(u,T),O=At(A,C.collectionRef);return b.jsx(d,{ref:O,children:w})});f.displayName=u;const m=e+"CollectionItemSlot",g="data-radix-collection-item",v=vs(m),E=Be.forwardRef((x,A)=>{const{scope:T,children:w,...C}=x,O=Be.useRef(null),N=At(A,O),j=s(m,T);return Be.useEffect(()=>(j.itemMap.set(O,{ref:O,...C}),()=>void j.itemMap.delete(O))),b.jsx(v,{[g]:"",ref:N,children:w})});E.displayName=m;function y(x){const A=s(e+"CollectionConsumer",x);return Be.useCallback(()=>{const w=A.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${g}]`));return Array.from(A.itemMap.values()).sort((j,D)=>C.indexOf(j.ref.current)-C.indexOf(D.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:l,Slot:f,ItemSlot:E},y,r]}var dB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=dB.reduce((e,t)=>{const n=vs(`Primitive.${t}`),r=S.forwardRef((a,s)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(d,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function aR(e,t){e&&co.flushSync(()=>e.dispatchEvent(t))}function xr(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function fB(e,t=globalThis==null?void 0:globalThis.document){const n=xr(e);S.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hB="DismissableLayer",iy="dismissableLayer.update",mB="dismissableLayer.pointerDownOutside",pB="dismissableLayer.focusOutside",TS,oR=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qf=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...d}=e,f=S.useContext(oR),[m,g]=S.useState(null),v=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=S.useState({}),y=At(t,D=>g(D)),x=Array.from(f.layers),[A]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),T=x.indexOf(A),w=m?x.indexOf(m):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,O=w>=T,N=yB(D=>{const L=D.target,z=[...f.branches].some(U=>U.contains(L));!O||z||(a==null||a(D),l==null||l(D),D.defaultPrevented||u==null||u())},v),j=vB(D=>{const L=D.target;[...f.branches].some(U=>U.contains(L))||(s==null||s(D),l==null||l(D),D.defaultPrevented||u==null||u())},v);return fB(D=>{w===f.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))},v),S.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(TS=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),RS(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=TS)}},[m,v,n,f]),S.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),RS())},[m,f]),S.useEffect(()=>{const D=()=>E({});return document.addEventListener(iy,D),()=>document.removeEventListener(iy,D)},[]),b.jsx(We.div,{...d,ref:y,style:{pointerEvents:C?O?"auto":"none":void 0,...e.style},onFocusCapture:tt(e.onFocusCapture,j.onFocusCapture),onBlurCapture:tt(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:tt(e.onPointerDownCapture,N.onPointerDownCapture)})});Qf.displayName=hB;var gB="DismissableLayerBranch",sR=S.forwardRef((e,t)=>{const n=S.useContext(oR),r=S.useRef(null),a=At(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),b.jsx(We.div,{...e,ref:a})});sR.displayName=gB;function yB(e,t=globalThis==null?void 0:globalThis.document){const n=xr(e),r=S.useRef(!1),a=S.useRef(()=>{});return S.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let d=function(){lR(mB,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vB(e,t=globalThis==null?void 0:globalThis.document){const n=xr(e),r=S.useRef(!1);return S.useEffect(()=>{const a=s=>{s.target&&!r.current&&lR(pB,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function RS(){const e=new CustomEvent(iy);document.dispatchEvent(e)}function lR(e,t,n,{discrete:r}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?aR(a,s):a.dispatchEvent(s)}var bB=Qf,_B=sR,cn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},xB="Portal",Jf=S.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[a,s]=S.useState(!1);cn(()=>s(!0),[]);const l=n||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?yz.createPortal(b.jsx(We.div,{...r,ref:t}),l):null});Jf.displayName=xB;function EB(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Uc=e=>{const{present:t,children:n}=e,r=SB(t),a=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=At(r.ref,AB(a));return typeof n=="function"||r.isPresent?S.cloneElement(a,{ref:s}):null};Uc.displayName="Presence";function SB(e){const[t,n]=S.useState(),r=S.useRef(null),a=S.useRef(e),s=S.useRef("none"),l=e?"mounted":"unmounted",[u,d]=EB(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const f=bd(r.current);s.current=u==="mounted"?f:"none"},[u]),cn(()=>{const f=r.current,m=a.current;if(m!==e){const v=s.current,E=bd(f);e?d("MOUNT"):E==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(m&&v!==E?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),cn(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,g=E=>{const x=bd(r.current).includes(E.animationName);if(E.target===t&&x&&(d("ANIMATION_END"),!a.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},v=E=>{E.target===t&&(s.current=bd(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:S.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function bd(e){return(e==null?void 0:e.animationName)||"none"}function AB(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wB=YT[" useInsertionEffect ".trim().toString()]||cn;function df({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,s,l]=TB({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=S.useRef(e!==void 0);S.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 f=S.useCallback(m=>{var g;if(u){const v=RB(m)?m(e):m;v!==e&&((g=l.current)==null||g.call(l,v))}else s(m)},[u,e,s,l]);return[d,f]}function TB({defaultProp:e,onChange:t}){const[n,r]=S.useState(e),a=S.useRef(n),s=S.useRef(t);return wB(()=>{s.current=t},[t]),S.useEffect(()=>{var l;a.current!==n&&((l=s.current)==null||l.call(s,n),a.current=n)},[n,a]),[n,r,s]}function RB(e){return typeof e=="function"}var cR=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"}),CB="VisuallyHidden",Av=S.forwardRef((e,t)=>b.jsx(We.span,{...e,ref:t,style:{...cR,...e.style}}));Av.displayName=CB;var wv="ToastProvider",[Tv,NB,kB]=iR("Toast"),[uR,OB]=Bc("Toast",[kB]),[DB,eh]=uR(wv),Rv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:l}=e,[u,d]=S.useState(null),[f,m]=S.useState(0),g=S.useRef(!1),v=S.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wv}\`. Expected non-empty \`string\`.`),b.jsx(Tv.Provider,{scope:t,children:b.jsx(DB,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:s,toastCount:f,viewport:u,onViewportChange:d,onToastAdd:S.useCallback(()=>m(E=>E+1),[]),onToastRemove:S.useCallback(()=>m(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:v,children:l})})};Rv.displayName=wv;var dR="ToastViewport",IB=["F8"],ay="toast.viewportPause",oy="toast.viewportResume",Cv=S.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=IB,label:a="Notifications ({hotkey})",...s}=e,l=eh(dR,n),u=NB(n),d=S.useRef(null),f=S.useRef(null),m=S.useRef(null),g=S.useRef(null),v=At(t,g,l.onViewportChange),E=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=l.toastCount>0;S.useEffect(()=>{const A=T=>{var C;r.length!==0&&r.every(O=>T[O]||T.code===O)&&((C=g.current)==null||C.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[r]),S.useEffect(()=>{const A=d.current,T=g.current;if(y&&A&&T){const w=()=>{if(!l.isClosePausedRef.current){const j=new CustomEvent(ay);T.dispatchEvent(j),l.isClosePausedRef.current=!0}},C=()=>{if(l.isClosePausedRef.current){const j=new CustomEvent(oy);T.dispatchEvent(j),l.isClosePausedRef.current=!1}},O=j=>{!A.contains(j.relatedTarget)&&C()},N=()=>{A.contains(document.activeElement)||C()};return A.addEventListener("focusin",w),A.addEventListener("focusout",O),A.addEventListener("pointermove",w),A.addEventListener("pointerleave",N),window.addEventListener("blur",w),window.addEventListener("focus",C),()=>{A.removeEventListener("focusin",w),A.removeEventListener("focusout",O),A.removeEventListener("pointermove",w),A.removeEventListener("pointerleave",N),window.removeEventListener("blur",w),window.removeEventListener("focus",C)}}},[y,l.isClosePausedRef]);const x=S.useCallback(({tabbingDirection:A})=>{const w=u().map(C=>{const O=C.ref.current,N=[O,...KB(O)];return A==="forwards"?N:N.reverse()});return(A==="forwards"?w.reverse():w).flat()},[u]);return S.useEffect(()=>{const A=g.current;if(A){const T=w=>{var N,j,D;const C=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!C){const L=document.activeElement,z=w.shiftKey;if(w.target===A&&z){(N=f.current)==null||N.focus();return}const ie=x({tabbingDirection:z?"backwards":"forwards"}),le=ie.findIndex(W=>W===L);Yp(ie.slice(le+1))?w.preventDefault():z?(j=f.current)==null||j.focus():(D=m.current)==null||D.focus()}};return A.addEventListener("keydown",T),()=>A.removeEventListener("keydown",T)}},[u,x]),b.jsxs(_B,{ref:d,role:"region","aria-label":a.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&b.jsx(sy,{ref:f,onFocusFromOutsideViewport:()=>{const A=x({tabbingDirection:"forwards"});Yp(A)}}),b.jsx(Tv.Slot,{scope:n,children:b.jsx(We.ol,{tabIndex:-1,...s,ref:v})}),y&&b.jsx(sy,{ref:m,onFocusFromOutsideViewport:()=>{const A=x({tabbingDirection:"backwards"});Yp(A)}})]})});Cv.displayName=dR;var fR="ToastFocusProxy",sy=S.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,s=eh(fR,n);return b.jsx(Av,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var f;const u=l.relatedTarget;!((f=s.viewport)!=null&&f.contains(u))&&r()}})});sy.displayName=fR;var $c="Toast",LB="toast.swipeStart",jB="toast.swipeMove",MB="toast.swipeCancel",PB="toast.swipeEnd",Nv=S.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:s,...l}=e,[u,d]=df({prop:r,defaultProp:a??!0,onChange:s,caller:$c});return b.jsx(Uc,{present:n||u,children:b.jsx(BB,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:xr(e.onPause),onResume:xr(e.onResume),onSwipeStart:tt(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:tt(e.onSwipeMove,f=>{const{x:m,y:g}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:tt(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:tt(e.onSwipeEnd,f=>{const{x:m,y:g}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),d(!1)})})})});Nv.displayName=$c;var[zB,VB]=uR($c,{onClose(){}}),BB=S.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:s,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:v,onSwipeEnd:E,...y}=e,x=eh($c,n),[A,T]=S.useState(null),w=At(t,W=>T(W)),C=S.useRef(null),O=S.useRef(null),N=a||x.duration,j=S.useRef(0),D=S.useRef(N),L=S.useRef(0),{onToastAdd:z,onToastRemove:U}=x,fe=xr(()=>{var ee;(A==null?void 0:A.contains(document.activeElement))&&((ee=x.viewport)==null||ee.focus()),l()}),ie=S.useCallback(W=>{!W||W===1/0||(window.clearTimeout(L.current),j.current=new Date().getTime(),L.current=window.setTimeout(fe,W))},[fe]);S.useEffect(()=>{const W=x.viewport;if(W){const ee=()=>{ie(D.current),f==null||f()},H=()=>{const re=new Date().getTime()-j.current;D.current=D.current-re,window.clearTimeout(L.current),d==null||d()};return W.addEventListener(ay,H),W.addEventListener(oy,ee),()=>{W.removeEventListener(ay,H),W.removeEventListener(oy,ee)}}},[x.viewport,N,d,f,ie]),S.useEffect(()=>{s&&!x.isClosePausedRef.current&&ie(N)},[s,N,x.isClosePausedRef,ie]),S.useEffect(()=>(z(),()=>U()),[z,U]);const le=S.useMemo(()=>A?gR(A):null,[A]);return x.viewport?b.jsxs(b.Fragment,{children:[le&&b.jsx(UB,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:le}),b.jsx(zB,{scope:n,onClose:fe,children:co.createPortal(b.jsx(Tv.ItemSlot,{scope:n,children:b.jsx(bB,{asChild:!0,onEscapeKeyDown:tt(u,()=>{x.isFocusedToastEscapeKeyDownRef.current||fe(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(We.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":x.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:tt(e.onKeyDown,W=>{W.key==="Escape"&&(u==null||u(W.nativeEvent),W.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,fe()))}),onPointerDown:tt(e.onPointerDown,W=>{W.button===0&&(C.current={x:W.clientX,y:W.clientY})}),onPointerMove:tt(e.onPointerMove,W=>{if(!C.current)return;const ee=W.clientX-C.current.x,H=W.clientY-C.current.y,re=!!O.current,Z=["left","right"].includes(x.swipeDirection),ve=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,P=Z?ve(0,ee):0,X=Z?0:ve(0,H),$=W.pointerType==="touch"?10:2,Q={x:P,y:X},ne={originalEvent:W,delta:Q};re?(O.current=Q,_d(jB,g,ne,{discrete:!1})):CS(Q,x.swipeDirection,$)?(O.current=Q,_d(LB,m,ne,{discrete:!1}),W.target.setPointerCapture(W.pointerId)):(Math.abs(ee)>$||Math.abs(H)>$)&&(C.current=null)}),onPointerUp:tt(e.onPointerUp,W=>{const ee=O.current,H=W.target;if(H.hasPointerCapture(W.pointerId)&&H.releasePointerCapture(W.pointerId),O.current=null,C.current=null,ee){const re=W.currentTarget,Z={originalEvent:W,delta:ee};CS(ee,x.swipeDirection,x.swipeThreshold)?_d(PB,E,Z,{discrete:!0}):_d(MB,v,Z,{discrete:!0}),re.addEventListener("click",ve=>ve.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),UB=e=>{const{__scopeToast:t,children:n,...r}=e,a=eh($c,t),[s,l]=S.useState(!1),[u,d]=S.useState(!1);return FB(()=>l(!0)),S.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:b.jsx(Jf,{asChild:!0,children:b.jsx(Av,{...r,children:s&&b.jsxs(b.Fragment,{children:[a.label," ",n]})})})},$B="ToastTitle",kv=S.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(We.div,{...r,ref:t})});kv.displayName=$B;var HB="ToastDescription",Ov=S.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(We.div,{...r,ref:t})});Ov.displayName=HB;var hR="ToastAction",Dv=S.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(pR,{altText:n,asChild:!0,children:b.jsx(th,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${hR}\`. Expected non-empty \`string\`.`),null)});Dv.displayName=hR;var mR="ToastClose",th=S.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=VB(mR,n);return b.jsx(pR,{asChild:!0,children:b.jsx(We.button,{type:"button",...r,ref:t,onClick:tt(e.onClick,a.onClose)})})});th.displayName=mR;var pR=S.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return b.jsx(We.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function gR(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),GB(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...gR(r))}}),t}function _d(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?aR(a,s):a.dispatchEvent(s)}var CS=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),s=r>a;return t==="left"||t==="right"?s&&r>n:!s&&a>n};function FB(e=()=>{}){const t=xr(e);cn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function GB(e){return e.nodeType===e.ELEMENT_NODE}function KB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ZB=Rv,yR=Cv,vR=Nv,bR=kv,_R=Ov,qB=Dv,xR=th;const WB=Object.freeze(Object.defineProperty({__proto__:null,Action:qB,Close:xR,Description:_R,Provider:ZB,Root:vR,Title:bR,Toast:Nv,ToastAction:Dv,ToastClose:th,ToastDescription:Ov,ToastProvider:Rv,ToastTitle:kv,ToastViewport:Cv,Viewport:yR,createToastScope:OB},Symbol.toStringTag,{value:"Module"})),YB=WB,XB=({className:e,...t})=>b.jsx(yR,{className:Ae("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}),QB=cr("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"}}),JB=({className:e,variant:t,...n})=>b.jsx(vR,{className:Ae(QB({variant:t}),e),...n}),eU=({className:e,...t})=>b.jsx(xR,{className:Ae("text-text/50 hover:text-text/80 focus:outline-hidden absolute right-1 top-1 rounded-md p-1 opacity-0 transition-opacity focus:opacity-100 focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:b.jsx(uo,{className:"size-5"})}),tU=({className:e,...t})=>b.jsx(bR,{className:Ae("text-sm font-semibold [&+div]:text-xs",e),...t}),nU=({className:e,...t})=>b.jsx(_R,{className:Ae("text-sm opacity-90",e),...t}),rU=1,iU=15*60*1e3;let Xp=0;const aU=()=>(Xp=(Xp+1)%Number.MAX_SAFE_INTEGER,Xp.toString()),Qp=new Map,NS=e=>{if(Qp.has(e))return;const t=setTimeout(()=>{Qp.delete(e),tc({type:"REMOVE_TOAST",toastId:e})},iU);Qp.set(e,t)},oU=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,rU)};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?NS(n):e.toasts.forEach(r=>{NS(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)}}},Kd=[];let Zd={toasts:[]};const tc=e=>{Zd=oU(Zd,e),Kd.forEach(t=>{t(Zd)})},sU=({...e})=>{const t=aU(),n=a=>tc({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>tc({type:"DISMISS_TOAST",toastId:t});return tc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}},ER=()=>{const[e,t]=S.useState(Zd);return S.useEffect(()=>(Kd.push(t),()=>{const n=Kd.indexOf(t);n>-1&&Kd.splice(n,1)}),[e]),{...e,toast:sU,dismiss:n=>tc({type:"DISMISS_TOAST",toastId:n})}},Ar=e=>{const t=Gr(),{csrfToken:n,oAuth2AccessToken:r}=Vc(),a=n?{csrf_token:n}:void 0;return Ff({...r&&{headers:{Authorization:`Bearer ${r}`}},body:a},t)};var lU={};const cU=e=>e.split("_").join(" "),SR=e=>{const{toast:t}=ER();return{...e,onError:n=>{var a;let r;try{if(typeof n>"u")return;r=JSON.parse(n)}catch{r=n}[r].flatMap(s=>s).forEach(s=>t({title:cU((lU.NODE_ENV==="production"?s.title:s.code)??"Error"),description:s.message??n??"An error occurred",variant:"error"})),(a=e.onError)==null||a.call(e,n)},onSuccess:n=>{var r;n!=null&&n.message&&t({title:n.message,description:n.description,variant:"success"}),(r=e.onSuccess)==null||r.call(e,n)}}},uU=(e,{requireUser:t,requireProject:n,requireOrganization:r}={})=>{const a=Gr(),{csrfToken:s,oAuth2AccessToken:l,session:u}=Vc({intlayerConfiguration:a}),d=(e==null?void 0:e.enable)??!0,f=u?u.user:l==null?void 0:l.user,m=u?u.organization:l==null?void 0:l.organization,g=u?u.project:l==null?void 0:l.project;return{...e,enable:d&&(t?!!f:!0)&&(n?!!g:!0)&&(r?!!m:!0)&&(!!s||!u&&!!l)}},Ri=(e,t,n,r)=>{const a=uU(n??{},r),s=SR(a);return zc(e,t,s)},AR=(e,t,n)=>{const r=SR(n??{});return zc(e,t,r)},dU=e=>Ri("logout",Ar().auth.logout,{invalidateQueries:["getSession"],...e}),fU=e=>Ri("getProjects",Ar().project.getProjects,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),hU=e=>Ri("getDictionaries",Ar().dictionary.getDictionaries,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0,requireProject:!0}),mU=e=>Ri("pushDictionaries",Ar().dictionary.pushDictionaries,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),pU=e=>Ri("deleteDictionary",Ar().dictionary.deleteDictionary,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),gU=e=>Ri("getTags",Ar().tag.getTags,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),yU=e=>Ri("auditContentDeclaration",Ar().ai.auditContentDeclarationMetadata,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),vU=e=>Ri("auditContentDeclarationField",Ar().ai.auditContentDeclarationField,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),bU=e=>Ri("autocomplete",Ar().ai.autocomplete,e),_U=e=>AR("writeDictionary",Ar().editor.writeDictionary,e),xU=e=>AR("getDictionaries",Ar().editor.getDictionaries,{store:!0,cache:!0,...e});var Jp,kS;function EU(){if(kS)return Jp;kS=1;var e=function(w){return t(w)&&!n(w)};function t(T){return!!T&&typeof T=="object"}function n(T){var w=Object.prototype.toString.call(T);return w==="[object RegExp]"||w==="[object Date]"||s(T)}var r=typeof Symbol=="function"&&Symbol.for,a=r?Symbol.for("react.element"):60103;function s(T){return T.$$typeof===a}function l(T){return Array.isArray(T)?[]:{}}function u(T,w){return w.clone!==!1&&w.isMergeableObject(T)?x(l(T),T,w):T}function d(T,w,C){return T.concat(w).map(function(O){return u(O,C)})}function f(T,w){if(!w.customMerge)return x;var C=w.customMerge(T);return typeof C=="function"?C:x}function m(T){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(T).filter(function(w){return Object.propertyIsEnumerable.call(T,w)}):[]}function g(T){return Object.keys(T).concat(m(T))}function v(T,w){try{return w in T}catch{return!1}}function E(T,w){return v(T,w)&&!(Object.hasOwnProperty.call(T,w)&&Object.propertyIsEnumerable.call(T,w))}function y(T,w,C){var O={};return C.isMergeableObject(T)&&g(T).forEach(function(N){O[N]=u(T[N],C)}),g(w).forEach(function(N){E(T,N)||(v(T,N)&&C.isMergeableObject(w[N])?O[N]=f(N,C)(T[N],w[N],C):O[N]=u(w[N],C))}),O}function x(T,w,C){C=C||{},C.arrayMerge=C.arrayMerge||d,C.isMergeableObject=C.isMergeableObject||e,C.cloneUnlessOtherwiseSpecified=u;var O=Array.isArray(w),N=Array.isArray(T),j=O===N;return j?O?C.arrayMerge(T,w,C):y(T,w,C):u(w,C)}x.all=function(w,C){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(O,N){return x(O,N,C)},{})};var A=x;return Jp=A,Jp}var SU=EU();const AU=Hf(SU),wU={},OS=e=>{let t;const n=new Set,r=(m,g)=>{const v=typeof m=="function"?m(t):m;if(!Object.is(v,t)){const E=t;t=g??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(y=>y(t,E))}},a=()=>t,d={setState:r,getState:a,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(wU?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,a,d);return d},TU=e=>e?OS(e):OS;var eg={exports:{}},tg={},ng={exports:{}},rg={};/**
194
- * @license React
195
- * use-sync-external-store-shim.production.js
196
- *
197
- * Copyright (c) Meta Platforms, Inc. and affiliates.
198
- *
199
- * This source code is licensed under the MIT license found in the
200
- * LICENSE file in the root directory of this source tree.
201
- */var DS;function RU(){if(DS)return rg;DS=1;var e=Ic();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,a=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function u(g,v){var E=v(),y=r({inst:{value:E,getSnapshot:v}}),x=y[0].inst,A=y[1];return s(function(){x.value=E,x.getSnapshot=v,d(x)&&A({inst:x})},[g,E,v]),a(function(){return d(x)&&A({inst:x}),g(function(){d(x)&&A({inst:x})})},[g]),l(E),E}function d(g){var v=g.getSnapshot;g=g.value;try{var E=v();return!n(g,E)}catch{return!0}}function f(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return rg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,rg}var IS;function CU(){return IS||(IS=1,ng.exports=RU()),ng.exports}/**
202
- * @license React
203
- * use-sync-external-store-shim/with-selector.production.js
204
- *
205
- * Copyright (c) Meta Platforms, Inc. and affiliates.
206
- *
207
- * This source code is licensed under the MIT license found in the
208
- * LICENSE file in the root directory of this source tree.
209
- */var LS;function NU(){if(LS)return tg;LS=1;var e=Ic(),t=CU();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return tg.useSyncExternalStoreWithSelector=function(f,m,g,v,E){var y=s(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=u(function(){function T(j){if(!w){if(w=!0,C=j,j=v(j),E!==void 0&&x.hasValue){var D=x.value;if(E(D,j))return O=D}return O=j}if(D=O,r(C,j))return D;var L=v(j);return E!==void 0&&E(D,L)?(C=j,D):(C=j,O=L)}var w=!1,C,O,N=g===void 0?null:g;return[function(){return T(m())},N===null?void 0:function(){return T(N())}]},[m,g,v,E]);var A=a(f,y[0],y[1]);return l(function(){x.hasValue=!0,x.value=A},[A]),d(A),A},tg}var jS;function kU(){return jS||(jS=1,eg.exports=NU()),eg.exports}var OU=kU();const DU=Hf(OU),wR={},{useDebugValue:IU}=Be,{useSyncExternalStoreWithSelector:LU}=DU;let MS=!1;const jU=e=>e;function MU(e,t=jU,n){(wR?"production":void 0)!=="production"&&n&&!MS&&(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"),MS=!0);const r=LU(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return IU(r),r}const PS=e=>{(wR?"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"?TU(e):e,n=(r,a)=>MU(t,r,a);return Object.assign(n,t),n},TR=e=>e?PS(e):PS,PU=TR((e,t)=>({scrollBlockers:[],addBlockage:(n,r)=>e(a=>{const s=a.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(f=>f.element===r?{...f,blockers:d}:f)}}return r.style.overflowY="hidden",r.style.overflowX="hidden",{scrollBlockers:[...s,{element:r,blockers:[n]}]}}),removeBlockage:(n,r)=>e(a=>{const s=a.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)})),zU=()=>{const{session:e,revalidateSession:t,setSession:n}=Vc(),{logout:r}=dU(),a=e!=null&&e.user?"authenticated":"unauthenticated",s=a==="authenticated",l=a==="unauthenticated",u=e==null?void 0:e.user;return{isAuthenticated:s,isUnauthenticated:l,user:u,revalidateSession:t,logout:async()=>{n(null),await r()}}};var Hc=e=>e.type==="checkbox",qa=e=>e instanceof Date,_n=e=>e==null;const RR=e=>typeof e=="object";var It=e=>!_n(e)&&!Array.isArray(e)&&RR(e)&&!qa(e),CR=e=>It(e)&&e.target?Hc(e.target)?e.target.checked:e.target.value:e,VU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,NR=(e,t)=>e.has(VU(t)),BU=e=>{const t=e.constructor&&e.constructor.prototype;return It(t)&&t.hasOwnProperty("isPrototypeOf")},Iv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function sn(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Iv&&(e instanceof Blob||r))&&(n||It(e)))if(t=n?[]:{},!n&&!BU(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=sn(e[a]));else return e;return t}var nh=e=>/^\w*$/.test(e),Dt=e=>e===void 0,Lv=e=>Array.isArray(e)?e.filter(Boolean):[],jv=e=>Lv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Se=(e,t,n)=>{if(!t||!It(e))return n;const r=(nh(t)?[t]:jv(t)).reduce((a,s)=>_n(a)?a:a[s],e);return Dt(r)||r===e?Dt(e[t])?n:e[t]:r},zn=e=>typeof e=="boolean",st=(e,t,n)=>{let r=-1;const a=nh(t)?[t]:jv(t),s=a.length,l=s-1;for(;++r<s;){const u=a[r];let d=n;if(r!==l){const f=e[u];d=It(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const ff={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},br={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Mv=Be.createContext(null);Mv.displayName="HookFormContext";const da=()=>Be.useContext(Mv),UU=e=>{const{children:t,...n}=e;return Be.createElement(Mv.Provider,{value:n},t)};var kR=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(a,s,{get:()=>{const l=s;return t._proxyFormState[l]!==br.all&&(t._proxyFormState[l]=!r||br.all),n&&(n[l]=!0),e[l]}});return a};const Pv=typeof window<"u"?S.useLayoutEffect:S.useEffect;function $U(e){const t=da(),{control:n=t.control,disabled:r,name:a,exact:s}=e||{},[l,u]=Be.useState(n._formState),d=Be.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pv(()=>n._subscribe({name:a,formState:d.current,exact:s,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,s]),Be.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),Be.useMemo(()=>kR(l,n,d.current,!1),[l,n])}var jr=e=>typeof e=="string",OR=(e,t,n,r,a)=>jr(e)?(r&&t.watch.add(e),Se(n,e,a)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Se(n,s))):(r&&(t.watchAll=!0),n);function HU(e){const t=da(),{control:n=t.control,name:r,defaultValue:a,disabled:s,exact:l}=e||{},u=Be.useRef(a),[d,f]=Be.useState(n._getWatch(r,u.current));return Pv(()=>n._subscribe({name:r,formState:{values:!0},exact:l,callback:m=>!s&&f(OR(r,n._names,m.values||n._formValues,!1,u.current))}),[r,n,s,l]),Be.useEffect(()=>n._removeUnmounted()),d}function FU(e){const t=da(),{name:n,disabled:r,control:a=t.control,shouldUnregister:s}=e,l=NR(a._names.array,n),u=HU({control:a,name:n,defaultValue:Se(a._formValues,n,Se(a._defaultValues,n,e.defaultValue)),exact:!0}),d=$U({control:a,name:n,exact:!0}),f=Be.useRef(e),m=Be.useRef(a.register(n,{...e.rules,value:u,...zn(e.disabled)?{disabled:e.disabled}:{}})),g=Be.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Se(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Se(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Se(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Se(d.validatingFields,n)},error:{enumerable:!0,get:()=>Se(d.errors,n)}}),[d,n]),v=Be.useCallback(A=>m.current.onChange({target:{value:CR(A),name:n},type:ff.CHANGE}),[n]),E=Be.useCallback(()=>m.current.onBlur({target:{value:Se(a._formValues,n),name:n},type:ff.BLUR}),[n,a._formValues]),y=Be.useCallback(A=>{const T=Se(a._fields,n);T&&A&&(T._f.ref={focus:()=>A.focus&&A.focus(),select:()=>A.select&&A.select(),setCustomValidity:w=>A.setCustomValidity(w),reportValidity:()=>A.reportValidity()})},[a._fields,n]),x=Be.useMemo(()=>({name:n,value:u,...zn(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:v,onBlur:E,ref:y}),[n,r,d.disabled,v,E,y,u]);return Be.useEffect(()=>{const A=a._options.shouldUnregister||s;a.register(n,{...f.current.rules,...zn(f.current.disabled)?{disabled:f.current.disabled}:{}});const T=(w,C)=>{const O=Se(a._fields,w);O&&O._f&&(O._f.mount=C)};if(T(n,!0),A){const w=sn(Se(a._options.defaultValues,n));st(a._defaultValues,n,w),Dt(Se(a._formValues,n))&&st(a._formValues,n,w)}return!l&&a.register(n),()=>{(l?A&&!a._state.action:A)?a.unregister(n):T(n,!1)}},[n,a,l,s]),Be.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),Be.useMemo(()=>({field:x,formState:d,fieldState:g}),[x,d,g])}const GU=e=>e.render(FU(e));var zv=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},nc=e=>Array.isArray(e)?e:[e],zS=()=>{let e=[];return{get observers(){return e},next:a=>{for(const s of e)s.next&&s.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(s=>s!==a)}}),unsubscribe:()=>{e=[]}}},ly=e=>_n(e)||!RR(e);function ta(e,t){if(ly(e)||ly(t))return e===t;if(qa(e)&&qa(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const s=e[a];if(!r.includes(a))return!1;if(a!=="ref"){const l=t[a];if(qa(s)&&qa(l)||It(s)&&It(l)||Array.isArray(s)&&Array.isArray(l)?!ta(s,l):s!==l)return!1}}return!0}var Cn=e=>It(e)&&!Object.keys(e).length,Vv=e=>e.type==="file",_r=e=>typeof e=="function",hf=e=>{if(!Iv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},DR=e=>e.type==="select-multiple",Bv=e=>e.type==="radio",KU=e=>Bv(e)||Hc(e),ig=e=>hf(e)&&e.isConnected;function ZU(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Dt(e)?r++:e[t[r++]];return e}function qU(e){for(const t in e)if(e.hasOwnProperty(t)&&!Dt(e[t]))return!1;return!0}function Ft(e,t){const n=Array.isArray(t)?t:nh(t)?[t]:jv(t),r=n.length===1?e:ZU(e,n),a=n.length-1,s=n[a];return r&&delete r[s],a!==0&&(It(r)&&Cn(r)||Array.isArray(r)&&qU(r))&&Ft(e,n.slice(0,-1)),e}var IR=e=>{for(const t in e)if(_r(e[t]))return!0;return!1};function mf(e,t={}){const n=Array.isArray(e);if(It(e)||n)for(const r in e)Array.isArray(e[r])||It(e[r])&&!IR(e[r])?(t[r]=Array.isArray(e[r])?[]:{},mf(e[r],t[r])):_n(e[r])||(t[r]=!0);return t}function LR(e,t,n){const r=Array.isArray(e);if(It(e)||r)for(const a in e)Array.isArray(e[a])||It(e[a])&&!IR(e[a])?Dt(t)||ly(n[a])?n[a]=Array.isArray(e[a])?mf(e[a],[]):{...mf(e[a])}:LR(e[a],_n(t)?{}:t[a],n[a]):n[a]=!ta(e[a],t[a]);return n}var $l=(e,t)=>LR(e,t,mf(t));const VS={value:!1,isValid:!1},BS={value:!0,isValid:!0};var jR=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&&!Dt(e[0].attributes.value)?Dt(e[0].value)||e[0].value===""?BS:{value:e[0].value,isValid:!0}:BS:VS}return VS},MR=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Dt(e)?e:t?e===""?NaN:e&&+e:n&&jr(e)?new Date(e):r?r(e):e;const US={isValid:!1,value:null};var PR=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,US):US;function $S(e){const t=e.ref;return Vv(t)?t.files:Bv(t)?PR(e.refs).value:DR(t)?[...t.selectedOptions].map(({value:n})=>n):Hc(t)?jR(e.refs).value:MR(Dt(t.value)?e.ref.value:t.value,e)}var WU=(e,t,n,r)=>{const a={};for(const s of e){const l=Se(t,s);l&&st(a,s,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},pf=e=>e instanceof RegExp,Hl=e=>Dt(e)?e:pf(e)?e.source:It(e)?pf(e.value)?e.value.source:e.value:e,HS=e=>({isOnSubmit:!e||e===br.onSubmit,isOnBlur:e===br.onBlur,isOnChange:e===br.onChange,isOnAll:e===br.all,isOnTouch:e===br.onTouched});const FS="AsyncFunction";var YU=e=>!!e&&!!e.validate&&!!(_r(e.validate)&&e.validate.constructor.name===FS||It(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===FS)),XU=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),GS=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const rc=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const s=Se(e,a);if(s){const{_f:l,...u}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(rc(u,t))break}else if(It(u)&&rc(u,t))break}}};function KS(e,t,n){const r=Se(e,n);if(r||nh(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const s=a.join("."),l=Se(t,s),u=Se(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};a.pop()}return{name:n}}var QU=(e,t,n,r)=>{n(e);const{name:a,...s}=e;return Cn(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===(!r||br.all))},JU=(e,t,n)=>!e||!t||e===t||nc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),e2=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,t2=(e,t)=>!Lv(Se(e,t)).length&&Ft(e,t),n2=(e,t,n)=>{const r=nc(Se(e,n));return st(r,"root",t[n]),st(e,n,r),e},qd=e=>jr(e);function ZS(e,t,n="validate"){if(qd(e)||Array.isArray(e)&&e.every(qd)||zn(e)&&!e)return{type:n,message:qd(e)?e:"",ref:t}}var Xo=e=>It(e)&&!pf(e)?e:{value:e,message:""},qS=async(e,t,n,r,a,s)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:m,min:g,max:v,pattern:E,validate:y,name:x,valueAsNumber:A,mount:T}=e._f,w=Se(n,x);if(!T||t.has(x))return{};const C=u?u[0]:l,O=ie=>{a&&C.reportValidity&&(C.setCustomValidity(zn(ie)?"":ie||""),C.reportValidity())},N={},j=Bv(l),D=Hc(l),L=j||D,z=(A||Vv(l))&&Dt(l.value)&&Dt(w)||hf(l)&&l.value===""||w===""||Array.isArray(w)&&!w.length,U=zv.bind(null,x,r,N),fe=(ie,le,W,ee=gi.maxLength,H=gi.minLength)=>{const re=ie?le:W;N[x]={type:ie?ee:H,message:re,ref:l,...U(ie?ee:H,re)}};if(s?!Array.isArray(w)||!w.length:d&&(!L&&(z||_n(w))||zn(w)&&!w||D&&!jR(u).isValid||j&&!PR(u).isValid)){const{value:ie,message:le}=qd(d)?{value:!!d,message:d}:Xo(d);if(ie&&(N[x]={type:gi.required,message:le,ref:C,...U(gi.required,le)},!r))return O(le),N}if(!z&&(!_n(g)||!_n(v))){let ie,le;const W=Xo(v),ee=Xo(g);if(!_n(w)&&!isNaN(w)){const H=l.valueAsNumber||w&&+w;_n(W.value)||(ie=H>W.value),_n(ee.value)||(le=H<ee.value)}else{const H=l.valueAsDate||new Date(w),re=P=>new Date(new Date().toDateString()+" "+P),Z=l.type=="time",ve=l.type=="week";jr(W.value)&&w&&(ie=Z?re(w)>re(W.value):ve?w>W.value:H>new Date(W.value)),jr(ee.value)&&w&&(le=Z?re(w)<re(ee.value):ve?w<ee.value:H<new Date(ee.value))}if((ie||le)&&(fe(!!ie,W.message,ee.message,gi.max,gi.min),!r))return O(N[x].message),N}if((f||m)&&!z&&(jr(w)||s&&Array.isArray(w))){const ie=Xo(f),le=Xo(m),W=!_n(ie.value)&&w.length>+ie.value,ee=!_n(le.value)&&w.length<+le.value;if((W||ee)&&(fe(W,ie.message,le.message),!r))return O(N[x].message),N}if(E&&!z&&jr(w)){const{value:ie,message:le}=Xo(E);if(pf(ie)&&!w.match(ie)&&(N[x]={type:gi.pattern,message:le,ref:l,...U(gi.pattern,le)},!r))return O(le),N}if(y){if(_r(y)){const ie=await y(w,n),le=ZS(ie,C);if(le&&(N[x]={...le,...U(gi.validate,le.message)},!r))return O(le.message),N}else if(It(y)){let ie={};for(const le in y){if(!Cn(ie)&&!r)break;const W=ZS(await y[le](w,n),C,le);W&&(ie={...W,...U(le,W.message)},O(W.message),r&&(N[x]=ie))}if(!Cn(ie)&&(N[x]={ref:C,...ie},!r))return N}}return O(!0),N};const r2={mode:br.onSubmit,reValidateMode:br.onChange,shouldFocusError:!0};function i2(e={}){let t={...r2,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:_r(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let a=It(t.defaultValues)||It(t.values)?sn(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:sn(a),l={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let g={...m};const v={array:zS(),state:zS()},E=t.criteriaMode===br.all,y=B=>J=>{clearTimeout(f),f=setTimeout(B,J)},x=async B=>{if(!t.disabled&&(m.isValid||g.isValid||B)){const J=t.resolver?Cn((await D()).errors):await z(r,!0);J!==n.isValid&&v.state.next({isValid:J})}},A=(B,J)=>{!t.disabled&&(m.isValidating||m.validatingFields||g.isValidating||g.validatingFields)&&((B||Array.from(u.mount)).forEach(se=>{se&&(J?st(n.validatingFields,se,J):Ft(n.validatingFields,se))}),v.state.next({validatingFields:n.validatingFields,isValidating:!Cn(n.validatingFields)}))},T=(B,J=[],se,we,be=!0,xe=!0)=>{if(we&&se&&!t.disabled){if(l.action=!0,xe&&Array.isArray(Se(r,B))){const Le=se(Se(r,B),we.argA,we.argB);be&&st(r,B,Le)}if(xe&&Array.isArray(Se(n.errors,B))){const Le=se(Se(n.errors,B),we.argA,we.argB);be&&st(n.errors,B,Le),t2(n.errors,B)}if((m.touchedFields||g.touchedFields)&&xe&&Array.isArray(Se(n.touchedFields,B))){const Le=se(Se(n.touchedFields,B),we.argA,we.argB);be&&st(n.touchedFields,B,Le)}(m.dirtyFields||g.dirtyFields)&&(n.dirtyFields=$l(a,s)),v.state.next({name:B,isDirty:fe(B,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else st(s,B,J)},w=(B,J)=>{st(n.errors,B,J),v.state.next({errors:n.errors})},C=B=>{n.errors=B,v.state.next({errors:n.errors,isValid:!1})},O=(B,J,se,we)=>{const be=Se(r,B);if(be){const xe=Se(s,B,Dt(se)?Se(a,B):se);Dt(xe)||we&&we.defaultChecked||J?st(s,B,J?xe:$S(be._f)):W(B,xe),l.mount&&x()}},N=(B,J,se,we,be)=>{let xe=!1,Le=!1;const rt={name:B};if(!t.disabled){if(!se||we){(m.isDirty||g.isDirty)&&(Le=n.isDirty,n.isDirty=rt.isDirty=fe(),xe=Le!==rt.isDirty);const ot=ta(Se(a,B),J);Le=!!Se(n.dirtyFields,B),ot?Ft(n.dirtyFields,B):st(n.dirtyFields,B,!0),rt.dirtyFields=n.dirtyFields,xe=xe||(m.dirtyFields||g.dirtyFields)&&Le!==!ot}if(se){const ot=Se(n.touchedFields,B);ot||(st(n.touchedFields,B,se),rt.touchedFields=n.touchedFields,xe=xe||(m.touchedFields||g.touchedFields)&&ot!==se)}xe&&be&&v.state.next(rt)}return xe?rt:{}},j=(B,J,se,we)=>{const be=Se(n.errors,B),xe=(m.isValid||g.isValid)&&zn(J)&&n.isValid!==J;if(t.delayError&&se?(d=y(()=>w(B,se)),d(t.delayError)):(clearTimeout(f),d=null,se?st(n.errors,B,se):Ft(n.errors,B)),(se?!ta(be,se):be)||!Cn(we)||xe){const Le={...we,...xe&&zn(J)?{isValid:J}:{},errors:n.errors,name:B};n={...n,...Le},v.state.next(Le)}},D=async B=>{A(B,!0);const J=await t.resolver(s,t.context,WU(B||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return A(B),J},L=async B=>{const{errors:J}=await D(B);if(B)for(const se of B){const we=Se(J,se);we?st(n.errors,se,we):Ft(n.errors,se)}else n.errors=J;return J},z=async(B,J,se={valid:!0})=>{for(const we in B){const be=B[we];if(be){const{_f:xe,...Le}=be;if(xe){const rt=u.array.has(xe.name),ot=be._f&&YU(be._f);ot&&m.validatingFields&&A([we],!0);const An=await qS(be,u.disabled,s,E,t.shouldUseNativeValidation&&!J,rt);if(ot&&m.validatingFields&&A([we]),An[xe.name]&&(se.valid=!1,J))break;!J&&(Se(An,xe.name)?rt?n2(n.errors,An,xe.name):st(n.errors,xe.name,An[xe.name]):Ft(n.errors,xe.name))}!Cn(Le)&&await z(Le,J,se)}}return se.valid},U=()=>{for(const B of u.unMount){const J=Se(r,B);J&&(J._f.refs?J._f.refs.every(se=>!ig(se)):!ig(J._f.ref))&&ue(B)}u.unMount=new Set},fe=(B,J)=>!t.disabled&&(B&&J&&st(s,B,J),!ta(P(),a)),ie=(B,J,se)=>OR(B,u,{...l.mount?s:Dt(J)?a:jr(B)?{[B]:J}:J},se,J),le=B=>Lv(Se(l.mount?s:a,B,t.shouldUnregister?Se(a,B,[]):[])),W=(B,J,se={})=>{const we=Se(r,B);let be=J;if(we){const xe=we._f;xe&&(!xe.disabled&&st(s,B,MR(J,xe)),be=hf(xe.ref)&&_n(J)?"":J,DR(xe.ref)?[...xe.ref.options].forEach(Le=>Le.selected=be.includes(Le.value)):xe.refs?Hc(xe.ref)?xe.refs.forEach(Le=>{(!Le.defaultChecked||!Le.disabled)&&(Array.isArray(be)?Le.checked=!!be.find(rt=>rt===Le.value):Le.checked=be===Le.value||!!be)}):xe.refs.forEach(Le=>Le.checked=Le.value===be):Vv(xe.ref)?xe.ref.value="":(xe.ref.value=be,xe.ref.type||v.state.next({name:B,values:sn(s)})))}(se.shouldDirty||se.shouldTouch)&&N(B,be,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&ve(B)},ee=(B,J,se)=>{for(const we in J){if(!J.hasOwnProperty(we))return;const be=J[we],xe=B+"."+we,Le=Se(r,xe);(u.array.has(B)||It(be)||Le&&!Le._f)&&!qa(be)?ee(xe,be,se):W(xe,be,se)}},H=(B,J,se={})=>{const we=Se(r,B),be=u.array.has(B),xe=sn(J);st(s,B,xe),be?(v.array.next({name:B,values:sn(s)}),(m.isDirty||m.dirtyFields||g.isDirty||g.dirtyFields)&&se.shouldDirty&&v.state.next({name:B,dirtyFields:$l(a,s),isDirty:fe(B,xe)})):we&&!we._f&&!_n(xe)?ee(B,xe,se):W(B,xe,se),GS(B,u)&&v.state.next({...n}),v.state.next({name:l.mount?B:void 0,values:sn(s)})},re=async B=>{l.mount=!0;const J=B.target;let se=J.name,we=!0;const be=Se(r,se),xe=ot=>{we=Number.isNaN(ot)||qa(ot)&&isNaN(ot.getTime())||ta(ot,Se(s,se,ot))},Le=HS(t.mode),rt=HS(t.reValidateMode);if(be){let ot,An;const _a=J.type?$S(be._f):CR(B),Tr=B.type===ff.BLUR||B.type===ff.FOCUS_OUT,kh=!XU(be._f)&&!t.resolver&&!Se(n.errors,se)&&!be._f.deps||e2(Tr,Se(n.touchedFields,se),n.isSubmitted,rt,Le),Yr=GS(se,u,Tr);st(s,se,_a),Tr?(be._f.onBlur&&be._f.onBlur(B),d&&d(0)):be._f.onChange&&be._f.onChange(B);const tn=N(se,_a,Tr),Oh=!Cn(tn)||Yr;if(!Tr&&v.state.next({name:se,type:B.type,values:sn(s)}),kh)return(m.isValid||g.isValid)&&(t.mode==="onBlur"?Tr&&x():Tr||x()),Oh&&v.state.next({name:se,...Yr?{}:tn});if(!Tr&&Yr&&v.state.next({...n}),t.resolver){const{errors:fr}=await D([se]);if(xe(_a),we){const yn=KS(n.errors,r,se),nu=KS(fr,r,yn.name||se);ot=nu.error,se=nu.name,An=Cn(fr)}}else A([se],!0),ot=(await qS(be,u.disabled,s,E,t.shouldUseNativeValidation))[se],A([se]),xe(_a),we&&(ot?An=!1:(m.isValid||g.isValid)&&(An=await z(r,!0)));we&&(be._f.deps&&ve(be._f.deps),j(se,An,ot,tn))}},Z=(B,J)=>{if(Se(n.errors,J)&&B.focus)return B.focus(),1},ve=async(B,J={})=>{let se,we;const be=nc(B);if(t.resolver){const xe=await L(Dt(B)?B:be);se=Cn(xe),we=B?!be.some(Le=>Se(xe,Le)):se}else B?(we=(await Promise.all(be.map(async xe=>{const Le=Se(r,xe);return await z(Le&&Le._f?{[xe]:Le}:Le)}))).every(Boolean),!(!we&&!n.isValid)&&x()):we=se=await z(r);return v.state.next({...!jr(B)||(m.isValid||g.isValid)&&se!==n.isValid?{}:{name:B},...t.resolver||!B?{isValid:se}:{},errors:n.errors}),J.shouldFocus&&!we&&rc(r,Z,B?be:u.mount),we},P=B=>{const J={...l.mount?s:a};return Dt(B)?J:jr(B)?Se(J,B):B.map(se=>Se(J,se))},X=(B,J)=>({invalid:!!Se((J||n).errors,B),isDirty:!!Se((J||n).dirtyFields,B),error:Se((J||n).errors,B),isValidating:!!Se(n.validatingFields,B),isTouched:!!Se((J||n).touchedFields,B)}),$=B=>{B&&nc(B).forEach(J=>Ft(n.errors,J)),v.state.next({errors:B?n.errors:{}})},Q=(B,J,se)=>{const we=(Se(r,B,{_f:{}})._f||{}).ref,be=Se(n.errors,B)||{},{ref:xe,message:Le,type:rt,...ot}=be;st(n.errors,B,{...ot,...J,ref:we}),v.state.next({name:B,errors:n.errors,isValid:!1}),se&&se.shouldFocus&&we&&we.focus&&we.focus()},ne=(B,J)=>_r(B)?v.state.subscribe({next:se=>B(ie(void 0,J),se)}):ie(B,J,!0),he=B=>v.state.subscribe({next:J=>{JU(B.name,J.name,B.exact)&&QU(J,B.formState||m,ur,B.reRenderRoot)&&B.callback({values:{...s},...n,...J})}}).unsubscribe,Ee=B=>(l.mount=!0,g={...g,...B.formState},he({...B,formState:g})),ue=(B,J={})=>{for(const se of B?nc(B):u.mount)u.mount.delete(se),u.array.delete(se),J.keepValue||(Ft(r,se),Ft(s,se)),!J.keepError&&Ft(n.errors,se),!J.keepDirty&&Ft(n.dirtyFields,se),!J.keepTouched&&Ft(n.touchedFields,se),!J.keepIsValidating&&Ft(n.validatingFields,se),!t.shouldUnregister&&!J.keepDefaultValue&&Ft(a,se);v.state.next({values:sn(s)}),v.state.next({...n,...J.keepDirty?{isDirty:fe()}:{}}),!J.keepIsValid&&x()},_e=({disabled:B,name:J})=>{(zn(B)&&l.mount||B||u.disabled.has(J))&&(B?u.disabled.add(J):u.disabled.delete(J))},Oe=(B,J={})=>{let se=Se(r,B);const we=zn(J.disabled)||zn(t.disabled);return st(r,B,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:B}},name:B,mount:!0,...J}}),u.mount.add(B),se?_e({disabled:zn(J.disabled)?J.disabled:t.disabled,name:B}):O(B,!0,J.value),{...we?{disabled:J.disabled||t.disabled}:{},...t.progressive?{required:!!J.required,min:Hl(J.min),max:Hl(J.max),minLength:Hl(J.minLength),maxLength:Hl(J.maxLength),pattern:Hl(J.pattern)}:{},name:B,onChange:re,onBlur:re,ref:be=>{if(be){Oe(B,J),se=Se(r,B);const xe=Dt(be.value)&&be.querySelectorAll&&be.querySelectorAll("input,select,textarea")[0]||be,Le=KU(xe),rt=se._f.refs||[];if(Le?rt.find(ot=>ot===xe):xe===se._f.ref)return;st(r,B,{_f:{...se._f,...Le?{refs:[...rt.filter(ig),xe,...Array.isArray(Se(a,B))?[{}]:[]],ref:{type:xe.type,name:B}}:{ref:xe}}}),O(B,!1,void 0,xe)}else se=Se(r,B,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(NR(u.array,B)&&l.action)&&u.unMount.add(B)}}},Re=()=>t.shouldFocusError&&rc(r,Z,u.mount),$e=B=>{zn(B)&&(v.state.next({disabled:B}),rc(r,(J,se)=>{const we=Se(r,se);we&&(J.disabled=we._f.disabled||B,Array.isArray(we._f.refs)&&we._f.refs.forEach(be=>{be.disabled=we._f.disabled||B}))},0,!1))},Fe=(B,J)=>async se=>{let we;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let be=sn(s);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:xe,values:Le}=await D();n.errors=xe,be=Le}else await z(r);if(u.disabled.size)for(const xe of u.disabled)st(be,xe,void 0);if(Ft(n.errors,"root"),Cn(n.errors)){v.state.next({errors:{}});try{await B(be,se)}catch(xe){we=xe}}else J&&await J({...n.errors},se),Re(),setTimeout(Re);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Cn(n.errors)&&!we,submitCount:n.submitCount+1,errors:n.errors}),we)throw we},pt=(B,J={})=>{Se(r,B)&&(Dt(J.defaultValue)?H(B,sn(Se(a,B))):(H(B,J.defaultValue),st(a,B,sn(J.defaultValue))),J.keepTouched||Ft(n.touchedFields,B),J.keepDirty||(Ft(n.dirtyFields,B),n.isDirty=J.defaultValue?fe(B,sn(Se(a,B))):fe()),J.keepError||(Ft(n.errors,B),m.isValid&&x()),v.state.next({...n}))},Zt=(B,J={})=>{const se=B?sn(B):a,we=sn(se),be=Cn(B),xe=be?a:we;if(J.keepDefaultValues||(a=se),!J.keepValues){if(J.keepDirtyValues){const Le=new Set([...u.mount,...Object.keys($l(a,s))]);for(const rt of Array.from(Le))Se(n.dirtyFields,rt)?st(xe,rt,Se(s,rt)):H(rt,Se(xe,rt))}else{if(Iv&&Dt(B))for(const Le of u.mount){const rt=Se(r,Le);if(rt&&rt._f){const ot=Array.isArray(rt._f.refs)?rt._f.refs[0]:rt._f.ref;if(hf(ot)){const An=ot.closest("form");if(An){An.reset();break}}}}for(const Le of u.mount)H(Le,Se(xe,Le))}s=sn(xe),v.array.next({values:{...xe}}),v.state.next({values:{...xe}})}u={mount:J.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!J.keepIsValid||!!J.keepDirtyValues,l.watch=!!t.shouldUnregister,v.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:be?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!ta(B,a)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:be?{}:J.keepDirtyValues?J.keepDefaultValues&&s?$l(a,s):n.dirtyFields:J.keepDefaultValues&&B?$l(a,B):J.keepDirty?n.dirtyFields:{},touchedFields:J.keepTouched?n.touchedFields:{},errors:J.keepErrors?n.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},On=(B,J)=>Zt(_r(B)?B(s):B,J),Sn=(B,J={})=>{const se=Se(r,B),we=se&&se._f;if(we){const be=we.refs?we.refs[0]:we.ref;be.focus&&(be.focus(),J.shouldSelect&&_r(be.select)&&be.select())}},ur=B=>{n={...n,...B}},dr={control:{register:Oe,unregister:ue,getFieldState:X,handleSubmit:Fe,setError:Q,_subscribe:he,_runSchema:D,_focusError:Re,_getWatch:ie,_getDirty:fe,_setValid:x,_setFieldArray:T,_setDisabledField:_e,_setErrors:C,_getFieldArray:le,_reset:Zt,_resetDefaultValues:()=>_r(t.defaultValues)&&t.defaultValues().then(B=>{On(B,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:$e,_subjects:v,_proxyFormState:m,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(B){l=B},get _defaultValues(){return a},get _names(){return u},set _names(B){u=B},get _formState(){return n},get _options(){return t},set _options(B){t={...t,...B}}},subscribe:Ee,trigger:ve,register:Oe,handleSubmit:Fe,watch:ne,setValue:H,getValues:P,reset:On,resetField:pt,clearErrors:$,unregister:ue,setError:Q,setFocus:Sn,getFieldState:X};return{...dr,formControl:dr}}function a2(e={}){const t=Be.useRef(void 0),n=Be.useRef(void 0),[r,a]=Be.useState({isDirty:!1,isValidating:!1,isLoading:_r(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:_r(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!_r(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...u}=i2(e);t.current={...u,formState:r}}const s=t.current.control;return s._options=e,Pv(()=>{const l=s._subscribe({formState:s._proxyFormState,callback:()=>a({...s._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),s._formState.isReady=!0,l},[s]),Be.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),Be.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),Be.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),Be.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),Be.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),Be.useEffect(()=>{e.values&&!ta(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,a(l=>({...l}))):s._resetDefaultValues()},[s,e.values]),Be.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=kR(r,s),t.current}const WS=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Se(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},cy=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?WS(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>WS(a,n,e))}},YS=(e,t)=>{t.shouldUseNativeValidation&&cy(e,t);const n={};for(const r in e){const a=Se(t.fields,r),s=Object.assign(e[r]||{},{ref:a&&a.ref});if(o2(t.names||Object.keys(e),r)){const l=Object.assign({},Se(n,r));st(l,"root",s),st(n,r,l)}else st(n,r,s)}return n},o2=(e,t)=>{const n=XS(t);return e.some(r=>XS(r).match(`^${n}\\.\\d+`))};function XS(e){return e.replace(/\]|\[/g,"")}function pe(e,t,n){function r(u,d){var f;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(f=u._zod).traits??(f.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 a=(n==null?void 0:n.Parent)??Object;class s extends a{}Object.defineProperty(s,"name",{value:e});function l(u){var d;const f=n!=null&&n.Parent?new s:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>{var d,f;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(f=(d=u==null?void 0:u._zod)==null?void 0:d.traits)==null?void 0:f.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class gc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const zR={};function to(e){return zR}function s2(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function l2(e,t){return typeof t=="bigint"?t.toString():t}function VR(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Uv(e){return e==null}function $v(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function xt(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 Hv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function BR(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function Fl(e){return JSON.stringify(e)}const UR=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function uy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const c2=VR(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function QS(e){if(uy(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(uy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const u2=new Set(["string","number","symbol"]);function rh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Ue(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function d2(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function f2(e,t){const n={},r=e._zod.def;for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return fo(e,{...e._zod.def,shape:n,checks:[]})}function h2(e,t){const n={...e._zod.def.shape},r=e._zod.def;for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return fo(e,{...e._zod.def,shape:n,checks:[]})}function m2(e,t){const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return Hv(this,"shape",r),r},checks:[]};return fo(e,n)}function p2(e,t){return fo(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Hv(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function g2(e,t,n){const r=t._zod.def.shape,a={...r};if(n)for(const s in n){if(!(s in r))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(a[s]=e?new e({type:"optional",innerType:r[s]}):r[s])}else for(const s in r)a[s]=e?new e({type:"optional",innerType:r[s]}):r[s];return fo(t,{...t._zod.def,shape:a,checks:[]})}function y2(e,t,n){const r=t._zod.def.shape,a={...r};if(n)for(const s in n){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(a[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(const s in r)a[s]=new e({type:"nonoptional",innerType:r[s]});return fo(t,{...t._zod.def,shape:a,checks:[]})}function ic(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n].continue!==!0)return!0;return!1}function Fv(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function xd(e){return typeof e=="string"?e:e==null?void 0:e.message}function no(e,t,n){var a,s,l,u,d,f;const r={...e,path:e.path??[]};if(!e.message){const m=xd((l=(s=(a=e.inst)==null?void 0:a._zod.def)==null?void 0:s.error)==null?void 0:l.call(s,e))??xd((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??xd((d=n.customError)==null?void 0:d.call(n,e))??xd((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input";r.message=m}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Gv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function yc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const $R=(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,l2,2)},enumerable:!0})},Kv=pe("$ZodError",$R),ih=pe("$ZodError",$R,{Parent:Error});function v2(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function b2(e,t){const n=t||function(s){return s.message},r={_errors:[]},a=s=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>a({issues:u}));else if(l.code==="invalid_key")a({issues:l.issues});else if(l.code==="invalid_element")a({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 f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(e),r}const HR=e=>(t,n,r,a)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new gc;if(l.issues.length){const u=new((a==null?void 0:a.Err)??e)(l.issues.map(d=>no(d,s,to())));throw UR(u,a==null?void 0:a.callee),u}return l.value},_2=HR(ih),FR=e=>async(t,n,r,a)=>{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((a==null?void 0:a.Err)??e)(l.issues.map(d=>no(d,s,to())));throw UR(u,a==null?void 0:a.callee),u}return l.value},x2=FR(ih),GR=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new gc;return s.issues.length?{success:!1,error:new(e??Kv)(s.issues.map(l=>no(l,a,to())))}:{success:!0,data:s.value}},E2=GR(ih),KR=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},a);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>no(l,a,to())))}:{success:!0,data:s.value}},S2=KR(ih);function JS(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function A2(e,t){for(var n={};e.length;){var r=e[0],a=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:a};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,f=d&&d[r.code];n[l]=zv(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function w2(e,t){for(var n={};e.length;){var r=e[0],a=r.code,s=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"){var u=r.errors[0][0];n[l]={message:u.message,type:u.code}}else n[l]={message:s,type:a};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,f=d&&d[r.code];n[l]=zv(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function T2(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,a,s){try{return Promise.resolve(JS(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return s.shouldUseNativeValidation&&cy({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if(function(u){return Array.isArray(u==null?void 0:u.issues)}(l))return{values:{},errors:YS(A2(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,a,s){try{return Promise.resolve(JS(function(){return Promise.resolve((n.mode==="sync"?_2:x2)(e,r,t)).then(function(l){return s.shouldUseNativeValidation&&cy({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if(function(u){return u instanceof Kv}(l))return{values:{},errors:YS(w2(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 ag=async e=>e&&typeof e.then=="function"?await e:e,R2=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:a,children:s,autoComplete:l,...u})=>{const d=async f=>{const m=(e==null?void 0:e.safeParse(f))??{success:!0,data:void 0};await ag(t==null?void 0:t(f)),m.success?await ag(n==null?void 0:n(m.data)):await ag(r==null?void 0:r(new Error(m.error.issues.map(g=>g.message).join(", "))))};return b.jsx(UU,{...u,children:b.jsx("form",{className:Ae("flex size-full flex-col gap-y-6",a),onSubmit:u.handleSubmit(d),autoComplete:l?"on":"off",noValidate:!0,children:s})})},C2=(e,t)=>{const n=a2({resolver:T2(e),...t}),r=n.formState.isSubmitting,a=n.formState.isSubmitted,s=n.formState.isLoading,l=n.formState.isValid;return{form:n,isSubmitting:r,isSubmitted:a,isLoading:s,isValid:l}},N2=e=>{const t=S.useId(),n=S.useMemo(()=>({id:t}),[t]);return b.jsx(ZR,{value:n,children:b.jsx("div",{className:"flex flex-col gap-2 p-2",...e})})},ZR=S.createContext({}),qR=S.createContext({}),k2=({...e})=>{const t=S.useMemo(()=>({name:e.name}),[e.name]);return b.jsx(qR,{value:t,children:b.jsx(GU,{...e})})},fa=()=>{const e=S.useContext(qR),t=S.useContext(ZR),{getFieldState:n,formState:r}=da(),a=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`,...a}},WR=cr("",{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"}}),Os=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...a})=>b.jsx("input",{className:WR({variant:t,size:n,validationStyleEnabled:e?"enabled":"disabled",className:r}),...a}),O2=cr("",{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"}}),D2=({validationStyleEnabled:e=!1,label:t,size:n,color:r,variant:a,className:s,...l})=>{const u=S.useId();return b.jsxs(b.Fragment,{children:[b.jsx("input",{type:"checkbox",className:O2({variant:a,size:n,color:r,validationStyleEnabled:e?"enabled":"disabled",className:s}),id:u,...l}),b.jsx("label",{htmlFor:u,children:t})]})},I2=e=>{const[t,n]=S.useState(!1),r=s=>{s.preventDefault(),s.stopPropagation(),n(l=>!l)},a=t?Zz:Gz;return b.jsxs("div",{className:"relative",children:[b.jsx(Os,{...e,"aria-label":"password",type:t?"text":"password"}),b.jsx("button",{"data-testid":"eye-icon",className:"absolute right-2 h-full flex-row items-center",onClick:r,"aria-label":t?"Hide password":"Show password",children:b.jsx(a,{className:"text-neutral mr-2 inline-block",size:20})})]})},YR=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>b.jsx("textarea",{className:Ae("resize-none",WR({variant:t,validationStyleEnabled:n?"enabled":"disabled",className:e})),...r}),XR=({value:e="",onCancel:t,onSave:n,onClick:r,children:a,isDisabled:s,...l})=>{const[u,d]=S.useState(!1),f=S.useRef(null),m=y=>{y.stopPropagation(),d(!1),n()},g=y=>{y.stopPropagation(),d(!1),t()},v=!e||e===""?"-":e,E=S.useCallback(y=>{const x=window.getSelection();x&&x.toString().trim()!==""||f.current&&!f.current.contains(y.target)&&(d(!1),n())},[n]);return S.useEffect(()=>(u?document.addEventListener("click",E):document.removeEventListener("click",E),()=>document.removeEventListener("click",E)),[E,u]),b.jsxs("span",{className:"group/editable-field flex gap-2",role:"button",tabIndex:0,onClick:y=>{d(!0),r==null||r(y)},ref:f,...l,children:[b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"display":"hidden"),children:[a,b.jsx(ut,{label:"Save",variant:"hoverable",size:"icon-sm",color:"text",Icon:Cs,onClick:m,disabled:s,className:"!text-current"}),b.jsx(ut,{label:"Cancel",color:"text",variant:"hoverable",className:"!text-current",size:"icon-sm",Icon:uo,onClick:g,disabled:s})]},String(u)),b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"hidden":"display"),children:[b.jsx("span",{className:"ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6",children:v}),b.jsx(ut,{label:"Edit",Icon:U1,color:"text",variant:"hoverable",size:"icon-sm",className:"invisible !text-current group-hover/editable-field:visible",disabled:s,onClick:y=>{y.stopPropagation(),d(!0)}})]})]})},QR=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=S.useRef(null),s=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()};S.useImperativeHandle(n,()=>a.current);const u=S.useMemo(()=>{var f;return r.value??((f=a.current)==null?void 0:f.value)??r.defaultValue},[r.value,r.defaultValue,(d=a.current)==null?void 0:d.value]);return b.jsx(XR,{value:u,onCancel:l,onSave:s,children:b.jsx(Os,{ref:a,...r})})},eA=24,tA=12,Zv=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:a,...s})=>{const l=S.useRef(null);S.useImperativeHandle(a,()=>l.current);const u=()=>{const m=l.current;if(!m||!t)return;const g=m.style;g.height="auto";const v=m.scrollHeight,E=eA*r+tA,y=eA+tA;g.height=Math.max(Math.min(v,E),y)+"px"};S.useEffect(()=>{u()},[s.value,s.defaultValue,u]);const d=m=>{n==null||n(m),u()},f=m=>{l.current=m,m&&u()};return b.jsx(YR,{ref:f,onChange:d,className:Ae("overflow-y-auto",t?"resize-none":"",e),...s})},JR=({onSave:e,onCancel:t,ref:n,...r})=>{var d;const a=S.useRef(null);S.useImperativeHandle(n,()=>a.current);const s=()=>{var f;e==null||e(((f=a.current)==null?void 0:f.value)??"")},l=()=>{a.current&&(a.current.value=a.current.defaultValue??""),t==null||t()},u=r.value??((d=a.current)==null?void 0:d.value)??r.defaultValue??"";return b.jsx(XR,{value:u,onCancel:l,onSave:s,onClick:f=>{f.preventDefault(),f.stopPropagation()},children:b.jsx(Zv,{className:"leading-6",ref:a,onClick:f=>{f.preventDefault(),f.stopPropagation()},...r})})},L2=cr("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"}}),j2=({className:e,variant:t,color:n,...r})=>b.jsx("div",{className:Ae(L2({variant:t,color:n}),e),...r});var M2=YT[" useId ".trim().toString()]||(()=>{}),P2=0;function or(e){const[t,n]=S.useState(M2());return cn(()=>{n(r=>r??String(P2++))},[e]),t?`radix-${t}`:""}var og="focusScope.autoFocusOnMount",sg="focusScope.autoFocusOnUnmount",nA={bubbles:!1,cancelable:!0},z2="FocusScope",qv=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[u,d]=S.useState(null),f=xr(a),m=xr(s),g=S.useRef(null),v=At(t,x=>d(x)),E=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let x=function(C){if(E.paused||!u)return;const O=C.target;u.contains(O)?g.current=O:Ji(g.current,{select:!0})},A=function(C){if(E.paused||!u)return;const O=C.relatedTarget;O!==null&&(u.contains(O)||Ji(g.current,{select:!0}))},T=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&Ji(u)};document.addEventListener("focusin",x),document.addEventListener("focusout",A);const w=new MutationObserver(T);return u&&w.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",A),w.disconnect()}}},[r,u,E.paused]),S.useEffect(()=>{if(u){iA.add(E);const x=document.activeElement;if(!u.contains(x)){const T=new CustomEvent(og,nA);u.addEventListener(og,f),u.dispatchEvent(T),T.defaultPrevented||(V2(F2(eC(u)),{select:!0}),document.activeElement===x&&Ji(u))}return()=>{u.removeEventListener(og,f),setTimeout(()=>{const T=new CustomEvent(sg,nA);u.addEventListener(sg,m),u.dispatchEvent(T),T.defaultPrevented||Ji(x??document.body,{select:!0}),u.removeEventListener(sg,m),iA.remove(E)},0)}}},[u,f,m,E]);const y=S.useCallback(x=>{if(!n&&!r||E.paused)return;const A=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,T=document.activeElement;if(A&&T){const w=x.currentTarget,[C,O]=B2(w);C&&O?!x.shiftKey&&T===O?(x.preventDefault(),n&&Ji(C,{select:!0})):x.shiftKey&&T===C&&(x.preventDefault(),n&&Ji(O,{select:!0})):T===w&&x.preventDefault()}},[n,r,E.paused]);return b.jsx(We.div,{tabIndex:-1,...l,ref:v,onKeyDown:y})});qv.displayName=z2;function V2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ji(r,{select:t}),document.activeElement!==n)return}function B2(e){const t=eC(e),n=rA(t,e),r=rA(t.reverse(),e);return[n,r]}function eC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rA(e,t){for(const n of e)if(!U2(n,{upTo:t}))return n}function U2(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 $2(e){return e instanceof HTMLInputElement&&"select"in e}function Ji(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$2(e)&&t&&e.select()}}var iA=H2();function H2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=aA(e,t),e.unshift(t)},remove(t){var n;e=aA(e,t),(n=e[0])==null||n.resume()}}}function aA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function F2(e){return e.filter(t=>t.tagName!=="A")}var lg=0;function tC(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oA()),document.body.insertAdjacentElement("beforeend",e[1]??oA()),lg++,()=>{lg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lg--}},[])}function oA(){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 Lr=function(){return Lr=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Lr.apply(this,arguments)};function nC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function G2(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;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 Wd="right-scroll-bar-position",Yd="width-before-scroll-bar",K2="with-scroll-bars-hidden",Z2="--removed-body-scroll-bar-size";function cg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function q2(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var W2=typeof window<"u"?S.useLayoutEffect:S.useEffect,sA=new WeakMap;function Y2(e,t){var n=q2(null,function(r){return e.forEach(function(a){return cg(a,r)})});return W2(function(){var r=sA.get(n);if(r){var a=new Set(r),s=new Set(e),l=n.current;a.forEach(function(u){s.has(u)||cg(u,null)}),s.forEach(function(u){a.has(u)||cg(u,l)})}sA.set(n,e)},[e]),n}function X2(e){return e}function Q2(e,t){t===void 0&&(t=X2);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(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)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return a}function J2(e){e===void 0&&(e={});var t=Q2(null);return t.options=Lr({async:!0,ssr:!1},e),t}var rC=function(e){var t=e.sideCar,n=nC(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 S.createElement(r,Lr({},n))};rC.isSideCarExport=!0;function e$(e,t){return e.useMedium(t),rC}var iC=J2(),ug=function(){},ah=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:ug,onWheelCapture:ug,onTouchMoveCapture:ug}),a=r[0],s=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,E=e.noRelative,y=e.noIsolation,x=e.inert,A=e.allowPinchZoom,T=e.as,w=T===void 0?"div":T,C=e.gapMode,O=nC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=v,j=Y2([n,t]),D=Lr(Lr({},O),a);return S.createElement(S.Fragment,null,m&&S.createElement(N,{sideCar:iC,removeScrollBar:f,shards:g,noRelative:E,noIsolation:y,inert:x,setCallbacks:s,allowPinchZoom:!!A,lockRef:n,gapMode:C}),l?S.cloneElement(S.Children.only(u),Lr(Lr({},D),{ref:j})):S.createElement(w,Lr({},D,{className:d,ref:j}),u))});ah.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ah.classNames={fullWidth:Yd,zeroRight:Wd};var t$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function n$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=t$();return t&&e.setAttribute("nonce",t),e}function r$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function i$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var a$=function(){var e=0,t=null;return{add:function(n){e==0&&(t=n$())&&(r$(t,n),i$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o$=function(){var e=a$();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},aC=function(){var e=o$(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},s$={left:0,top:0,right:0,gap:0},dg=function(e){return parseInt(e||"",10)||0},l$=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[dg(n),dg(r),dg(a)]},c$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return s$;var t=l$(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])}},u$=aC(),fs="data-scroll-locked",d$=function(e,t,n,r){var a=e.left,s=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
210
- .`.concat(K2,` {
211
- overflow: hidden `).concat(r,`;
212
- padding-right: `).concat(u,"px ").concat(r,`;
213
- }
214
- body[`).concat(fs,`] {
215
- overflow: hidden `).concat(r,`;
216
- overscroll-behavior: contain;
217
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
218
- padding-left: `.concat(a,`px;
219
- padding-top: `).concat(s,`px;
220
- padding-right: `).concat(l,`px;
221
- margin-left:0;
222
- margin-top:0;
223
- margin-right: `).concat(u,"px ").concat(r,`;
224
- `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
225
- }
226
-
227
- .`).concat(Wd,` {
228
- right: `).concat(u,"px ").concat(r,`;
229
- }
230
-
231
- .`).concat(Yd,` {
232
- margin-right: `).concat(u,"px ").concat(r,`;
233
- }
234
-
235
- .`).concat(Wd," .").concat(Wd,` {
236
- right: 0 `).concat(r,`;
237
- }
238
-
239
- .`).concat(Yd," .").concat(Yd,` {
240
- margin-right: 0 `).concat(r,`;
241
- }
242
-
243
- body[`).concat(fs,`] {
244
- `).concat(Z2,": ").concat(u,`px;
245
- }
246
- `)},lA=function(){var e=parseInt(document.body.getAttribute(fs)||"0",10);return isFinite(e)?e:0},f$=function(){S.useEffect(function(){return document.body.setAttribute(fs,(lA()+1).toString()),function(){var e=lA()-1;e<=0?document.body.removeAttribute(fs):document.body.setAttribute(fs,e.toString())}},[])},h$=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;f$();var s=S.useMemo(function(){return c$(a)},[a]);return S.createElement(u$,{styles:d$(s,!t,a,n?"":"!important")})},dy=!1;if(typeof window<"u")try{var Ed=Object.defineProperty({},"passive",{get:function(){return dy=!0,!0}});window.addEventListener("test",Ed,Ed),window.removeEventListener("test",Ed,Ed)}catch{dy=!1}var Qo=dy?{passive:!1}:!1,m$=function(e){return e.tagName==="TEXTAREA"},oC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!m$(e)&&n[t]==="visible")},p$=function(e){return oC(e,"overflowY")},g$=function(e){return oC(e,"overflowX")},cA=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=sC(e,r);if(a){var s=lC(e,r),l=s[1],u=s[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},y$=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},v$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sC=function(e,t){return e==="v"?p$(t):g$(t)},lC=function(e,t){return e==="v"?y$(t):v$(t)},b$=function(e,t){return e==="h"&&t==="rtl"?-1:1},_$=function(e,t,n,r,a){var s=b$(e,window.getComputedStyle(t).direction),l=s*r,u=n.target,d=t.contains(u),f=!1,m=l>0,g=0,v=0;do{if(!u)break;var E=lC(e,u),y=E[0],x=E[1],A=E[2],T=x-A-s*y;(y||T)&&sC(e,u)&&(g+=T,v+=y);var w=u.parentNode;u=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(f=!0),f},Sd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uA=function(e){return[e.deltaX,e.deltaY]},dA=function(e){return e&&"current"in e?e.current:e},x$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},E$=function(e){return`
247
- .block-interactivity-`.concat(e,` {pointer-events: none;}
248
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
249
- `)},S$=0,Jo=[];function A$(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),a=S.useState(S$++)[0],s=S.useState(aC)[0],l=S.useRef(e);S.useEffect(function(){l.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=G2([e.lockRef.current],(e.shards||[]).map(dA),!0).filter(Boolean);return x.forEach(function(A){return A.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=S.useCallback(function(x,A){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!l.current.allowPinchZoom;var T=Sd(x),w=n.current,C="deltaX"in x?x.deltaX:w[0]-T[0],O="deltaY"in x?x.deltaY:w[1]-T[1],N,j=x.target,D=Math.abs(C)>Math.abs(O)?"h":"v";if("touches"in x&&D==="h"&&j.type==="range")return!1;var L=cA(D,j);if(!L)return!0;if(L?N=D:(N=D==="v"?"h":"v",L=cA(D,j)),!L)return!1;if(!r.current&&"changedTouches"in x&&(C||O)&&(r.current=N),!N)return!0;var z=r.current||N;return _$(z,A,x,z==="h"?C:O)},[]),d=S.useCallback(function(x){var A=x;if(!(!Jo.length||Jo[Jo.length-1]!==s)){var T="deltaY"in A?uA(A):Sd(A),w=t.current.filter(function(N){return N.name===A.type&&(N.target===A.target||A.target===N.shadowParent)&&x$(N.delta,T)})[0];if(w&&w.should){A.cancelable&&A.preventDefault();return}if(!w){var C=(l.current.shards||[]).map(dA).filter(Boolean).filter(function(N){return N.contains(A.target)}),O=C.length>0?u(A,C[0]):!l.current.noIsolation;O&&A.cancelable&&A.preventDefault()}}},[]),f=S.useCallback(function(x,A,T,w){var C={name:x,delta:A,target:T,should:w,shadowParent:w$(T)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(O){return O!==C})},1)},[]),m=S.useCallback(function(x){n.current=Sd(x),r.current=void 0},[]),g=S.useCallback(function(x){f(x.type,uA(x),x.target,u(x,e.lockRef.current))},[]),v=S.useCallback(function(x){f(x.type,Sd(x),x.target,u(x,e.lockRef.current))},[]);S.useEffect(function(){return Jo.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Qo),document.addEventListener("touchmove",d,Qo),document.addEventListener("touchstart",m,Qo),function(){Jo=Jo.filter(function(x){return x!==s}),document.removeEventListener("wheel",d,Qo),document.removeEventListener("touchmove",d,Qo),document.removeEventListener("touchstart",m,Qo)}},[]);var E=e.removeScrollBar,y=e.inert;return S.createElement(S.Fragment,null,y?S.createElement(s,{styles:E$(a)}):null,E?S.createElement(h$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function w$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const T$=e$(iC,A$);var Wv=S.forwardRef(function(e,t){return S.createElement(ah,Lr({},e,{ref:t,sideCar:T$}))});Wv.classNames=ah.classNames;var R$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},es=new WeakMap,Ad=new WeakMap,wd={},fg=0,cC=function(e){return e&&(e.host||cC(e.parentNode))},C$=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=cC(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})},N$=function(e,t,n,r){var a=C$(t,Array.isArray(e)?e:[e]);wd[n]||(wd[n]=new WeakMap);var s=wd[n],l=[],u=new Set,d=new Set(a),f=function(g){!g||u.has(g)||(u.add(g),f(g.parentNode))};a.forEach(f);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 E=v.getAttribute(r),y=E!==null&&E!=="false",x=(es.get(v)||0)+1,A=(s.get(v)||0)+1;es.set(v,x),s.set(v,A),l.push(v),x===1&&y&&Ad.set(v,!0),A===1&&v.setAttribute(n,"true"),y||v.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",v,T)}})};return m(t),u.clear(),fg++,function(){l.forEach(function(g){var v=es.get(g)-1,E=s.get(g)-1;es.set(g,v),s.set(g,E),v||(Ad.has(g)||g.removeAttribute(r),Ad.delete(g)),E||g.removeAttribute(n)}),fg--,fg||(es=new WeakMap,es=new WeakMap,Ad=new WeakMap,wd={})}},uC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=R$(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),N$(r,a,n,"aria-hidden")):function(){return null}},oh="Dialog",[dC,Cte]=Bc(oh),[k$,wr]=dC(oh),fC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,u=S.useRef(null),d=S.useRef(null),[f,m]=df({prop:r,defaultProp:a??!1,onChange:s,caller:oh});return b.jsx(k$,{scope:t,triggerRef:u,contentRef:d,contentId:or(),titleId:or(),descriptionId:or(),open:f,onOpenChange:m,onOpenToggle:S.useCallback(()=>m(g=>!g),[m]),modal:l,children:n})};fC.displayName=oh;var hC="DialogTrigger",O$=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(hC,n),s=At(t,a.triggerRef);return b.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Qv(a.open),...r,ref:s,onClick:tt(e.onClick,a.onOpenToggle)})});O$.displayName=hC;var Yv="DialogPortal",[D$,mC]=dC(Yv,{forceMount:void 0}),pC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,s=wr(Yv,t);return b.jsx(D$,{scope:t,forceMount:n,children:S.Children.map(r,l=>b.jsx(Uc,{present:n||s.open,children:b.jsx(Jf,{asChild:!0,container:a,children:l})}))})};pC.displayName=Yv;var gf="DialogOverlay",gC=S.forwardRef((e,t)=>{const n=mC(gf,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=wr(gf,e.__scopeDialog);return s.modal?b.jsx(Uc,{present:r||s.open,children:b.jsx(L$,{...a,ref:t})}):null});gC.displayName=gf;var I$=vs("DialogOverlay.RemoveScroll"),L$=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(gf,n);return b.jsx(Wv,{as:I$,allowPinchZoom:!0,shards:[a.contentRef],children:b.jsx(We.div,{"data-state":Qv(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ro="DialogContent",yC=S.forwardRef((e,t)=>{const n=mC(ro,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,s=wr(ro,e.__scopeDialog);return b.jsx(Uc,{present:r||s.open,children:s.modal?b.jsx(j$,{...a,ref:t}):b.jsx(M$,{...a,ref:t})})});yC.displayName=ro;var j$=S.forwardRef((e,t)=>{const n=wr(ro,e.__scopeDialog),r=S.useRef(null),a=At(t,n.contentRef,r);return S.useEffect(()=>{const s=r.current;if(s)return uC(s)},[]),b.jsx(vC,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tt(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:tt(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&s.preventDefault()}),onFocusOutside:tt(e.onFocusOutside,s=>s.preventDefault())})}),M$=S.forwardRef((e,t)=>{const n=wr(ro,e.__scopeDialog),r=S.useRef(!1),a=S.useRef(!1);return b.jsx(vC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),s.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:s=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=s.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),vC=S.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,u=wr(ro,n),d=S.useRef(null),f=At(t,d);return tC(),b.jsxs(b.Fragment,{children:[b.jsx(qv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:b.jsx(Qf,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Qv(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(B$,{titleId:u.titleId}),b.jsx($$,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Xv="DialogTitle",P$=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(Xv,n);return b.jsx(We.h2,{id:a.titleId,...r,ref:t})});P$.displayName=Xv;var bC="DialogDescription",z$=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(bC,n);return b.jsx(We.p,{id:a.descriptionId,...r,ref:t})});z$.displayName=bC;var _C="DialogClose",V$=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=wr(_C,n);return b.jsx(We.button,{type:"button",...r,ref:t,onClick:tt(e.onClick,()=>a.onOpenChange(!1))})});V$.displayName=_C;function Qv(e){return e?"open":"closed"}var xC="DialogTitleWarning",[Nte,EC]=rB(xC,{contentName:ro,titleName:Xv,docsSlug:"dialog"}),B$=({titleId:e})=>{const t=EC(xC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
250
-
251
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
252
-
253
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},U$="DialogDescriptionWarning",$$=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${EC(U$).contentName}}.`;return S.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},H$=fC,F$=pC,G$=gC,K$=yC,fA=1,Z$=.9,q$=.8,W$=.17,hg=.1,mg=.999,Y$=.9999,X$=.99,Q$=/[\\\/_+.#"@\[\(\{&]/,J$=/[\\\/_+.#"@\[\(\{&]/g,eH=/[\s-]/,SC=/[\s-]/g;function fy(e,t,n,r,a,s,l){if(s===t.length)return a===e.length?fA:X$;var u=`${a},${s}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(s),f=n.indexOf(d,a),m=0,g,v,E,y;f>=0;)g=fy(e,t,n,r,f+1,s+1,l),g>m&&(f===a?g*=fA:Q$.test(e.charAt(f-1))?(g*=q$,E=e.slice(a,f-1).match(J$),E&&a>0&&(g*=Math.pow(mg,E.length))):eH.test(e.charAt(f-1))?(g*=Z$,y=e.slice(a,f-1).match(SC),y&&a>0&&(g*=Math.pow(mg,y.length))):(g*=W$,a>0&&(g*=Math.pow(mg,f-a))),e.charAt(f)!==t.charAt(s)&&(g*=Y$)),(g<hg&&n.charAt(f-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(f-1)!==r.charAt(s))&&(v=fy(e,t,n,r,f+1,s+2,l),v*hg>g&&(g=v*hg)),g>m&&(m=g),f=n.indexOf(d,f+1);return l[u]=m,m}function hA(e){return e.toLowerCase().replace(SC," ")}function tH(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,fy(e,t,hA(e),hA(t),0,0,{})}var Gl='[cmdk-group=""]',pg='[cmdk-group-items=""]',nH='[cmdk-group-heading=""]',AC='[cmdk-item=""]',mA=`${AC}:not([aria-disabled="true"])`,hy="cmdk-item-select",ns="data-value",rH=(e,t,n)=>tH(e,t,n),wC=S.createContext(void 0),Fc=()=>S.useContext(wC),TC=S.createContext(void 0),Jv=()=>S.useContext(TC),RC=S.createContext(void 0),CC=S.forwardRef((e,t)=>{let n=rs(()=>{var $,Q;return{search:"",value:(Q=($=e.value)!=null?$:e.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=rs(()=>new Set),a=rs(()=>new Map),s=rs(()=>new Map),l=rs(()=>new Set),u=NC(e),{label:d,children:f,value:m,onValueChange:g,filter:v,shouldFilter:E,loop:y,disablePointerSelection:x=!1,vimBindings:A=!0,...T}=e,w=or(),C=or(),O=or(),N=S.useRef(null),j=mH();io(()=>{if(m!==void 0){let $=m.trim();n.current.value=$,D.emit()}},[m]),io(()=>{j(6,le)},[]);let D=S.useMemo(()=>({subscribe:$=>(l.current.add($),()=>l.current.delete($)),snapshot:()=>n.current,setState:($,Q,ne)=>{var he,Ee,ue,_e;if(!Object.is(n.current[$],Q)){if(n.current[$]=Q,$==="search")ie(),U(),j(1,fe);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Oe=document.getElementById(O);Oe?Oe.focus():(he=document.getElementById(w))==null||he.focus()}if(j(7,()=>{var Oe;n.current.selectedItemId=(Oe=W())==null?void 0:Oe.id,D.emit()}),ne||j(5,le),((Ee=u.current)==null?void 0:Ee.value)!==void 0){let Oe=Q??"";(_e=(ue=u.current).onValueChange)==null||_e.call(ue,Oe);return}}D.emit()}},emit:()=>{l.current.forEach($=>$())}}),[]),L=S.useMemo(()=>({value:($,Q,ne)=>{var he;Q!==((he=s.current.get($))==null?void 0:he.value)&&(s.current.set($,{value:Q,keywords:ne}),n.current.filtered.items.set($,z(Q,ne)),j(2,()=>{U(),D.emit()}))},item:($,Q)=>(r.current.add($),Q&&(a.current.has(Q)?a.current.get(Q).add($):a.current.set(Q,new Set([$]))),j(3,()=>{ie(),U(),n.current.value||fe(),D.emit()}),()=>{s.current.delete($),r.current.delete($),n.current.filtered.items.delete($);let ne=W();j(4,()=>{ie(),(ne==null?void 0:ne.getAttribute("id"))===$&&fe(),D.emit()})}),group:$=>(a.current.has($)||a.current.set($,new Set),()=>{s.current.delete($),a.current.delete($)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:w,inputId:O,labelId:C,listInnerRef:N}),[]);function z($,Q){var ne,he;let Ee=(he=(ne=u.current)==null?void 0:ne.filter)!=null?he:rH;return $?Ee($,n.current.search,Q):0}function U(){if(!n.current.search||u.current.shouldFilter===!1)return;let $=n.current.filtered.items,Q=[];n.current.filtered.groups.forEach(he=>{let Ee=a.current.get(he),ue=0;Ee.forEach(_e=>{let Oe=$.get(_e);ue=Math.max(Oe,ue)}),Q.push([he,ue])});let ne=N.current;ee().sort((he,Ee)=>{var ue,_e;let Oe=he.getAttribute("id"),Re=Ee.getAttribute("id");return((ue=$.get(Re))!=null?ue:0)-((_e=$.get(Oe))!=null?_e:0)}).forEach(he=>{let Ee=he.closest(pg);Ee?Ee.appendChild(he.parentElement===Ee?he:he.closest(`${pg} > *`)):ne.appendChild(he.parentElement===ne?he:he.closest(`${pg} > *`))}),Q.sort((he,Ee)=>Ee[1]-he[1]).forEach(he=>{var Ee;let ue=(Ee=N.current)==null?void 0:Ee.querySelector(`${Gl}[${ns}="${encodeURIComponent(he[0])}"]`);ue==null||ue.parentElement.appendChild(ue)})}function fe(){let $=ee().find(ne=>ne.getAttribute("aria-disabled")!=="true"),Q=$==null?void 0:$.getAttribute(ns);D.setState("value",Q||void 0)}function ie(){var $,Q,ne,he;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Ee=0;for(let ue of r.current){let _e=(Q=($=s.current.get(ue))==null?void 0:$.value)!=null?Q:"",Oe=(he=(ne=s.current.get(ue))==null?void 0:ne.keywords)!=null?he:[],Re=z(_e,Oe);n.current.filtered.items.set(ue,Re),Re>0&&Ee++}for(let[ue,_e]of a.current)for(let Oe of _e)if(n.current.filtered.items.get(Oe)>0){n.current.filtered.groups.add(ue);break}n.current.filtered.count=Ee}function le(){var $,Q,ne;let he=W();he&&((($=he.parentElement)==null?void 0:$.firstChild)===he&&((ne=(Q=he.closest(Gl))==null?void 0:Q.querySelector(nH))==null||ne.scrollIntoView({block:"nearest"})),he.scrollIntoView({block:"nearest"}))}function W(){var $;return($=N.current)==null?void 0:$.querySelector(`${AC}[aria-selected="true"]`)}function ee(){var $;return Array.from((($=N.current)==null?void 0:$.querySelectorAll(mA))||[])}function H($){let Q=ee()[$];Q&&D.setState("value",Q.getAttribute(ns))}function re($){var Q;let ne=W(),he=ee(),Ee=he.findIndex(_e=>_e===ne),ue=he[Ee+$];(Q=u.current)!=null&&Q.loop&&(ue=Ee+$<0?he[he.length-1]:Ee+$===he.length?he[0]:he[Ee+$]),ue&&D.setState("value",ue.getAttribute(ns))}function Z($){let Q=W(),ne=Q==null?void 0:Q.closest(Gl),he;for(;ne&&!he;)ne=$>0?fH(ne,Gl):hH(ne,Gl),he=ne==null?void 0:ne.querySelector(mA);he?D.setState("value",he.getAttribute(ns)):re($)}let ve=()=>H(ee().length-1),P=$=>{$.preventDefault(),$.metaKey?ve():$.altKey?Z(1):re(1)},X=$=>{$.preventDefault(),$.metaKey?H(0):$.altKey?Z(-1):re(-1)};return S.createElement(We.div,{ref:t,tabIndex:-1,...T,"cmdk-root":"",onKeyDown:$=>{var Q;(Q=T.onKeyDown)==null||Q.call(T,$);let ne=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||ne))switch($.key){case"n":case"j":{A&&$.ctrlKey&&P($);break}case"ArrowDown":{P($);break}case"p":case"k":{A&&$.ctrlKey&&X($);break}case"ArrowUp":{X($);break}case"Home":{$.preventDefault(),H(0);break}case"End":{$.preventDefault(),ve();break}case"Enter":{$.preventDefault();let he=W();if(he){let Ee=new Event(hy);he.dispatchEvent(Ee)}}}}},S.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:gH},d),sh(e,$=>S.createElement(TC.Provider,{value:D},S.createElement(wC.Provider,{value:L},$))))}),iH=S.forwardRef((e,t)=>{var n,r;let a=or(),s=S.useRef(null),l=S.useContext(RC),u=Fc(),d=NC(e),f=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;io(()=>{if(!f)return u.item(a,l==null?void 0:l.id)},[f]);let m=kC(a,s,[e.value,e.children,s],e.keywords),g=Jv(),v=ia(j=>j.value&&j.value===m.current),E=ia(j=>f||u.filter()===!1?!0:j.search?j.filtered.items.get(a)>0:!0);S.useEffect(()=>{let j=s.current;if(!(!j||e.disabled))return j.addEventListener(hy,y),()=>j.removeEventListener(hy,y)},[E,e.onSelect,e.disabled]);function y(){var j,D;x(),(D=(j=d.current).onSelect)==null||D.call(j,m.current)}function x(){g.setState("value",m.current,!0)}if(!E)return null;let{disabled:A,value:T,onSelect:w,forceMount:C,keywords:O,...N}=e;return S.createElement(We.div,{ref:eo(s,t),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!v,"data-disabled":!!A,"data-selected":!!v,onPointerMove:A||u.getDisablePointerSelection()?void 0:x,onClick:A?void 0:y},e.children)}),aH=S.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...s}=e,l=or(),u=S.useRef(null),d=S.useRef(null),f=or(),m=Fc(),g=ia(E=>a||m.filter()===!1?!0:E.search?E.filtered.groups.has(l):!0);io(()=>m.group(l),[]),kC(l,u,[e.value,e.heading,d]);let v=S.useMemo(()=>({id:l,forceMount:a}),[a]);return S.createElement(We.div,{ref:eo(u,t),...s,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},n&&S.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),sh(e,E=>S.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},S.createElement(RC.Provider,{value:v},E))))}),oH=S.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=S.useRef(null),s=ia(l=>!l.search);return!n&&!s?null:S.createElement(We.div,{ref:eo(a,t),...r,"cmdk-separator":"",role:"separator"})}),sH=S.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,s=Jv(),l=ia(f=>f.search),u=ia(f=>f.selectedItemId),d=Fc();return S.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),S.createElement(We.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:a?e.value:l,onChange:f=>{a||s.setState("search",f.target.value),n==null||n(f.target.value)}})}),lH=S.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,s=S.useRef(null),l=S.useRef(null),u=ia(f=>f.selectedItemId),d=Fc();return S.useEffect(()=>{if(l.current&&s.current){let f=l.current,m=s.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let E=f.offsetHeight;m.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(g),v.unobserve(f)}}},[]),S.createElement(We.div,{ref:eo(s,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:d.listId},sh(e,f=>S.createElement("div",{ref:eo(l,d.listInnerRef),"cmdk-list-sizer":""},f)))}),cH=S.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:s,container:l,...u}=e;return S.createElement(H$,{open:n,onOpenChange:r},S.createElement(F$,{container:l},S.createElement(G$,{"cmdk-overlay":"",className:a}),S.createElement(K$,{"aria-label":e.label,"cmdk-dialog":"",className:s},S.createElement(CC,{ref:t,...u}))))}),uH=S.forwardRef((e,t)=>ia(n=>n.filtered.count===0)?S.createElement(We.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),dH=S.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...s}=e;return S.createElement(We.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},sh(e,l=>S.createElement("div",{"aria-hidden":!0},l)))}),Gc=Object.assign(CC,{List:lH,Item:iH,Input:sH,Group:aH,Separator:oH,Dialog:cH,Empty:uH,Loading:dH});function fH(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function hH(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function NC(e){let t=S.useRef(e);return io(()=>{t.current=e}),t}var io=typeof window>"u"?S.useEffect:S.useLayoutEffect;function rs(e){let t=S.useRef();return t.current===void 0&&(t.current=e()),t}function ia(e){let t=Jv(),n=()=>e(t.snapshot());return S.useSyncExternalStore(t.subscribe,n,n)}function kC(e,t,n,r=[]){let a=S.useRef(),s=Fc();return io(()=>{var l;let u=(()=>{var f;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),d=r.map(f=>f.trim());s.value(e,u,d),(l=t.current)==null||l.setAttribute(ns,u),a.current=u}),a}var mH=()=>{let[e,t]=S.useState(),n=rs(()=>new Map);return io(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function pH(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function sh({asChild:e,children:t},n){return e&&S.isValidElement(t)?S.cloneElement(pH(t),{ref:t.ref},n(t.props.children)):n(t)}var gH={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const OC=({className:e,...t})=>b.jsx(Gc,{className:Ae("flex size-full flex-col overflow-hidden rounded-md",e),...t}),yH=({className:e,...t})=>b.jsxs("div",{className:"flex w-full items-center","cmdk-input-wrapper":"",children:[b.jsx(iV,{className:"mr-2 size-4 shrink-0 opacity-50"}),b.jsx(Gc.Input,{className:Ae("placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),vH=({className:e,...t})=>b.jsx(Gc.List,{className:Ae("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),bH=e=>b.jsx(Gc.Empty,{className:"py-6 text-center text-sm",...e}),_H=({className:e,...t})=>b.jsx(Gc.Item,{className:Ae("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}),yf={...OC,Input:yH,List:vH,Empty:bH,Item:_H},DC=S.createContext(null),lh=()=>{const e=S.useContext(DC);if(!e)throw new Error("useMultiSelect must be used within MultiSelectProvider");return e},xH=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:a,children:s,dir:l,...u})=>{const[d,f]=S.useState(t??[]),[m,g]=S.useState(""),[v,E]=S.useState(!1),[y,x]=S.useState(-1),A=S.useRef(null),[T,w]=S.useState(!1),[C,O]=S.useState("");S.useEffect(()=>{e&&f(e)},[e]);const N=S.useCallback(z=>{if(d.includes(z)){const U=d.filter(fe=>fe!==z);f(U),n==null||n(U)}else{const U=[...d,z];f(U),n==null||n(U)}},[d]),j=S.useCallback(z=>{z.preventDefault();const U=z.currentTarget,fe=U.value.substring(U.selectionStart??0,U.selectionEnd??0);O(fe),w(fe===m)},[m]),D=S.useCallback(z=>{z.stopPropagation();const U=A.current;if(!U)return;const fe=()=>{const W=y+1;x(W>d.length-1?r?0:-1:W)},ie=()=>{const W=y-1;x(W<0?d.length-1:W)},le=()=>{const W=y-1<=0?d.length-1===0?-1:0:y-1;x(W)};switch(z.key){case"ArrowLeft":l==="rtl"?d.length>0&&(y!==-1||r)&&fe():d.length>0&&U.selectionStart===0&&ie();break;case"ArrowRight":l==="rtl"?d.length>0&&U.selectionStart===0&&ie():d.length>0&&(y!==-1||r)&&fe();break;case"Backspace":case"Delete":d.length>0&&(y!==-1&&y<d.length?(N(d[y]),le()):(U.selectionStart===0&&C===m||T)&&N(d[d.length-1]));break;case"Enter":E(!0);break;case"Escape":y!==-1?x(-1):v&&E(!1);break}},[d,m,y,r]),L=S.useMemo(()=>({value:d,onValueChange:N,open:v,setOpen:E,inputValue:m,setInputValue:g,activeIndex:y,setActiveIndex:x,ref:A,handleSelect:j}),[d,N,v,E,m,g,y,x,A,j]);return b.jsx(DC,{value:L,children:b.jsx(OC,{onKeyDown:D,className:Ae("flex w-full flex-col gap-2 overflow-visible bg-transparent",a),dir:l,...u,children:s})})},EH=({className:e,getBadgeValue:t=s=>s,validationStyleEnabled:n=!1,children:r,...a})=>{const{value:s,onValueChange:l,activeIndex:u}=lh(),d=S.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]);return b.jsxs("div",{className:Ae("flex w-full flex-col gap-3 rounded-lg p-1 py-2","border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",n&&"valid:border-success invalid:border-error",e),...a,children:[s.length>0&&b.jsx("div",{className:"flex w-full flex-wrap gap-1",children:s.map((f,m)=>b.jsxs(j2,{className:Ae("flex items-center gap-1 rounded-xl px-1",u===m&&"ring-muted-foreground ring-2"),color:"text",children:[b.jsx("span",{className:"text-xs",children:t(f)}),b.jsxs("button",{"aria-label":`Remove ${f} option`,"aria-roledescription":"button to remove option",onMouseDown:d,onClick:()=>l(f),children:[b.jsxs("span",{className:"sr-only",children:["Remove ",f," option"]}),b.jsx(uo,{className:"size-4 cursor-pointer"})]})]},f))}),r]})},SH=({className:e,...t})=>{const{setOpen:n,inputValue:r,setInputValue:a,activeIndex:s,setActiveIndex:l,handleSelect:u,ref:d}=lh();return b.jsx(yf.Input,{...t,tabIndex:0,ref:d,value:r,onValueChange:s===-1?a:void 0,onSelect:u,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>l(-1),className:Ae("outline-hidden ml-2 flex-1 cursor-pointer",e,s!==-1&&"caret-transparent")})},AH=({children:e})=>{const{open:t}=lh();return b.jsx("div",{className:"relative",children:t&&e})},wH=({className:e,children:t})=>b.jsxs(yf.List,{className:Ae("border-muted bg-input-background absolute top-0 z-10 flex w-full flex-col gap-2 rounded-lg border p-2 shadow-md transition-colors",e),children:[t,b.jsx(yf.Empty,{children:b.jsx("span",{className:"text-muted-foreground",children:"No results found"})})]}),TH=({className:e,value:t,children:n,...r})=>{const{value:a,onValueChange:s,setInputValue:l}=lh(),u=S.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]),d=a.includes(t);return b.jsxs(yf.Item,{...r,onSelect:()=>{s(t),l("")},className:Ae("flex cursor-pointer justify-between rounded-lg px-2 py-1 transition-colors","hover:bg-neutral/10",e,d&&"opacity-50",r.disabled&&"cursor-not-allowed opacity-50"),onMouseDown:u,children:[n,d&&b.jsx(Cs,{className:"size-4"})]})},mn=xH;mn.Trigger=EH;mn.Input=SH;mn.Content=AH;mn.List=wH;mn.Item=TH;const RH=({className:e,children:t,...n})=>b.jsxs("i",{className:Ae("text-xs text-neutral-400",e),...n,children:["ⓘ ",t]}),my=({htmlFor:e,...t})=>b.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",htmlFor:e,...t}),CH=({className:e,...t})=>{const{error:n,formItemId:r}=fa();return b.jsx(my,{className:Ae("mb-2",n&&"text-error",e),htmlFor:r,...t})},NH=({isRequired:e})=>e?b.jsx("span",{"aria-label":"Asterisk meaning the field is required",children:"*"}):b.jsx(b.Fragment,{}),IC=({children:e,isRequired:t,info:n,htmlFor:r,className:a})=>b.jsxs("div",{className:"ml-1 flex gap-1 align-middle text-base leading-none",children:[e&&b.jsxs(CH,{htmlFor:r,id:`${r}-label`,className:Xf("font-bold",a),children:[e,b.jsx(NH,{isRequired:t})]}),n&&b.jsx(RH,{content:n})]});function pA(e,[t,n]){return Math.min(n,Math.max(t,e))}var kH=S.createContext(void 0);function OH(e){const t=S.useContext(kH);return e||t||"ltr"}const DH=["top","right","bottom","left"],aa=Math.min,Bn=Math.max,vf=Math.round,Td=Math.floor,Vr=e=>({x:e,y:e}),IH={left:"right",right:"left",bottom:"top",top:"bottom"},LH={start:"end",end:"start"};function py(e,t,n){return Bn(e,aa(t,n))}function xi(e,t){return typeof e=="function"?e(t):e}function Ei(e){return e.split("-")[0]}function Ds(e){return e.split("-")[1]}function eb(e){return e==="x"?"y":"x"}function tb(e){return e==="y"?"height":"width"}function Mr(e){return["top","bottom"].includes(Ei(e))?"y":"x"}function nb(e){return eb(Mr(e))}function jH(e,t,n){n===void 0&&(n=!1);const r=Ds(e),a=nb(e),s=tb(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=bf(l)),[l,bf(l)]}function MH(e){const t=bf(e);return[gy(e),t,gy(t)]}function gy(e){return e.replace(/start|end/g,t=>LH[t])}function PH(e,t,n){const r=["left","right"],a=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?s:l;default:return[]}}function zH(e,t,n,r){const a=Ds(e);let s=PH(Ei(e),n==="start",r);return a&&(s=s.map(l=>l+"-"+a),t&&(s=s.concat(s.map(gy)))),s}function bf(e){return e.replace(/left|right|bottom|top/g,t=>IH[t])}function VH(e){return{top:0,right:0,bottom:0,left:0,...e}}function LC(e){return typeof e!="number"?VH(e):{top:e,right:e,bottom:e,left:e}}function _f(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function gA(e,t,n){let{reference:r,floating:a}=e;const s=Mr(t),l=nb(t),u=tb(l),d=Ei(t),f=s==="y",m=r.x+r.width/2-a.width/2,g=r.y+r.height/2-a.height/2,v=r[u]/2-a[u]/2;let E;switch(d){case"top":E={x:m,y:r.y-a.height};break;case"bottom":E={x:m,y:r.y+r.height};break;case"right":E={x:r.x+r.width,y:g};break;case"left":E={x:r.x-a.width,y:g};break;default:E={x:r.x,y:r.y}}switch(Ds(t)){case"start":E[l]-=v*(n&&f?-1:1);break;case"end":E[l]+=v*(n&&f?-1:1);break}return E}const BH=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:l}=n,u=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=gA(f,r,d),v=r,E={},y=0;for(let x=0;x<u.length;x++){const{name:A,fn:T}=u[x],{x:w,y:C,data:O,reset:N}=await T({x:m,y:g,initialPlacement:r,placement:v,strategy:a,middlewareData:E,rects:f,platform:l,elements:{reference:e,floating:t}});m=w??m,g=C??g,E={...E,[A]:{...E[A],...O}},N&&y<=50&&(y++,typeof N=="object"&&(N.placement&&(v=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:m,y:g}=gA(f,v,d)),x=-1)}return{x:m,y:g,placement:v,strategy:a,middlewareData:E}};async function vc(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:s,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:v=!1,padding:E=0}=xi(t,e),y=LC(E),A=u[v?g==="floating"?"reference":"floating":g],T=_f(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(A)))==null||n?A:A.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),w=g==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),O=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},N=_f(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:C,strategy:d}):w);return{top:(T.top-N.top+y.top)/O.y,bottom:(N.bottom-T.bottom+y.bottom)/O.y,left:(T.left-N.left+y.left)/O.x,right:(N.right-T.right+y.right)/O.x}}const UH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:s,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=xi(e,t)||{};if(f==null)return{};const g=LC(m),v={x:n,y:r},E=nb(a),y=tb(E),x=await l.getDimensions(f),A=E==="y",T=A?"top":"left",w=A?"bottom":"right",C=A?"clientHeight":"clientWidth",O=s.reference[y]+s.reference[E]-v[E]-s.floating[y],N=v[E]-s.reference[E],j=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let D=j?j[C]:0;(!D||!await(l.isElement==null?void 0:l.isElement(j)))&&(D=u.floating[C]||s.floating[y]);const L=O/2-N/2,z=D/2-x[y]/2-1,U=aa(g[T],z),fe=aa(g[w],z),ie=U,le=D-x[y]-fe,W=D/2-x[y]/2+L,ee=py(ie,W,le),H=!d.arrow&&Ds(a)!=null&&W!==ee&&s.reference[y]/2-(W<ie?U:fe)-x[y]/2<0,re=H?W<ie?W-ie:W-le:0;return{[E]:v[E]+re,data:{[E]:ee,centerOffset:W-ee-re,...H&&{alignmentOffset:re}},reset:H}}}),$H=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...A}=xi(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const T=Ei(a),w=Mr(u),C=Ei(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=v||(C||!x?[bf(u)]:MH(u)),j=y!=="none";!v&&j&&N.push(...zH(u,x,y,O));const D=[u,...N],L=await vc(t,A),z=[];let U=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&z.push(L[T]),g){const W=jH(a,l,O);z.push(L[W[0]],L[W[1]])}if(U=[...U,{placement:a,overflows:z}],!z.every(W=>W<=0)){var fe,ie;const W=(((fe=s.flip)==null?void 0:fe.index)||0)+1,ee=D[W];if(ee&&(!(g==="alignment"?w!==Mr(ee):!1)||U.every(Z=>Z.overflows[0]>0&&Mr(Z.placement)===w)))return{data:{index:W,overflows:U},reset:{placement:ee}};let H=(ie=U.filter(re=>re.overflows[0]<=0).sort((re,Z)=>re.overflows[1]-Z.overflows[1])[0])==null?void 0:ie.placement;if(!H)switch(E){case"bestFit":{var le;const re=(le=U.filter(Z=>{if(j){const ve=Mr(Z.placement);return ve===w||ve==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ve=>ve>0).reduce((ve,P)=>ve+P,0)]).sort((Z,ve)=>Z[1]-ve[1])[0])==null?void 0:le[0];re&&(H=re);break}case"initialPlacement":H=u;break}if(a!==H)return{reset:{placement:H}}}return{}}}};function yA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vA(e){return DH.some(t=>e[t]>=0)}const HH=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=xi(e,t);switch(r){case"referenceHidden":{const s=await vc(t,{...a,elementContext:"reference"}),l=yA(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:vA(l)}}}case"escaped":{const s=await vc(t,{...a,altBoundary:!0}),l=yA(s,n.floating);return{data:{escapedOffsets:l,escaped:vA(l)}}}default:return{}}}}};async function FH(e,t){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ei(n),u=Ds(n),d=Mr(n)==="y",f=["left","top"].includes(l)?-1:1,m=s&&d?-1:1,g=xi(t,e);let{mainAxis:v,crossAxis:E,alignmentAxis:y}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof y=="number"&&(E=u==="end"?y*-1:y),d?{x:E*m,y:v*f}:{x:v*f,y:E*m}}const GH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:s,placement:l,middlewareData:u}=t,d=await FH(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:s+d.y,data:{...d,placement:l}}}}},KH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:T,y:w}=A;return{x:T,y:w}}},...d}=xi(e,t),f={x:n,y:r},m=await vc(t,d),g=Mr(Ei(a)),v=eb(g);let E=f[v],y=f[g];if(s){const A=v==="y"?"top":"left",T=v==="y"?"bottom":"right",w=E+m[A],C=E-m[T];E=py(w,E,C)}if(l){const A=g==="y"?"top":"left",T=g==="y"?"bottom":"right",w=y+m[A],C=y-m[T];y=py(w,y,C)}const x=u.fn({...t,[v]:E,[g]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:s,[g]:l}}}}}},ZH=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=xi(e,t),m={x:n,y:r},g=Mr(a),v=eb(g);let E=m[v],y=m[g];const x=xi(u,t),A=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const C=v==="y"?"height":"width",O=s.reference[v]-s.floating[C]+A.mainAxis,N=s.reference[v]+s.reference[C]-A.mainAxis;E<O?E=O:E>N&&(E=N)}if(f){var T,w;const C=v==="y"?"width":"height",O=["top","left"].includes(Ei(a)),N=s.reference[g]-s.floating[C]+(O&&((T=l.offset)==null?void 0:T[g])||0)+(O?0:A.crossAxis),j=s.reference[g]+s.reference[C]+(O?0:((w=l.offset)==null?void 0:w[g])||0)-(O?A.crossAxis:0);y<N?y=N:y>j&&(y=j)}return{[v]:E,[g]:y}}}},qH=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:s,platform:l,elements:u}=t,{apply:d=()=>{},...f}=xi(e,t),m=await vc(t,f),g=Ei(a),v=Ds(a),E=Mr(a)==="y",{width:y,height:x}=s.floating;let A,T;g==="top"||g==="bottom"?(A=g,T=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(T=g,A=v==="end"?"top":"bottom");const w=x-m.top-m.bottom,C=y-m.left-m.right,O=aa(x-m[A],w),N=aa(y-m[T],C),j=!t.middlewareData.shift;let D=O,L=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=w),j&&!v){const U=Bn(m.left,0),fe=Bn(m.right,0),ie=Bn(m.top,0),le=Bn(m.bottom,0);E?L=y-2*(U!==0||fe!==0?U+fe:Bn(m.left,m.right)):D=x-2*(ie!==0||le!==0?ie+le:Bn(m.top,m.bottom))}await d({...t,availableWidth:L,availableHeight:D});const z=await l.getDimensions(u.floating);return y!==z.width||x!==z.height?{reset:{rects:!0}}:{}}}};function ch(){return typeof window<"u"}function Is(e){return jC(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(jC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jC(e){return ch()?e instanceof Node||e instanceof $n(e).Node:!1}function Er(e){return ch()?e instanceof Element||e instanceof $n(e).Element:!1}function Fr(e){return ch()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function bA(e){return!ch()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function Kc(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function WH(e){return["table","td","th"].includes(Is(e))}function uh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function rb(e){const t=ib(),n=Er(e)?Sr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function YH(e){let t=oa(e);for(;Fr(t)&&!bs(t);){if(rb(t))return t;if(uh(t))return null;t=oa(t)}return null}function ib(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bs(e){return["html","body","#document"].includes(Is(e))}function Sr(e){return $n(e).getComputedStyle(e)}function dh(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oa(e){if(Is(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bA(e)&&e.host||Zr(e);return bA(t)?t.host:t}function MC(e){const t=oa(e);return bs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fr(t)&&Kc(t)?t:MC(t)}function bc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=MC(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),l=$n(a);if(s){const u=yy(l);return t.concat(l,l.visualViewport||[],Kc(a)?a:[],u&&n?bc(u):[])}return t.concat(a,bc(a,[],n))}function yy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PC(e){const t=Sr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Fr(e),s=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=vf(n)!==s||vf(r)!==l;return u&&(n=s,r=l),{width:n,height:r,$:u}}function ab(e){return Er(e)?e:e.contextElement}function hs(e){const t=ab(e);if(!Fr(t))return Vr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:s}=PC(t);let l=(s?vf(n.width):n.width)/r,u=(s?vf(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const XH=Vr(0);function zC(e){const t=$n(e);return!ib()||!t.visualViewport?XH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function QH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function ao(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=ab(e);let l=Vr(1);t&&(r?Er(r)&&(l=hs(r)):l=hs(e));const u=QH(s,n,r)?zC(s):Vr(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,g=a.height/l.y;if(s){const v=$n(s),E=r&&Er(r)?$n(r):r;let y=v,x=yy(y);for(;x&&r&&E!==y;){const A=hs(x),T=x.getBoundingClientRect(),w=Sr(x),C=T.left+(x.clientLeft+parseFloat(w.paddingLeft))*A.x,O=T.top+(x.clientTop+parseFloat(w.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,g*=A.y,d+=C,f+=O,y=$n(x),x=yy(y)}}return _f({width:m,height:g,x:d,y:f})}function ob(e,t){const n=dh(e).scrollLeft;return t?t.left+n:ao(Zr(e)).left+n}function VC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:ob(e,r)),s=r.top+t.scrollTop;return{x:a,y:s}}function JH(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",l=Zr(r),u=t?uh(t.floating):!1;if(r===l||u&&s)return n;let d={scrollLeft:0,scrollTop:0},f=Vr(1);const m=Vr(0),g=Fr(r);if((g||!g&&!s)&&((Is(r)!=="body"||Kc(l))&&(d=dh(r)),Fr(r))){const E=ao(r);f=hs(r),m.x=E.x+r.clientLeft,m.y=E.y+r.clientTop}const v=l&&!g&&!s?VC(l,d,!0):Vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+v.x,y:n.y*f.y-d.scrollTop*f.y+m.y+v.y}}function eF(e){return Array.from(e.getClientRects())}function tF(e){const t=Zr(e),n=dh(e),r=e.ownerDocument.body,a=Bn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Bn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ob(e);const u=-n.scrollTop;return Sr(r).direction==="rtl"&&(l+=Bn(t.clientWidth,r.clientWidth)-a),{width:a,height:s,x:l,y:u}}function nF(e,t){const n=$n(e),r=Zr(e),a=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){s=a.width,l=a.height;const f=ib();(!f||f&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}return{width:s,height:l,x:u,y:d}}function rF(e,t){const n=ao(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=Fr(e)?hs(e):Vr(1),l=e.clientWidth*s.x,u=e.clientHeight*s.y,d=a*s.x,f=r*s.y;return{width:l,height:u,x:d,y:f}}function _A(e,t,n){let r;if(t==="viewport")r=nF(e,n);else if(t==="document")r=tF(Zr(e));else if(Er(t))r=rF(t,n);else{const a=zC(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return _f(r)}function BC(e,t){const n=oa(e);return n===t||!Er(n)||bs(n)?!1:Sr(n).position==="fixed"||BC(n,t)}function iF(e,t){const n=t.get(e);if(n)return n;let r=bc(e,[],!1).filter(u=>Er(u)&&Is(u)!=="body"),a=null;const s=Sr(e).position==="fixed";let l=s?oa(e):e;for(;Er(l)&&!bs(l);){const u=Sr(l),d=rb(l);!d&&u.position==="fixed"&&(a=null),(s?!d&&!a:!d&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Kc(l)&&!d&&BC(e,l))?r=r.filter(m=>m!==l):a=u,l=oa(l)}return t.set(e,r),r}function aF(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?uh(t)?[]:iF(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const g=_A(t,m,a);return f.top=Bn(g.top,f.top),f.right=aa(g.right,f.right),f.bottom=aa(g.bottom,f.bottom),f.left=Bn(g.left,f.left),f},_A(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function oF(e){const{width:t,height:n}=PC(e);return{width:t,height:n}}function sF(e,t,n){const r=Fr(t),a=Zr(t),s=n==="fixed",l=ao(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const d=Vr(0);function f(){d.x=ob(a)}if(r||!r&&!s)if((Is(t)!=="body"||Kc(a))&&(u=dh(t)),r){const E=ao(t,!0,s,t);d.x=E.x+t.clientLeft,d.y=E.y+t.clientTop}else a&&f();s&&!r&&a&&f();const m=a&&!r&&!s?VC(a,u):Vr(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 gg(e){return Sr(e).position==="static"}function xA(e,t){if(!Fr(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zr(e)===n&&(n=n.ownerDocument.body),n}function UC(e,t){const n=$n(e);if(uh(e))return n;if(!Fr(e)){let a=oa(e);for(;a&&!bs(a);){if(Er(a)&&!gg(a))return a;a=oa(a)}return n}let r=xA(e,t);for(;r&&WH(r)&&gg(r);)r=xA(r,t);return r&&bs(r)&&gg(r)&&!rb(r)?n:r||YH(e)||n}const lF=async function(e){const t=this.getOffsetParent||UC,n=this.getDimensions,r=await n(e.floating);return{reference:sF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cF(e){return Sr(e).direction==="rtl"}const uF={convertOffsetParentRelativeRectToViewportRelativeRect:JH,getDocumentElement:Zr,getClippingRect:aF,getOffsetParent:UC,getElementRects:lF,getClientRects:eF,getDimensions:oF,getScale:hs,isElement:Er,isRTL:cF};function $C(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dF(e,t){let n=null,r;const a=Zr(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 f=e.getBoundingClientRect(),{left:m,top:g,width:v,height:E}=f;if(u||t(),!v||!E)return;const y=Td(g),x=Td(a.clientWidth-(m+v)),A=Td(a.clientHeight-(g+E)),T=Td(m),C={rootMargin:-y+"px "+-x+"px "+-A+"px "+-T+"px",threshold:Bn(0,aa(1,d))||1};let O=!0;function N(j){const D=j[0].intersectionRatio;if(D!==d){if(!O)return l();D?l(!1,D):r=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!$C(f,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(N,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,C)}n.observe(e)}return l(!0),s}function fF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=ab(e),m=a||s?[...f?bc(f):[],...bc(t)]:[];m.forEach(T=>{a&&T.addEventListener("scroll",n,{passive:!0}),s&&T.addEventListener("resize",n)});const g=f&&u?dF(f,n):null;let v=-1,E=null;l&&(E=new ResizeObserver(T=>{let[w]=T;w&&w.target===f&&E&&(E.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=E)==null||C.observe(t)})),n()}),f&&!d&&E.observe(f),E.observe(t));let y,x=d?ao(e):null;d&&A();function A(){const T=ao(e);x&&!$C(x,T)&&n(),x=T,y=requestAnimationFrame(A)}return n(),()=>{var T;m.forEach(w=>{a&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),g==null||g(),(T=E)==null||T.disconnect(),E=null,d&&cancelAnimationFrame(y)}}const hF=GH,mF=KH,pF=$H,gF=qH,yF=HH,EA=UH,vF=ZH,bF=(e,t,n)=>{const r=new Map,a={platform:uF,...n},s={...a.platform,_c:r};return BH(e,t,{...a,platform:s})};var _F=typeof document<"u",xF=function(){},Xd=_F?S.useLayoutEffect:xF;function xf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xf(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const s=a[r];if(!(s==="_owner"&&e.$$typeof)&&!xf(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function HC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function SA(e,t){const n=HC(e);return Math.round(t*n)/n}function yg(e){const t=S.useRef(e);return Xd(()=>{t.current=e}),t}function EF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,g]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,E]=S.useState(r);xf(v,r)||E(r);const[y,x]=S.useState(null),[A,T]=S.useState(null),w=S.useCallback(Z=>{Z!==j.current&&(j.current=Z,x(Z))},[]),C=S.useCallback(Z=>{Z!==D.current&&(D.current=Z,T(Z))},[]),O=s||y,N=l||A,j=S.useRef(null),D=S.useRef(null),L=S.useRef(m),z=d!=null,U=yg(d),fe=yg(a),ie=yg(f),le=S.useCallback(()=>{if(!j.current||!D.current)return;const Z={placement:t,strategy:n,middleware:v};fe.current&&(Z.platform=fe.current),bF(j.current,D.current,Z).then(ve=>{const P={...ve,isPositioned:ie.current!==!1};W.current&&!xf(L.current,P)&&(L.current=P,co.flushSync(()=>{g(P)}))})},[v,t,n,fe,ie]);Xd(()=>{f===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,g(Z=>({...Z,isPositioned:!1})))},[f]);const W=S.useRef(!1);Xd(()=>(W.current=!0,()=>{W.current=!1}),[]),Xd(()=>{if(O&&(j.current=O),N&&(D.current=N),O&&N){if(U.current)return U.current(O,N,le);le()}},[O,N,le,U,z]);const ee=S.useMemo(()=>({reference:j,floating:D,setReference:w,setFloating:C}),[w,C]),H=S.useMemo(()=>({reference:O,floating:N}),[O,N]),re=S.useMemo(()=>{const Z={position:n,left:0,top:0};if(!H.floating)return Z;const ve=SA(H.floating,m.x),P=SA(H.floating,m.y);return u?{...Z,transform:"translate("+ve+"px, "+P+"px)",...HC(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:P}},[n,u,H.floating,m.x,m.y]);return S.useMemo(()=>({...m,update:le,refs:ee,elements:H,floatingStyles:re}),[m,le,ee,H,re])}const SF=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?EA({element:r.current,padding:a}).fn(n):{}:r?EA({element:r,padding:a}).fn(n):{}}}},AF=(e,t)=>({...hF(e),options:[e,t]}),wF=(e,t)=>({...mF(e),options:[e,t]}),TF=(e,t)=>({...vF(e),options:[e,t]}),RF=(e,t)=>({...pF(e),options:[e,t]}),CF=(e,t)=>({...gF(e),options:[e,t]}),NF=(e,t)=>({...yF(e),options:[e,t]}),kF=(e,t)=>({...SF(e),options:[e,t]});var OF="Arrow",FC=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...s}=e;return b.jsx(We.svg,{...s,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});FC.displayName=OF;var DF=FC;function IF(e){const[t,n]=S.useState(void 0);return cn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,u;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sb="Popper",[GC,KC]=Bc(sb),[LF,ZC]=GC(sb),qC=e=>{const{__scopePopper:t,children:n}=e,[r,a]=S.useState(null);return b.jsx(LF,{scope:t,anchor:r,onAnchorChange:a,children:n})};qC.displayName=sb;var WC="PopperAnchor",YC=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,s=ZC(WC,n),l=S.useRef(null),u=At(t,l);return S.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:b.jsx(We.div,{...a,ref:u})});YC.displayName=WC;var lb="PopperContent",[jF,MF]=GC(lb),XC=S.forwardRef((e,t)=>{var ue,_e,Oe,Re,$e,Fe;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:E="optimized",onPlaced:y,...x}=e,A=ZC(lb,n),[T,w]=S.useState(null),C=At(t,pt=>w(pt)),[O,N]=S.useState(null),j=IF(O),D=(j==null?void 0:j.width)??0,L=(j==null?void 0:j.height)??0,z=r+(s!=="center"?"-"+s:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},fe=Array.isArray(f)?f:[f],ie=fe.length>0,le={padding:U,boundary:fe.filter(zF),altBoundary:ie},{refs:W,floatingStyles:ee,placement:H,isPositioned:re,middlewareData:Z}=EF({strategy:"fixed",placement:z,whileElementsMounted:(...pt)=>fF(...pt,{animationFrame:E==="always"}),elements:{reference:A.anchor},middleware:[AF({mainAxis:a+L,alignmentAxis:l}),d&&wF({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?TF():void 0,...le}),d&&RF({...le}),CF({...le,apply:({elements:pt,rects:Zt,availableWidth:On,availableHeight:Sn})=>{const{width:ur,height:ba}=Zt.reference,dr=pt.floating.style;dr.setProperty("--radix-popper-available-width",`${On}px`),dr.setProperty("--radix-popper-available-height",`${Sn}px`),dr.setProperty("--radix-popper-anchor-width",`${ur}px`),dr.setProperty("--radix-popper-anchor-height",`${ba}px`)}}),O&&kF({element:O,padding:u}),VF({arrowWidth:D,arrowHeight:L}),v&&NF({strategy:"referenceHidden",...le})]}),[ve,P]=eN(H),X=xr(y);cn(()=>{re&&(X==null||X())},[re,X]);const $=(ue=Z.arrow)==null?void 0:ue.x,Q=(_e=Z.arrow)==null?void 0:_e.y,ne=((Oe=Z.arrow)==null?void 0:Oe.centerOffset)!==0,[he,Ee]=S.useState();return cn(()=>{T&&Ee(window.getComputedStyle(T).zIndex)},[T]),b.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:re?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(Re=Z.transformOrigin)==null?void 0:Re.x,($e=Z.transformOrigin)==null?void 0:$e.y].join(" "),...((Fe=Z.hide)==null?void 0:Fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(jF,{scope:n,placedSide:ve,onArrowChange:N,arrowX:$,arrowY:Q,shouldHideArrow:ne,children:b.jsx(We.div,{"data-side":ve,"data-align":P,...x,ref:C,style:{...x.style,animation:re?void 0:"none"}})})})});XC.displayName=lb;var QC="PopperArrow",PF={top:"bottom",right:"left",bottom:"top",left:"right"},JC=S.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,s=MF(QC,r),l=PF[s.placedSide];return b.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:b.jsx(DF,{...a,ref:n,style:{...a.style,display:"block"}})})});JC.displayName=QC;function zF(e){return e!==null}var VF=e=>({name:"transformOrigin",options:e,fn(t){var A,T,w;const{placement:n,rects:r,middlewareData:a}=t,l=((A=a.arrow)==null?void 0:A.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=eN(n),g={start:"0%",center:"50%",end:"100%"}[m],v=(((T=a.arrow)==null?void 0:T.x)??0)+u/2,E=(((w=a.arrow)==null?void 0:w.y)??0)+d/2;let y="",x="";return f==="bottom"?(y=l?g:`${v}px`,x=`${-d}px`):f==="top"?(y=l?g:`${v}px`,x=`${r.floating.height+d}px`):f==="right"?(y=`${-d}px`,x=l?g:`${E}px`):f==="left"&&(y=`${r.floating.width+d}px`,x=l?g:`${E}px`),{data:{x:y,y:x}}}});function eN(e){const[t,n="center"]=e.split("-");return[t,n]}var BF=qC,UF=YC,$F=XC,HF=JC;function FF(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var GF=[" ","Enter","ArrowUp","ArrowDown"],KF=[" ","Enter"],oo="Select",[fh,hh,ZF]=iR(oo),[Ls,kte]=Bc(oo,[ZF,KC]),mh=KC(),[qF,ha]=Ls(oo),[WF,YF]=Ls(oo),tN=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:s,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:g,disabled:v,required:E,form:y}=e,x=mh(t),[A,T]=S.useState(null),[w,C]=S.useState(null),[O,N]=S.useState(!1),j=OH(f),[D,L]=df({prop:r,defaultProp:a??!1,onChange:s,caller:oo}),[z,U]=df({prop:l,defaultProp:u,onChange:d,caller:oo}),fe=S.useRef(null),ie=A?y||!!A.closest("form"):!0,[le,W]=S.useState(new Set),ee=Array.from(le).map(H=>H.props.value).join(";");return b.jsx(BF,{...x,children:b.jsxs(qF,{required:E,scope:t,trigger:A,onTriggerChange:T,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:O,onValueNodeHasChildrenChange:N,contentId:or(),value:z,onValueChange:U,open:D,onOpenChange:L,dir:j,triggerPointerDownPosRef:fe,disabled:v,children:[b.jsx(fh.Provider,{scope:t,children:b.jsx(WF,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(H=>{W(re=>new Set(re).add(H))},[]),onNativeOptionRemove:S.useCallback(H=>{W(re=>{const Z=new Set(re);return Z.delete(H),Z})},[]),children:n})}),ie?b.jsxs(TN,{"aria-hidden":!0,required:E,tabIndex:-1,name:m,autoComplete:g,value:z,onChange:H=>U(H.target.value),disabled:v,form:y,children:[z===void 0?b.jsx("option",{value:""}):null,Array.from(le)]},ee):null]})})};tN.displayName=oo;var nN="SelectTrigger",rN=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,s=mh(n),l=ha(nN,n),u=l.disabled||r,d=At(t,l.onTriggerChange),f=hh(n),m=S.useRef("touch"),[g,v,E]=CN(x=>{const A=f().filter(C=>!C.disabled),T=A.find(C=>C.value===l.value),w=NN(A,x,T);w!==void 0&&l.onValueChange(w.value)}),y=x=>{u||(l.onOpenChange(!0),E()),x&&(l.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return b.jsx(UF,{asChild:!0,...s,children:b.jsx(We.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":RN(l.value)?"":void 0,...a,ref:d,onClick:tt(a.onClick,x=>{x.currentTarget.focus(),m.current!=="mouse"&&y(x)}),onPointerDown:tt(a.onPointerDown,x=>{m.current=x.pointerType;const A=x.target;A.hasPointerCapture(x.pointerId)&&A.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(y(x),x.preventDefault())}),onKeyDown:tt(a.onKeyDown,x=>{const A=g.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&v(x.key),!(A&&x.key===" ")&&GF.includes(x.key)&&(y(),x.preventDefault())})})})});rN.displayName=nN;var iN="SelectValue",aN=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:s,placeholder:l="",...u}=e,d=ha(iN,n),{onValueNodeHasChildrenChange:f}=d,m=s!==void 0,g=At(t,d.onValueNodeChange);return cn(()=>{f(m)},[f,m]),b.jsx(We.span,{...u,ref:g,style:{pointerEvents:"none"},children:RN(d.value)?b.jsx(b.Fragment,{children:l}):s})});aN.displayName=iN;var XF="SelectIcon",oN=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return b.jsx(We.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});oN.displayName=XF;var QF="SelectPortal",sN=e=>b.jsx(Jf,{asChild:!0,...e});sN.displayName=QF;var so="SelectContent",lN=S.forwardRef((e,t)=>{const n=ha(so,e.__scopeSelect),[r,a]=S.useState();if(cn(()=>{a(new DocumentFragment)},[]),!n.open){const s=r;return s?co.createPortal(b.jsx(cN,{scope:e.__scopeSelect,children:b.jsx(fh.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),s):null}return b.jsx(uN,{...e,ref:t})});lN.displayName=so;var yr=10,[cN,ma]=Ls(so),JF="SelectContentImpl",e4=vs("SelectContent.RemoveScroll"),uN=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:g,collisionBoundary:v,collisionPadding:E,sticky:y,hideWhenDetached:x,avoidCollisions:A,...T}=e,w=ha(so,n),[C,O]=S.useState(null),[N,j]=S.useState(null),D=At(t,ue=>O(ue)),[L,z]=S.useState(null),[U,fe]=S.useState(null),ie=hh(n),[le,W]=S.useState(!1),ee=S.useRef(!1);S.useEffect(()=>{if(C)return uC(C)},[C]),tC();const H=S.useCallback(ue=>{const[_e,...Oe]=ie().map(Fe=>Fe.ref.current),[Re]=Oe.slice(-1),$e=document.activeElement;for(const Fe of ue)if(Fe===$e||(Fe==null||Fe.scrollIntoView({block:"nearest"}),Fe===_e&&N&&(N.scrollTop=0),Fe===Re&&N&&(N.scrollTop=N.scrollHeight),Fe==null||Fe.focus(),document.activeElement!==$e))return},[ie,N]),re=S.useCallback(()=>H([L,C]),[H,L,C]);S.useEffect(()=>{le&&re()},[le,re]);const{onOpenChange:Z,triggerPointerDownPosRef:ve}=w;S.useEffect(()=>{if(C){let ue={x:0,y:0};const _e=Re=>{var $e,Fe;ue={x:Math.abs(Math.round(Re.pageX)-((($e=ve.current)==null?void 0:$e.x)??0)),y:Math.abs(Math.round(Re.pageY)-(((Fe=ve.current)==null?void 0:Fe.y)??0))}},Oe=Re=>{ue.x<=10&&ue.y<=10?Re.preventDefault():C.contains(Re.target)||Z(!1),document.removeEventListener("pointermove",_e),ve.current=null};return ve.current!==null&&(document.addEventListener("pointermove",_e),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_e),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[C,Z,ve]),S.useEffect(()=>{const ue=()=>Z(!1);return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[Z]);const[P,X]=CN(ue=>{const _e=ie().filter($e=>!$e.disabled),Oe=_e.find($e=>$e.ref.current===document.activeElement),Re=NN(_e,ue,Oe);Re&&setTimeout(()=>Re.ref.current.focus())}),$=S.useCallback((ue,_e,Oe)=>{const Re=!ee.current&&!Oe;(w.value!==void 0&&w.value===_e||Re)&&(z(ue),Re&&(ee.current=!0))},[w.value]),Q=S.useCallback(()=>C==null?void 0:C.focus(),[C]),ne=S.useCallback((ue,_e,Oe)=>{const Re=!ee.current&&!Oe;(w.value!==void 0&&w.value===_e||Re)&&fe(ue)},[w.value]),he=r==="popper"?vy:dN,Ee=he===vy?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:g,collisionBoundary:v,collisionPadding:E,sticky:y,hideWhenDetached:x,avoidCollisions:A}:{};return b.jsx(cN,{scope:n,content:C,viewport:N,onViewportChange:j,itemRefCallback:$,selectedItem:L,onItemLeave:Q,itemTextRefCallback:ne,focusSelectedItem:re,selectedItemText:U,position:r,isPositioned:le,searchRef:P,children:b.jsx(Wv,{as:e4,allowPinchZoom:!0,children:b.jsx(qv,{asChild:!0,trapped:w.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:tt(a,ue=>{var _e;(_e=w.trigger)==null||_e.focus({preventScroll:!0}),ue.preventDefault()}),children:b.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:b.jsx(he,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:ue=>ue.preventDefault(),...T,...Ee,onPlaced:()=>W(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:tt(T.onKeyDown,ue=>{const _e=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!_e&&ue.key.length===1&&X(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let Re=ie().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const $e=ue.target,Fe=Re.indexOf($e);Re=Re.slice(Fe+1)}setTimeout(()=>H(Re)),ue.preventDefault()}})})})})})})});uN.displayName=JF;var t4="SelectItemAlignedPosition",dN=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,s=ha(so,n),l=ma(so,n),[u,d]=S.useState(null),[f,m]=S.useState(null),g=At(t,D=>m(D)),v=hh(n),E=S.useRef(!1),y=S.useRef(!0),{viewport:x,selectedItem:A,selectedItemText:T,focusSelectedItem:w}=l,C=S.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&f&&x&&A&&T){const D=s.trigger.getBoundingClientRect(),L=f.getBoundingClientRect(),z=s.valueNode.getBoundingClientRect(),U=T.getBoundingClientRect();if(s.dir!=="rtl"){const $e=U.left-L.left,Fe=z.left-$e,pt=D.left-Fe,Zt=D.width+pt,On=Math.max(Zt,L.width),Sn=window.innerWidth-yr,ur=pA(Fe,[yr,Math.max(yr,Sn-On)]);u.style.minWidth=Zt+"px",u.style.left=ur+"px"}else{const $e=L.right-U.right,Fe=window.innerWidth-z.right-$e,pt=window.innerWidth-D.right-Fe,Zt=D.width+pt,On=Math.max(Zt,L.width),Sn=window.innerWidth-yr,ur=pA(Fe,[yr,Math.max(yr,Sn-On)]);u.style.minWidth=Zt+"px",u.style.right=ur+"px"}const fe=v(),ie=window.innerHeight-yr*2,le=x.scrollHeight,W=window.getComputedStyle(f),ee=parseInt(W.borderTopWidth,10),H=parseInt(W.paddingTop,10),re=parseInt(W.borderBottomWidth,10),Z=parseInt(W.paddingBottom,10),ve=ee+H+le+Z+re,P=Math.min(A.offsetHeight*5,ve),X=window.getComputedStyle(x),$=parseInt(X.paddingTop,10),Q=parseInt(X.paddingBottom,10),ne=D.top+D.height/2-yr,he=ie-ne,Ee=A.offsetHeight/2,ue=A.offsetTop+Ee,_e=ee+H+ue,Oe=ve-_e;if(_e<=ne){const $e=fe.length>0&&A===fe[fe.length-1].ref.current;u.style.bottom="0px";const Fe=f.clientHeight-x.offsetTop-x.offsetHeight,pt=Math.max(he,Ee+($e?Q:0)+Fe+re),Zt=_e+pt;u.style.height=Zt+"px"}else{const $e=fe.length>0&&A===fe[0].ref.current;u.style.top="0px";const pt=Math.max(ne,ee+x.offsetTop+($e?$:0)+Ee)+Oe;u.style.height=pt+"px",x.scrollTop=_e-ne+x.offsetTop}u.style.margin=`${yr}px 0`,u.style.minHeight=P+"px",u.style.maxHeight=ie+"px",r==null||r(),requestAnimationFrame(()=>E.current=!0)}},[v,s.trigger,s.valueNode,u,f,x,A,T,s.dir,r]);cn(()=>C(),[C]);const[O,N]=S.useState();cn(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const j=S.useCallback(D=>{D&&y.current===!0&&(C(),w==null||w(),y.current=!1)},[C,w]);return b.jsx(r4,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:E,onScrollButtonChange:j,children:b.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:b.jsx(We.div,{...a,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});dN.displayName=t4;var n4="SelectPopperPosition",vy=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=yr,...s}=e,l=mh(n);return b.jsx($F,{...l,...s,ref:t,align:r,collisionPadding:a,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)"}})});vy.displayName=n4;var[r4,cb]=Ls(so,{}),by="SelectViewport",fN=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,s=ma(by,n),l=cb(by,n),u=At(t,s.onViewportChange),d=S.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),b.jsx(fh.Slot,{scope:n,children:b.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:tt(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:v}=l;if(v!=null&&v.current&&g){const E=Math.abs(d.current-m.scrollTop);if(E>0){const y=window.innerHeight-yr*2,x=parseFloat(g.style.minHeight),A=parseFloat(g.style.height),T=Math.max(x,A);if(T<y){const w=T+E,C=Math.min(y,w),O=w-C;g.style.height=C+"px",g.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,g.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});fN.displayName=by;var hN="SelectGroup",[i4,a4]=Ls(hN),mN=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=or();return b.jsx(i4,{scope:n,id:a,children:b.jsx(We.div,{role:"group","aria-labelledby":a,...r,ref:t})})});mN.displayName=hN;var pN="SelectLabel",gN=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=a4(pN,n);return b.jsx(We.div,{id:a.id,...r,ref:t})});gN.displayName=pN;var Ef="SelectItem",[o4,yN]=Ls(Ef),vN=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:s,...l}=e,u=ha(Ef,n),d=ma(Ef,n),f=u.value===r,[m,g]=S.useState(s??""),[v,E]=S.useState(!1),y=At(t,w=>{var C;return(C=d.itemRefCallback)==null?void 0:C.call(d,w,r,a)}),x=or(),A=S.useRef("touch"),T=()=>{a||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(o4,{scope:n,value:r,disabled:a,textId:x,isSelected:f,onItemTextChange:S.useCallback(w=>{g(C=>C||((w==null?void 0:w.textContent)??"").trim())},[]),children:b.jsx(fh.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:b.jsx(We.div,{role:"option","aria-labelledby":x,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:y,onFocus:tt(l.onFocus,()=>E(!0)),onBlur:tt(l.onBlur,()=>E(!1)),onClick:tt(l.onClick,()=>{A.current!=="mouse"&&T()}),onPointerUp:tt(l.onPointerUp,()=>{A.current==="mouse"&&T()}),onPointerDown:tt(l.onPointerDown,w=>{A.current=w.pointerType}),onPointerMove:tt(l.onPointerMove,w=>{var C;A.current=w.pointerType,a?(C=d.onItemLeave)==null||C.call(d):A.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:tt(l.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=d.onItemLeave)==null||C.call(d))}),onKeyDown:tt(l.onKeyDown,w=>{var O;((O=d.searchRef)==null?void 0:O.current)!==""&&w.key===" "||(KF.includes(w.key)&&T(),w.key===" "&&w.preventDefault())})})})})});vN.displayName=Ef;var Xl="SelectItemText",bN=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...s}=e,l=ha(Xl,n),u=ma(Xl,n),d=yN(Xl,n),f=YF(Xl,n),[m,g]=S.useState(null),v=At(t,T=>g(T),d.onItemTextChange,T=>{var w;return(w=u.itemTextRefCallback)==null?void 0:w.call(u,T,d.value,d.disabled)}),E=m==null?void 0:m.textContent,y=S.useMemo(()=>b.jsx("option",{value:d.value,disabled:d.disabled,children:E},d.value),[d.disabled,d.value,E]),{onNativeOptionAdd:x,onNativeOptionRemove:A}=f;return cn(()=>(x(y),()=>A(y)),[x,A,y]),b.jsxs(b.Fragment,{children:[b.jsx(We.span,{id:d.textId,...s,ref:v}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?co.createPortal(s.children,l.valueNode):null]})});bN.displayName=Xl;var _N="SelectItemIndicator",xN=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return yN(_N,n).isSelected?b.jsx(We.span,{"aria-hidden":!0,...r,ref:t}):null});xN.displayName=_N;var _y="SelectScrollUpButton",EN=S.forwardRef((e,t)=>{const n=ma(_y,e.__scopeSelect),r=cb(_y,e.__scopeSelect),[a,s]=S.useState(!1),l=At(t,r.onScrollButtonChange);return cn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;s(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(AN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});EN.displayName=_y;var xy="SelectScrollDownButton",SN=S.forwardRef((e,t)=>{const n=ma(xy,e.__scopeSelect),r=cb(xy,e.__scopeSelect),[a,s]=S.useState(!1),l=At(t,r.onScrollButtonChange);return cn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;s(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?b.jsx(AN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});SN.displayName=xy;var AN=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,s=ma("SelectScrollButton",n),l=S.useRef(null),u=hh(n),d=S.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return S.useEffect(()=>()=>d(),[d]),cn(()=>{var m;const f=u().find(g=>g.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),b.jsx(We.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:tt(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:tt(a.onPointerMove,()=>{var f;(f=s.onItemLeave)==null||f.call(s),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:tt(a.onPointerLeave,()=>{d()})})}),s4="SelectSeparator",wN=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(We.div,{"aria-hidden":!0,...r,ref:t})});wN.displayName=s4;var Ey="SelectArrow",l4=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=mh(n),s=ha(Ey,n),l=ma(Ey,n);return s.open&&l.position==="popper"?b.jsx(HF,{...a,...r,ref:t}):null});l4.displayName=Ey;var c4="SelectBubbleInput",TN=S.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=S.useRef(null),s=At(r,a),l=FF(t);return S.useEffect(()=>{const u=a.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]),b.jsx(We.select,{...n,style:{...cR,...n.style},ref:s,defaultValue:t})});TN.displayName=c4;function RN(e){return e===""||e===void 0}function CN(e){const t=xr(e),n=S.useRef(""),r=S.useRef(0),a=S.useCallback(l=>{const u=n.current+l;t(u),function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),s=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,s]}function NN(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=u4(e,Math.max(s,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function u4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var d4=tN,f4=rN,h4=aN,m4=oN,p4=sN,g4=lN,y4=fN,v4=mN,b4=gN,_4=vN,x4=bN,E4=xN,S4=EN,A4=SN,w4=wN;const T4=d4,R4=v4,C4=h4,N4=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>b.jsxs(f4,{className:Ae("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap rounded-md border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",e&&"valid:border-success invalid:border-error",t),...r,children:[n,b.jsx(m4,{asChild:!0,children:b.jsx(jz,{className:"size-4 opacity-50"})})]}),kN=({className:e,...t})=>b.jsx(S4,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(Iz,{})}),ON=({className:e,...t})=>b.jsx(A4,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(B1,{})}),k4=({className:e,children:t,position:n="popper",...r})=>b.jsx(p4,{children:b.jsxs(g4,{className:Ae("bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 p-1 text-sm shadow-none outline-0 transition-all","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[b.jsx(kN,{}),b.jsx(y4,{className:Ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(ON,{})]})}),O4=({className:e,...t})=>b.jsx(b4,{className:Ae("px-1 py-0.5 text-sm font-semibold",e),...t}),D4=({className:e,children:t,...n})=>b.jsxs(_4,{className:Ae("focus:bg-neutral/10 outline-hidden relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:b.jsx(E4,{children:b.jsx(Cs,{className:"size-4"})})}),b.jsx(x4,{children:t})]}),I4=({className:e,...t})=>b.jsx(w4,{className:Ae("-mx-1 my-1 h-px bg-red-300",e),...t}),Ie=T4;Ie.Group=R4;Ie.Value=C4;Ie.Trigger=N4;Ie.ScrollUpButton=kN;Ie.ScrollDownButton=ON;Ie.Content=k4;Ie.Label=O4;Ie.Item=D4;Ie.Separator=I4;const L4=e=>(e==null?void 0:e.getAttribute("aria-selected"))==="true",j4=(e,t=L4,n=!1)=>{const[r,a]=S.useState(null),[s,l]=S.useState(null),u=e.current.length;return S.useEffect(()=>{const d=()=>{let x=null;if(s?x=s:x=e.current.find(t)??null,!x){a(w=>({left:0,width:0,...w,opacity:0}));return}const A=x.offsetLeft,T=x.offsetWidth;a({left:A,width:T,opacity:1})};d(),window.addEventListener("resize",d),window.addEventListener("DOMContentLoaded",d);const f=[];e.current.forEach(x=>{if(x){const A=new MutationObserver(T=>{for(const w of T)if(w.type==="attributes"&&w.attributeName==="aria-selected"){d();break}});A.observe(x,{attributes:!0,attributeFilter:["aria-selected"]}),f.push(A)}});const m=[],g=x=>{if(!x)return;const A=new ResizeObserver(()=>{d()});A.observe(x),m.push(A)},v=e.current.find(t)??null;v&&g(v),s&&g(s);const E=x=>{l(x.currentTarget)},y=()=>{l(null)};return n&&e.current.forEach(x=>{x==null||x.addEventListener("mouseenter",E,{passive:!0}),x==null||x.addEventListener("mouseleave",y,{passive:!0})}),()=>{window.removeEventListener("resize",d),window.removeEventListener("DOMContentLoaded",d),f.forEach(x=>x.disconnect()),m.forEach(x=>x.disconnect()),e.current.forEach(x=>{x==null||x.removeEventListener("mouseenter",E),x==null||x.removeEventListener("mouseleave",y)})}},[e,t,s,u]),{choiceIndicatorPosition:r}},M4=[{content:"Off",value:!1},{content:"On",value:!0}],P4=cr("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"}}),z4=cr("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"}}),V4=cr("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"}}}),Zc=({choices:e=M4,value:t,defaultValue:n,onChange:r,color:a="primary",size:s="md",className:l})=>{const[u,d]=S.useState(t??n??e[0].value),f=S.useRef([]),m=S.useRef(null),{choiceIndicatorPosition:g}=j4(f),v=E=>{d(E),r==null||r(E)};return S.useEffect(()=>{t!==void 0&&d(t)},[t]),b.jsx("div",{className:P4({color:a,className:l}),role:"tablist",children:b.jsxs("div",{className:"relative flex size-full flex-row items-center justify-center",children:[e.map((E,y)=>{const{content:x,value:A,...T}=E,w=typeof A=="string"||typeof A=="number",C=A===u;return S.createElement("button",{...T,className:Ae(z4({size:s})),key:w?A:y,role:"tab",onClick:()=>v(A),"aria-selected":C,disabled:C,ref:O=>{f.current[y]=O}},x)}),g&&b.jsx("div",{className:Ae(V4({color:a})),style:g,ref:m})]})})},B4=e=>{const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=fa();return b.jsx(aB,{id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})},U4=e=>{const{formDescriptionId:t}=fa();return b.jsx("p",{className:"text-neutral text-sm",id:t,...e})},$4=({children:e,...t})=>{const{error:n,formMessageId:r}=fa(),a=n?String((n==null?void 0:n.message)??""):e;return a?b.jsx("p",{className:"text-error text-xs font-medium",role:"alert",id:r,...t,children:a}):null},ph=({label:e,description:t,isRequired:n,info:r,children:a,showErrorMessage:s=!0,htmlFor:l})=>b.jsxs(Ze.Item,{className:"flex w-full flex-col gap-2 p-2",children:[(t||e)&&b.jsxs("div",{className:"flex flex-col gap-1 p-1 leading-none",children:[e&&b.jsx(IC,{isRequired:n,info:r,htmlFor:l,children:e}),t&&b.jsx(Ze.Description,{children:t})]}),b.jsx(Ze.Control,{children:a}),s&&b.jsx(Ze.Message,{"data-testid":"error-message"})]}),H4=({field:e,name:t,label:n,Element:r,isRequired:a=!1,info:s,description:l,showErrorMessage:u=!0,...d})=>{const{error:f}=fa();return b.jsx(ph,{htmlFor:t,label:n,description:l,isRequired:a,info:s,showErrorMessage:u,"aria-invalid":!!f,children:b.jsx(r,{"data-testid":"element",id:t,...e,...d,children:d.children})})},pa=e=>{const{control:t}=da();return b.jsx(Ze.Field,{control:t,name:e.name,render:({field:n})=>b.jsx(H4,{...e,field:n})})},F4=e=>b.jsx(pa,{id:e.name,"data-testid":e.name,Element:Os,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),G4=({autoComplete:e,...t})=>b.jsx(pa,{Element:I2,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}),K4=e=>b.jsx(pa,{Element:YR,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}),Z4=e=>b.jsx(pa,{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:QR,...e}),q4=e=>b.jsx(pa,{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:JR,...e}),W4=e=>b.jsx(pa,{Element:Zv,id:e.name,"data-testid":e.name,...e}),Y4=({inputLabel:e,...t})=>b.jsx(D2,{...t,label:e}),X4=({autoComplete:e,...t})=>b.jsx(pa,{Element:Y4,id:t.name,"data-testid":t.name,autoComplete:e,minLength:6,maxLength:255,...t}),Q4=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:s,children:l,...u})=>{const{control:d}=da();return b.jsx(Ze.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=fa();return b.jsx(ph,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:s,"aria-invalid":!!m,children:b.jsx(mn,{onValueChange:f.onChange,values:f.value,...u,children:l})})}})},J4=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:s,children:l,...u})=>{const{control:d}=da();return b.jsx(Ze.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=fa();return b.jsx(ph,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:s,"aria-invalid":!!m,children:b.jsx(Ie,{onValueChange:f.onChange,defaultValue:f.value,...u,children:l})})}})},e3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:s,children:l,...u})=>{const{control:d}=da();return b.jsx(Ze.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=fa();return b.jsx(ph,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:s,"aria-invalid":!!m,children:b.jsx(Zc,{...f,...u,children:l})})}})},Ze=R2;Ze.Description=U4;Ze.Control=B4;Ze.Field=k2;Ze.Item=N2;Ze.Label=IC;Ze.Message=$4;Ze.Element=pa;Ze.Input=F4;Ze.InputPassword=G4;Ze.Checkbox=X4;Ze.TextArea=K4;Ze.AutoSizedTextArea=W4;Ze.Button=ut;Ze.Select=J4;Ze.MultiSelect=Q4;Ze.EditableFieldInput=Z4;Ze.EditableFieldTextArea=q4;Ze.SwitchSelector=e3;const t3=/^[cC][^\s-]{8,}$/,n3=/^[0-9a-z]+$/,r3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,i3=/^[0-9a-vA-V]{20}$/,a3=/^[A-Za-z0-9]{27}$/,o3=/^[a-zA-Z0-9_-]{21}$/,s3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,l3=/^([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})$/,AA=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)$/,c3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,u3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function d3(){return new RegExp(u3,"u")}const f3=/^(?:(?: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])$/,h3=/^(([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})$/,m3=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,p3=/^(([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])$/,g3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,DN=/^[A-Za-z0-9_-]*$/,y3=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,v3=/^\+(?:[0-9]){6,14}[0-9]$/,IN="(?:(?:\\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])))",b3=new RegExp(`^${IN}$`);function LN(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 _3(e){return new RegExp(`^${LN(e)}$`)}function x3(e){const t=LN({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(`^${IN}T(?:${r})$`)}const E3=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},S3=/^[^A-Z]*$/,A3=/^[^a-z]*$/,qr=pe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),w3=pe("$ZodCheckMaxLength",(e,t)=>{qr.init(e,t),e._zod.when=n=>{const r=n.value;return!Uv(r)&&r.length!==void 0},e._zod.onattach.push(n=>{const r=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=Gv(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),T3=pe("$ZodCheckMinLength",(e,t)=>{qr.init(e,t),e._zod.when=n=>{const r=n.value;return!Uv(r)&&r.length!==void 0},e._zod.onattach.push(n=>{const r=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=Gv(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),R3=pe("$ZodCheckLengthEquals",(e,t)=>{qr.init(e,t),e._zod.when=n=>{const r=n.value;return!Uv(r)&&r.length!==void 0},e._zod.onattach.push(n=>{const r=n._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=n=>{const r=n.value,a=r.length;if(a===t.length)return;const s=Gv(r),l=a>t.length;n.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},input:n.value,inst:e,continue:!t.abort})}}),gh=pe("$ZodCheckStringFormat",(e,t)=>{var n;qr.init(e,t),e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),(n=e._zod).check??(n.check=r=>{if(!t.pattern)throw new Error("Not implemented.");t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})})}),C3=pe("$ZodCheckRegex",(e,t)=>{gh.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})}}),N3=pe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=S3),gh.init(e,t)}),k3=pe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=A3),gh.init(e,t)}),O3=pe("$ZodCheckIncludes",(e,t)=>{qr.init(e,t);const n=rh(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const s=a._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),D3=pe("$ZodCheckStartsWith",(e,t)=>{qr.init(e,t);const n=new RegExp(`^${rh(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),I3=pe("$ZodCheckEndsWith",(e,t)=>{qr.init(e,t);const n=new RegExp(`.*${rh(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),L3=pe("$ZodCheckOverwrite",(e,t)=>{qr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class j3{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(`
254
- `).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,a=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...n,a.join(`
255
- `))}}const M3={major:4,minor:0,patch:0},Bt=pe("$ZodType",(e,t)=>{var a;var n;e??(e={}),xt(e._zod,"id",()=>t.type+"_"+BR(10)),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=M3;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const l of s._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,u,d)=>{let f=ic(l),m;for(const g of u){if(g._zod.when){if(!g._zod.when(l))continue}else if(f)continue;const v=l.issues.length,E=g._zod.check(l);if(E instanceof Promise&&(d==null?void 0:d.async)===!1)throw new gc;if(m||E instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await E,l.issues.length!==v&&(f||(f=ic(l,v)))});else{if(l.issues.length===v)continue;f||(f=ic(l,v))}}return m?m.then(()=>l):l};e._zod.run=(l,u)=>{const d=e._zod.parse(l,u);if(d instanceof Promise){if(u.async===!1)throw new gc;return d.then(f=>s(f,r,u))}return s(d,r,u)}}e["~standard"]={validate:s=>{var l;try{const u=E2(e,s);return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}}catch{return S2(e,s).then(d=>{var f;return d.success?{value:d.data}:{issues:(f=d.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}}),ub=pe("$ZodString",(e,t)=>{var n;Bt.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??E3(e._zod.bag),e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yt=pe("$ZodStringFormat",(e,t)=>{gh.init(e,t),ub.init(e,t)}),P3=pe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=l3),yt.init(e,t)}),z3=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=AA(r))}else t.pattern??(t.pattern=AA());yt.init(e,t)}),V3=pe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=c3),yt.init(e,t)}),B3=pe("$ZodURL",(e,t)=>{yt.init(e,t),e._zod.check=n=>{try{const r=new URL(n.value);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:y3.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}));return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),U3=pe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=d3()),yt.init(e,t)}),$3=pe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=o3),yt.init(e,t)}),H3=pe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=t3),yt.init(e,t)}),F3=pe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=n3),yt.init(e,t)}),G3=pe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=r3),yt.init(e,t)}),K3=pe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=i3),yt.init(e,t)}),Z3=pe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=a3),yt.init(e,t)}),q3=pe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=x3(t)),yt.init(e,t),e._zod.check}),W3=pe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=b3),yt.init(e,t)}),Y3=pe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_3(t)),yt.init(e,t),e._zod.check}),X3=pe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=s3),yt.init(e,t)}),Q3=pe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=f3),yt.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),J3=pe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=h3),yt.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})}}}),e5=pe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=m3),yt.init(e,t)}),t5=pe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=p3),yt.init(e,t),e._zod.check=n=>{const[r,a]=n.value.split("/");try{if(!a)throw new Error;const s=Number(a);if(`${s}`!==a)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 jN(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const n5=pe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=g3),yt.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{jN(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function r5(e){if(!DN.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return jN(n)}const i5=pe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=DN),yt.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{r5(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),a5=pe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=v3),yt.init(e,t)});function o5(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n,a=JSON.parse(atob(r));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const s5=pe("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=n=>{o5(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),l5=pe("$ZodUnknown",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),c5=pe("$ZodNever",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function wA(e,t,n){e.issues.length&&t.issues.push(...Fv(n,e.issues)),t.value[n]=e.value}const u5=pe("$ZodArray",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const s=[];for(let l=0;l<a.length;l++){const u=a[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?s.push(d.then(f=>wA(f,n,l))):wA(d,n,l)}return s.length?Promise.all(s).then(()=>n):n}});function Rd(e,t,n){e.issues.length&&t.issues.push(...Fv(n,e.issues)),t.value[n]=e.value}function TA(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(...Fv(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}const d5=pe("$ZodObject",(e,t)=>{Bt.init(e,t);const n=VR(()=>{const g=Object.keys(t.shape);for(const E of g)if(!(t.shape[E]instanceof Bt))throw new Error(`Invalid element at key "${E}": expected a Zod schema`);const v=d2(t.shape);return{shape:t.shape,keys:g,keySet:new Set(g),numKeys:g.length,optionalKeys:new Set(v)}});xt(e._zod,"propValues",()=>{const g=t.shape,v={};for(const E in g){const y=g[E]._zod;if(y.values){v[E]??(v[E]=new Set);for(const x of y.values)v[E].add(x)}}return v});const r=g=>{const v=new j3(["shape","payload","ctx"]),{keys:E,optionalKeys:y}=n.value,x=w=>{const C=Fl(w);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};v.write("const input = payload.value;");const A=Object.create(null);for(const w of E)A[w]=BR(15);v.write("const newResult = {}");for(const w of E)if(y.has(w)){const C=A[w];v.write(`const ${C} = ${x(w)};`);const O=Fl(w);v.write(`
256
- if (${C}.issues.length) {
257
- if (input[${O}] === undefined) {
258
- if (${O} in input) {
259
- newResult[${O}] = undefined;
260
- }
261
- } else {
262
- payload.issues = payload.issues.concat(
263
- ${C}.issues.map((iss) => ({
264
- ...iss,
265
- path: iss.path ? [${O}, ...iss.path] : [${O}],
266
- }))
267
- );
268
- }
269
- } else if (${C}.value === undefined) {
270
- if (${O} in input) newResult[${O}] = undefined;
271
- } else {
272
- newResult[${O}] = ${C}.value;
273
- }
274
- `)}else{const C=A[w];v.write(`const ${C} = ${x(w)};`),v.write(`
275
- if (${C}.issues.length) payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
276
- ...iss,
277
- path: iss.path ? [${Fl(w)}, ...iss.path] : [${Fl(w)}]
278
- })));`),v.write(`newResult[${Fl(w)}] = ${C}.value`)}v.write("payload.value = newResult;"),v.write("return payload;");const T=v.compile();return(w,C)=>T(g,w,C)};let a;const s=uy,l=!zR.jitless,d=l&&c2.value,{catchall:f}=t;let m;e._zod.parse=(g,v)=>{m??(m=n.value);const E=g.value;if(!s(E))return g.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),g;const y=[];if(l&&d&&(v==null?void 0:v.async)===!1&&v.jitless!==!0)a||(a=r(t.shape)),g=a(g,v);else{g.value={};const C=m.shape;for(const O of m.keys){const N=C[O],j=N._zod.run({value:E[O],issues:[]},v),D=N._zod.optin==="optional"&&N._zod.optout==="optional";j instanceof Promise?y.push(j.then(L=>D?TA(L,g,O,E):Rd(L,g,O))):D?TA(j,g,O,E):Rd(j,g,O)}}if(!f)return y.length?Promise.all(y).then(()=>g):g;const x=[],A=m.keySet,T=f._zod,w=T.def.type;for(const C of Object.keys(E)){if(A.has(C))continue;if(w==="never"){x.push(C);continue}const O=T.run({value:E[C],issues:[]},v);O instanceof Promise?y.push(O.then(N=>Rd(N,g,C))):Rd(O,g,C)}return x.length&&g.issues.push({code:"unrecognized_keys",keys:x,input:E,inst:e}),y.length?Promise.all(y).then(()=>g):g}});function RA(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(s=>no(s,r,to())))}),t}const f5=pe("$ZodUnion",(e,t)=>{Bt.init(e,t),xt(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),xt(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=>$v(r.source)).join("|")})$`)}}),e._zod.parse=(n,r)=>{let a=!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),a=!0;else{if(u.issues.length===0)return u;s.push(u)}}return a?Promise.all(s).then(l=>RA(l,n,e,r)):RA(s,n,e,r)}}),h5=pe("$ZodIntersection",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const{value:a}=n,s=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([d,f])=>CA(n,d,f)):CA(n,s,l)}});function Sy(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(QS(e)&&QS(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),a={...e,...t};for(const s of r){const l=Sy(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};a[s]=l.data}return{valid:!0,data:a}}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 a=e[r],s=t[r],l=Sy(a,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 CA(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),ic(e))return e;const r=Sy(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 m5=pe("$ZodEnum",(e,t)=>{Bt.init(e,t);const n=s2(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(r=>u2.has(typeof r)).map(r=>typeof r=="string"?rh(r):r.toString()).join("|")})$`),e._zod.parse=(r,a)=>{const s=r.value;return e._zod.values.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),p5=pe("$ZodTransform",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n));if(a instanceof Promise)throw new gc;return n.value=a,n}}),g5=pe("$ZodOptional",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",xt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),xt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$v(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>n.value===void 0?n:t.innerType._zod.run(n,r)}),y5=pe("$ZodNullable",(e,t)=>{Bt.init(e,t),xt(e._zod,"optin",()=>t.innerType._zod.optin),xt(e._zod,"optout",()=>t.innerType._zod.optout),xt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$v(n.source)}|null)$`):void 0}),xt(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)}),v5=pe("$ZodDefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",xt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>NA(s,t)):NA(a,t)}});function NA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const b5=pe("$ZodPrefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",xt(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))}),_5=pe("$ZodNonOptional",(e,t)=>{Bt.init(e,t),xt(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 a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>kA(s,e)):kA(a,e)}});function kA(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 x5=pe("$ZodCatch",(e,t)=>{Bt.init(e,t),xt(e._zod,"optin",()=>t.innerType._zod.optin),xt(e._zod,"optout",()=>t.innerType._zod.optout),xt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>no(l,r,to()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(s=>no(s,r,to()))},input:n.value}),n.issues=[]),n)}}),E5=pe("$ZodPipe",(e,t)=>{Bt.init(e,t),xt(e._zod,"values",()=>t.in._zod.values),xt(e._zod,"optin",()=>t.in._zod.optin),xt(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(n,r)=>{const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(s=>OA(s,t,r)):OA(a,t,r)}});function OA(e,t,n){return ic(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const S5=pe("$ZodReadonly",(e,t)=>{Bt.init(e,t),xt(e._zod,"propValues",()=>t.innerType._zod.propValues),xt(e._zod,"optin",()=>t.innerType._zod.optin),xt(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(DA):DA(a)}});function DA(e){return e.value=Object.freeze(e.value),e}const A5=pe("$ZodCustom",(e,t)=>{qr.init(e,t),Bt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(s=>IA(s,n,r,e));IA(a,n,r,e)}});function IA(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(yc(a))}}class w5{constructor(){this._map=new WeakMap,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}remove(t){return 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 T5(){return new w5}const Cd=T5();function R5(e,t){return new e({type:"string",...Ue(t)})}function C5(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ue(t)})}function LA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ue(t)})}function N5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ue(t)})}function k5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ue(t)})}function O5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ue(t)})}function D5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ue(t)})}function I5(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ue(t)})}function L5(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ue(t)})}function j5(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ue(t)})}function M5(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ue(t)})}function P5(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ue(t)})}function z5(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ue(t)})}function V5(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ue(t)})}function B5(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ue(t)})}function U5(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ue(t)})}function $5(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ue(t)})}function H5(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ue(t)})}function F5(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ue(t)})}function G5(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ue(t)})}function K5(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ue(t)})}function Z5(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ue(t)})}function q5(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ue(t)})}function W5(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ue(t)})}function Y5(e,t){return new e({type:"string",format:"date",check:"string_format",...Ue(t)})}function X5(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ue(t)})}function Q5(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ue(t)})}function J5(e){return new e({type:"unknown"})}function eG(e,t){return new e({type:"never",...Ue(t)})}function MN(e,t){return new w3({check:"max_length",...Ue(t),maximum:e})}function Sf(e,t){return new T3({check:"min_length",...Ue(t),minimum:e})}function PN(e,t){return new R3({check:"length_equals",...Ue(t),length:e})}function tG(e,t){return new C3({check:"string_format",format:"regex",...Ue(t),pattern:e})}function nG(e){return new N3({check:"string_format",format:"lowercase",...Ue(e)})}function rG(e){return new k3({check:"string_format",format:"uppercase",...Ue(e)})}function iG(e,t){return new O3({check:"string_format",format:"includes",...Ue(t),includes:e})}function aG(e,t){return new D3({check:"string_format",format:"starts_with",...Ue(t),prefix:e})}function oG(e,t){return new I3({check:"string_format",format:"ends_with",...Ue(t),suffix:e})}function qc(e){return new L3({check:"overwrite",tx:e})}function sG(e){return qc(t=>t.normalize(e))}function lG(){return qc(e=>e.trim())}function cG(){return qc(e=>e.toLowerCase())}function uG(){return qc(e=>e.toUpperCase())}function dG(e,t,n){return new e({type:"array",element:t,...Ue(n)})}function fG(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ue(n)})}const hG=pe("ZodISODateTime",(e,t)=>{q3.init(e,t),wt.init(e,t)});function mG(e){return W5(hG,e)}const pG=pe("ZodISODate",(e,t)=>{W3.init(e,t),wt.init(e,t)});function gG(e){return Y5(pG,e)}const yG=pe("ZodISOTime",(e,t)=>{Y3.init(e,t),wt.init(e,t)});function vG(e){return X5(yG,e)}const bG=pe("ZodISODuration",(e,t)=>{X3.init(e,t),wt.init(e,t)});function _G(e){return Q5(bG,e)}const xG=(e,t)=>{Kv.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>b2(e,n)},flatten:{value:n=>v2(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},yh=pe("ZodError",xG,{Parent:Error}),EG=HR(yh),SG=FR(yh),AG=GR(yh),wG=KR(yh),en=pe("ZodType",(e,t)=>(Bt.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)=>fo(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>EG(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>AG(e,n,r),e.parseAsync=async(n,r)=>SG(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>wG(e,n,r),e.spa=e.safeParseAsync,e.refine=(n,r)=>e.check(g6(n,r)),e.superRefine=n=>e.check(y6(n)),e.overwrite=n=>e.check(qc(n)),e.optional=()=>PA(e),e.nullable=()=>zA(e),e.nullish=()=>PA(zA(e)),e.nonoptional=n=>l6(e,n),e.array=()=>Ay(e),e.or=n=>XG([e,n]),e.and=n=>JG(e,n),e.transform=n=>VA(e,n6(n)),e.default=n=>a6(e,n),e.prefault=n=>s6(e,n),e.catch=n=>u6(e,n),e.pipe=n=>VA(e,n),e.readonly=()=>h6(e),e.describe=n=>{const r=e.clone();return Cd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=Cd.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Cd.get(e);const r=e.clone();return Cd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),zN=pe("_ZodString",(e,t)=>{ub.init(e,t),en.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(tG(...r)),e.includes=(...r)=>e.check(iG(...r)),e.startsWith=(...r)=>e.check(aG(...r)),e.endsWith=(...r)=>e.check(oG(...r)),e.min=(...r)=>e.check(Sf(...r)),e.max=(...r)=>e.check(MN(...r)),e.length=(...r)=>e.check(PN(...r)),e.nonempty=(...r)=>e.check(Sf(1,...r)),e.lowercase=r=>e.check(nG(r)),e.uppercase=r=>e.check(rG(r)),e.trim=()=>e.check(lG()),e.normalize=(...r)=>e.check(sG(...r)),e.toLowerCase=()=>e.check(cG()),e.toUpperCase=()=>e.check(uG())}),TG=pe("ZodString",(e,t)=>{ub.init(e,t),zN.init(e,t),e.email=n=>e.check(C5(RG,n)),e.url=n=>e.check(I5(CG,n)),e.jwt=n=>e.check(q5(HG,n)),e.emoji=n=>e.check(L5(NG,n)),e.guid=n=>e.check(LA(jA,n)),e.uuid=n=>e.check(N5(Nd,n)),e.uuidv4=n=>e.check(k5(Nd,n)),e.uuidv6=n=>e.check(O5(Nd,n)),e.uuidv7=n=>e.check(D5(Nd,n)),e.nanoid=n=>e.check(j5(kG,n)),e.guid=n=>e.check(LA(jA,n)),e.cuid=n=>e.check(M5(OG,n)),e.cuid2=n=>e.check(P5(DG,n)),e.ulid=n=>e.check(z5(IG,n)),e.base64=n=>e.check(G5(BG,n)),e.base64url=n=>e.check(K5(UG,n)),e.xid=n=>e.check(V5(LG,n)),e.ksuid=n=>e.check(B5(jG,n)),e.ipv4=n=>e.check(U5(MG,n)),e.ipv6=n=>e.check($5(PG,n)),e.cidrv4=n=>e.check(H5(zG,n)),e.cidrv6=n=>e.check(F5(VG,n)),e.e164=n=>e.check(Z5($G,n)),e.datetime=n=>e.check(mG(n)),e.date=n=>e.check(gG(n)),e.time=n=>e.check(vG(n)),e.duration=n=>e.check(_G(n))});function Kl(e){return R5(TG,e)}const wt=pe("ZodStringFormat",(e,t)=>{yt.init(e,t),zN.init(e,t)}),RG=pe("ZodEmail",(e,t)=>{V3.init(e,t),wt.init(e,t)}),jA=pe("ZodGUID",(e,t)=>{P3.init(e,t),wt.init(e,t)}),Nd=pe("ZodUUID",(e,t)=>{z3.init(e,t),wt.init(e,t)}),CG=pe("ZodURL",(e,t)=>{B3.init(e,t),wt.init(e,t)}),NG=pe("ZodEmoji",(e,t)=>{U3.init(e,t),wt.init(e,t)}),kG=pe("ZodNanoID",(e,t)=>{$3.init(e,t),wt.init(e,t)}),OG=pe("ZodCUID",(e,t)=>{H3.init(e,t),wt.init(e,t)}),DG=pe("ZodCUID2",(e,t)=>{F3.init(e,t),wt.init(e,t)}),IG=pe("ZodULID",(e,t)=>{G3.init(e,t),wt.init(e,t)}),LG=pe("ZodXID",(e,t)=>{K3.init(e,t),wt.init(e,t)}),jG=pe("ZodKSUID",(e,t)=>{Z3.init(e,t),wt.init(e,t)}),MG=pe("ZodIPv4",(e,t)=>{Q3.init(e,t),wt.init(e,t)}),PG=pe("ZodIPv6",(e,t)=>{J3.init(e,t),wt.init(e,t)}),zG=pe("ZodCIDRv4",(e,t)=>{e5.init(e,t),wt.init(e,t)}),VG=pe("ZodCIDRv6",(e,t)=>{t5.init(e,t),wt.init(e,t)}),BG=pe("ZodBase64",(e,t)=>{n5.init(e,t),wt.init(e,t)}),UG=pe("ZodBase64URL",(e,t)=>{i5.init(e,t),wt.init(e,t)}),$G=pe("ZodE164",(e,t)=>{a5.init(e,t),wt.init(e,t)}),HG=pe("ZodJWT",(e,t)=>{s5.init(e,t),wt.init(e,t)}),FG=pe("ZodUnknown",(e,t)=>{l5.init(e,t),en.init(e,t)});function MA(){return J5(FG)}const GG=pe("ZodNever",(e,t)=>{c5.init(e,t),en.init(e,t)});function KG(e){return eG(GG,e)}const ZG=pe("ZodArray",(e,t)=>{u5.init(e,t),en.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(Sf(n,r)),e.nonempty=n=>e.check(Sf(1,n)),e.max=(n,r)=>e.check(MN(n,r)),e.length=(n,r)=>e.check(PN(n,r)),e.unwrap=()=>e.element});function Ay(e,t){return dG(ZG,e,t)}const qG=pe("ZodObject",(e,t)=>{d5.init(e,t),en.init(e,t),xt(e,"shape",()=>t.shape),e.keyof=()=>e6(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:MA()}),e.loose=()=>e.clone({...e._zod.def,catchall:MA()}),e.strict=()=>e.clone({...e._zod.def,catchall:KG()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>m2(e,n),e.merge=n=>p2(e,n),e.pick=n=>f2(e,n),e.omit=n=>h2(e,n),e.partial=(...n)=>g2(VN,e,n[0]),e.required=(...n)=>y2(BN,e,n[0])});function WG(e,t){const n={type:"object",get shape(){return Hv(this,"shape",{...e}),this.shape},...Ue(t)};return new qG(n)}const YG=pe("ZodUnion",(e,t)=>{f5.init(e,t),en.init(e,t),e.options=t.options});function XG(e,t){return new YG({type:"union",options:e,...Ue(t)})}const QG=pe("ZodIntersection",(e,t)=>{h5.init(e,t),en.init(e,t)});function JG(e,t){return new QG({type:"intersection",left:e,right:t})}const wy=pe("ZodEnum",(e,t)=>{m5.init(e,t),en.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{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 wy({...t,checks:[],...Ue(a),entries:s})},e.exclude=(r,a)=>{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 wy({...t,checks:[],...Ue(a),entries:s})}});function e6(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new wy({type:"enum",entries:n,...Ue(t)})}const t6=pe("ZodTransform",(e,t)=>{p5.init(e,t),en.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=s=>{if(typeof s=="string")n.issues.push(yc(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(yc(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(s=>(n.value=s,n)):(n.value=a,n)}});function n6(e){return new t6({type:"transform",transform:e})}const VN=pe("ZodOptional",(e,t)=>{g5.init(e,t),en.init(e,t),e.unwrap=()=>e._zod.def.innerType});function PA(e){return new VN({type:"optional",innerType:e})}const r6=pe("ZodNullable",(e,t)=>{y5.init(e,t),en.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zA(e){return new r6({type:"nullable",innerType:e})}const i6=pe("ZodDefault",(e,t)=>{v5.init(e,t),en.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function a6(e,t){return new i6({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const o6=pe("ZodPrefault",(e,t)=>{b5.init(e,t),en.init(e,t),e.unwrap=()=>e._zod.def.innerType});function s6(e,t){return new o6({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const BN=pe("ZodNonOptional",(e,t)=>{_5.init(e,t),en.init(e,t),e.unwrap=()=>e._zod.def.innerType});function l6(e,t){return new BN({type:"nonoptional",innerType:e,...Ue(t)})}const c6=pe("ZodCatch",(e,t)=>{x5.init(e,t),en.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function u6(e,t){return new c6({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const d6=pe("ZodPipe",(e,t)=>{E5.init(e,t),en.init(e,t),e.in=t.in,e.out=t.out});function VA(e,t){return new d6({type:"pipe",in:e,out:t})}const f6=pe("ZodReadonly",(e,t)=>{S5.init(e,t),en.init(e,t)});function h6(e){return new f6({type:"readonly",innerType:e})}const m6=pe("ZodCustom",(e,t)=>{A5.init(e,t),en.init(e,t)});function p6(e,t){const n=new qr({check:"custom",...Ue(t)});return n._zod.check=e,n}function g6(e,t={}){return fG(m6,e,t)}function y6(e,t){const n=p6(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(yc(a,r.value,n._zod.def));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(yc(s))}},e(r.value,r)),t);return n}const UN=S.createContext({});function v6(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const db=typeof window<"u",b6=db?S.useLayoutEffect:S.useEffect,fb=S.createContext(null);function hb(e,t){e.indexOf(t)===-1&&e.push(t)}function mb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Si=(e,t,n)=>n>t?t:n<e?e:n;let pb=()=>{};const Ai={},$N=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function HN(e){return typeof e=="object"&&e!==null}const FN=e=>/^0[^.\s]+$/u.test(e);function gb(e){let t;return()=>(t===void 0&&(t=e()),t)}const sr=e=>e,_6=(e,t)=>n=>t(e(n)),Wc=(...e)=>e.reduce(_6),_c=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class yb{constructor(){this.subscriptions=[]}add(t){return hb(this.subscriptions,t),()=>mb(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let s=0;s<a;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Br=e=>e*1e3,Ur=e=>e/1e3;function GN(e,t){return t?e*(1e3/t):0}const KN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,x6=1e-7,E6=12;function S6(e,t,n,r,a){let s,l,u=0;do l=t+(n-t)/2,s=KN(l,r,a)-e,s>0?n=l:t=l;while(Math.abs(s)>x6&&++u<E6);return l}function Yc(e,t,n,r){if(e===t&&n===r)return sr;const a=s=>S6(s,0,1,e,n);return s=>s===0||s===1?s:KN(a(s),t,r)}const ZN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qN=e=>t=>1-e(1-t),WN=Yc(.33,1.53,.69,.99),vb=qN(WN),YN=ZN(vb),XN=e=>(e*=2)<1?.5*vb(e):.5*(2-Math.pow(2,-10*(e-1))),bb=e=>1-Math.sin(Math.acos(e)),QN=qN(bb),JN=ZN(bb),A6=Yc(.42,0,1,1),w6=Yc(0,0,.58,1),ek=Yc(.42,0,.58,1),T6=e=>Array.isArray(e)&&typeof e[0]!="number",tk=e=>Array.isArray(e)&&typeof e[0]=="number",R6={linear:sr,easeIn:A6,easeInOut:ek,easeOut:w6,circIn:bb,circInOut:JN,circOut:QN,backIn:vb,backInOut:YN,backOut:WN,anticipate:XN},C6=e=>typeof e=="string",BA=e=>{if(tk(e)){pb(e.length===4);const[t,n,r,a]=e;return Yc(t,n,r,a)}else if(C6(e))return R6[e];return e},kd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function N6(e,t){let n=new Set,r=new Set,a=!1,s=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(f.schedule(m),e()),m(u)}const f={schedule:(m,g=!1,v=!1)=>{const y=v&&a?n:r;return g&&l.add(m),y.has(m)||y.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,a){s=!0;return}a=!0,[n,r]=[r,n],n.forEach(d),n.clear(),a=!1,s&&(s=!1,f.process(m))}};return f}const k6=40;function nk(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=kd.reduce((C,O)=>(C[O]=N6(s),C),{}),{setup:u,read:d,resolveKeyframes:f,preUpdate:m,update:g,preRender:v,render:E,postRender:y}=l,x=()=>{const C=Ai.useManualTiming?a.timestamp:performance.now();n=!1,Ai.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(C-a.timestamp,k6),1)),a.timestamp=C,a.isProcessing=!0,u.process(a),d.process(a),f.process(a),m.process(a),g.process(a),v.process(a),E.process(a),y.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(x))},A=()=>{n=!0,r=!0,a.isProcessing||e(x)};return{schedule:kd.reduce((C,O)=>{const N=l[O];return C[O]=(j,D=!1,L=!1)=>(n||A(),N.schedule(j,D,L)),C},{}),cancel:C=>{for(let O=0;O<kd.length;O++)l[kd[O]].cancel(C)},state:a,steps:l}}const{schedule:St,cancel:sa,state:ln,steps:vg}=nk(typeof requestAnimationFrame<"u"?requestAnimationFrame:sr,!0);let Qd;function O6(){Qd=void 0}const Nn={now:()=>(Qd===void 0&&Nn.set(ln.isProcessing||Ai.useManualTiming?ln.timestamp:performance.now()),Qd),set:e=>{Qd=e,queueMicrotask(O6)}},rk=e=>t=>typeof t=="string"&&t.startsWith(e),_b=rk("--"),D6=rk("var(--"),xb=e=>D6(e)?I6.test(e.split("/*")[0].trim()):!1,I6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,js={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xc={...js,transform:e=>Si(0,1,e)},Od={...js,default:1},ac=e=>Math.round(e*1e5)/1e5,Eb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function L6(e){return e==null}const j6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Sb=(e,t)=>n=>!!(typeof n=="string"&&j6.test(n)&&n.startsWith(e)||t&&!L6(n)&&Object.prototype.hasOwnProperty.call(n,t)),ik=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,s,l,u]=r.match(Eb);return{[e]:parseFloat(a),[t]:parseFloat(s),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},M6=e=>Si(0,255,e),bg={...js,transform:e=>Math.round(M6(e))},Wa={test:Sb("rgb","red"),parse:ik("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+bg.transform(e)+", "+bg.transform(t)+", "+bg.transform(n)+", "+ac(xc.transform(r))+")"};function P6(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const Ty={test:Sb("#"),parse:P6,transform:Wa.transform},Xc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ea=Xc("deg"),$r=Xc("%"),ze=Xc("px"),z6=Xc("vh"),V6=Xc("vw"),UA={...$r,parse:e=>$r.parse(e)/100,transform:e=>$r.transform(e*100)},as={test:Sb("hsl","hue"),parse:ik("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$r.transform(ac(t))+", "+$r.transform(ac(n))+", "+ac(xc.transform(r))+")"},zt={test:e=>Wa.test(e)||Ty.test(e)||as.test(e),parse:e=>Wa.test(e)?Wa.parse(e):as.test(e)?as.parse(e):Ty.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wa.transform(e):as.transform(e),getAnimatableNone:e=>{const t=zt.parse(e);return t.alpha=0,zt.transform(t)}},B6=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function U6(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Eb))==null?void 0:t.length)||0)+(((n=e.match(B6))==null?void 0:n.length)||0)>0}const ak="number",ok="color",$6="var",H6="var(",$A="${}",F6=/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 Ec(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let s=0;const u=t.replace(F6,d=>(zt.test(d)?(r.color.push(s),a.push(ok),n.push(zt.parse(d))):d.startsWith(H6)?(r.var.push(s),a.push($6),n.push(d)):(r.number.push(s),a.push(ak),n.push(parseFloat(d))),++s,$A)).split($A);return{values:n,split:u,indexes:r,types:a}}function sk(e){return Ec(e).values}function lk(e){const{split:t,types:n}=Ec(e),r=t.length;return a=>{let s="";for(let l=0;l<r;l++)if(s+=t[l],a[l]!==void 0){const u=n[l];u===ak?s+=ac(a[l]):u===ok?s+=zt.transform(a[l]):s+=a[l]}return s}}const G6=e=>typeof e=="number"?0:zt.test(e)?zt.getAnimatableNone(e):e;function K6(e){const t=sk(e);return lk(e)(t.map(G6))}const la={test:U6,parse:sk,createTransformer:lk,getAnimatableNone:K6};function _g(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 Z6({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,s=0,l=0;if(!t)a=s=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;a=_g(d,u,e+1/3),s=_g(d,u,e),l=_g(d,u,e-1/3)}return{red:Math.round(a*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}function Af(e,t){return n=>n>0?t:e}const _t=(e,t,n)=>e+(t-e)*n,xg=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},q6=[Ty,Wa,as],W6=e=>q6.find(t=>t.test(e));function HA(e){const t=W6(e);if(!t)return!1;let n=t.parse(e);return t===as&&(n=Z6(n)),n}const FA=(e,t)=>{const n=HA(e),r=HA(t);if(!n||!r)return Af(e,t);const a={...n};return s=>(a.red=xg(n.red,r.red,s),a.green=xg(n.green,r.green,s),a.blue=xg(n.blue,r.blue,s),a.alpha=_t(n.alpha,r.alpha,s),Wa.transform(a))},Ry=new Set(["none","hidden"]);function Y6(e,t){return Ry.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function X6(e,t){return n=>_t(e,t,n)}function Ab(e){return typeof e=="number"?X6:typeof e=="string"?xb(e)?Af:zt.test(e)?FA:e8:Array.isArray(e)?ck:typeof e=="object"?zt.test(e)?FA:Q6:Af}function ck(e,t){const n=[...e],r=n.length,a=e.map((s,l)=>Ab(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=a[l](s);return n}}function Q6(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=Ab(e[a])(e[a],t[a]));return a=>{for(const s in r)n[s]=r[s](a);return n}}function J6(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const s=t.types[a],l=e.indexes[s][r[s]],u=e.values[l]??0;n[a]=u,r[s]++}return n}const e8=(e,t)=>{const n=la.createTransformer(t),r=Ec(e),a=Ec(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?Ry.has(e)&&!a.values.length||Ry.has(t)&&!r.values.length?Y6(e,t):Wc(ck(J6(r,a),a.values),n):Af(e,t)};function uk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?_t(e,t,n):Ab(e)(e,t)}const t8=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>St.update(t,n),stop:()=>sa(t),now:()=>ln.isProcessing?ln.timestamp:Nn.now()}},dk=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let s=0;s<a;s++)r+=Math.round(e(s/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wf=2e4;function wb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<wf;)t+=n,r=e.next(t);return t>=wf?1/0:t}function n8(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(wb(r),wf);return{type:"keyframes",ease:s=>r.next(a*s).value/t,duration:Ur(a)}}const r8=5;function fk(e,t,n){const r=Math.max(t-r8,0);return GN(n-e(r),t-r)}const Nt={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},Eg=.001;function i8({duration:e=Nt.duration,bounce:t=Nt.bounce,velocity:n=Nt.velocity,mass:r=Nt.mass}){let a,s,l=1-t;l=Si(Nt.minDamping,Nt.maxDamping,l),e=Si(Nt.minDuration,Nt.maxDuration,Ur(e)),l<1?(a=f=>{const m=f*l,g=m*e,v=m-n,E=Cy(f,l),y=Math.exp(-g);return Eg-v/E*y},s=f=>{const g=f*l*e,v=g*n+n,E=Math.pow(l,2)*Math.pow(f,2)*e,y=Math.exp(-g),x=Cy(Math.pow(f,2),l);return(-a(f)+Eg>0?-1:1)*((v-E)*y)/x}):(a=f=>{const m=Math.exp(-f*e),g=(f-n)*e+1;return-Eg+m*g},s=f=>{const m=Math.exp(-f*e),g=(n-f)*(e*e);return m*g});const u=5/e,d=o8(a,s,u);if(e=Br(e),isNaN(d))return{stiffness:Nt.stiffness,damping:Nt.damping,duration:e};{const f=Math.pow(d,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const a8=12;function o8(e,t,n){let r=n;for(let a=1;a<a8;a++)r=r-e(r)/t(r);return r}function Cy(e,t){return e*Math.sqrt(1-t*t)}const s8=["duration","bounce"],l8=["stiffness","damping","mass"];function GA(e,t){return t.some(n=>e[n]!==void 0)}function c8(e){let t={velocity:Nt.velocity,stiffness:Nt.stiffness,damping:Nt.damping,mass:Nt.mass,isResolvedFromDuration:!1,...e};if(!GA(e,l8)&&GA(e,s8))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,s=2*Si(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:Nt.mass,stiffness:a,damping:s}}else{const n=i8(e);t={...t,...n,mass:Nt.mass},t.isResolvedFromDuration=!0}return t}function Tf(e=Nt.visualDuration,t=Nt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const s=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:s},{stiffness:d,damping:f,mass:m,duration:g,velocity:v,isResolvedFromDuration:E}=c8({...n,velocity:-Ur(n.velocity||0)}),y=v||0,x=f/(2*Math.sqrt(d*m)),A=l-s,T=Ur(Math.sqrt(d/m)),w=Math.abs(A)<5;r||(r=w?Nt.restSpeed.granular:Nt.restSpeed.default),a||(a=w?Nt.restDelta.granular:Nt.restDelta.default);let C;if(x<1){const N=Cy(T,x);C=j=>{const D=Math.exp(-x*T*j);return l-D*((y+x*T*A)/N*Math.sin(N*j)+A*Math.cos(N*j))}}else if(x===1)C=N=>l-Math.exp(-T*N)*(A+(y+T*A)*N);else{const N=T*Math.sqrt(x*x-1);C=j=>{const D=Math.exp(-x*T*j),L=Math.min(N*j,300);return l-D*((y+x*T*A)*Math.sinh(L)+N*A*Math.cosh(L))/N}}const O={calculatedDuration:E&&g||null,next:N=>{const j=C(N);if(E)u.done=N>=g;else{let D=N===0?y:0;x<1&&(D=N===0?Br(y):fk(C,N,j));const L=Math.abs(D)<=r,z=Math.abs(l-j)<=a;u.done=L&&z}return u.value=u.done?l:j,u},toString:()=>{const N=Math.min(wb(O),wf),j=dk(D=>O.next(N*D).value,N,30);return N+"ms "+j},toTransition:()=>{}};return O}Tf.applyToOptions=e=>{const t=n8(e,100,Tf);return e.ease=t.ease,e.duration=Br(t.duration),e.type="keyframes",e};function Ny({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:l,min:u,max:d,restDelta:f=.5,restSpeed:m}){const g=e[0],v={done:!1,value:g},E=L=>u!==void 0&&L<u||d!==void 0&&L>d,y=L=>u===void 0?d:d===void 0||Math.abs(u-L)<Math.abs(d-L)?u:d;let x=n*t;const A=g+x,T=l===void 0?A:l(A);T!==A&&(x=T-g);const w=L=>-x*Math.exp(-L/r),C=L=>T+w(L),O=L=>{const z=w(L),U=C(L);v.done=Math.abs(z)<=f,v.value=v.done?T:U};let N,j;const D=L=>{E(v.value)&&(N=L,j=Tf({keyframes:[v.value,y(v.value)],velocity:fk(C,L,v.value),damping:a,stiffness:s,restDelta:f,restSpeed:m}))};return D(0),{calculatedDuration:null,next:L=>{let z=!1;return!j&&N===void 0&&(z=!0,O(L),D(L)),N!==void 0&&L>=N?j.next(L-N):(!z&&O(L),v)}}}function u8(e,t,n){const r=[],a=n||Ai.mix||uk,s=e.length-1;for(let l=0;l<s;l++){let u=a(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||sr:t;u=Wc(d,u)}r.push(u)}return r}function d8(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const s=e.length;if(pb(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=u8(t,r,a),d=u.length,f=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=_c(e[g],e[g+1],m);return u[g](v)};return n?m=>f(Si(e[0],e[s-1],m)):f}function f8(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=_c(0,t,r);e.push(_t(n,1,a))}}function h8(e){const t=[0];return f8(t,e.length-1),t}function m8(e,t){return e.map(n=>n*t)}function p8(e,t){return e.map(()=>t||ek).splice(0,e.length-1)}function oc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=T6(r)?r.map(BA):BA(r),s={done:!1,value:t[0]},l=m8(n&&n.length===t.length?n:h8(t),e),u=d8(l,t,{ease:Array.isArray(a)?a:p8(t,a)});return{calculatedDuration:e,next:d=>(s.value=u(d),s.done=d>=e,s)}}const g8=e=>e!==null;function Tb(e,{repeat:t,repeatType:n="loop"},r,a=1){const s=e.filter(g8),u=a<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!u||r===void 0?s[u]:r}const y8={decay:Ny,inertia:Ny,tween:oc,keyframes:oc,spring:Tf};function hk(e){typeof e.type=="string"&&(e.type=y8[e.type])}class Rb{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 v8=e=>e/100;class Cb extends Rb{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,a;const{motionValue:n}=this.options;n&&n.updatedAt!==Nn.now()&&this.tick(Nn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;hk(t);const{type:n=oc,repeat:r=0,repeatDelay:a=0,repeatType:s,velocity:l=0}=t;let{keyframes:u}=t;const d=n||oc;d!==oc&&typeof u[0]!="number"&&(this.mixKeyframes=Wc(v8,uk(u[0],u[1])),u=[0,100]);const f=d({...t,keyframes:u});s==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=wb(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:m,repeat:g,repeatType:v,repeatDelay:E,type:y,onUpdate:x,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-f*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?T<0:T>a;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let C=this.currentTime,O=r;if(g){const L=Math.min(this.currentTime,a)/u;let z=Math.floor(L),U=L%1;!U&&L>=1&&(U=1),U===1&&z--,z=Math.min(z,g+1),!!(z%2)&&(v==="reverse"?(U=1-U,E&&(U-=E/u)):v==="mirror"&&(O=l)),C=Si(0,1,U)*u}const N=w?{done:!1,value:m[0]}:O.next(C);s&&(N.value=s(N.value));let{done:j}=N;!w&&d!==null&&(j=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return D&&y!==Ny&&(N.value=Tb(m,this.options,A,this.speed)),x&&x(N.value),D&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return Ur(this.calculatedDuration)}get time(){return Ur(this.currentTime)}set time(t){var n;t=Br(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Nn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ur(this.currentTime))}play(){var a,s;if(this.isStopped)return;const{driver:t=t8,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(s=(a=this.options).onPlay)==null||s.call(a);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Nn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function b8(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ya=e=>e*180/Math.PI,ky=e=>{const t=Ya(Math.atan2(e[1],e[0]));return Oy(t)},_8={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ky,rotateZ:ky,skewX:e=>Ya(Math.atan(e[1])),skewY:e=>Ya(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Oy=e=>(e=e%360,e<0&&(e+=360),e),KA=ky,ZA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),x8={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ZA,scaleY:qA,scale:e=>(ZA(e)+qA(e))/2,rotateX:e=>Oy(Ya(Math.atan2(e[6],e[5]))),rotateY:e=>Oy(Ya(Math.atan2(-e[2],e[0]))),rotateZ:KA,rotate:KA,skewX:e=>Ya(Math.atan(e[4])),skewY:e=>Ya(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Dy(e){return e.includes("scale")?1:0}function Iy(e,t){if(!e||e==="none")return Dy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=x8,a=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_8,a=u}if(!a)return Dy(t);const s=r[t],l=a[1].split(",").map(S8);return typeof s=="function"?s(l):l[s]}const E8=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Iy(n,t)};function S8(e){return parseFloat(e.trim())}const Ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ps=new Set(Ms),WA=e=>e===js||e===ze,A8=new Set(["x","y","z"]),w8=Ms.filter(e=>!A8.has(e));function T8(e){const t=[];return w8.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Qa={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})=>Iy(t,"x"),y:(e,{transform:t})=>Iy(t,"y")};Qa.translateX=Qa.x;Qa.translateY=Qa.y;const Ja=new Set;let Ly=!1,jy=!1,My=!1;function mk(){if(jy){const e=Array.from(Ja).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=T8(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([s,l])=>{var u;(u=r.getValue(s))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}jy=!1,Ly=!1,Ja.forEach(e=>e.complete(My)),Ja.clear()}function pk(){Ja.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jy=!0)})}function R8(){My=!0,pk(),mk(),My=!1}class Nb{constructor(t,n,r,a,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Ja.add(this),Ly||(Ly=!0,St.read(pk),St.resolveKeyframes(mk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const s=a==null?void 0:a.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),a&&s===void 0&&a.set(t[0])}b8(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ja.delete(this)}cancel(){this.state==="scheduled"&&(Ja.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const C8=e=>e.startsWith("--");function N8(e,t,n){C8(t)?e.style.setProperty(t,n):e.style[t]=n}const k8=gb(()=>window.ScrollTimeline!==void 0),O8={};function D8(e,t){const n=gb(e);return()=>O8[t]??n()}const gk=D8(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ql=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,YA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ql([0,.65,.55,1]),circOut:Ql([.55,0,1,.45]),backIn:Ql([.31,.01,.66,-.59]),backOut:Ql([.33,1.53,.69,.99])};function yk(e,t){if(e)return typeof e=="function"?gk()?dk(e,t):"ease-out":tk(e)?Ql(e):Array.isArray(e)?e.map(n=>yk(n,t)||YA.easeOut):YA[e]}function I8(e,t,n,{delay:r=0,duration:a=300,repeat:s=0,repeatType:l="loop",ease:u="easeOut",times:d}={},f=void 0){const m={[t]:n};d&&(m.offset=d);const g=yk(u,a);Array.isArray(g)&&(m.easing=g);const v={delay:r,duration:a,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return f&&(v.pseudoElement=f),e.animate(m,v)}function vk(e){return typeof e=="function"&&"applyToOptions"in e}function L8({type:e,...t}){return vk(e)&&gk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class j8 extends Rb{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=t,pb(typeof t.type!="string");const f=L8(t);this.animation=I8(n,r,a,f,s),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=Tb(a,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):N8(n,r,m),this.animation.cancel()}d==null||d(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ur(Number(t))}get time(){return Ur(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Br(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&k8()?(this.animation.timeline=t,sr):n(this)}}const bk={anticipate:XN,backInOut:YN,circInOut:JN};function M8(e){return e in bk}function P8(e){typeof e.ease=="string"&&M8(e.ease)&&(e.ease=bk[e.ease])}const XA=10;class z8 extends j8{constructor(t){P8(t),hk(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:s,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Cb({...l,autoplay:!1}),d=Br(this.finishedTime??this.time);n.setWithVelocity(u.sample(d-XA).value,u.sample(d).value,XA),u.stop()}}const QA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(la.test(e)||e==="0")&&!e.startsWith("url("));function V8(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 B8(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],l=QA(a,t),u=QA(s,t);return!l||!u?!1:V8(e)||(n==="spring"||vk(n))&&r}function _k(e){return HN(e)&&"offsetHeight"in e}const U8=new Set(["opacity","clipPath","filter","transform"]),$8=gb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function H8(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:s,type:l}=e;if(!_k((f=t==null?void 0:t.owner)==null?void 0:f.current))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return $8()&&n&&U8.has(n)&&(n!=="transform"||!d)&&!u&&!r&&a!=="mirror"&&s!==0&&l!=="inertia"}const F8=40;class G8 extends Rb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:l="loop",keyframes:u,name:d,motionValue:f,element:m,...g}){var y;super(),this.stop=()=>{var x,A;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=Nn.now();const v={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:s,repeatType:l,name:d,motionValue:f,element:m,...g},E=(m==null?void 0:m.KeyframeResolver)||Nb;this.keyframeResolver=new E(u,(x,A,T)=>this.onKeyframesResolved(x,A,v,!T),d,f,m),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:s,type:l,velocity:u,delay:d,isHandoff:f,onUpdate:m}=r;this.resolvedAt=Nn.now(),B8(t,s,l,u)||((Ai.instantAnimations||!d)&&(m==null||m(Tb(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const v={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>F8?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},E=!f&&H8(v)?new z8({...v,element:v.motionValue.owner.current}):new Cb(v);E.finished.then(()=>this.notifyFinished()).catch(sr),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),R8()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const K8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Z8(e){const t=K8.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function xk(e,t,n=1){const[r,a]=Z8(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return $N(l)?parseFloat(l):l}return xb(a)?xk(a,t,n+1):a}function kb(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Ek=new Set(["width","height","top","left","right","bottom",...Ms]),q8={test:e=>e==="auto",parse:e=>e},Sk=e=>t=>t.test(e),Ak=[js,ze,$r,ea,V6,z6,q8],JA=e=>Ak.find(Sk(e));function W8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||FN(e):!0}const Y8=new Set(["brightness","contrast","saturate","opacity"]);function X8(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Eb)||[];if(!r)return e;const a=n.replace(r,"");let s=Y8.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+a+")"}const Q8=/\b([a-z-]*)\(.*?\)/gu,Py={...la,getAnimatableNone:e=>{const t=e.match(Q8);return t?t.map(X8).join(" "):e}},ew={...js,transform:Math.round},J8={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:Od,scaleX:Od,scaleY:Od,scaleZ:Od,skew:ea,skewX:ea,skewY:ea,distance:ze,translateX:ze,translateY:ze,translateZ:ze,x:ze,y:ze,z:ze,perspective:ze,transformPerspective:ze,opacity:xc,originX:UA,originY:UA,originZ:ze},Ob={borderWidth:ze,borderTopWidth:ze,borderRightWidth:ze,borderBottomWidth:ze,borderLeftWidth:ze,borderRadius:ze,radius:ze,borderTopLeftRadius:ze,borderTopRightRadius:ze,borderBottomRightRadius:ze,borderBottomLeftRadius:ze,width:ze,maxWidth:ze,height:ze,maxHeight:ze,top:ze,right:ze,bottom:ze,left:ze,padding:ze,paddingTop:ze,paddingRight:ze,paddingBottom:ze,paddingLeft:ze,margin:ze,marginTop:ze,marginRight:ze,marginBottom:ze,marginLeft:ze,backgroundPositionX:ze,backgroundPositionY:ze,...J8,zIndex:ew,fillOpacity:xc,strokeOpacity:xc,numOctaves:ew},e9={...Ob,color:zt,backgroundColor:zt,outlineColor:zt,fill:zt,stroke:zt,borderColor:zt,borderTopColor:zt,borderRightColor:zt,borderBottomColor:zt,borderLeftColor:zt,filter:Py,WebkitFilter:Py},wk=e=>e9[e];function Tk(e,t){let n=wk(e);return n!==Py&&(n=la),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const t9=new Set(["auto","none","0"]);function n9(e,t,n){let r=0,a;for(;r<e.length&&!a;){const s=e[r];typeof s=="string"&&!t9.has(s)&&Ec(s).values.length&&(a=e[r]),r++}if(a&&n)for(const s of t)e[s]=Tk(n,a)}class r9 extends Nb{constructor(t,n,r,a,s){super(t,n,r,a,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 f=t[d];if(typeof f=="string"&&(f=f.trim(),xb(f))){const m=xk(f,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Ek.has(r)||t.length!==2)return;const[a,s]=t,l=JA(a),u=JA(s);if(l!==u)if(WA(l)&&WA(u))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else Qa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||W8(t[a]))&&r.push(a);r.length&&n9(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=Qa[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const s=r.length-1,l=r[s];r[s]=Qa[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,f])=>{t.getValue(d).set(f)}),this.resolveNoneKeyframes()}}function i9(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const a=(n==null?void 0:n[e])??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const Rk=(e,t)=>t&&typeof e=="number"?t.transform(e):e,tw=30,a9=e=>!isNaN(parseFloat(e));class o9{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{var l,u;const s=Nn.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty();a&&((u=this.events.renderRequest)==null||u.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=a9(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 yb);const r=this.events[t].add(n);return t==="change"?()=>{r(),St.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>tw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,tw);return GN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _s(e,t){return new o9(e,t)}const{schedule:Db}=nk(queueMicrotask,!1),vr={x:!1,y:!1};function Ck(){return vr.x||vr.y}function s9(e){return e==="x"||e==="y"?vr[e]?null:(vr[e]=!0,()=>{vr[e]=!1}):vr.x||vr.y?null:(vr.x=vr.y=!0,()=>{vr.x=vr.y=!1})}function Nk(e,t){const n=i9(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function nw(e){return!(e.pointerType==="touch"||Ck())}function l9(e,t,n={}){const[r,a,s]=Nk(e,n),l=u=>{if(!nw(u))return;const{target:d}=u,f=t(d,u);if(typeof f!="function"||!d)return;const m=g=>{nw(g)&&(f(g),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return r.forEach(u=>{u.addEventListener("pointerenter",l,a)}),s}const kk=(e,t)=>t?e===t?!0:kk(e,t.parentElement):!1,Ib=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,c9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function u9(e){return c9.has(e.tagName)||e.tabIndex!==-1}const Jd=new WeakSet;function rw(e){return t=>{t.key==="Enter"&&e(t)}}function Sg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const d9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=rw(()=>{if(Jd.has(n))return;Sg(n,"down");const a=rw(()=>{Sg(n,"up")}),s=()=>Sg(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function iw(e){return Ib(e)&&!Ck()}function f9(e,t,n={}){const[r,a,s]=Nk(e,n),l=u=>{const d=u.currentTarget;if(!iw(u))return;Jd.add(d);const f=t(d,u),m=(E,y)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),Jd.has(d)&&Jd.delete(d),iw(E)&&typeof f=="function"&&f(E,{success:y})},g=E=>{m(E,d===window||d===document||n.useGlobalTarget||kk(d,E.target))},v=E=>{m(E,!1)};window.addEventListener("pointerup",g,a),window.addEventListener("pointercancel",v,a)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,a),_k(u)&&(u.addEventListener("focus",f=>d9(f,a)),!u9(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),s}function Ok(e){return HN(e)&&"ownerSVGElement"in e}function h9(e){return Ok(e)&&e.tagName==="svg"}const gn=e=>!!(e&&e.getVelocity),m9=[...Ak,zt,la],p9=e=>m9.find(Sk(e)),Dk=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function g9(e=!0){const t=S.useContext(fb);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,s=S.useId();S.useEffect(()=>{if(e)return a(s)},[e]);const l=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,l]:[!0]}const Lb=S.createContext({strict:!1}),aw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xs={};for(const e in aw)xs[e]={isEnabled:t=>aw[e].some(n=>!!t[n])};function zy(e){for(const t in e)xs[t]={...xs[t],...e[t]}}function y9({children:e,features:t,strict:n=!1}){const[,r]=S.useState(!Ag(t)),a=S.useRef(void 0);if(!Ag(t)){const{renderer:s,...l}=t;a.current=s,zy(l)}return S.useEffect(()=>{Ag(t)&&t().then(({renderer:s,...l})=>{zy(l),a.current=s,r(!0)})},[]),b.jsx(Lb.Provider,{value:{renderer:a.current,strict:n},children:e})}function Ag(e){return typeof e=="function"}const v9=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 Rf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||v9.has(e)}let Ik=e=>!Rf(e);function b9(e){typeof e=="function"&&(Ik=t=>t.startsWith("on")?!Rf(t):e(t))}try{b9(require("@emotion/is-prop-valid").default)}catch{}function _9(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(Ik(a)||n===!0&&Rf(a)||!t&&!Rf(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function x9(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const vh=S.createContext({});function bh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sc(e){return typeof e=="string"||Array.isArray(e)}const jb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mb=["initial",...jb];function _h(e){return bh(e.animate)||Mb.some(t=>Sc(e[t]))}function Lk(e){return!!(_h(e)||e.variants)}function E9(e,t){if(_h(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Sc(n)?n:void 0,animate:Sc(r)?r:void 0}}return e.inherit!==!1?t:{}}function S9(e){const{initial:t,animate:n}=E9(e,S.useContext(vh));return S.useMemo(()=>({initial:t,animate:n}),[ow(t),ow(n)])}function ow(e){return Array.isArray(e)?e.join(" "):e}const A9=Symbol.for("motionComponentSymbol");function os(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function w9(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):os(n)&&(n.current=r))},[t])}const Pb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),T9="framerAppearId",jk="data-"+Pb(T9),Mk=S.createContext({});function R9(e,t,n,r,a){var x,A;const{visualElement:s}=S.useContext(vh),l=S.useContext(Lb),u=S.useContext(fb),d=S.useContext(Dk).reducedMotion,f=S.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const m=f.current,g=S.useContext(Mk);m&&!m.projection&&a&&(m.type==="html"||m.type==="svg")&&C9(f.current,n,a,g);const v=S.useRef(!1);S.useInsertionEffect(()=>{m&&v.current&&m.update(n,u)});const E=n[jk],y=S.useRef(!!E&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,E))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,E)));return b6(()=>{m&&(v.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Db.render(m.render),y.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,E)}),y.current=!1))}),m}function C9(e,t,n,r){const{layoutId:a,layout:s,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:f,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Pk(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!l||u&&os(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:f})}function Pk(e){if(e)return e.options.allowProjection!==!1?e.projection:Pk(e.parent)}function N9({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){e&&zy(e);function s(u,d){let f;const m={...S.useContext(Dk),...u,layoutId:k9(u)},{isStatic:g}=m,v=S9(u),E=r(u,g);if(!g&&db){O9();const y=D9(m);f=y.MeasureLayout,v.visualElement=R9(a,E,m,t,y.ProjectionNode)}return b.jsxs(vh.Provider,{value:v,children:[f&&v.visualElement?b.jsx(f,{visualElement:v.visualElement,...m}):null,n(a,u,w9(E,v.visualElement,d),E,g,v.visualElement)]})}s.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const l=S.forwardRef(s);return l[A9]=a,l}function k9({layoutId:e}){const t=S.useContext(UN).id;return t&&e!==void 0?t+"-"+e:e}function O9(e,t){S.useContext(Lb).strict}function D9(e){const{drag:t,layout:n}=xs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ac={};function I9(e){for(const t in e)Ac[t]=e[t],_b(t)&&(Ac[t].isCSSVariable=!0)}function zk(e,{layout:t,layoutId:n}){return Ps.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ac[e]||e==="opacity")}const L9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},j9=Ms.length;function M9(e,t,n){let r="",a=!0;for(let s=0;s<j9;s++){const l=Ms[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 f=Rk(u,Ob[l]);if(!d){a=!1;const m=L9[l]||l;r+=`${m}(${f}) `}n&&(t[l]=f)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function zb(e,t,n){const{style:r,vars:a,transformOrigin:s}=e;let l=!1,u=!1;for(const d in t){const f=t[d];if(Ps.has(d)){l=!0;continue}else if(_b(d)){a[d]=f;continue}else{const m=Rk(f,Ob[d]);d.startsWith("origin")?(u=!0,s[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=M9(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:m=0}=s;r.transformOrigin=`${d} ${f} ${m}`}}const Vb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vk(e,t,n){for(const r in t)!gn(t[r])&&!zk(r,n)&&(e[r]=t[r])}function P9({transformTemplate:e},t){return S.useMemo(()=>{const n=Vb();return zb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function z9(e,t){const n=e.style||{},r={};return Vk(r,n,e),Object.assign(r,P9(e,t)),r}function V9(e,t){const n={},r=z9(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 B9={offset:"stroke-dashoffset",array:"stroke-dasharray"},U9={offset:"strokeDashoffset",array:"strokeDasharray"};function $9(e,t,n=1,r=0,a=!0){e.pathLength=1;const s=a?B9:U9;e[s.offset]=ze.transform(-r);const l=ze.transform(t),u=ze.transform(n);e[s.array]=`${l} ${u}`}function Bk(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},d,f,m){if(zb(e,u,f),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==null?void 0: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),a!==void 0&&$9(g,a,s,l,!1)}const Uk=()=>({...Vb(),attrs:{}}),$k=e=>typeof e=="string"&&e.toLowerCase()==="svg";function H9(e,t,n,r){const a=S.useMemo(()=>{const s=Uk();return Bk(s,t,$k(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Vk(s,e.style,e),a.style={...s,...a.style}}return a}const F9=["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 Bb(e){return typeof e!="string"||e.includes("-")?!1:!!(F9.indexOf(e)>-1||/[A-Z]/u.test(e))}function G9(e=!1){return(n,r,a,{latestValues:s},l)=>{const d=(Bb(n)?H9:V9)(r,s,l,n),f=_9(r,typeof n=="string",e),m=n!==S.Fragment?{...f,...d,ref:a}:{},{children:g}=r,v=S.useMemo(()=>gn(g)?g.get():g,[g]);return S.createElement(n,{...m,children:v})}}function sw(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ub(e,t,n,r){if(typeof t=="function"){const[a,s]=sw(r);t=t(n!==void 0?n:e.custom,a,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,s]=sw(r);t=t(n!==void 0?n:e.custom,a,s)}return t}function ef(e){return gn(e)?e.get():e}function K9({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:Z9(n,r,a,e),renderState:t()}}const Hk=e=>(t,n)=>{const r=S.useContext(vh),a=S.useContext(fb),s=()=>K9(e,t,r,a);return n?s():v6(s)};function Z9(e,t,n,r){const a={},s=r(e,{});for(const v in s)a[v]=ef(s[v]);let{initial:l,animate:u}=e;const d=_h(e),f=Lk(e);t&&f&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const g=m?u:l;if(g&&typeof g!="boolean"&&!bh(g)){const v=Array.isArray(g)?g:[g];for(let E=0;E<v.length;E++){const y=Ub(e,v[E]);if(y){const{transitionEnd:x,transition:A,...T}=y;for(const w in T){let C=T[w];if(Array.isArray(C)){const O=m?C.length-1:0;C=C[O]}C!==null&&(a[w]=C)}for(const w in x)a[w]=x[w]}}}return a}function $b(e,t,n){var s;const{style:r}=e,a={};for(const l in r)(gn(r[l])||t.style&&gn(t.style[l])||zk(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(a[l]=r[l]);return a}const q9={useVisualState:Hk({scrapeMotionValuesFromProps:$b,createRenderState:Vb})};function Fk(e,t,n){const r=$b(e,t,n);for(const a in e)if(gn(e[a])||gn(t[a])){const s=Ms.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[s]=e[a]}return r}const W9={useVisualState:Hk({scrapeMotionValuesFromProps:Fk,createRenderState:Uk})};function Y9(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const l={...Bb(r)?W9:q9,preloadedFeatures:e,useRender:G9(a),createVisualElement:t,Component:r};return N9(l)}}function wc(e,t,n){const r=e.getProps();return Ub(r,t,n!==void 0?n:r.custom,e)}const Vy=e=>Array.isArray(e);function X9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_s(n))}function Q9(e){return Vy(e)?e[e.length-1]||0:e}function J9(e,t){const n=wc(e,t);let{transitionEnd:r={},transition:a={},...s}=n||{};s={...s,...r};for(const l in s){const u=Q9(s[l]);X9(e,l,u)}}function e7(e){return!!(gn(e)&&e.add)}function By(e,t){const n=e.getValue("willChange");if(e7(n))return n.add(t);if(!n&&Ai.WillChange){const r=new Ai.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Gk(e){return e.props[jk]}const t7=e=>e!==null;function n7(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(t7),s=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[s]}const r7={type:"spring",stiffness:500,damping:25,restSpeed:10},i7=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),a7={type:"keyframes",duration:.8},o7={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},s7=(e,{keyframes:t})=>t.length>2?a7:Ps.has(e)?e.startsWith("scale")?i7(t[1]):r7:o7;function l7({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:s,repeatType:l,repeatDelay:u,from:d,elapsed:f,...m}){return!!Object.keys(m).length}const Hb=(e,t,n,r={},a,s)=>l=>{const u=kb(r,e)||{},d=u.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Br(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:v=>{t.set(v),u.onUpdate&&u.onUpdate(v)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:s?void 0:a};l7(u)||Object.assign(m,s7(e,m)),m.duration&&(m.duration=Br(m.duration)),m.repeatDelay&&(m.repeatDelay=Br(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(g=!0)),(Ai.instantAnimations||Ai.skipAnimations)&&(g=!0,m.duration=0,m.delay=0),m.allowFlatten=!u.type&&!u.ease,g&&!s&&t.get()!==void 0){const v=n7(m.keyframes,u);if(v!==void 0){St.update(()=>{m.onUpdate(v),m.onComplete()});return}}return u.isSync?new Cb(m):new G8(m)};function c7({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Kk(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(s=r);const d=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const m in u){const g=e.getValue(m,e.latestValues[m]??null),v=u[m];if(v===void 0||f&&c7(f,m))continue;const E={delay:n,...kb(s||{},m)},y=g.get();if(y!==void 0&&!g.isAnimating&&!Array.isArray(v)&&v===y&&!E.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const T=Gk(e);if(T){const w=window.MotionHandoffAnimation(T,m,St);w!==null&&(E.startTime=w,x=!0)}}By(e,m),g.start(Hb(m,g,v,e.shouldReduceMotion&&Ek.has(m)?{type:!1}:E,e,x));const A=g.animation;A&&d.push(A)}return l&&Promise.all(d).then(()=>{St.update(()=>{l&&J9(e,l)})}),d}function Uy(e,t,n={}){var d;const r=wc(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const s=r?()=>Promise.all(Kk(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:g,staggerDirection:v}=a;return u7(e,t,m+f,g,v,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[f,m]=u==="beforeChildren"?[s,l]:[l,s];return f().then(()=>m())}else return Promise.all([s(),l(n.delay)])}function u7(e,t,n=0,r=0,a=1,s){const l=[],u=(e.variantChildren.size-1)*r,d=a===1?(f=0)=>f*r:(f=0)=>u-f*r;return Array.from(e.variantChildren).sort(d7).forEach((f,m)=>{f.notify("AnimationStart",t),l.push(Uy(f,t,{...s,delay:n+d(m)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function d7(e,t){return e.sortNodePosition(t)}function f7(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(s=>Uy(e,s,n));r=Promise.all(a)}else if(typeof t=="string")r=Uy(e,t,n);else{const a=typeof t=="function"?wc(e,t,n.custom):t;r=Promise.all(Kk(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Zk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const h7=Mb.length;function qk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?qk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<h7;n++){const r=Mb[n],a=e.props[r];(Sc(a)||a===!1)&&(t[r]=a)}return t}const m7=[...jb].reverse(),p7=jb.length;function g7(e){return t=>Promise.all(t.map(({animation:n,options:r})=>f7(e,n,r)))}function y7(e){let t=g7(e),n=lw(),r=!0;const a=d=>(f,m)=>{var v;const g=wc(e,m,d==="exit"?(v=e.presenceContext)==null?void 0:v.custom:void 0);if(g){const{transition:E,transitionEnd:y,...x}=g;f={...f,...x,...y}}return f};function s(d){t=d(e)}function l(d){const{props:f}=e,m=qk(e.parent)||{},g=[],v=new Set;let E={},y=1/0;for(let A=0;A<p7;A++){const T=m7[A],w=n[T],C=f[T]!==void 0?f[T]:m[T],O=Sc(C),N=T===d?w.isActive:null;N===!1&&(y=A);let j=C===m[T]&&C!==f[T]&&O;if(j&&r&&e.manuallyAnimateOnMount&&(j=!1),w.protectedKeys={...E},!w.isActive&&N===null||!C&&!w.prevProp||bh(C)||typeof C=="boolean")continue;const D=v7(w.prevProp,C);let L=D||T===d&&w.isActive&&!j&&O||A>y&&O,z=!1;const U=Array.isArray(C)?C:[C];let fe=U.reduce(a(T),{});N===!1&&(fe={});const{prevResolvedValues:ie={}}=w,le={...ie,...fe},W=re=>{L=!0,v.has(re)&&(z=!0,v.delete(re)),w.needsAnimating[re]=!0;const Z=e.getValue(re);Z&&(Z.liveStyle=!1)};for(const re in le){const Z=fe[re],ve=ie[re];if(E.hasOwnProperty(re))continue;let P=!1;Vy(Z)&&Vy(ve)?P=!Zk(Z,ve):P=Z!==ve,P?Z!=null?W(re):v.add(re):Z!==void 0&&v.has(re)?W(re):w.protectedKeys[re]=!0}w.prevProp=C,w.prevResolvedValues=fe,w.isActive&&(E={...E,...fe}),r&&e.blockInitialAnimation&&(L=!1),L&&(!(j&&D)||z)&&g.push(...U.map(re=>({animation:re,options:{type:T}})))}if(v.size){const A={};if(typeof f.initial!="boolean"){const T=wc(e,Array.isArray(f.initial)?f.initial[0]:f.initial);T&&T.transition&&(A.transition=T.transition)}v.forEach(T=>{const w=e.getBaseTarget(T),C=e.getValue(T);C&&(C.liveStyle=!0),A[T]=w??null}),g.push({animation:A})}let x=!!g.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(g):Promise.resolve()}function u(d,f){var g;if(n[d].isActive===f)return Promise.resolve();(g=e.variantChildren)==null||g.forEach(v=>{var E;return(E=v.animationState)==null?void 0:E.setActive(d,f)}),n[d].isActive=f;const m=l(d);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n,reset:()=>{n=lw(),r=!0}}}function v7(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Zk(t,e):!1}function Fa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lw(){return{animate:Fa(!0),whileInView:Fa(),whileHover:Fa(),whileTap:Fa(),whileDrag:Fa(),whileFocus:Fa(),exit:Fa()}}class ga{constructor(t){this.isMounted=!1,this.node=t}update(){}}class b7 extends ga{constructor(t){super(t),t.animationState||(t.animationState=y7(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();bh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let _7=0;class x7 extends ga{constructor(){super(...arguments),this.id=_7++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Wk={animation:{Feature:b7},exit:{Feature:x7}};function Tc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Qc(e){return{point:{x:e.pageX,y:e.pageY}}}const E7=e=>t=>Ib(t)&&e(t,Qc(t));function sc(e,t,n,r){return Tc(e,t,E7(n),r)}function Yk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function S7({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function A7(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Xk=1e-4,w7=1-Xk,T7=1+Xk,Qk=.01,R7=0-Qk,C7=0+Qk;function xn(e){return e.max-e.min}function N7(e,t,n){return Math.abs(e-t)<=n}function cw(e,t,n,r=.5){e.origin=r,e.originPoint=_t(t.min,t.max,e.origin),e.scale=xn(n)/xn(t),e.translate=_t(n.min,n.max,e.origin)-e.originPoint,(e.scale>=w7&&e.scale<=T7||isNaN(e.scale))&&(e.scale=1),(e.translate>=R7&&e.translate<=C7||isNaN(e.translate))&&(e.translate=0)}function lc(e,t,n,r){cw(e.x,t.x,n.x,r?r.originX:void 0),cw(e.y,t.y,n.y,r?r.originY:void 0)}function uw(e,t,n){e.min=n.min+t.min,e.max=e.min+xn(t)}function k7(e,t,n){uw(e.x,t.x,n.x),uw(e.y,t.y,n.y)}function dw(e,t,n){e.min=t.min-n.min,e.max=e.min+xn(t)}function cc(e,t,n){dw(e.x,t.x,n.x),dw(e.y,t.y,n.y)}const fw=()=>({translate:0,scale:1,origin:0,originPoint:0}),ss=()=>({x:fw(),y:fw()}),hw=()=>({min:0,max:0}),Ot=()=>({x:hw(),y:hw()});function rr(e){return[e("x"),e("y")]}function wg(e){return e===void 0||e===1}function $y({scale:e,scaleX:t,scaleY:n}){return!wg(e)||!wg(t)||!wg(n)}function Ga(e){return $y(e)||Jk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Jk(e){return mw(e.x)||mw(e.y)}function mw(e){return e&&e!=="0%"}function Cf(e,t,n){const r=e-n,a=t*r;return n+a}function pw(e,t,n,r,a){return a!==void 0&&(e=Cf(e,a,r)),Cf(e,n,r)+t}function Hy(e,t=0,n=1,r,a){e.min=pw(e.min,t,n,r,a),e.max=pw(e.max,t,n,r,a)}function eO(e,{x:t,y:n}){Hy(e.x,t.translate,t.scale,t.originPoint),Hy(e.y,n.translate,n.scale,n.originPoint)}const gw=.999999999999,yw=1.0000000000001;function O7(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u<a;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&&cs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,eO(e,l)),r&&Ga(s.latestValues)&&cs(e,s.latestValues))}t.x<yw&&t.x>gw&&(t.x=1),t.y<yw&&t.y>gw&&(t.y=1)}function ls(e,t){e.min=e.min+t,e.max=e.max+t}function vw(e,t,n,r,a=.5){const s=_t(e.min,e.max,a);Hy(e,t,n,s,r)}function cs(e,t){vw(e.x,t.x,t.scaleX,t.scale,t.originX),vw(e.y,t.y,t.scaleY,t.scale,t.originY)}function tO(e,t){return Yk(A7(e.getBoundingClientRect(),t))}function D7(e,t,n){const r=tO(e,n),{scroll:a}=t;return a&&(ls(r.x,a.offset.x),ls(r.y,a.offset.y)),r}const nO=({current:e})=>e?e.ownerDocument.defaultView:null,bw=(e,t)=>Math.abs(e-t);function I7(e,t){const n=bw(e.x,t.x),r=bw(e.y,t.y);return Math.sqrt(n**2+r**2)}class rO{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Rg(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,E=I7(g.offset,{x:0,y:0})>=3;if(!v&&!E)return;const{point:y}=g,{timestamp:x}=ln;this.history.push({...y,timestamp:x});const{onStart:A,onMove:T}=this.handlers;v||(A&&A(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,g)},this.handlePointerMove=(g,v)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=Tg(v,this.transformPagePoint),St.update(this.updatePoint,!0)},this.handlePointerUp=(g,v)=>{this.end();const{onEnd:E,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=Rg(g.type==="pointercancel"?this.lastMoveEventInfo:Tg(v,this.transformPagePoint),this.history);this.startEvent&&E&&E(g,A),y&&y(g,A)},!Ib(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const l=Qc(t),u=Tg(l,this.transformPagePoint),{point:d}=u,{timestamp:f}=ln;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,Rg(u,this.history)),this.removeListeners=Wc(sc(this.contextWindow,"pointermove",this.handlePointerMove),sc(this.contextWindow,"pointerup",this.handlePointerUp),sc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),sa(this.updatePoint)}}function Tg(e,t){return t?{point:t(e.point)}:e}function _w(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rg({point:e},t){return{point:e,delta:_w(e,iO(t)),offset:_w(e,L7(t)),velocity:j7(t,.1)}}function L7(e){return e[0]}function iO(e){return e[e.length-1]}function j7(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=iO(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Br(t)));)n--;if(!r)return{x:0,y:0};const s=Ur(a.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(a.x-r.x)/s,y:(a.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function M7(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?_t(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?_t(n,e,r.max):Math.min(e,n)),e}function xw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function P7(e,{top:t,left:n,bottom:r,right:a}){return{x:xw(e.x,n,a),y:xw(e.y,t,r)}}function Ew(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function z7(e,t){return{x:Ew(e.x,t.x),y:Ew(e.y,t.y)}}function V7(e,t){let n=.5;const r=xn(e),a=xn(t);return a>r?n=_c(t.min,t.max-r,e.min):r>a&&(n=_c(e.min,e.max-a,t.min)),Si(0,1,n)}function B7(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 Fy=.35;function U7(e=Fy){return e===!1?e=0:e===!0&&(e=Fy),{x:Sw(e,"left","right"),y:Sw(e,"top","bottom")}}function Sw(e,t,n){return{min:Aw(e,t),max:Aw(e,n)}}function Aw(e,t){return typeof e=="number"?e:e[t]||0}const $7=new WeakMap;class H7{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=Ot(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=m=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Qc(m).point)},s=(m,g)=>{const{drag:v,dragPropagation:E,onDragStart:y}=this.getProps();if(v&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=s9(v),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rr(A=>{let T=this.getAxisMotionValue(A).get()||0;if($r.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const C=w.layout.layoutBox[A];C&&(T=xn(C)*(parseFloat(T)/100))}}this.originPoint[A]=T}),y&&St.postRender(()=>y(m,g)),By(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},l=(m,g)=>{const{dragPropagation:v,dragDirectionLock:E,onDirectionLock:y,onDrag:x}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:A}=g;if(E&&this.currentDirection===null){this.currentDirection=F7(A),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",g.point,A),this.updateAxis("y",g.point,A),this.visualElement.render(),x&&x(m,g)},u=(m,g)=>this.stop(m,g),d=()=>rr(m=>{var g;return this.getAnimationState(m)==="paused"&&((g=this.getAxisMotionValue(m).animation)==null?void 0:g.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new rO(t,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:nO(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&St.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Dd(t,a,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=M7(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,a=this.constraints;t&&os(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=P7(r.layoutBox,t):this.constraints=!1,this.elastic=U7(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=B7(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!os(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const s=D7(r,a.root,this.visualElement.getTransformPagePoint());let l=z7(a.layout.layoutBox,s);if(n){const u=n(S7(l));this.hasMutatedConstraints=!!u,u&&(l=Yk(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},f=rr(m=>{if(!Dd(m,n,this.currentDirection))return;let g=d&&d[m]||{};l&&(g={min:0,max:0});const v=a?200:1e6,E=a?40:1e7,y={type:"inertia",velocity:r?t[m]:0,bounceStiffness:v,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...s,...g};return this.startAxisValueAnimation(m,y)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return By(this.visualElement,t),r.start(Hb(t,r,0,n,this.visualElement,!1))}stopAnimation(){rr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rr(n=>{const{drag:r}=this.getProps();if(!Dd(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,s=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:u}=a.layout.layoutBox[n];s.set(t[n]-_t(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!os(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};rr(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();a[l]=V7({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(!Dd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];u.set(_t(d,f,a[l]))})}addListeners(){if(!this.visualElement.current)return;$7.set(this.visualElement,this);const t=this.visualElement.current,n=sc(t,"pointerdown",d=>{const{drag:f,dragListener:m=!0}=this.getProps();f&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();os(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,s=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),St.read(r);const l=Tc(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&(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:a=!1,dragConstraints:s=!1,dragElastic:l=Fy,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function Dd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function F7(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class G7 extends ga{constructor(t){super(t),this.removeGroupControls=sr,this.removeListeners=sr,this.controls=new H7(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||sr}unmount(){this.removeGroupControls(),this.removeListeners()}}const ww=e=>(t,n)=>{e&&St.postRender(()=>e(t,n))};class K7 extends ga{constructor(){super(...arguments),this.removePointerDownListener=sr}onPointerDown(t){this.session=new rO(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nO(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:ww(t),onStart:ww(n),onMove:r,onEnd:(s,l)=>{delete this.session,a&&St.postRender(()=>a(s,l))}}}mount(){this.removePointerDownListener=sc(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 tf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Zl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ze.test(e))e=parseFloat(e);else return e;const n=Tw(e,t.target.x),r=Tw(e,t.target.y);return`${n}% ${r}%`}},Z7={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=la.parse(e);if(a.length>5)return r;const s=la.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=d;const f=_t(u,d,.5);return typeof a[2+l]=="number"&&(a[2+l]/=f),typeof a[3+l]=="number"&&(a[3+l]/=f),s(a)}};class q7 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:s}=t;I9(W7),s&&(n.group&&n.group.add(s),r&&r.register&&a&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),tf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,a||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||St.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Db.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function aO(e){const[t,n]=g9(),r=S.useContext(UN);return b.jsx(q7,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Mk),isPresent:t,safeToRemove:n})}const W7={borderRadius:{...Zl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zl,borderTopRightRadius:Zl,borderBottomLeftRadius:Zl,borderBottomRightRadius:Zl,boxShadow:Z7};function Y7(e,t,n){const r=gn(e)?e:_s(e);return r.start(Hb("",r,t,n)),r.animation}const X7=(e,t)=>e.depth-t.depth;class Q7{constructor(){this.children=[],this.isDirty=!1}add(t){hb(this.children,t),this.isDirty=!0}remove(t){mb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(X7),this.isDirty=!1,this.children.forEach(t)}}function J7(e,t){const n=Nn.now(),r=({timestamp:a})=>{const s=a-n;s>=t&&(sa(r),e(s-t))};return St.setup(r,!0),()=>sa(r)}const oO=["TopLeft","TopRight","BottomLeft","BottomRight"],eK=oO.length,Rw=e=>typeof e=="string"?parseFloat(e):e,Cw=e=>typeof e=="number"||ze.test(e);function tK(e,t,n,r,a,s){a?(e.opacity=_t(0,n.opacity??1,nK(r)),e.opacityExit=_t(t.opacity??1,0,rK(r))):s&&(e.opacity=_t(t.opacity??1,n.opacity??1,r));for(let l=0;l<eK;l++){const u=`border${oO[l]}Radius`;let d=Nw(t,u),f=Nw(n,u);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||Cw(d)===Cw(f)?(e[u]=Math.max(_t(Rw(d),Rw(f),r),0),($r.test(f)||$r.test(d))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=_t(t.rotate||0,n.rotate||0,r))}function Nw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nK=sO(0,.5,QN),rK=sO(.5,.95,sr);function sO(e,t,n){return r=>r<e?0:r>t?1:n(_c(e,t,r))}function kw(e,t){e.min=t.min,e.max=t.max}function tr(e,t){kw(e.x,t.x),kw(e.y,t.y)}function Ow(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Dw(e,t,n,r,a){return e-=t,e=Cf(e,1/n,r),a!==void 0&&(e=Cf(e,1/a,r)),e}function iK(e,t=0,n=1,r=.5,a,s=e,l=e){if($r.test(t)&&(t=parseFloat(t),t=_t(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=_t(s.min,s.max,r);e===s&&(u-=t),e.min=Dw(e.min,t,n,u,a),e.max=Dw(e.max,t,n,u,a)}function Iw(e,t,[n,r,a],s,l){iK(e,t[n],t[r],t[a],t.scale,s,l)}const aK=["x","scaleX","originX"],oK=["y","scaleY","originY"];function Lw(e,t,n,r){Iw(e.x,t,aK,n?n.x:void 0,r?r.x:void 0),Iw(e.y,t,oK,n?n.y:void 0,r?r.y:void 0)}function jw(e){return e.translate===0&&e.scale===1}function lO(e){return jw(e.x)&&jw(e.y)}function Mw(e,t){return e.min===t.min&&e.max===t.max}function sK(e,t){return Mw(e.x,t.x)&&Mw(e.y,t.y)}function Pw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function cO(e,t){return Pw(e.x,t.x)&&Pw(e.y,t.y)}function zw(e){return xn(e.x)/xn(e.y)}function Vw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lK{constructor(){this.members=[]}add(t){hb(this.members,t),t.scheduleRender()}remove(t){if(mb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const s=this.members[a];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:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cK(e,t,n){let r="";const a=e.x.translate/t.x,s=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((a||s||l)&&(r=`translate3d(${a}px, ${s}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:g,rotateY:v,skewX:E,skewY:y}=n;f&&(r=`perspective(${f}px) ${r}`),m&&(r+=`rotate(${m}deg) `),g&&(r+=`rotateX(${g}deg) `),v&&(r+=`rotateY(${v}deg) `),E&&(r+=`skewX(${E}deg) `),y&&(r+=`skewY(${y}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 Cg=["","X","Y","Z"],uK={visibility:"hidden"},dK=1e3;let fK=0;function Ng(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function uO(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",St,!(a||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&uO(r)}function dO({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(l={},u=t==null?void 0:t()){this.id=fK++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pK),this.nodes.forEach(_K),this.nodes.forEach(xK),this.nodes.forEach(gK)},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 Q7)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new yb),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=Ok(l)&&!h9(l),this.instance=l;const{layoutId:u,layout:d,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||u)&&(this.isLayoutDirty=!0),e){let m;const g=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=J7(g,250),tf.hasAnimatedSinceResize&&(tf.hasAnimatedSinceResize=!1,this.nodes.forEach(Uw))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||f.getDefaultTransition()||TK,{onLayoutAnimationStart:x,onLayoutAnimationComplete:A}=f.getProps(),T=!this.targetLayout||!cO(this.targetLayout,E),w=!g&&v;if(this.options.layoutRoot||this.resumeFrom||w||g&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...kb(y,"layout"),onPlay:x,onComplete:A};(f.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(m,w)}else g||Uw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}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(),sa(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(EK),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&&uO(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 f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bw);return}this.isUpdating||this.nodes.forEach(vK),this.isUpdating=!1,this.nodes.forEach(bK),this.nodes.forEach(hK),this.nodes.forEach(mK),this.clearAllSnapshots();const u=Nn.now();ln.delta=Si(0,1e3/60,u-ln.timestamp),ln.timestamp=u,ln.isProcessing=!0,vg.update.process(ln),vg.preRender.process(ln),vg.render.process(ln),ln.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Db.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yK),this.sharedNodes.forEach(SK)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,St.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){St.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xn(this.snapshot.measuredBox.x)&&!xn(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=Ot(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!a)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!lO(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;l&&this.instance&&(u||Ga(this.latestValues)||m)&&(a(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),RK(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:l}=this.options;if(!l)return Ot();const u=l.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(CK))){const{scroll:m}=this.root;m&&(ls(u.x,m.offset.x),ls(u.y,m.offset.y))}return u}removeElementScroll(l){var d;const u=Ot();if(tr(u,l),(d=this.scroll)!=null&&d.wasRoot)return u;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:g,options:v}=m;m!==this.root&&g&&v.layoutScroll&&(g.wasRoot&&tr(u,l),ls(u.x,g.offset.x),ls(u.y,g.offset.y))}return u}applyTransform(l,u=!1){const d=Ot();tr(d,l);for(let f=0;f<this.path.length;f++){const m=this.path[f];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&cs(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Ga(m.latestValues)&&cs(d,m.latestValues)}return Ga(this.latestValues)&&cs(d,this.latestValues),d}removeTransform(l){const u=Ot();tr(u,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!Ga(f.latestValues))continue;$y(f.latestValues)&&f.updateSnapshot();const m=Ot(),g=f.measurePageBox();tr(m,g),Lw(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,m)}return Ga(this.latestValues)&&Lw(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ln.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var v;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||(v=this.parent)!=null&&v.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 E=this.getClosestProjectingParent();E&&E.layout&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),cc(this.relativeTargetOrigin,this.layout.layoutBox,E.layout.layoutBox),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ot(),this.targetWithTransforms=Ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),k7(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tr(this.target,this.layout.layoutBox),eO(this.target,this.targetDelta)):tr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const E=this.getClosestProjectingParent();E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),cc(this.relativeTargetOrigin,this.target,E.target),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||$y(this.parent.latestValues)||Jk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===ln.timestamp&&(d=!1),d)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;tr(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;O7(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=Ot());const{target:E}=l;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ow(this.prevProjectionDelta.x,this.projectionDelta.x),Ow(this.prevProjectionDelta.y,this.projectionDelta.y)),lc(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!Vw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ss(),this.projectionDelta=ss(),this.projectionDeltaWithTransform=ss()}setAnimationOrigin(l,u=!1){const d=this.snapshot,f=d?d.latestValues:{},m={...this.latestValues},g=ss();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const v=Ot(),E=d?d.source:void 0,y=this.layout?this.layout.source:void 0,x=E!==y,A=this.getStack(),T=!A||A.members.length<=1,w=!!(x&&!T&&this.options.crossfade===!0&&!this.path.some(wK));this.animationProgress=0;let C;this.mixTargetDelta=O=>{const N=O/1e3;$w(g.x,l.x,N),$w(g.y,l.y,N),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cc(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),AK(this.relativeTarget,this.relativeTargetOrigin,v,N),C&&sK(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Ot()),tr(C,this.relativeTarget)),x&&(this.animationValues=m,tK(m,f,this.latestValues,N,w,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,d,f;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(f=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||f.stop(),this.pendingAnimation&&(sa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=St.update(()=>{tf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_s(0)),this.currentAnimation=Y7(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),l.onUpdate&&l.onUpdate(m)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dK),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:f,latestValues:m}=l;if(!(!u||!d||!f)){if(this!==l&&this.layout&&f&&fO(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||Ot();const g=xn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+g;const v=xn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+v}tr(u,d),cs(u,m),lc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new lK),this.sharedNodes.get(l).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const f=this.getStack();f&&f.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const f={};d.z&&Ng("z",l,f,this.animationValues);for(let m=0;m<Cg.length;m++)Ng(`rotate${Cg[m]}`,l,f,this.animationValues),Ng(`skew${Cg[m]}`,l,f,this.animationValues);l.render();for(const m in f)l.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);l.scheduleRender()}getProjectionStyles(l){if(!this.instance||this.isSVG)return;if(!this.isVisible)return uK;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ef(l==null?void 0:l.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=ef(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Ga(this.latestValues)&&(E.transform=d?d({},""):"none",this.hasProjected=!1),E}const m=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=cK(this.projectionDeltaWithTransform,this.treeScale,m),d&&(u.transform=d(m,u.transform));const{x:g,y:v}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${v.origin*100}% 0`,f.animationValues?u.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const E in Ac){if(m[E]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:A}=Ac[E],T=u.transform==="none"?m[E]:y(m[E],f);if(x){const w=x.length;for(let C=0;C<w;C++)u[x[C]]=T}else A?this.options.visualElement.renderState.vars[E]=T:u[E]=T}return this.options.layoutId&&(u.pointerEvents=f===this?ef(l==null?void 0:l.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(Bw),this.root.sharedNodes.clear()}}}function hK(e){e.updateLayout()}function mK(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;s==="size"?rr(g=>{const v=l?t.measuredBox[g]:t.layoutBox[g],E=xn(v);v.min=r[g].min,v.max=v.min+E}):fO(s,t.layoutBox,r)&&rr(g=>{const v=l?t.measuredBox[g]:t.layoutBox[g],E=xn(r[g]);v.max=v.min+E,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+E)});const u=ss();lc(u,r,t.layoutBox);const d=ss();l?lc(d,e.applyTransform(a,!0),t.measuredBox):lc(d,r,t.layoutBox);const f=!lO(u);let m=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:v,layout:E}=g;if(v&&E){const y=Ot();cc(y,t.layoutBox,v.layoutBox);const x=Ot();cc(x,r,E.layoutBox),cO(y,x)||(m=!0),g.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function pK(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 gK(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yK(e){e.clearSnapshot()}function Bw(e){e.clearMeasurements()}function vK(e){e.isLayoutDirty=!1}function bK(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Uw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _K(e){e.resolveTargetDelta()}function xK(e){e.calcProjection()}function EK(e){e.resetSkewAndRotation()}function SK(e){e.removeLeadSnapshot()}function $w(e,t,n){e.translate=_t(t.translate,0,n),e.scale=_t(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hw(e,t,n,r){e.min=_t(t.min,n.min,r),e.max=_t(t.max,n.max,r)}function AK(e,t,n,r){Hw(e.x,t.x,n.x,r),Hw(e.y,t.y,n.y,r)}function wK(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TK={duration:.45,ease:[.4,0,.1,1]},Fw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gw=Fw("applewebkit/")&&!Fw("chrome/")?Math.round:sr;function Kw(e){e.min=Gw(e.min),e.max=Gw(e.max)}function RK(e){Kw(e.x),Kw(e.y)}function fO(e,t,n){return e==="position"||e==="preserve-aspect"&&!N7(zw(t),zw(n),.2)}function CK(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const NK=dO({attachResizeListener:(e,t)=>Tc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),kg={current:void 0},hO=dO({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!kg.current){const e=new NK({});e.mount(window),e.setOptions({layoutScroll:!0}),kg.current=e}return kg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kK={pan:{Feature:K7},drag:{Feature:G7,ProjectionNode:hO,MeasureLayout:aO}};function Zw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,s=r[a];s&&St.postRender(()=>s(t,Qc(t)))}class OK extends ga{mount(){const{current:t}=this.node;t&&(this.unmount=l9(t,(n,r)=>(Zw(this.node,r,"Start"),a=>Zw(this.node,a,"End"))))}unmount(){}}class DK extends ga{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(Tc(this.node.current,"focus",()=>this.onFocus()),Tc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function qw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),s=r[a];s&&St.postRender(()=>s(t,Qc(t)))}class IK extends ga{mount(){const{current:t}=this.node;t&&(this.unmount=f9(t,(n,r)=>(qw(this.node,r,"Start"),(a,{success:s})=>qw(this.node,a,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Gy=new WeakMap,Og=new WeakMap,LK=e=>{const t=Gy.get(e.target);t&&t(e)},jK=e=>{e.forEach(LK)};function MK({root:e,...t}){const n=e||document;Og.has(n)||Og.set(n,{});const r=Og.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(jK,{root:e,...t})),r[a]}function PK(e,t,n){const r=MK(t);return Gy.set(e,n),r.observe(e),()=>{Gy.delete(e),r.unobserve(e)}}const zK={some:0,all:1};class VK extends ga{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:zK[a]},u=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),v=f?m:g;v&&v(d)};return PK(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(BK(t,n))&&this.startObserver()}unmount(){}}function BK({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const mO={inView:{Feature:VK},tap:{Feature:IK},focus:{Feature:DK},hover:{Feature:OK}},UK={layout:{ProjectionNode:hO,MeasureLayout:aO}},Ky={current:null},pO={current:!1};function $K(){if(pO.current=!0,!!db)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ky.current=e.matches;e.addListener(t),t()}else Ky.current=!1}const HK=new WeakMap;function FK(e,t,n){for(const r in t){const a=t[r],s=n[r];if(gn(a))e.addValue(r,a);else if(gn(s))e.addValue(r,_s(a,{owner:e}));else if(s!==a)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(a):l.hasAnimated||l.set(a)}else{const l=e.getStaticValue(r);e.addValue(r,_s(l!==void 0?l:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ww=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class GK{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,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=Nb,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=Nn.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,St.render(this.render,!1,!0))};const{latestValues:d,renderState:f}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=_h(n),this.isVariantNode=Lk(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 E=g[v];d[v]!==void 0&&gn(E)&&E.set(d[v],!1)}}mount(t){this.current=t,HK.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)),pO.current||$K(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ky.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),sa(this.notifyUpdate),sa(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ps.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&St.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),s(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xs){const n=xs[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const 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):Ot()}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<Ww.length;r++){const a=Ww[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const s="on"+a,l=t[s];l&&(this.propEventSubscriptions[a]=this.on(a,l))}this.prevMotionValues=FK(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=_s(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"&&($N(r)||FN(r))?r=parseFloat(r):!p9(r)&&la.test(n)&&(r=Tk(t,n)),this.setBaseTarget(t,gn(r)?r.get():r)),gn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=Ub(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!gn(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yb),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class gO extends GK{constructor(){super(...arguments),this.KeyframeResolver=r9}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;gn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function yO(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}function KK(e){return window.getComputedStyle(e)}class ZK extends gO{constructor(){super(...arguments),this.type="html",this.renderInstance=yO}readValueFromInstance(t,n){var r;if(Ps.has(n))return(r=this.projection)!=null&&r.isProjecting?Dy(n):E8(t,n);{const a=KK(t),s=(_b(n)?a.getPropertyValue(n):a[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tO(t,n)}build(t,n,r){zb(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return $b(t,n,r)}}const vO=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 qK(e,t,n,r){yO(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(vO.has(a)?a:Pb(a),t.attrs[a])}class WK extends gO{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ps.has(n)){const r=wk(n);return r&&r.default||0}return n=vO.has(n)?n:Pb(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fk(t,n,r)}build(t,n,r){Bk(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){qK(t,n,r,a)}mount(t){this.isSVGTag=$k(t.tagName),super.mount(t)}}const bO=(e,t)=>Bb(e)?new WK(t):new ZK(t,{allowProjection:e!==S.Fragment}),YK=Y9({...Wk,...mO,...kK,...UK},bO),_O=x9(YK),XK={renderer:bO,...Wk,...mO},xO=e=>{const[t,n]=S.useState(e);return S.useEffect(()=>{n(e??window.document.body)},[e]),t};function QK(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:JK}=Be;function EO(e){const t=JK();return n=>{const r=e(n);return QK(t.current,r)?t.current:t.current=r}}const SO=e=>{const{disableScroll:t=!1,element:n,key:r="unnamed_blocker"}=e??{},{isElementScrollBlocked:a,addBlockage:s,removeBlockage:l}=PU(EO(f=>({isElementScrollBlocked:f.isElementScrollBlocked,addBlockage:f.addBlockage,removeBlockage:f.removeBlockage}))),u=xO(n);return S.useEffect(()=>{const f=n??window.document.body;t?s(r,f):l(r,f)},[s,t,n,r,l]),{isScrollBlocked:u?a(u):!1}},eZ=cr("flex text-text flex-col backdrop-blur",{variants:{roundedSize:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},transparency:{none:"bg-card",sm:"bg-card/90",md:"bg-card/70",lg:"bg-card/40",xl:"bg-card/20",full:""},padding:{none:"p-0",sm:"p-1",md:"p-2",lg:"p-3",xl:"p-4"},separator:{without:"",x:"divide-x divide-dashed divide-text/20",y:"divide-y divide-dashed divide-text/20",both:"divide-x divide-y divide-dashed divide-text/20"},border:{none:"",with:"border-[1.5px]"},borderColor:{primary:"border-primary",secondary:"border-secondary",neutral:"border-neutral",text:"border-text ",error:"border-error",warning:"border-warning",success:"border-success"},background:{none:"bg-inherit",hoverable:"!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur",with:""},gap:{none:"gap-0",sm:"gap-1",md:"gap-3",lg:"gap-5",xl:"gap-8","2xl":"gap-10"}},defaultVariants:{roundedSize:"md",border:"none",borderColor:"text",transparency:"md",padding:"none",separator:"without",gap:"none"}}),Wr=({children:e,roundedSize:t,padding:n,transparency:r,separator:a,className:s,border:l,borderColor:u,background:d,...f})=>b.jsx("div",{className:Ae(eZ({roundedSize:t,transparency:r,padding:n,separator:a,border:typeof l=="boolean"?l?"with":"none":void 0,background:d,borderColor:u,className:s})),...f,children:e}),Fb="relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8",tZ="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",nZ=({className:e,...t})=>b.jsx("h1",{className:Ae("mt-5 text-2xl font-bold",e),...t}),rZ=({className:e,...t})=>b.jsx("h2",{className:Ae("mt-16 mb-2 text-2xl font-bold",Fb,e),...t}),iZ=({className:e,...t})=>b.jsx("h3",{className:Ae("mt-5 mb-2 text-xl font-bold",Fb,e),...t}),aZ=({className:e,...t})=>b.jsx("h4",{className:Ae("mt-3 text-lg font-bold",Fb,e),...t}),oZ=e=>String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase(),sZ=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},lZ=(e,t)=>{const n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,a=window.getComputedStyle(e,":after"),s=n+parseInt(a.getPropertyValue("left"),10),l=s+parseInt(a.width,10),u=r+parseInt(a.getPropertyValue("top"),10),d=u+parseInt(a.height,10),f=t.clientX,m=t.clientY;return f>=s&&f<=l&&m>=u&&m<=d},Gb=({H:e,children:t,className:n,isClickable:r,...a})=>{const s=typeof t=="string"?oZ(t):void 0,l=u=>{const{id:d}=u.currentTarget;if(lZ(u.currentTarget,u)&&typeof d=="string"){const g=`${window.location.href.split("#")[0]}#${d}`;navigator.clipboard.writeText(g),sZ(d)}};return b.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:Ae(r&&tZ,n),...a,children:t})},cZ=({isClickable:e,...t})=>b.jsx(nZ,{...t}),uZ=({isClickable:e=!1,...t})=>b.jsx(Gb,{H:rZ,isClickable:e,...t}),Kb=({isClickable:e=!1,...t})=>b.jsx(Gb,{H:iZ,isClickable:e,...t}),dZ=({isClickable:e=!1,...t})=>b.jsx(Gb,{H:aZ,isClickable:e,...t}),fZ=cr("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"}}),hZ=_O.create(Wr),AO=({children:e,isOpen:t,container:n,disableScroll:r=!1,onClose:a,hasCloseButton:s=!1,title:l,size:u="md",className:d,...f})=>{const m=xO(n);if(SO({key:"modal",disableScroll:t&&r}),!m)return b.jsx(b.Fragment,{});const g=typeof l=="string";return co.createPortal(b.jsx(_O.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(),a==null||a()},"aria-hidden":!t,children:b.jsx("div",{className:"flex justify-center p-4",children:b.jsxs(hZ,{onClick:v=>v.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:fZ({size:u,className:d}),role:"dialog","aria-modal":!0,roundedSize:"2xl",...f,children:[b.jsxs("div",{className:Ae("cursor-default px-4",s&&g?"flex items-center justify-center":s?"flex items-center justify-end":g?"items-center":"hidden"),children:[g&&b.jsx(Kb,{className:"ml-4 flex items-center justify-center text-lg font-bold",children:l}),s&&b.jsx(ut,{variant:"hoverable",color:"text",label:"Close modal",className:"ml-auto",onClick:v=>{v.stopPropagation(),a==null||a()},Icon:uo,size:"icon-md"})]}),b.jsx("div",{className:"flex flex-1 flex-col items-center overflow-auto",children:e})]})})}),m)},mZ=cr("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"}}),pZ=({href:e,isExternalLink:t})=>{const n=typeof e=="string"&&e.trim()!=="";return t===!0||typeof t>"u"&&n&&/^https?:\/\//.test(e)},Zb=e=>{const{variant:t="default",color:n="primary",children:r,label:a,className:s,isActive:l,underlined:u,locale:d,isExternalLink:f,href:m,...g}=e,{internationalization:v}=qe,E=pZ(e),y=typeof r=="string",x=E?"noopener noreferrer nofollow":void 0,A=E?"_blank":"_self",T=d?d===v.defaultLocale?"x-default":d:void 0,w=d&&m&&!E?nM(m,d):m;return b.jsxs("a",{href:w,hrefLang:T,"aria-label":a,rel:x,target:A,"aria-current":l?"page":void 0,className:Ae(mZ({variant:t,color:n,underlined:u,className:s})),...g,children:[t==="button"?b.jsx("span",{children:r}):r,E&&y&&b.jsx(Hz,{className:"ml-2 inline-block size-4"})]})},wO={key:"breadcrumb",content:{linkLabel:ge({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:"Перейти на"})}},gZ=({href:e,lang:t,children:n,onClick:r,color:a,position:s,locale:l,...u})=>{const{linkLabel:d}=Jt(wO);return b.jsxs(b.Fragment,{children:[b.jsx(Zb,{href:e,locale:l,color:a,onClick:r,itemProp:"item",itemScope:!0,itemType:"https://schema.org/WebPage",...u,label:`${d} ${n}`,itemID:e,children:b.jsx("span",{itemProp:"name",children:n})}),b.jsx("meta",{itemProp:"position",content:s.toString()})]})},yZ=({children:e,onClick:t,color:n,position:r,...a})=>{const{linkLabel:s}=Jt(wO);return b.jsxs(b.Fragment,{children:[b.jsx(ut,{onClick:t,variant:"link",label:`${s} ${e}`,color:n,itemProp:"item",...a,children:b.jsx("span",{itemProp:"name",children:e})}),b.jsx("meta",{itemProp:"position",content:r.toString()})]})},vZ=({children:e,position:t,...n})=>b.jsxs("span",{itemProp:"item",children:[b.jsx("span",{itemProp:"name",...n,children:e}),b.jsx("meta",{itemProp:"position",content:t.toString()})]}),bZ=({links:e,className:t,color:n="text",locale:r,elementType:a="page",...s})=>b.jsx("nav",{"aria-label":"breadcrumb",children:b.jsx("ol",{className:Ae("flex flex-row flex-wrap items-center gap-2 text-sm",t),itemScope:!0,itemType:"http://schema.org/BreadcrumbList",...s,children:e.map((l,u)=>{const d=u===e.length-1,f=typeof l=="object"&&typeof l.href=="string",m=typeof l=="object"&&typeof l.onClick=="function",v=u===e.length-1?a:void 0,E=l.text??l;let y=b.jsx(vZ,{position:u+1,"aria-current":v,children:E},E);f?y=b.jsx(gZ,{href:l.href,color:n,position:u+1,locale:r,"aria-current":v,children:E},E):m&&(y=b.jsx(yZ,{onClick:l.onClick,color:n,position:u+1,"aria-current":v,children:E},E));const x=b.jsx("li",{itemProp:"itemListElement",itemScope:!0,itemType:"https://schema.org/ListItem",children:y},E);return d?x:b.jsxs(S.Fragment,{children:[x,b.jsx(uf,{size:10})]},E)})})}),_Z={key:"save-dictionary-details",content:{deleteButton:{text:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({en:"Download","en-GB":"Download",fr:"Télécharger",es:"Descargar",de:"Herunterladen",ja:"ダウンロード",ko:"다운로드",zh:"下载",it:"Scarica",pt:"Baixar",hi:"डाउनलोड",ar:"تنزيل",ru:"Скачать"}),label:ge({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:ge({en:"Confirmation","en-GB":"Confirmation",fr:"Confirmation",es:"Confirmation",de:"Confirmation",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmação",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтверждение"}),message:ge({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:ge({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:ge({en:"Confirm","en-GB":"Confirm",fr:"Confirmer",es:"Confirmar",de:"Bestätigen",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmar",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтвердить"}),label:ge({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:ge({en:"Cancel","en-GB":"Cancel",fr:"Annuler",es:"Cancelar",de:"Abbrechen",ja:"キャンセル",ko:"취소",zh:"取消",it:"Annulla",pt:"Cancelar",hi:"रद्द करें",ar:"إلغاء",ru:"Отмена"}),label:ge({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:"Нажмите, чтобы отменить"})}}}},TO=({dictionary:e,mode:t,className:n,onDelete:r,...a})=>{var ee;const[s,l]=S.useState(!1),{setLocaleDictionary:u}=Gf(),{deleteDictionary:d,isLoading:f}=pU(),{writeDictionary:m,isLoading:g}=_U(),{pushDictionaries:v,isLoading:E}=mU(),y=g||E,x=t.includes("local")&&((ee=e.filePath)==null?void 0:ee.endsWith(".json")),{editedContent:A,restoreEditedContent:T}=En(),{deleteButton:w,resetButton:C,saveButton:O,publishButton:N,downloadButton:j,confirmation:D}=Jt(_Z),{isAuthenticated:L}=Vc(),z=A==null?void 0:A[e.key],U=z&&JSON.stringify(z)!==JSON.stringify(e),fe=typeof(e==null?void 0:e._id)<"u",ie=async()=>{if(!(A!=null&&A[e.key]))return;const H={...e,...A==null?void 0:A[e.key]};await m(H).then(()=>{u(A==null?void 0:A[e.key]),T(e.key)})},le=async()=>{if(!(A!=null&&A[e.key]))return;const H={...e,...A==null?void 0:A[e.key]};await v([H]).then(re=>{re&&(u(A==null?void 0:A[e.key]),T(e.key))})},W=async()=>{e._id&&await d(e._id.toString()).then(H=>{H&&(r==null||r())})};return b.jsxs(b.Fragment,{children:[b.jsx(AO,{isOpen:s,title:D.title.value,size:"md",children:b.jsxs("form",{className:"size-full px-3",children:[x?b.jsx("p",{className:"text-neutral py-4 text-sm",children:D.message}):b.jsx("p",{className:"text-neutral py-4 text-sm",children:D.differentFormatMessage}),b.jsxs("div",{className:"mt-12 flex justify-end gap-2 max-md:flex-col",children:[b.jsx(Ze.Button,{label:D.cancelButton.label.value,disabled:!U||y,color:"text",className:"max-md:w-full",variant:"outline",onClick:()=>l(!1),children:D.cancelButton.text}),b.jsx(Ze.Button,{label:D.confirmButton.label.value,disabled:!U||y,Icon:yS,color:"text",className:"max-md:w-full",isLoading:E,onClick:ie,children:D.confirmButton.text})]})]})}),b.jsxs("form",{className:Ae("flex justify-end gap-2 max-md:flex-col",n),...a,children:[t.includes("remote")&&fe&&r&&L&&b.jsx(Ze.Button,{label:w.label.value,Icon:Yf,color:"error",variant:"outline",className:"max-md:w-full",isLoading:f,onClick:W,children:w.text}),U&&b.jsx(Ze.Button,{label:C.label.value,disabled:!U,Icon:tV,variant:"outline",color:"text",className:"max-md:w-full",onClick:()=>T(e.key),children:C.text}),t.includes("local")&&b.jsx(Ze.Button,{label:j.label.value,disabled:!U||y,Icon:Uz,color:"text",variant:L?"outline":"default",className:"max-md:w-full",isLoading:g,onClick:()=>l(!0),children:j.text}),t.includes("remote")&&L&&!fe&&b.jsx(Ze.Button,{label:N.label.value,disabled:y,Icon:Tz,color:"text",className:"max-md:w-full",isLoading:E,onClick:le,children:N.text}),t.includes("remote")&&L&&fe&&U&&b.jsx(Ze.Button,{label:O.label.value,disabled:!U||y,Icon:yS,color:"text",className:"max-md:w-full",isLoading:E,onClick:le,children:O.text})]})]})},RO=({level:e,title:t,description:n,children:r,rightParam:a,isSelected:s,...l})=>b.jsx("div",{className:Ae("rounded-md p-2 transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",e===2&&"hover:bg-card/30",e>=3&&"",s===!0&&"bg-card/40"),...l,children:b.jsx(nR,{isOpen:s,label:t,header:b.jsxs("div",{className:"flex w-full",children:[b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("span",{className:Ae(e===0&&"text-2xl",e===1&&"text-xl",e===2&&"text-lg",e>=3&&"text-base"),children:t}),a&&b.jsx("div",{className:"flex w-auto items-center justify-between p-3",children:a})]}),n&&b.jsx("p",{className:"text-card pl-3 text-sm",children:n})]}),children:r})}),CO=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:a,onFocusKeyPath:s,renderSection:l})=>{const u=r??zr(n,e);if(u&&typeof u!="string")return b.jsx(b.Fragment,{children:"Error loading section - Edited content Incoherence with the original content format"});const d=e.length,f=String(u??t);return b.jsx("span",{role:"button",tabIndex:0,className:Ae("w-full rounded-md p-2 text-left transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",d===2&&"hover:bg-card/30",d>=3&&""),onClick:m=>{m.stopPropagation(),s(e)},children:typeof l=="function"?l(f):b.jsx(JR,{"aria-label":"Editable field",defaultValue:f,onSave:m=>a({keyPath:e,newValue:m}),onCancel:()=>null})})},xZ=e=>{const{keyPath:t,section:n}=e,{addEditedContent:r}=En(),a=zr(e.editedContent,t),s=n[K.File],{content:l}=n,u=[...t,{type:K.File}];return b.jsxs("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:[b.jsxs("span",{className:"text-neutral text-sm",children:[s," "]}),b.jsx(CO,{...e,keyPath:u,section:l,editedContentValue:a==null?void 0:a.content,onContentChange:d=>{console.log("lll",{subSection:s,file:{...n,content:d.newValue},keyPath:t,newKeyPath:u}),r(e.dictionary.key,{...n,content:d.newValue},t)}})]})},EZ=e=>{const{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:a=[]}=e;return n.map((s,l)=>{const u={key:l,type:K.Array},d=[...t,u];return b.jsx(RO,{level:t.length,title:`${l}`,description:"",isSelected:Lc(d,a),onClick:f=>{f.stopPropagation(),r(d)},children:b.jsx(ya,{...e,keyPath:d,section:s})},JSON.stringify(s))})},SZ=e=>{const{keyPath:t,section:n}=e;return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!qb.includes(r)).map(r=>{const a={type:K.Condition,key:r},s=[...t,a],l=n[K.Condition][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),S.createElement(ya,{...e,key:r,keyPath:s,section:l})]})})})},AZ=e=>{const{keyPath:t,section:n}=e;return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:Object.keys(n).filter(r=>!qb.includes(r)).map(r=>{const a={type:K.Enumeration,key:r},s=[...t,a],l=n[K.Enumeration][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),S.createElement(ya,{...e,key:r,keyPath:s,section:l})]})})})},wZ=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:K.Insertion}],a=n[K.Insertion];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(ya,{...e,keyPath:r,section:a})})},TZ=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:K.Markdown}],a=n[K.Markdown];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(ya,{...e,keyPath:r,section:a})})},RZ=e=>{const{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:a}=e;return Object.keys(n).filter(s=>!qb.includes(s)).map(s=>{const l={key:s,type:K.Object},u=[...t,l];return b.jsx(RO,{level:t.length,title:s,description:"",isSelected:Lc(u,r),onClick:d=>{d.stopPropagation(),a(u)},children:b.jsx(ya,{...e,keyPath:u,section:n[s]})},s)})},CZ=e=>{const{keyPath:t,section:n,locale:r}=e,a={type:K.Translation,key:r},s=[...t,a],l=n.translation[r];return b.jsx(ya,{...e,keyPath:s,section:l})},qb=["filePath","id","nodeType"],ya=e=>{const n=zr(e.editedContent,e.keyPath)??e.section,r=As(n);if(typeof n=="object")return r===K.ReactNode?b.jsx("span",{className:"text-neutral text-xs",children:"React node not editable"}):r===K.Nested?b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:"[Nested] Dictionary"}):r===K.Markdown?b.jsx(TZ,{...e,section:n}):r===K.Translation?b.jsx(CZ,{...e,section:n}):r===K.Enumeration?b.jsx(AZ,{...e,section:n}):r===K.Condition?b.jsx(SZ,{...e,section:n}):r===K.Insertion?b.jsx(wZ,{...e,section:n}):r===K.Array?b.jsx(EZ,{...e,section:n}):r===K.File?b.jsx(xZ,{...e,section:n}):b.jsx(RZ,{...e,section:n});if(typeof n=="string")return b.jsx(CO,{...e,section:n})},NZ=({dictionary:e,mode:t,onDelete:n,...r})=>{var m;const{editedContent:a,addEditedContent:s}=En(),{focusedContent:l,setFocusedContentKeyPath:u,setFocusedContent:d}=ca(),f=l==null?void 0:l.keyPath;return b.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2",children:[b.jsx("div",{children:S.createElement(ya,{...r,keyPath:[],dictionary:e,key:JSON.stringify(((a==null?void 0:a[e.key])??e).content),editedContent:(m=a==null?void 0:a[e.key])==null?void 0:m.content,focusedKeyPath:f,section:e.content,onContentChange:g=>{s(e.key,g.newValue,g.keyPath)},onFocusKeyPath:u})}),b.jsx(TO,{dictionary:e,mode:t,className:"mb-4 flex-col",onDelete:()=>{d(null),n==null||n()}})]})};function wi(e){return Array.isArray?Array.isArray(e):OO(e)==="[object Array]"}function kZ(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function OZ(e){return e==null?"":kZ(e)}function Pr(e){return typeof e=="string"}function NO(e){return typeof e=="number"}function DZ(e){return e===!0||e===!1||IZ(e)&&OO(e)=="[object Boolean]"}function kO(e){return typeof e=="object"}function IZ(e){return kO(e)&&e!==null}function Un(e){return e!=null}function Dg(e){return!e.trim().length}function OO(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const LZ="Incorrect 'index' type",jZ=e=>`Invalid value for key ${e}`,MZ=e=>`Pattern length exceeds max of ${e}.`,PZ=e=>`Missing ${e} property in key`,zZ=e=>`Property 'weight' in key '${e}' must be a positive integer`,Yw=Object.prototype.hasOwnProperty;class VZ{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let a=DO(r);this._keys.push(a),this._keyMap[a.id]=a,n+=a.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function DO(e){let t=null,n=null,r=null,a=1,s=null;if(Pr(e)||wi(e))r=e,t=Xw(e),n=Zy(e);else{if(!Yw.call(e,"name"))throw new Error(PZ("name"));const l=e.name;if(r=l,Yw.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(zZ(l));t=Xw(l),n=Zy(l),s=e.getFn}return{path:t,id:n,weight:a,src:r,getFn:s}}function Xw(e){return wi(e)?e:e.split(".")}function Zy(e){return wi(e)?e.join("."):e}function BZ(e,t){let n=[],r=!1;const a=(s,l,u)=>{if(Un(s))if(!l[u])n.push(s);else{let d=l[u];const f=s[d];if(!Un(f))return;if(u===l.length-1&&(Pr(f)||NO(f)||DZ(f)))n.push(OZ(f));else if(wi(f)){r=!0;for(let m=0,g=f.length;m<g;m+=1)a(f[m],l,u+1)}else l.length&&a(f,l,u+1)}};return a(e,Pr(t)?t.split("."):t,0),r?n:n[0]}const UZ={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},$Z={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},HZ={location:0,threshold:.6,distance:100},FZ={useExtendedSearch:!1,getFn:BZ,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ve={...$Z,...UZ,...HZ,...FZ};const GZ=/[^ ]+/g;function KZ(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(a){const s=a.match(GZ).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 Wb{constructor({getFn:t=Ve.getFn,fieldNormWeight:n=Ve.fieldNormWeight}={}){this.norm=KZ(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,Pr(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();Pr(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(!Un(t)||Dg(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((a,s)=>{let l=a.getFn?a.getFn(t):this.getFn(t,a.path);if(Un(l)){if(wi(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:f,value:m}=d.pop();if(Un(m))if(Pr(m)&&!Dg(m)){let g={v:m,i:f,n:this.norm.get(m)};u.push(g)}else wi(m)&&m.forEach((g,v)=>{d.push({nestedArrIndex:v,value:g})})}r.$[s]=u}else if(Pr(l)&&!Dg(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 IO(e,t,{getFn:n=Ve.getFn,fieldNormWeight:r=Ve.fieldNormWeight}={}){const a=new Wb({getFn:n,fieldNormWeight:r});return a.setKeys(e.map(DO)),a.setSources(t),a.create(),a}function ZZ(e,{getFn:t=Ve.getFn,fieldNormWeight:n=Ve.fieldNormWeight}={}){const{keys:r,records:a}=e,s=new Wb({getFn:t,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(a),s}function Id(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:a=Ve.distance,ignoreLocation:s=Ve.ignoreLocation}={}){const l=t/e.length;if(s)return l;const u=Math.abs(r-n);return a?l+u/a:u?1:l}function qZ(e=[],t=Ve.minMatchCharLength){let n=[],r=-1,a=-1,s=0;for(let l=e.length;s<l;s+=1){let u=e[s];u&&r===-1?r=s:!u&&r!==-1&&(a=s-1,a-r+1>=t&&n.push([r,a]),r=-1)}return e[s-1]&&s-r>=t&&n.push([r,s-1]),n}const Ka=32;function WZ(e,t,n,{location:r=Ve.location,distance:a=Ve.distance,threshold:s=Ve.threshold,findAllMatches:l=Ve.findAllMatches,minMatchCharLength:u=Ve.minMatchCharLength,includeMatches:d=Ve.includeMatches,ignoreLocation:f=Ve.ignoreLocation}={}){if(t.length>Ka)throw new Error(MZ(Ka));const m=t.length,g=e.length,v=Math.max(0,Math.min(r,g));let E=s,y=v;const x=u>1||d,A=x?Array(g):[];let T;for(;(T=e.indexOf(t,y))>-1;){let D=Id(t,{currentLocation:T,expectedLocation:v,distance:a,ignoreLocation:f});if(E=Math.min(D,E),y=T+m,x){let L=0;for(;L<m;)A[T+L]=1,L+=1}}y=-1;let w=[],C=1,O=m+g;const N=1<<m-1;for(let D=0;D<m;D+=1){let L=0,z=O;for(;L<z;)Id(t,{errors:D,currentLocation:v+z,expectedLocation:v,distance:a,ignoreLocation:f})<=E?L=z:O=z,z=Math.floor((O-L)/2+L);O=z;let U=Math.max(1,v-z+1),fe=l?g:Math.min(v+z,g)+m,ie=Array(fe+2);ie[fe+1]=(1<<D)-1;for(let W=fe;W>=U;W-=1){let ee=W-1,H=n[e.charAt(ee)];if(x&&(A[ee]=+!!H),ie[W]=(ie[W+1]<<1|1)&H,D&&(ie[W]|=(w[W+1]|w[W])<<1|1|w[W+1]),ie[W]&N&&(C=Id(t,{errors:D,currentLocation:ee,expectedLocation:v,distance:a,ignoreLocation:f}),C<=E)){if(E=C,y=ee,y<=v)break;U=Math.max(1,2*v-y)}}if(Id(t,{errors:D+1,currentLocation:v,expectedLocation:v,distance:a,ignoreLocation:f})>E)break;w=ie}const j={isMatch:y>=0,score:Math.max(.001,C)};if(x){const D=qZ(A,u);D.length?d&&(j.indices=D):j.isMatch=!1}return j}function YZ(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const a=e.charAt(n);t[a]=(t[a]||0)|1<<r-n-1}return t}const Nf=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 LO{constructor(t,{location:n=Ve.location,threshold:r=Ve.threshold,distance:a=Ve.distance,includeMatches:s=Ve.includeMatches,findAllMatches:l=Ve.findAllMatches,minMatchCharLength:u=Ve.minMatchCharLength,isCaseSensitive:d=Ve.isCaseSensitive,ignoreDiacritics:f=Ve.ignoreDiacritics,ignoreLocation:m=Ve.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:a,includeMatches:s,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m},t=d?t:t.toLowerCase(),t=f?Nf(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const g=(E,y)=>{this.chunks.push({pattern:E,alphabet:YZ(E),startIndex:y})},v=this.pattern.length;if(v>Ka){let E=0;const y=v%Ka,x=v-y;for(;E<x;)g(this.pattern.substr(E,Ka),E),E+=Ka;if(y){const A=v-Ka;g(this.pattern.substr(A),A)}}else g(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=r?Nf(t):t,this.pattern===t){let x={isMatch:!0,score:0};return a&&(x.indices=[[0,t.length-1]]),x}const{location:s,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,ignoreLocation:m}=this.options;let g=[],v=0,E=!1;this.chunks.forEach(({pattern:x,alphabet:A,startIndex:T})=>{const{isMatch:w,score:C,indices:O}=WZ(t,x,A,{location:s+T,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,includeMatches:a,ignoreLocation:m});w&&(E=!0),v+=C,w&&O&&(g=[...g,...O])});let y={isMatch:E,score:E?v/this.chunks.length:1};return E&&a&&(y.indices=g),y}}class va{constructor(t){this.pattern=t}static isMultiMatch(t){return Qw(t,this.multiRegex)}static isSingleMatch(t){return Qw(t,this.singleRegex)}search(){}}function Qw(e,t){const n=e.match(t);return n?n[1]:null}class XZ extends va{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 QZ extends va{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 JZ extends va{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 eq extends va{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 tq extends va{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 nq extends va{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 jO extends va{constructor(t,{location:n=Ve.location,threshold:r=Ve.threshold,distance:a=Ve.distance,includeMatches:s=Ve.includeMatches,findAllMatches:l=Ve.findAllMatches,minMatchCharLength:u=Ve.minMatchCharLength,isCaseSensitive:d=Ve.isCaseSensitive,ignoreDiacritics:f=Ve.ignoreDiacritics,ignoreLocation:m=Ve.ignoreLocation}={}){super(t),this._bitapSearch=new LO(t,{location:n,threshold:r,distance:a,includeMatches:s,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:d,ignoreDiacritics:f,ignoreLocation:m})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class MO extends va{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const a=[],s=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+s,a.push([r,n-1]);const l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}const qy=[XZ,MO,JZ,eq,nq,tq,QZ,jO],Jw=qy.length,rq=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,iq="|";function aq(e,t={}){return e.split(iq).map(n=>{let r=n.trim().split(rq).filter(s=>s&&!!s.trim()),a=[];for(let s=0,l=r.length;s<l;s+=1){const u=r[s];let d=!1,f=-1;for(;!d&&++f<Jw;){const m=qy[f];let g=m.isMultiMatch(u);g&&(a.push(new m(g,t)),d=!0)}if(!d)for(f=-1;++f<Jw;){const m=qy[f];let g=m.isSingleMatch(u);if(g){a.push(new m(g,t));break}}}return a})}const oq=new Set([jO.type,MO.type]);class sq{constructor(t,{isCaseSensitive:n=Ve.isCaseSensitive,ignoreDiacritics:r=Ve.ignoreDiacritics,includeMatches:a=Ve.includeMatches,minMatchCharLength:s=Ve.minMatchCharLength,ignoreLocation:l=Ve.ignoreLocation,findAllMatches:u=Ve.findAllMatches,location:d=Ve.location,threshold:f=Ve.threshold,distance:m=Ve.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a,minMatchCharLength:s,findAllMatches:u,ignoreLocation:l,location:d,threshold:f,distance:m},t=n?t:t.toLowerCase(),t=r?Nf(t):t,this.pattern=t,this.query=aq(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:a,ignoreDiacritics:s}=this.options;t=a?t:t.toLowerCase(),t=s?Nf(t):t;let l=0,u=[],d=0;for(let f=0,m=n.length;f<m;f+=1){const g=n[f];u.length=0,l=0;for(let v=0,E=g.length;v<E;v+=1){const y=g[v],{isMatch:x,indices:A,score:T}=y.search(t);if(x){if(l+=1,d+=T,r){const w=y.constructor.type;oq.has(w)?u=[...u,...A]:u.push(A)}}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 Wy=[];function lq(...e){Wy.push(...e)}function Yy(e,t){for(let n=0,r=Wy.length;n<r;n+=1){let a=Wy[n];if(a.condition(e,t))return new a(e,t)}return new LO(e,t)}const kf={AND:"$and",OR:"$or"},Xy={PATH:"$path",PATTERN:"$val"},Qy=e=>!!(e[kf.AND]||e[kf.OR]),cq=e=>!!e[Xy.PATH],uq=e=>!wi(e)&&kO(e)&&!Qy(e),eT=e=>({[kf.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function PO(e,t,{auto:n=!0}={}){const r=a=>{let s=Object.keys(a);const l=cq(a);if(!l&&s.length>1&&!Qy(a))return r(eT(a));if(uq(a)){const d=l?a[Xy.PATH]:s[0],f=l?a[Xy.PATTERN]:a[d];if(!Pr(f))throw new Error(jZ(d));const m={keyId:Zy(d),pattern:f};return n&&(m.searcher=Yy(f,t)),m}let u={children:[],operator:s[0]};return s.forEach(d=>{const f=a[d];wi(f)&&f.forEach(m=>{u.children.push(r(m))})}),u};return Qy(e)||(e=eT(e)),r(e)}function dq(e,{ignoreFieldNorm:t=Ve.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:a,norm:s,score:l})=>{const u=a?a.weight:null;r*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(t?1:s))}),n.score=r})}function fq(e,t){const n=e.matches;t.matches=[],Un(n)&&n.forEach(r=>{if(!Un(r.indices)||!r.indices.length)return;const{indices:a,value:s}=r;let l={indices:a,value:s};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),t.matches.push(l)})}function hq(e,t){t.score=e.score}function mq(e,t,{includeMatches:n=Ve.includeMatches,includeScore:r=Ve.includeScore}={}){const a=[];return n&&a.push(fq),r&&a.push(hq),e.map(s=>{const{idx:l}=s,u={item:t[l],refIndex:l};return a.length&&a.forEach(d=>{d(s,u)}),u})}class zs{constructor(t,n={},r){this.options={...Ve,...n},this.options.useExtendedSearch,this._keyStore=new VZ(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Wb))throw new Error(LZ);this._myIndex=n||IO(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Un(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,a=this._docs.length;r<a;r+=1){const s=this._docs[r];t(s,r)&&(this.removeAt(r),r-=1,a-=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:a,shouldSort:s,sortFn:l,ignoreFieldNorm:u}=this.options;let d=Pr(t)?Pr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return dq(d,{ignoreFieldNorm:u}),s&&d.sort(l),NO(n)&&n>-1&&(d=d.slice(0,n)),mq(d,this._docs,{includeMatches:r,includeScore:a})}_searchStringList(t){const n=Yy(t,this.options),{records:r}=this._myIndex,a=[];return r.forEach(({v:s,i:l,n:u})=>{if(!Un(s))return;const{isMatch:d,score:f,indices:m}=n.searchIn(s);d&&a.push({item:s,idx:l,matches:[{score:f,value:s,norm:u,indices:m}]})}),a}_searchLogical(t){const n=PO(t,this.options),r=(u,d,f)=>{if(!u.children){const{keyId:g,searcher:v}=u,E=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(d,g),searcher:v});return E&&E.length?[{idx:f,item:d,matches:E}]:[]}const m=[];for(let g=0,v=u.children.length;g<v;g+=1){const E=u.children[g],y=r(E,d,f);if(y.length)m.push(...y);else if(u.operator===kf.AND)return[]}return m},a=this._myIndex.records,s={},l=[];return a.forEach(({$:u,i:d})=>{if(Un(u)){let f=r(n,u,d);f.length&&(s[d]||(s[d]={idx:d,item:u,matches:[]},l.push(s[d])),f.forEach(({matches:m})=>{s[d].matches.push(...m)}))}}),l}_searchObjectList(t){const n=Yy(t,this.options),{keys:r,records:a}=this._myIndex,s=[];return a.forEach(({$:l,i:u})=>{if(!Un(l))return;let d=[];r.forEach((f,m)=>{d.push(...this._findMatches({key:f,value:l[m],searcher:n}))}),d.length&&s.push({idx:u,item:l,matches:d})}),s}_findMatches({key:t,value:n,searcher:r}){if(!Un(n))return[];let a=[];if(wi(n))n.forEach(({v:s,i:l,n:u})=>{if(!Un(s))return;const{isMatch:d,score:f,indices:m}=r.searchIn(s);d&&a.push({score:f,key:t,value:s,idx:l,norm:u,indices:m})});else{const{v:s,n:l}=n,{isMatch:u,score:d,indices:f}=r.searchIn(s);u&&a.push({score:d,key:t,value:s,norm:l,indices:f})}return a}}zs.version="7.1.0";zs.createIndex=IO;zs.parseIndex=ZZ;zs.config=Ve;zs.parseQuery=PO;lq(sq);const uc=({children:e,className:t,identifier:n,...r})=>b.jsx("div",{className:Ae("group/dropdown relative flex",t),"aria-label":`DropDown ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),pq=({children:e,identifier:t,className:n,...r})=>b.jsx("button",{className:Ae("w-full cursor-pointer",n),"aria-label":`Open panel ${t}`,onClick:a=>{a.currentTarget.focus()},onBlur:a=>a.currentTarget.blur(),...r,children:e}),gq=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:a="start",identifier:s,className:l,...u})=>b.jsx("div",{className:Ae("absolute top-[calc(100%+0.5rem)] z-[1000] min-w-full",a==="start"&&"left-0",a==="end"&&"right-0",l),"aria-hidden":t,role:"region","aria-labelledby":`unrollable-panel-button-${s}`,id:`unrollable-panel-${s}`,children:b.jsx(tR,{isHidden:t,className:Ae("overflow-x-visible",t!==!1?"invisible":"visible",n&&"group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]",r&&"group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]"),...u,children:e})});uc.Trigger=pq;uc.Panel=gq;const yq={key:"locale-switcher-content",content:{localeSwitcherLabel:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:"Показать только выбранные языки"})}}},dc=(e,t)=>{const[n,r]=S.useState(()=>{if(t!==void 0){const l=typeof t=="function"?t():t;if(typeof window>"u")return l;const u=localStorage==null?void 0:localStorage.getItem(e);if(u)try{return JSON.parse(u)}catch(d){console.error(d)}return l}});S.useEffect(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);if(l&&n===void 0)try{r(JSON.parse(l))}catch(u){console.error(u)}else t!==void 0&&n===void 0&&r(t)},[e,n]);const a=S.useCallback(l=>{r(u=>{const d=typeof l=="function"?l(u):l;return localStorage==null||localStorage.setItem(e,JSON.stringify(d)),d})},[e,r]),s=S.useCallback(()=>{const l=localStorage==null?void 0:localStorage.getItem(e);l&&r(JSON.parse(l))},[e,r]);return S.useMemo(()=>[n,a,s],[n,a,s])},zO=S.createContext({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),VO=()=>S.useContext(zO),vq=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{const{locale:r}=yv(),[a,s]=dc("locale-content-selector-selected-locales",t??[r]);return b.jsx(zO,{value:{availableLocales:e,selectedLocales:a,setSelectedLocales:s},children:n})},Ig="locale-switcher-content",bq=({panelProps:e,isMultilingual:t=!0})=>{const{switchTo:n,searchInput:r,localeSwitcherLabel:a,languageListLabel:s,seeAllLocalesSwitch:l}=Jt(yq),u=S.useRef(null),{locale:d}=yv(),{availableLocales:f,selectedLocales:m,setSelectedLocales:g}=VO(),v=S.useMemo(()=>f.map(N=>{const j=Hd(N,V.ENGLISH),D=Hd(N,d),L=Hd(N);return{locale:N,englishName:j,currentLocaleName:D,ownLocaleName:L}}),[f,d]),[E,y]=S.useState(v),[x,A]=dc("locale-content-selector-see-all-locales",!1),T=S.useMemo(()=>{const N={keys:[{name:"ownLocaleName",weight:.4},{name:"englishName",weight:.2},{name:"currentLocaleName",weight:.2},{name:"locale",weight:.2}],threshold:.02};return new zs(v,N)},[v]),w=S.useCallback(N=>{if(N){const j=T.search(N).map(D=>D.item);y(j)}else y(v)},[T,v]),C=N=>{t?m.includes(N)?m.length>1&&g(j=>j.filter(D=>D!==N)):g(j=>[...j,N]):g([N])},O=N=>{A(N),g(N?f:[d])};return b.jsx("div",{className:"border-text text-text rounded-xl border transition-colors","aria-label":a.value,children:b.jsxs(uc,{identifier:Ig,children:[b.jsx(uc.Trigger,{identifier:Ig,children:b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("div",{className:"px-2 py-1",children:b.jsx(Wz,{size:18})}),b.jsx(Xz,{className:"self-center",size:18})]})}),b.jsx(uc.Panel,{identifier:Ig,isOverable:!0,isFocusable:!0,className:"left-auto right-0",...e,children:b.jsxs(Wr,{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&&b.jsx("div",{className:"m-auto p-2",children:b.jsx(Zc,{defaultValue:!1,onChange:O,color:"text",size:"sm",className:"!w-60",choices:[{content:l.true.value,value:!0},{content:l.false.value,value:!1}]})}),!(t&&x)&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"p-3",children:b.jsx(Os,{type:"search","aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:N=>w(N.target.value),ref:u})}),b.jsx("ol",{className:"divide-text/20 divide-y divide-dashed overflow-y-auto p-1",children:E.map(({locale:N,currentLocaleName:j,ownLocaleName:D})=>b.jsx("li",{className:"px-1.5 py-1",children:b.jsx(ut,{onClick:()=>C(N),label:`${n} ${j}`,disabled:!(f??f).includes(N),isActive:m.includes(N),variant:"hoverable",color:"text",isFullWidth:!0,textAlign:"left",size:"sm",children:b.jsxs("div",{className:"flex flex-row items-center justify-between gap-3 px-2 py-1",children:[t&&b.jsx("div",{className:"w-4",children:m.includes(N)&&b.jsx(Cs,{className:"size-full"})}),b.jsxs("div",{className:"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1",children:[b.jsxs("div",{className:"flex flex-col text-nowrap",children:[b.jsx("span",{dir:Jj(N),lang:N,children:D}),b.jsx("span",{className:"text-neutral text-xs",children:j})]}),b.jsx("span",{className:"text-neutral text-sm",children:N.toUpperCase()})]})]})})},N))})]})]})})]})})},_q=(e,t,n)=>{const r={...e};for(const a of Object.keys(e))a===t?(r[n]=e[t],delete r[t]):r[a]=e[a];return r},Jy=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...s})=>{const[l,u]=S.useState(e),[d,f]=S.useState(0),m=l!==e,g=()=>{u(e),f(x=>x+1)},v=()=>{t(l)},E=x=>{u(x.currentTarget.value)};S.useEffect(()=>{u(e)},[e]);const y=(r==null?void 0:r(l))??!0;return b.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[b.jsx(Os,{onChange:E,"aria-label":"value",variant:"invisible",className:"size-full",defaultValue:e,...s},d),(m||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[m&&b.jsxs(b.Fragment,{children:[b.jsx(ut,{Icon:Cs,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!y,onClick:v}),b.jsx(ut,{Icon:uo,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:g})]}),a]})]},String(e))},xq=(e,t)=>{const[n,r]=S.useState(e);return S.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>clearTimeout(a)},[e,t]),n},Eq=({isActive:e=!0,suggestion:t,...n})=>{const r=String(n.value??n.defaultValue??""),{autocomplete:a}=bU(),s=Gr(),[l,u]=S.useState(!1),[d,f]=S.useState(r),[m,g]=S.useState(""),v=xq(d,200);S.useEffect(()=>{typeof n.value>"u"||f(r)},[n.value,n.defaultValue]),S.useEffect(()=>{if(!e||!l)return;const y=async()=>{var x;try{const A=await a({text:v,openAiApiKey:s.editor.openAiApiKey,model:s.editor.openAiApiModel,temperature:s.editor.openAiApiTemperature}),T=((x=A==null?void 0:A.data)==null?void 0:x.autocompletion)??"";if(T.startsWith(v)){const w=T.slice(v.length);return g(w)}return g(T)}catch(A){console.error("Autocomplete error:",A)}};v.length>3?(g(""),y()):g("")},[v,e]);const E=()=>{f(y=>y+m),g("")};return b.jsxs("div",{className:"relative w-full",children:[b.jsxs("div",{className:"pointer-events-none absolute inset-0 whitespace-pre-wrap break-words px-1 py-3 text-base leading-[1.45rem] md:py-1 md:text-sm md:leading-[1.23rem]","aria-hidden":"true",children:[b.jsx("span",{className:"align-text-top text-transparent",children:d}),(m||t)&&b.jsx("span",{className:"text-neutral ml-3 align-text-top",children:t??m})]}),b.jsx(Zv,{...n,value:d,onChange:y=>{var x;u(!0),f(y.target.value),(x=n.onChange)==null||x.call(n,y)},onKeyDown:y=>{var x;y.key==="Tab"&&m&&(y.preventDefault(),E()),(x=n.onKeyDown)==null||x.call(n,y)}})]})},Sq=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...s})=>{const{isAuthenticated:l}=zU(),[u,d]=S.useState(e),[f,m]=S.useState(0),g=u!==e,v=()=>{d(e),m(A=>A+1)},E=()=>{t(u)},y=A=>d(A.currentTarget.value??"");S.useEffect(()=>{d(e)},[e]);const x=(r==null?void 0:r(u))??!0;return b.jsxs("div",{className:"flex size-full flex-col items-center justify-between gap-2",children:[b.jsx(Eq,{onChange:y,variant:"invisible",className:"size-full",defaultValue:e,isActive:l,...s},f),(g||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[g&&b.jsxs(b.Fragment,{children:[b.jsx(ut,{Icon:Cs,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!x,onClick:E}),b.jsx(ut,{Icon:uo,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:v})]}),a]})]},e)};function Za(){return Za=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},Za.apply(this,arguments)}const Aq=["children","options"],Pe={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var tT;(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(tT||(tT={}));const nT=["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"}),rT={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},wq=["style","script"],Tq=["src","href","data","formAction","srcDoc","action"],Rq=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Cq=/mailto:/i,Nq=/\n{2,}$/,iT=/^(\s*>[\s\S]*?)(?=\n\n|$)/,kq=/^ *> ?/gm,Oq=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Dq=/^ {2,}\n/,Iq=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,aT=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,oT=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Lq=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,jq=/^(?:\n *)*\n/,Mq=/\r\n?/g,Pq=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,zq=/^\[\^([^\]]+)]/,Vq=/\f/g,Bq=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Uq=/^\s*?\[(x|\s)\]/,sT=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,lT=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,cT=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Lg=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,$q=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,uT=/^<!--[\s\S]*?(?:-->)/,Hq=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,jg=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Fq=/^\{.*\}$/,Gq=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Kq=/^<([^ >]+@[^ >]+)>/,Zq=/^<([^ >]+:\/[^ >]+)>/,qq=/-([a-z])?/gi,dT=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Wq=/^[^\n]+(?: \n|\n{2,})/,Yq=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Xq=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Qq=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Jq=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,eW=/\t/g,tW=/(^ *\||\| *$)/g,nW=/^ *:-+: *$/,rW=/^ *:-+ *$/,iW=/^ *-+: *$/,xh="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",aW=new RegExp(`^([*_])\\1${xh}\\1\\1(?!\\1)`),oW=new RegExp(`^([*_])${xh}\\1(?!\\1)`),sW=new RegExp(`^(==)${xh}\\1`),lW=new RegExp(`^(~~)${xh}\\1`),cW=/^\\([^0-9A-Za-z\s])/,fT=/\\([^0-9A-Za-z\s])/g,uW=/^(?: |[\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[! ])*)/,dW=/^\n+/,fW=/^([ \t]*)/,hW=/\\([^\\])/g,mW=/(?:^|\n)( *)$/,Yb="(?:\\d+\\.)",Xb="(?:[*+-])";function BO(e){return"( *)("+(e===1?Yb:Xb)+") +"}const UO=BO(1),$O=BO(2);function HO(e){return new RegExp("^"+(e===1?UO:$O))}const pW=HO(1),gW=HO(2);function FO(e){return new RegExp("^"+(e===1?UO:$O)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Yb:Xb)+" )[^\\n]*)*(\\n|$)","gm")}const yW=FO(1),vW=FO(2);function GO(e){const t=e===1?Yb:Xb;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const KO=GO(1),ZO=GO(2);function hT(e,t){const n=t===1,r=n?KO:ZO,a=n?yW:vW,s=n?pW:gW;return{match:Es(function(l,u){const d=mW.exec(u.prevCapture);return d&&(u.list||!u.inline&&!u.simple)?r.exec(l=d[1]+l):null}),order:1,parse(l,u,d){const f=n?+l[2]:void 0,m=l[0].replace(Nq,`
279
- `).match(a);let g=!1;return{items:m.map(function(v,E){const y=s.exec(v)[0].length,x=new RegExp("^ {1,"+y+"}","gm"),A=v.replace(x,"").replace(s,""),T=E===m.length-1,w=A.indexOf(`
280
-
281
- `)!==-1||T&&g;g=w;const C=d.inline,O=d.list;let N;d.list=!0,w?(d.inline=!1,N=fc(A)+`
282
-
283
- `):(d.inline=!0,N=fc(A));const j=u(N,d);return d.inline=C,d.list=O,j}),ordered:n,start:f}},render:(l,u,d)=>e(l.ordered?"ol":"ul",{key:d.key,start:l.type===Pe.orderedList?l.start:void 0},l.items.map(function(f,m){return e("li",{key:m},u(f,d))}))}}const bW=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),_W=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function fc(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function ql(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 xW(e){return iW.test(e)?"right":nW.test(e)?"center":rW.test(e)?"left":null}function mT(e,t,n,r){const a=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,f,m)=>{d.trim()==="|"&&(u(),r)?f!==0&&f!==m.length-1&&s.push([]):l+=d}),u(),n.inTable=a,s}function EW(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(tW,"").split("|").map(xW):[],a=e[3]?function(l,u,d){return l.trim().split(`
284
- `).map(function(f){return mT(f,u,d,!0)})}(e[3],t,n):[],s=mT(e[1],t,n,!!a.length);return n.inline=!1,a.length?{align:r,cells:a,header:s,type:Pe.table}:{children:s,type:Pe.paragraph}}function pT(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Es(e){return e.inline=1,e}function Xi(e){return Es(function(t,n){return n.inline?e.exec(t):null})}function Qi(e){return Es(function(t,n){return n.inline||n.simple?e.exec(t):null})}function yi(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Wl(e){return Es(function(t){return e.exec(t)})}const SW=/(javascript|vbscript|data(?!:image)):/i;function AW(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(SW.test(t))return null}catch{return null}return e}function gT(e){return e.replace(hW,"$1")}function nf(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=a,s}function wW(e,t,n){const r=n.inline||!1,a=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=a,s}function TW(e,t,n){const r=n.inline||!1;n.inline=!1;const a=e(t,n);return n.inline=r,a}const Mg=(e,t,n)=>({children:nf(t,e[2],n)});function Pg(){return{}}function zg(){return null}function RW(...e){return e.filter(Boolean).join(" ")}function Vg(e,t,n){let r=e;const a=t.split(".");for(;a.length&&(r=r[a[0]],r!==void 0);)a.shift();return r||n}function CW(e="",t={}){t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||AW,t.slugify=t.slugify||ql,t.namedCodesToUnicode=t.namedCodesToUnicode?Za({},rT,t.namedCodesToUnicode):rT,t.createElement=t.createElement||S.createElement;const n=[iT,aT,oT,t.enforceAtxHeadings?lT:sT,cT,dT,KO,ZO],r=[...n,Wq,Lg,uT,jg];function a(y,x,...A){const T=Vg(t.overrides,`${y}.props`,{});return t.createElement(function(w,C){const O=Vg(C,w);return O?typeof O=="function"||typeof O=="object"&&"render"in O?O:Vg(C,`${w}.component`,w):w}(y,t.overrides),Za({},x,T,{className:RW(x==null?void 0:x.className,T.className)||void 0}),...A)}function s(y){y=y.replace(Bq,"");let x=!1;t.forceInline?x=!0:t.forceBlock||(x=Jq.test(y)===!1);const A=g(m(x?y:`${fc(y).replace(dW,"")}
285
-
286
- `,{inline:x}));for(;typeof A[A.length-1]=="string"&&!A[A.length-1].trim();)A.pop();if(t.wrapper===null)return A;const T=t.wrapper||(x?"span":"div");let w;if(A.length>1||t.forceWrapper)w=A;else{if(A.length===1)return w=A[0],typeof w=="string"?a("span",{key:"outer"},w):w;w=null}return t.createElement(T,{key:"outer"},w)}function l(y,x){const A=x.match(Rq);return A?A.reduce(function(T,w){const C=w.indexOf("=");if(C!==-1){const O=function(L){return L.indexOf("-")!==-1&&L.match(Hq)===null&&(L=L.replace(qq,function(z,U){return U.toUpperCase()})),L}(w.slice(0,C)).trim(),N=function(L){const z=L[0];return(z==='"'||z==="'")&&L.length>=2&&L[L.length-1]===z?L.slice(1,-1):L}(w.slice(C+1).trim()),j=nT[O]||O;if(j==="ref")return T;const D=T[j]=function(L,z,U,fe){return z==="style"?function(ie){const le=[];let W="",ee=!1,H=!1,re="";if(!ie)return le;for(let ve=0;ve<ie.length;ve++){const P=ie[ve];if(P!=='"'&&P!=="'"||ee||(H?P===re&&(H=!1,re=""):(H=!0,re=P)),P==="("&&W.endsWith("url")?ee=!0:P===")"&&ee&&(ee=!1),P!==";"||H||ee)W+=P;else{const X=W.trim();if(X){const $=X.indexOf(":");if($>0){const Q=X.slice(0,$).trim(),ne=X.slice($+1).trim();le.push([Q,ne])}}W=""}}const Z=W.trim();if(Z){const ve=Z.indexOf(":");if(ve>0){const P=Z.slice(0,ve).trim(),X=Z.slice(ve+1).trim();le.push([P,X])}}return le}(U).reduce(function(ie,[le,W]){return ie[le.replace(/(-[a-z])/g,ee=>ee[1].toUpperCase())]=fe(W,L,le),ie},{}):Tq.indexOf(z)!==-1?fe(U,L,z):(U.match(Fq)&&(U=U.slice(1,U.length-1)),U==="true"||U!=="false"&&U)}(y,O,N,t.sanitizer);typeof D=="string"&&(Lg.test(D)||jg.test(D))&&(T[j]=s(D.trim()))}else w!=="style"&&(T[nT[w]||w]=!0);return T},{}):null}const u=[],d={},f={[Pe.blockQuote]:{match:yi(iT),order:1,parse(y,x,A){const[,T,w]=y[0].replace(kq,"").match(Oq);return{alert:T,children:x(w,A)}},render(y,x,A){const T={key:A.key};return y.alert&&(T.className="markdown-alert-"+t.slugify(y.alert.toLowerCase(),ql),y.children.unshift({attrs:{},children:[{type:Pe.text,text:y.alert}],noInnerParse:!0,type:Pe.htmlBlock,tag:"header"})),a("blockquote",T,x(y.children,A))}},[Pe.breakLine]:{match:Wl(Dq),order:1,parse:Pg,render:(y,x,A)=>a("br",{key:A.key})},[Pe.breakThematic]:{match:yi(Iq),order:1,parse:Pg,render:(y,x,A)=>a("hr",{key:A.key})},[Pe.codeBlock]:{match:yi(oT),order:0,parse:y=>({lang:void 0,text:fc(y[0].replace(/^ {4}/gm,"")).replace(fT,"$1")}),render:(y,x,A)=>a("pre",{key:A.key},a("code",Za({},y.attrs,{className:y.lang?`lang-${y.lang}`:""}),y.text))},[Pe.codeFenced]:{match:yi(aT),order:0,parse:y=>({attrs:l("code",y[3]||""),lang:y[2]||void 0,text:y[4],type:Pe.codeBlock})},[Pe.codeInline]:{match:Qi(Lq),order:3,parse:y=>({text:y[2].replace(fT,"$1")}),render:(y,x,A)=>a("code",{key:A.key},y.text)},[Pe.footnote]:{match:yi(Pq),order:0,parse:y=>(u.push({footnote:y[2],identifier:y[1]}),{}),render:zg},[Pe.footnoteReference]:{match:Xi(zq),order:1,parse:y=>({target:`#${t.slugify(y[1],ql)}`,text:y[1]}),render:(y,x,A)=>a("a",{key:A.key,href:t.sanitizer(y.target,"a","href")},a("sup",{key:A.key},y.text))},[Pe.gfmTask]:{match:Xi(Uq),order:1,parse:y=>({completed:y[1].toLowerCase()==="x"}),render:(y,x,A)=>a("input",{checked:y.completed,key:A.key,readOnly:!0,type:"checkbox"})},[Pe.heading]:{match:yi(t.enforceAtxHeadings?lT:sT),order:1,parse:(y,x,A)=>({children:nf(x,y[2],A),id:t.slugify(y[2],ql),level:y[1].length}),render:(y,x,A)=>a(`h${y.level}`,{id:y.id,key:A.key},x(y.children,A))},[Pe.headingSetext]:{match:yi(cT),order:0,parse:(y,x,A)=>({children:nf(x,y[1],A),level:y[2]==="="?1:2,type:Pe.heading})},[Pe.htmlBlock]:{match:Wl(Lg),order:1,parse(y,x,A){const[,T]=y[3].match(fW),w=new RegExp(`^${T}`,"gm"),C=y[3].replace(w,""),O=(N=C,r.some(U=>U.test(N))?TW:nf);var N;const j=y[1].toLowerCase(),D=wq.indexOf(j)!==-1,L=(D?j:y[1]).trim(),z={attrs:l(L,y[2]),noInnerParse:D,tag:L};return A.inAnchor=A.inAnchor||j==="a",D?z.text=y[3]:z.children=O(x,C,A),A.inAnchor=!1,z},render:(y,x,A)=>a(y.tag,Za({key:A.key},y.attrs),y.text||(y.children?x(y.children,A):""))},[Pe.htmlSelfClosing]:{match:Wl(jg),order:1,parse(y){const x=y[1].trim();return{attrs:l(x,y[2]||""),tag:x}},render:(y,x,A)=>a(y.tag,Za({},y.attrs,{key:A.key}))},[Pe.htmlComment]:{match:Wl(uT),order:1,parse:()=>({}),render:zg},[Pe.image]:{match:Qi(_W),order:1,parse:y=>({alt:y[1],target:gT(y[2]),title:y[3]}),render:(y,x,A)=>a("img",{key:A.key,alt:y.alt||void 0,title:y.title||void 0,src:t.sanitizer(y.target,"img","src")})},[Pe.link]:{match:Xi(bW),order:3,parse:(y,x,A)=>({children:wW(x,y[1],A),target:gT(y[2]),title:y[3]}),render:(y,x,A)=>a("a",{key:A.key,href:t.sanitizer(y.target,"a","href"),title:y.title},x(y.children,A))},[Pe.linkAngleBraceStyleDetector]:{match:Xi(Zq),order:0,parse:y=>({children:[{text:y[1],type:Pe.text}],target:y[1],type:Pe.link})},[Pe.linkBareUrlDetector]:{match:Es((y,x)=>x.inAnchor||t.disableAutoLink?null:Xi(Gq)(y,x)),order:0,parse:y=>({children:[{text:y[1],type:Pe.text}],target:y[1],title:void 0,type:Pe.link})},[Pe.linkMailtoDetector]:{match:Xi(Kq),order:0,parse(y){let x=y[1],A=y[1];return Cq.test(A)||(A="mailto:"+A),{children:[{text:x.replace("mailto:",""),type:Pe.text}],target:A,type:Pe.link}}},[Pe.orderedList]:hT(a,1),[Pe.unorderedList]:hT(a,2),[Pe.newlineCoalescer]:{match:yi(jq),order:3,parse:Pg,render:()=>`
287
- `},[Pe.paragraph]:{match:Es(function(y,x){if(x.inline||x.simple)return null;let A="";y.split(`
288
- `).every(w=>(w+=`
289
- `,!n.some(C=>C.test(w))&&(A+=w,!!w.trim())));const T=fc(A);return T==""?null:[A,,T]}),order:3,parse:Mg,render:(y,x,A)=>a("p",{key:A.key},x(y.children,A))},[Pe.ref]:{match:Xi(Yq),order:0,parse:y=>(d[y[1]]={target:y[2],title:y[4]},{}),render:zg},[Pe.refImage]:{match:Qi(Xq),order:0,parse:y=>({alt:y[1]||void 0,ref:y[2]}),render:(y,x,A)=>d[y.ref]?a("img",{key:A.key,alt:y.alt,src:t.sanitizer(d[y.ref].target,"img","src"),title:d[y.ref].title}):null},[Pe.refLink]:{match:Xi(Qq),order:0,parse:(y,x,A)=>({children:x(y[1],A),fallbackChildren:y[0],ref:y[2]}),render:(y,x,A)=>d[y.ref]?a("a",{key:A.key,href:t.sanitizer(d[y.ref].target,"a","href"),title:d[y.ref].title},x(y.children,A)):a("span",{key:A.key},y.fallbackChildren)},[Pe.table]:{match:yi(dT),order:1,parse:EW,render(y,x,A){const T=y;return a("table",{key:A.key},a("thead",null,a("tr",null,T.header.map(function(w,C){return a("th",{key:C,style:pT(T,C)},x(w,A))}))),a("tbody",null,T.cells.map(function(w,C){return a("tr",{key:C},w.map(function(O,N){return a("td",{key:N,style:pT(T,N)},x(O,A))}))})))}},[Pe.text]:{match:Wl(uW),order:4,parse:y=>({text:y[0].replace($q,(x,A)=>t.namedCodesToUnicode[A]?t.namedCodesToUnicode[A]:x)}),render:y=>y.text},[Pe.textBolded]:{match:Qi(aW),order:2,parse:(y,x,A)=>({children:x(y[2],A)}),render:(y,x,A)=>a("strong",{key:A.key},x(y.children,A))},[Pe.textEmphasized]:{match:Qi(oW),order:3,parse:(y,x,A)=>({children:x(y[2],A)}),render:(y,x,A)=>a("em",{key:A.key},x(y.children,A))},[Pe.textEscaped]:{match:Qi(cW),order:1,parse:y=>({text:y[1],type:Pe.text})},[Pe.textMarked]:{match:Qi(sW),order:3,parse:Mg,render:(y,x,A)=>a("mark",{key:A.key},x(y.children,A))},[Pe.textStrikethroughed]:{match:Qi(lW),order:3,parse:Mg,render:(y,x,A)=>a("del",{key:A.key},x(y.children,A))}};t.disableParsingRawHTML===!0&&(delete f[Pe.htmlBlock],delete f[Pe.htmlSelfClosing]);const m=function(y){let x=Object.keys(y);function A(T,w){let C,O,N=[],j="",D="";for(w.prevCapture=w.prevCapture||"";T;){let L=0;for(;L<x.length;){if(j=x[L],C=y[j],w.inline&&!C.match.inline){L++;continue}const z=C.match(T,w);if(z){D=z[0],w.prevCapture+=D,T=T.substring(D.length),O=C.parse(z,A,w),O.type==null&&(O.type=j),N.push(O);break}L++}}return w.prevCapture="",N}return x.sort(function(T,w){let C=y[T].order,O=y[w].order;return C!==O?C-O:T<w?-1:1}),function(T,w){return A(function(C){return C.replace(Mq,`
290
- `).replace(Vq,"").replace(eW," ")}(T),w)}}(f),g=(v=function(y,x){return function(A,T,w){const C=y[A.type].render;return x?x(()=>C(A,T,w),A,T,w):C(A,T,w)}}(f,t.renderRule),function y(x,A={}){if(Array.isArray(x)){const T=A.key,w=[];let C=!1;for(let O=0;O<x.length;O++){A.key=O;const N=y(x[O],A),j=typeof N=="string";j&&C?w[w.length-1]+=N:N!==null&&w.push(N),C=j}return A.key=T,w}return v(x,y,A)});var v;const E=s(e);return u.length?a("div",null,E,a("footer",{key:"footer"},u.map(function(y){return a("div",{id:t.slugify(y.identifier,ql),key:y.identifier},y.identifier,g(m(y.footnote,{inline:!0})))}))):E}const NW=e=>{let{children:t="",options:n}=e,r=function(a,s){if(a==null)return{};var l,u,d={},f=Object.keys(a);for(u=0;u<f.length;u++)s.indexOf(l=f[u])>=0||(d[l]=a[l]);return d}(e,Aq);return S.cloneElement(CW(t,n),r)},kW=e=>{var a;const t=document.getElementById(e),r=(((a=t==null?void 0:t.getBoundingClientRect())==null?void 0:a.top)??0)+window.scrollY-150;window.scrollTo({top:r,behavior:"smooth"})},OW=()=>{const[e,t]=S.useState(),n=()=>{t(window.location.hash.slice(1))};return S.useEffect(()=>(t(window.location.hash.slice(1)),window.addEventListener("hashchange",n,{passive:!0}),()=>window.removeEventListener("hashchange",n)),[]),S.useEffect(()=>{e&&kW(e)},[e]),null},DW=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function IW(e,t,n){const r=[];for(const a of e){if(n==="v3"){const u=a.children.flatMap((d,f)=>{if(d.type!=="element")return d;const m=d.children[0];if(m.type!=="text")return d;const g=f===a.children.length-1;if(!vT(m.value,g))return d;const E=m.value.split(/(\s+\/\/)/);if(E.length<=1)return d;let y=[E[0]];for(let x=1;x<E.length;x+=2)y.push(E[x]+(E[x+1]||""));return y=y.filter(Boolean),y.length<=1?d:y.map(x=>({...d,children:[{type:"text",value:x}]}))});u.length!==a.children.length&&(a.children=u)}const s=a.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 f=d.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const m=u===s.length-1,g=vT(f.value,m);if(g)if(t&&!m&&u!==0){const v=yT(s[u-1],"{")&&yT(s[u+1],"}");r.push({info:g,line:a,token:d,isLineCommentOnly:s.length===3&&d.children.length===1,isJsxStyle:v})}else r.push({info:g,line:a,token:d,isLineCommentOnly:s.length===1&&d.children.length===1,isJsxStyle:!1})}}return r}function yT(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function vT(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const a=e.length-n.length-r;for(const[s,l]of DW){if(l&&!t)continue;const u=s.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(a):void 0]}}function LW(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function qO(e,t,n,r){return r==null&&(r="v3"),{name:e,code(a){const s=a.children.filter(f=>f.type==="element"),l=[];a.data??(a.data={});const u=a.data;u._shiki_notation??(u._shiki_notation=IW(s,["jsx","tsx"].includes(this.options.lang),r));const d=u._shiki_notation;for(const f of d){if(f.info[1].length===0)continue;let m=s.indexOf(f.line);f.isLineCommentOnly&&r!=="v1"&&m++;let g=!1;if(f.info[1]=f.info[1].replace(t,(...E)=>n.call(this,E,f.line,f.token,s,m)?(g=!0,""):E[0]),!g)continue;r==="v1"&&(f.info[1]=LW(f.info[1]));const v=f.info[1].trim().length===0;if(v&&(f.info[1]=""),v&&f.isLineCommentOnly)l.push(f.line);else if(v&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(v)f.line.children.splice(f.line.children.indexOf(f.token),1);else{const E=f.token.children[0];E.type==="text"&&(E.value=f.info.join(""))}}for(const f of l){const m=a.children.indexOf(f),g=a.children[m+1];let v=1;(g==null?void 0:g.type)==="text"&&(g==null?void 0:g.value)===`
291
- `&&(v=2),a.children.splice(m,v)}}}}function jW(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const a=r.split("-").map(s=>Number.parseInt(s,10));return a.length===1?[a[0]]:Array.from({length:a[1]-a[0]+1},(s,l)=>l+a[0])}):null}const Ld=Symbol("highlighted-lines");function MW(e={}){const{className:t="highlighted"}=e;return{name:"@shikijs/transformers:meta-highlight",line(n,r){var l;if(!((l=this.options.meta)!=null&&l.__raw))return;const a=this.meta;return a[Ld]??(a[Ld]=jW(this.options.meta.__raw)),(a[Ld]??[]).includes(r)&&this.addClassToHast(n,t),n}}}function PW(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(n=>n[1].replace(/\\(.)/g,"$1")):[]}function zW(e={}){const{className:t="highlighted-word"}=e;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(n,r){var s;if(!((s=this.options.meta)!=null&&s.__raw))return;const a=PW(this.options.meta.__raw);r.decorations||(r.decorations=[]);for(const l of a){const u=VW(n,l);for(const d of u)r.decorations.push({start:d,end:d+l.length,properties:{class:t}})}}}}function VW(e,t){const n=[];let r=0;for(;;){const a=e.indexOf(t,r);if(a===-1||a>=e.length||a<r)break;n.push(a),r=a+t.length}return n}function BW(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Qb(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0}=e;return qO(t,new RegExp(`\\s*\\[!code (${Object.keys(n).map(BW).join("|")})(:\\d+)?\\]`),function([a,s,l=":1"],u,d,f,m){const g=Number.parseInt(l.slice(1),10);for(let v=m;v<Math.min(m+g,f.length);v++)this.addClassToHast(f[v],n[s]);return r&&this.addClassToHast(this.pre,r),!0},e.matchAlgorithm)}function UW(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff"}=e;return Qb({classMap:{"++":t,"--":n},classActivePre:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function $W(e={}){const{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:n="has-highlighted"}=e;return Qb({classMap:t,classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function HW(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted"}=e;return Qb({classMap:{highlight:t,hl:t},classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function FW(e,t,n,r){const a=WO(e);let s=a.indexOf(n);for(;s!==-1;)GW.call(this,e.children,t,s,n.length,r),s=a.indexOf(n,s+1)}function WO(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(WO).join(""):""}function GW(e,t,n,r,a){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(KW([s,s+d.value.length-1],[n,n+r])){const f=Math.max(0,n-s),m=r-Math.max(0,s-n);if(m===0)continue;const g=ZW(u,d,f,m);this.addClassToHast(g[1],a);const v=g.filter(Boolean);e.splice(l,1,...v),l+=v.length-1}s+=d.value.length}}}function KW(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function ZW(e,t,n,r){const a=t.value,s=l=>qW(e,{children:[{type:"text",value:l}]});return[n>0?s(a.slice(0,n)):void 0,s(a.slice(n,n+r)),n+r<a.length?s(a.slice(n+r)):void 0]}function qW(e,t){return{...e,properties:{...e.properties},...t}}function WW(e={}){const{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return qO("@shikijs/transformers:notation-highlight-word",/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,function([r,a,s],l,u,d,f){const m=s?Number.parseInt(s.slice(1),10):d.length;a=a.replace(/\\(.)/g,"$1");for(let g=f;g<Math.min(f+m,d.length);g++)FW.call(this,d[g],u,a,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}const YW="modulepreload",XW=function(e){return"/"+e},bT={},I=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=l(n.map(f=>{if(f=XW(f),f in bT)return;bT[f]=!0;const m=f.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":YW,m||(v.as="script"),v.crossOrigin="",v.href=f,d&&v.setAttribute("nonce",d),document.head.appendChild(v),m)return new Promise((E,y)=>{v.addEventListener("load",E),v.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})};let Vt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function QW(e){return Jb(e)}function Jb(e){return Array.isArray(e)?JW(e):e instanceof RegExp?e:typeof e=="object"?eY(e):e}function JW(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Jb(e[n]);return t}function eY(e){let t={};for(let n in e)t[n]=Jb(e[n]);return t}function YO(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function XO(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?XO(e.substring(0,e.length-1)):e.substr(~t+1)}var Bg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,jd=class{static hasCaptures(e){return e===null?!1:(Bg.lastIndex=0,Bg.test(e))}static replaceCaptures(e,t,n){return e.replace(Bg,(r,a,s,l)=>{let u=n[parseInt(a||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 QO(e,t){return e<t?-1:e>t?1:0}function JO(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let s=QO(e[a],t[a]);if(s!==0)return s}return 0}return n-r}function _T(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 eD(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var tD=class{constructor(e){ce(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Of=class{constructor(e,t,n){ce(this,"_cachedMatchRoot",new tD(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(rY(e),t)}static createFromParsedTheme(e,t){return aY(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>tY(e.parent,a.parentScopes));return r?new nD(r.fontStyle,r.foreground,r.background):null}},Ug=class rf{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new rf(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new rf(n,t[r]);return n}push(t){return new rf(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 tY(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!nY(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function nY(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var nD=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function rY(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,s=t.length;a<s;a++){let l=t[a];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,E=g.length;v<E;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 f=null;typeof l.settings.foreground=="string"&&_T(l.settings.foreground)&&(f=l.settings.foreground);let m=null;typeof l.settings.background=="string"&&_T(l.settings.background)&&(m=l.settings.background);for(let g=0,v=u.length;g<v;g++){let y=u[g].trim().split(" "),x=y[y.length-1],A=null;y.length>1&&(A=y.slice(0,y.length-1),A.reverse()),n[r++]=new iY(x,A,a,d,f,m)}}return n}var iY=class{constructor(e,t,n,r,a,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=s}},pn=(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))(pn||{});function aY(e,t){e.sort((d,f)=>{let m=QO(d.scope,f.scope);return m!==0||(m=JO(d.parentScopes,f.parentScopes),m!==0)?m:d.index-f.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let d=e.shift();d.fontStyle!==-1&&(n=d.fontStyle),d.foreground!==null&&(r=d.foreground),d.background!==null&&(a=d.background)}let s=new oY(t),l=new nD(n,s.getId(r),s.getId(a)),u=new lY(new ev(0,null,-1,0,0),[]);for(let d=0,f=e.length;d<f;d++){let m=e[d];u.insert(0,m.scope,m.parentScopes,m.fontStyle,s.getId(m.foreground),s.getId(m.background))}return new Of(s,l,u)}var oY=class{constructor(e){ce(this,"_isFrozen");ce(this,"_lastColorId");ce(this,"_id2color");ce(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},sY=Object.freeze([]),ev=class rD{constructor(t,n,r,a,s){ce(this,"scopeDepth");ce(this,"parentScopes");ce(this,"fontStyle");ce(this,"foreground");ce(this,"background");this.scopeDepth=t,this.parentScopes=n||sY,this.fontStyle=r,this.foreground=a,this.background=s}clone(){return new rD(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},lY=class tv{constructor(t,n=[],r={}){ce(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){const s=n.parentScopes[a].length-t.parentScopes[r].length;if(s!==0)return s;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,s;if(r===-1?(a=t,s=""):(a=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(tv._cmpBySpecificity),n}insert(t,n,r,a,s,l){if(n===""){this._doInsertHere(t,r,a,s,l);return}let u=n.indexOf("."),d,f;u===-1?(d=n,f=""):(d=n.substring(0,u),f=n.substring(u+1));let m;this._children.hasOwnProperty(d)?m=this._children[d]:(m=new tv(this._mainRule.clone(),ev.cloneArr(this._rulesWithParentScopes)),this._children[d]=m),m.insert(t+1,f,r,a,s,l)}_doInsertHere(t,n,r,a,s){if(n===null){this._mainRule.acceptOverwrite(t,r,a,s);return}for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let d=this._rulesWithParentScopes[l];if(JO(d.parentScopes,n)===0){d.acceptOverwrite(t,r,a,s);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new ev(t,n,r,a,s))}},Ss=class nr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=nr.getLanguageId(t),r=nr.getTokenType(t),a=nr.getFontStyle(t),s=nr.getForeground(t),l=nr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,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,a,s,l,u){let d=nr.getLanguageId(t),f=nr.getTokenType(t),m=nr.containsBalancedBrackets(t)?1:0,g=nr.getFontStyle(t),v=nr.getForeground(t),E=nr.getBackground(t);return n!==0&&(d=n),r!==8&&(f=r),a!==null&&(m=a?1:0),s!==-1&&(g=s),l!==0&&(v=l),u!==0&&(E=u),(d<<0|f<<8|m<<10|g<<11|v<<15|E<<24)>>>0}};function Df(e,t){const n=[],r=cY(e);let a=r.next();for(;a!==null;){let d=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let f=l();if(n.push({matcher:f,priority:d}),a!==",")break;a=r.next()}return n;function s(){if(a==="-"){a=r.next();const d=s();return f=>!!d&&!d(f)}if(a==="("){a=r.next();const d=u();return a===")"&&(a=r.next()),d}if(xT(a)){const d=[];do d.push(a),a=r.next();while(xT(a));return f=>t(d,f)}return null}function l(){const d=[];let f=s();for(;f;)d.push(f),f=s();return m=>d.every(g=>g(m))}function u(){const d=[];let f=l();for(;f&&(d.push(f),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");f=l()}return m=>d.some(g=>g(m))}}function xT(e){return!!e&&!!e.match(/[\w\.:]+/)}function cY(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 iD(e){typeof e.dispose=="function"&&e.dispose()}var Rc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},uY=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},dY=class{constructor(){ce(this,"_references",[]);ce(this,"_seenReferenceKeys",new Set);ce(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},fY=class{constructor(e,t){ce(this,"seenFullScopeRequests",new Set);ce(this,"seenPartialScopeRequests",new Set);ce(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Rc(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new dY;for(const n of e)hY(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Rc){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 hY(e,t,n,r){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Rc?af({baseGrammar:s,selfGrammar:a},r):nv(e.ruleName,{baseGrammar:s,selfGrammar:a,repository:a.repository},r);const l=n.injections(e.scopeName);if(l)for(const u of l)r.add(new Rc(u))}function nv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];If([r],t,n)}}function af(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&If(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&If(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function If(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?YO({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&If(r.patterns,{...t,repository:a},n);const s=r.include;if(!s)continue;const l=aD(s);switch(l.kind){case 0:af({...t,selfGrammar:t.baseGrammar},n);break;case 1:af(t,n);break;case 2:nv(l.ruleName,{...t,repository:a},n);break;case 3:case 4:const u=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const d={baseGrammar:t.baseGrammar,selfGrammar:u,repository:a};l.kind===4?nv(l.ruleName,d,n):af(d,n)}else l.kind===4?n.add(new uY(l.scopeName,l.ruleName)):n.add(new Rc(l.scopeName));break}}}var mY=class{constructor(){ce(this,"kind",0)}},pY=class{constructor(){ce(this,"kind",1)}},gY=class{constructor(e){ce(this,"kind",2);this.ruleName=e}},yY=class{constructor(e){ce(this,"kind",3);this.scopeName=e}},vY=class{constructor(e,t){ce(this,"kind",4);this.scopeName=e,this.ruleName=t}};function aD(e){if(e==="$base")return new mY;if(e==="$self")return new pY;const t=e.indexOf("#");if(t===-1)return new yY(e);if(t===0)return new gY(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new vY(n,r)}}var bY=/\\(\d+)/,ET=/\\(\d+)/g,_Y=-1,oD=-2;var Jc=class{constructor(e,t,n,r){ce(this,"$location");ce(this,"id");ce(this,"_nameIsCapturing");ce(this,"_name");ce(this,"_contentNameIsCapturing");ce(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=jd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=jd.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${XO(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:jd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:jd.replaceCaptures(this._contentName,e,t)}},xY=class extends Jc{constructor(t,n,r,a,s){super(t,n,r,a);ce(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,a){throw new Error("Not supported!")}},EY=class extends Jc{constructor(t,n,r,a,s){super(t,n,r,null);ce(this,"_match");ce(this,"captures");ce(this,"_cachedCompiledPatterns");this._match=new Cc(a,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Nc,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ST=class extends Jc{constructor(t,n,r,a,s){super(t,n,r,a);ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Nc,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},rv=class extends Jc{constructor(t,n,r,a,s,l,u,d,f,m){super(t,n,r,a);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"_end");ce(this,"endHasBackReferences");ce(this,"endCaptures");ce(this,"applyEndPatternLast");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this._begin=new Cc(s,this.id),this.beginCaptures=l,this._end=new Cc(u||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=f||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,a)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Nc;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Lf=class extends Jc{constructor(t,n,r,a,s,l,u,d,f){super(t,n,r,a);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"whileCaptures");ce(this,"_while");ce(this,"whileHasBackReferences");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");ce(this,"_cachedCompiledWhilePatterns");this._begin=new Cc(s,this.id),this.beginCaptures=l,this.whileCaptures=d,this._while=new Cc(u,oD),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Nc;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,a){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,a)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Nc,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},sD=class hn{static createCaptureRule(t,n,r,a,s){return t.registerRule(l=>new xY(n,l,r,a,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new EY(t.$vscodeTextmateLocation,t.id,t.name,t.match,hn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=YO({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new ST(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,hn._compilePatterns(s,n,r))}return t.while?new Lf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,hn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,hn._compileCaptures(t.whileCaptures||t.captures,n,r),hn._compilePatterns(t.patterns,n,r)):new rv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,hn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,hn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,hn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];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++)a[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const u=parseInt(l,10);let d=0;t[l].patterns&&(d=hn.getCompiledRuleId(t[l],n,r)),a[u]=hn.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,d)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let s=0,l=t.length;s<l;s++){const u=t[s];let d=-1;if(u.include){const f=aD(u.include);switch(f.kind){case 0:case 1:d=hn.getCompiledRuleId(r[u.include],n,r);break;case 2:let m=r[f.ruleName];m&&(d=hn.getCompiledRuleId(m,n,r));break;case 3:case 4:const g=f.scopeName,v=f.kind===4?f.ruleName:null,E=n.getExternalGrammar(g,r);if(E)if(v){let y=E.repository[v];y&&(d=hn.getCompiledRuleId(y,n,E.repository))}else d=hn.getCompiledRuleId(E.repository.$self,n,E.repository);break}}else d=hn.getCompiledRuleId(u,n,r);if(d!==-1){const f=n.getRule(d);let m=!1;if((f instanceof ST||f instanceof rv||f instanceof Lf)&&f.hasMissingPatterns&&f.patterns.length===0&&(m=!0),m)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Cc=class lD{constructor(t,n){ce(this,"source");ce(this,"ruleId");ce(this,"hasAnchor");ce(this,"hasBackReferences");ce(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let a=0,s=[],l=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(s.push(t.substring(a,u)),s.push("$(?!\\n)(?<!\\n)"),a=u+2):(f==="A"||f==="G")&&(l=!0),u++}this.hasAnchor=l,a===0?this.source=t:(s.push(t.substring(a,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=bY.test(this.source):this.hasBackReferences=!1}clone(){return new lD(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return ET.lastIndex=0,this.source.replace(ET,(a,s)=>eD(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=[],a=[],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,a[s]=u,u==="\\"&&s+1<l&&(d=this.source.charAt(s+1),d==="A"?(t[s+1]="￿",n[s+1]="￿",r[s+1]="A",a[s+1]="A"):d==="G"?(t[s+1]="￿",n[s+1]="G",r[s+1]="￿",a[s+1]="G"):(t[s+1]=d,n[s+1]=d,r[s+1]=d,a[s+1]=d),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Nc=class{constructor(){ce(this,"_items");ce(this,"_hasAnchors");ce(this,"_cached");ce(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new AT(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new AT(e,r,this._items.map(a=>a.ruleId))}},AT=class{constructor(e,t,n){ce(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
292
- `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},$g=class{constructor(e,t){this.languageId=e,this.tokenType=t}},vi,SY=(vi=class{constructor(t,n){ce(this,"_defaultAttributes");ce(this,"_embeddedLanguagesMatcher");ce(this,"_getBasicScopeAttributes",new tD(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new $g(n,r)}));this._defaultAttributes=new $g(t,8),this._embeddedLanguagesMatcher=new AY(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?vi._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(vi.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},ce(vi,"_NULL_SCOPE_METADATA",new $g(0,0)),ce(vi,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),vi),AY=class{constructor(e){ce(this,"values");ce(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>eD(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])}},wT=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function cD(e,t,n,r,a,s,l,u){const d=t.content.length;let f=!1,m=-1;if(l){const E=wY(e,t,n,r,a,s);a=E.stack,r=E.linePos,n=E.isFirstLine,m=E.anchorPosition}const g=Date.now();for(;!f;){if(u!==0&&Date.now()-g>u)return new wT(a,!0);v()}return new wT(a,!1);function v(){const E=TY(e,t,n,r,a,m);if(!E){s.produce(a,d),f=!0;return}const y=E.captureIndices,x=E.matchedRuleId,A=y&&y.length>0?y[0].end>r:!1;if(x===_Y){const T=a.getRule(e);s.produce(a,y[0].start),a=a.withContentNameScopesList(a.nameScopesList),Jl(e,t,n,a,s,T.endCaptures,y),s.produce(a,y[0].end);const w=a;if(a=a.parent,m=w.getAnchorPos(),!A&&w.getEnterPos()===r){a=w,s.produce(a,d),f=!0;return}}else{const T=e.getRule(x);s.produce(a,y[0].start);const w=a,C=T.getName(t.content,y),O=a.contentNameScopesList.pushAttributed(C,e);if(a=a.push(x,r,m,y[0].end===d,null,O,O),T instanceof rv){const N=T;Jl(e,t,n,a,s,N.beginCaptures,y),s.produce(a,y[0].end),m=y[0].end;const j=N.getContentName(t.content,y),D=O.pushAttributed(j,e);if(a=a.withContentNameScopesList(D),N.endHasBackReferences&&(a=a.withEndRule(N.getEndWithResolvedBackReferences(t.content,y))),!A&&w.hasSameRuleAs(a)){a=a.pop(),s.produce(a,d),f=!0;return}}else if(T instanceof Lf){const N=T;Jl(e,t,n,a,s,N.beginCaptures,y),s.produce(a,y[0].end),m=y[0].end;const j=N.getContentName(t.content,y),D=O.pushAttributed(j,e);if(a=a.withContentNameScopesList(D),N.whileHasBackReferences&&(a=a.withEndRule(N.getWhileWithResolvedBackReferences(t.content,y))),!A&&w.hasSameRuleAs(a)){a=a.pop(),s.produce(a,d),f=!0;return}}else if(Jl(e,t,n,a,s,T.captures,y),s.produce(a,y[0].end),a=a.pop(),!A){a=a.safePop(),s.produce(a,d),f=!0;return}}y[0].end>r&&(r=y[0].end,n=!1)}}function wY(e,t,n,r,a,s){let l=a.beginRuleCapturedEOL?0:-1;const u=[];for(let d=a;d;d=d.pop()){const f=d.getRule(e);f instanceof Lf&&u.push({rule:f,stack:d})}for(let d=u.pop();d;d=u.pop()){const{ruleScanner:f,findOptions:m}=NY(d.rule,e,d.stack.endRule,n,r===l),g=f.findNextMatchSync(t,r,m);if(g){if(g.ruleId!==oD){a=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(s.produce(d.stack,g.captureIndices[0].start),Jl(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{a=d.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function TY(e,t,n,r,a,s){const l=RY(e,t,n,r,a,s),u=e.getInjections();if(u.length===0)return l;const d=CY(u,e,t,n,r,a,s);if(!d)return l;if(!l)return d;const f=l.captureIndices[0].start,m=d.captureIndices[0].start;return m<f||d.priorityMatch&&m===f?d:l}function RY(e,t,n,r,a,s){const l=a.getRule(e),{ruleScanner:u,findOptions:d}=uD(l,e,a.endRule,n,r===s),f=u.findNextMatchSync(t,r,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function CY(e,t,n,r,a,s,l){let u=Number.MAX_VALUE,d=null,f,m=0;const g=s.contentNameScopesList.getScopeNames();for(let v=0,E=e.length;v<E;v++){const y=e[v];if(!y.matcher(g))continue;const x=t.getRule(y.ruleId),{ruleScanner:A,findOptions:T}=uD(x,t,null,r,a===l),w=A.findNextMatchSync(n,a,T);if(!w)continue;const C=w.captureIndices[0].start;if(!(C>=u)&&(u=C,d=w.captureIndices,f=w.ruleId,m=y.priority,u===a))break}return d?{priorityMatch:m===-1,captureIndices:d,matchedRuleId:f}:null}function uD(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function NY(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function Jl(e,t,n,r,a,s,l){if(s.length===0)return;const u=t.content,d=Math.min(s.length,l.length),f=[],m=l[0].end;for(let g=0;g<d;g++){const v=s[g];if(v===null)continue;const E=l[g];if(E.length===0)continue;if(E.start>m)break;for(;f.length>0&&f[f.length-1].endPos<=E.start;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?a.produceFromScopes(f[f.length-1].scopes,E.start):a.produce(r,E.start),v.retokenizeCapturedWithRuleId){const x=v.getName(u,l),A=r.contentNameScopesList.pushAttributed(x,e),T=v.getContentName(u,l),w=A.pushAttributed(T,e),C=r.push(v.retokenizeCapturedWithRuleId,E.start,-1,!1,null,A,w),O=e.createOnigString(u.substring(0,E.end));cD(e,O,n&&E.start===0,E.start,C,a,!1,0),iD(O);continue}const y=v.getName(u,l);if(y!==null){const A=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(y,e);f.push(new kY(A,E.end))}}for(;f.length>0;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var kY=class{constructor(e,t){ce(this,"scopes");ce(this,"endPos");this.scopes=e,this.endPos=t}};function OY(e,t,n,r,a,s,l,u){return new IY(e,t,n,r,a,s,l,u)}function TT(e,t,n,r,a){const s=Df(t,jf),l=sD.getCompiledRuleId(n,r,a.repository);for(const u of s)e.push({debugSelector:t,matcher:u.matcher,ruleId:l,grammar:a,priority:u.priority})}function jf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(DY(t[a],r))return n=a+1,!0;return!1})}function DY(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 IY=class{constructor(e,t,n,r,a,s,l,u){ce(this,"_rootId");ce(this,"_lastRuleId");ce(this,"_ruleId2desc");ce(this,"_includedGrammars");ce(this,"_grammarRepository");ce(this,"_grammar");ce(this,"_injections");ce(this,"_basicScopeAttributesProvider");ce(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=u,this._basicScopeAttributesProvider=new SY(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=RT(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const f=Df(d,jf);for(const m of f)this._tokenTypeMatchers.push({matcher:m.matcher,type:a[d]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const a=r.injections;if(a)for(let l in a)TT(t,l,a[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&&TT(t,d,u,this,u)}})}return t.sort((a,s)=>a.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]=RT(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=sD.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===iv.NULL){a=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),g=Ss.set(0,f.languageId,f.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),v=this.getRule(this._rootId).getName(null,null);let E;v?E=hc.createRootAndLookUpScopeName(v,g,this):E=hc.createRoot("unknown",g),t=new iv(null,this._rootId,-1,-1,!1,null,E,E)}else a=!1,t.reset();e=e+`
293
- `;const s=this.createOnigString(e),l=s.content.length,u=new jY(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=cD(this,s,a,0,t,u,!0,r);return iD(s),{lineLength:l,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function RT(e,t){return e=QW(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 hc=class Dr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=(t==null?void 0:t.scopePath)??null;for(const s of n)a=Ug.push(a,s.scopeNames),r=new Dr(r,a,s.encodedTokenAttributes);return r}static createRoot(t,n){return new Dr(null,new Ug(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),s=new Ug(null,t),l=r.themeProvider.themeMatch(s),u=Dr.mergeAttributes(n,a,l);return new Dr(null,s,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Dr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,s=0,l=0;return r!==null&&(a=r.fontStyle,s=r.foregroundId,l=r.backgroundId),Ss.set(t,n.languageId,n.tokenType,null,a,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Dr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const s of r)a=Dr._pushAttributed(a,s,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),s=t.scopePath.push(n),l=r.themeProvider.themeMatch(s),u=Dr.mergeAttributes(t.tokenAttributes,a,l);return new Dr(t,s,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var a;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((a=r.parent)==null?void 0:a.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},ir,iv=(ir=class{constructor(t,n,r,a,s,l,u,d){ce(this,"_stackElementBrand");ce(this,"_enterPos");ce(this,"_anchorPos");ce(this,"depth");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=a}equals(t){return t===null?!1:ir._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?hc.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(){ir._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,s,l,u){return new ir(this,t,n,r,a,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){var r,a;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(a=this.contentNameScopesList)==null?void 0:a.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ir(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=hc.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ir(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,hc.fromExtension(r,n.contentNameScopesList))}},ce(ir,"NULL",new ir(null,0,0,0,!1,null,null,null)),ir),LY=class{constructor(e,t){ce(this,"balancedBracketScopes");ce(this,"unbalancedBracketScopes");ce(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Df(n,jf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Df(n,jf).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}},jY=class{constructor(e,t,n,r){ce(this,"_emitBinaryTokens");ce(this,"_lineText");ce(this,"_tokens");ce(this,"_binaryTokens");ce(this,"_lastTokenEndIndex");ce(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let a=(e==null?void 0:e.tokenAttributes)??0,s=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(l)&&(a=Ss.set(a,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(l))}if(s&&(a=Ss.set(a,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},MY=class{constructor(e,t){ce(this,"_grammars",new Map);ce(this,"_rawGrammars",new Map);ce(this,"_injectionGrammars",new Map);ce(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,OY(e,s,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},PY=class{constructor(t){ce(this,"_options");ce(this,"_syncRegistry");ce(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new MY(Of.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Of.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 LY(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,s){const l=new fY(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(u=>this._loadSingleGrammar(u.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,a,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,a=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,a)}_grammarForScopeName(t,n=0,r=null,a=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,s)}},av=iv.NULL;const zY=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class eu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}eu.prototype.normal={};eu.prototype.property={};eu.prototype.space=void 0;function dD(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new eu(n,r,t)}function ov(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 VY=0;const Ke=ho(),Pt=ho(),sv=ho(),ye=ho(),mt=ho(),ms=ho(),Pn=ho();function ho(){return 2**++VY}const lv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:Pt,commaOrSpaceSeparated:Pn,commaSeparated:ms,number:ye,overloadedBoolean:sv,spaceSeparated:mt},Symbol.toStringTag,{value:"Module"})),Hg=Object.keys(lv);class e0 extends kn{constructor(t,n,r,a){let s=-1;if(super(t,n),CT(this,"space",a),typeof r=="number")for(;++s<Hg.length;){const l=Hg[s];CT(this,Hg[s],(r&lv[l])===lv[l])}}}e0.prototype.defined=!0;function CT(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new e0(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ov(r)]=r,n[ov(s.attribute)]=r}return new eu(t,n,e.space)}const fD=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:Pt,ariaAutoComplete:null,ariaBusy:Pt,ariaChecked:Pt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:mt,ariaCurrent:null,ariaDescribedBy:mt,ariaDetails:null,ariaDisabled:Pt,ariaDropEffect:mt,ariaErrorMessage:null,ariaExpanded:Pt,ariaFlowTo:mt,ariaGrabbed:Pt,ariaHasPopup:null,ariaHidden:Pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mt,ariaLevel:ye,ariaLive:null,ariaModal:Pt,ariaMultiLine:Pt,ariaMultiSelectable:Pt,ariaOrientation:null,ariaOwns:mt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Pt,ariaReadOnly:Pt,ariaRelevant:null,ariaRequired:Pt,ariaRoleDescription:mt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Pt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hD(e,t){return t in e?e[t]:t}function mD(e,t){return hD(e,t.toLowerCase())}const BY=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ms,acceptCharset:mt,accessKey:mt,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:mt,autoFocus:Ke,autoPlay:Ke,blocking:mt,capture:null,charSet:null,checked:Ke,cite:null,className:mt,cols:ye,colSpan:null,content:null,contentEditable:Pt,controls:Ke,controlsList:mt,coords:ye|ms,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:sv,draggable:Pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:mt,height:ye,hidden:sv,high:ye,href:null,hrefLang:null,htmlFor:mt,httpEquiv:mt,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:mt,itemRef:mt,itemScope:Ke,itemType:mt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,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:Ke,optimum:ye,pattern:null,ping:mt,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:mt,required:Ke,reversed:Ke,rows:ye,rowSpan:ye,sandbox:mt,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:Pt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Pt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:mD}),UY=Vs({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:Pn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:mt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ms,g2:ms,glyphName:ms,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hD}),pD=Vs({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()}}),gD=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mD}),yD=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$Y=/[A-Z]/g,NT=/-[a-z]/g,HY=/^data[-\w.:]+$/i;function FY(e,t){const n=ov(t);let r=t,a=kn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&HY.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(NT,KY);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!NT.test(s)){let l=s.replace($Y,GY);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=e0}return new a(r,t)}function GY(e){return"-"+e.toLowerCase()}function KY(e){return e.charAt(1).toUpperCase()}const ZY=dD([fD,BY,pD,gD,yD],"html"),vD=dD([fD,UY,pD,gD,yD],"svg"),kT={}.hasOwnProperty;function qY(e,t){const n=t||{};function r(a,...s){let l=r.invalid;const u=r.handlers;if(a&&kT.call(a,e)){const d=String(a[e]);l=kT.call(u,d)?u[d]:r.unknown}if(l)return l.call(this,a,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const WY=/["&'<>`]/g,YY=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,XY=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,QY=/[|\\{}()[\]^$+*?.]/g,OT=new WeakMap;function JY(e,t){if(e=e.replace(t.subset?eX(t.subset):WY,r),t.subset||t.escapeOnly)return e;return e.replace(YY,n).replace(XY,r);function n(a,s,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function r(a,s,l){return t.format(a.charCodeAt(0),l.charCodeAt(s+1),t)}}function eX(e){let t=OT.get(e);return t||(t=tX(e),OT.set(e,t)),t}function tX(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(QY,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const nX=/[\dA-Fa-f]/;function rX(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!nX.test(String.fromCharCode(t))?r:r+";"}const iX=/\d/;function aX(e,t,n){const r="&#"+String(e);return n&&t&&!iX.test(String.fromCharCode(t))?r:r+";"}const oX=["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"],Fg={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:"€"},sX=["cent","copy","divide","gt","lt","not","para","times"],bD={}.hasOwnProperty,cv={};let Md;for(Md in Fg)bD.call(Fg,Md)&&(cv[Fg[Md]]=Md);const lX=/[^\dA-Za-z]/;function cX(e,t,n,r){const a=String.fromCharCode(e);if(bD.call(cv,a)){const s=cv[a],l="&"+s;return n&&oX.includes(s)&&!sX.includes(s)&&(!r||t&&t!==61&&lX.test(String.fromCharCode(t)))?l:l+";"}return""}function uX(e,t,n){let r=rX(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=cX(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const s=aX(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function ps(e,t){return JY(e,Object.assign({format:uX},t))}const dX=/^>|^->|<!--|-->|--!>|<!-$/g,fX=[">"],hX=["<",">"];function mX(e,t,n,r){return r.settings.bogusComments?"<?"+ps(e.value,Object.assign({},r.settings.characterReferences,{subset:fX}))+">":"<!--"+e.value.replace(dX,a)+"-->";function a(s){return ps(s,Object.assign({},r.settings.characterReferences,{subset:hX}))}}function pX(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function DT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function gX(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function yX(e){return e.join(" ").trim()}const vX=/[ \t\n\f\r]/g;function t0(e){return typeof e=="object"?e.type==="text"?IT(e.value):!1:IT(e)}function IT(e){return e.replace(vX,"")===""}const Kt=xD(1),_D=xD(-1),bX=[];function xD(e){return t;function t(n,r,a){const s=n?n.children:bX;let l=(r||0)+e,u=s[l];if(!a)for(;u&&t0(u);)l+=e,u=s[l];return u}}const _X={}.hasOwnProperty;function ED(e){return t;function t(n,r,a){return _X.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const n0=ED({body:EX,caption:Gg,colgroup:Gg,dd:TX,dt:wX,head:Gg,html:xX,li:AX,optgroup:RX,option:CX,p:SX,rp:LT,rt:LT,tbody:kX,td:jT,tfoot:OX,th:jT,thead:NX,tr:DX});function Gg(e,t,n){const r=Kt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&t0(r.value.charAt(0)))}function xX(e,t,n){const r=Kt(n,t);return!r||r.type!=="comment"}function EX(e,t,n){const r=Kt(n,t);return!r||r.type!=="comment"}function SX(e,t,n){const r=Kt(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 AX(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function wX(e,t,n){const r=Kt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function TX(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function LT(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function RX(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function CX(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function NX(e,t,n){const r=Kt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function kX(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function OX(e,t,n){return!Kt(n,t)}function DX(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function jT(e,t,n){const r=Kt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const IX=ED({body:MX,colgroup:PX,head:jX,html:LX,tbody:zX});function LX(e){const t=Kt(e,-1);return!t||t.type!=="comment"}function jX(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 MX(e){const t=Kt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&t0(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function PX(e,t,n){const r=_D(n,t),a=Kt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&n0(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function zX(e,t,n){const r=_D(n,t),a=Kt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&n0(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Pd={name:[[`
294
- \f\r &/=>`.split(""),`
295
- \f\r "&'/=>\``.split("")],[`\0
296
- \f\r "&'/<=>`.split(""),`\0
297
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
298
- \f\r &>`.split(""),`\0
299
- \f\r "&'<=>\``.split("")],[`\0
300
- \f\r "&'<=>\``.split(""),`\0
301
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function VX(e,t,n,r){const a=r.schema,s=a.space==="svg"?!1:r.settings.omitOptionalTags;let l=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let d;a.space==="html"&&e.tagName==="svg"&&(r.schema=vD);const f=BX(r,e.properties),m=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,m&&(l=!1),(f||!s||!IX(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),l&&(a.space==="svg"||r.settings.closeSelfClosing)&&(d=f.charAt(f.length-1),(!r.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(m),!l&&(!s||!n0(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function BX(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const s=UX(e,a,t[a]);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 UX(e,t,n){const r=FY(e.schema,t),a=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=ps(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Pd.name[a][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?gX:yX)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(u=ps(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Pd.unquoted[a][s]}))),u!==n&&(e.settings.quoteSmart&&DT(n,l)>DT(n,e.alternative)&&(l=e.alternative),u=l+ps(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Pd.single:Pd.double)[a][s],attribute:!0}))+l),d+(u&&"="+u))}const $X=["<","&"];function SD(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:ps(e.value,Object.assign({},r.settings.characterReferences,{subset:$X}))}function HX(e,t,n,r){return r.settings.allowDangerousHtml?e.value:SD(e,t,n,r)}function FX(e,t,n,r){return r.all(e)}const GX=qY("type",{invalid:KX,unknown:ZX,handlers:{comment:mX,doctype:pX,element:VX,raw:HX,root:FX,text:SD}});function KX(e){throw new Error("Expected node, not `"+e+"`")}function ZX(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const qX={},WX={},YX=[];function XX(e,t){const n=t||qX,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:QX,all:JX,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||zY,characterReferences:n.characterReferences||WX,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?vD:ZY,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function QX(e,t,n){return GX(e,t,n,this)}function JX(e){const t=[],n=e&&e.children||YX;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Mf(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,s]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof s=="string"?n[a]=s:a===r&&Object.assign(n,s);return n}function na(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function eQ(e){return Array.isArray(e)?e:[e]}async function AD(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function r0(e){return!e||["plaintext","txt","text","plain"].includes(e)}function wD(e){return e==="ansi"||r0(e)}function i0(e){return e==="none"}function TD(e){return i0(e)}function RD(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const a of n)a&&!e.properties.class.includes(a)&&e.properties.class.push(a);return e}function Eh(e,t=!1){var s;const n=e.split(/(\r?\n)/g);let r=0;const a=[];for(let l=0;l<n.length;l+=2){const u=t?n[l]+(n[l+1]||""):n[l];a.push([u,r]),r+=n[l].length,r+=((s=n[l+1])==null?void 0:s.length)||0}return a}function tQ(e){const t=Eh(e,!0).map(([a])=>a);function n(a){if(a===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=a,l=0;for(const u of t){if(s<u.length)break;s-=u.length,l++}return{line:l,character:s}}function r(a,s){let l=0;for(let u=0;u<a;u++)l+=t[u].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:r}}function nQ(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 a=n.getBundledLanguages();return Array.from(r).filter(s=>s&&a[s])}const a0="light-dark()";function rQ(e,t){let n=0;const r=[];for(const a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function iQ(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,a)=>r-a);return n.length?e.map(r=>r.flatMap(a=>{const s=n.filter(l=>a.offset<l&&l<a.offset+a.content.length).map(l=>l-a.offset).sort((l,u)=>l-u);return s.length?rQ(a,s):a})):e}function aQ(e,t,n,r,a="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(m=>Pf(e.variants[m])),u=new Set(l.flatMap(m=>Object.keys(m))),d={},f=(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 E=m[v]||"inherit";if(g===0&&r)if(r===a0&&l.length>1){const y=t.findIndex(w=>w==="light"),x=t.findIndex(w=>w==="dark");if(y===-1||x===-1)throw new Vt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const A=l[y][v]||"inherit",T=l[x][v]||"inherit";d[v]=`light-dark(${A}, ${T})`,a==="css-vars"&&(d[f(g,v)]=E)}else d[v]=E;else a==="css-vars"&&(d[f(g,v)]=E)}}),s.htmlStyle=d,s}function Pf(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&pn.Italic&&(t["font-style"]="italic"),e.fontStyle&pn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&pn.Underline&&n.push("underline"),e.fontStyle&pn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function uv(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const CD=new WeakMap;function Sh(e,t){CD.set(e,t)}function kc(e){return CD.get(e)}class Bs{constructor(...t){ce(this,"_stacks",{});ce(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Bs(Object.fromEntries(eQ(n).map(r=>[r,av])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return oQ(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function oQ(e){const t=[],n=new Set;function r(a){var l;if(n.has(a))return;n.add(a);const s=(l=a==null?void 0:a.nameScopesList)==null?void 0:l.scopeName;s&&t.push(s),a.parent&&r(a.parent)}return r(e),t}function sQ(e,t){if(!(e instanceof Bs))throw new Vt("Invalid grammar state");return e.getInternalStack(t)}function lQ(){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 Vt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...a.indexToPos(l),offset:l}}else{const u=a.lines[l.line];if(u===void 0)throw new Vt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${a.lines.length}`);if(l.character<0||l.character>u.length)throw new Vt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${u.length}`);return{...l,offset:a.posToIndex(l.line,l.character)}}};const a=tQ(n.source),s=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));cQ(s),e.set(n.meta,{decorations:s,converter:a,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var l;if(!((l=this.options.decorations)!=null&&l.length))return;const a=t(this).decorations.flatMap(u=>[u.start.offset,u.end.offset]);return iQ(n,a)},code(n){var m;if(!((m=this.options.decorations)!=null&&m.length))return;const r=t(this),a=Array.from(n.children).filter(g=>g.type==="element"&&g.tagName==="span");if(a.length!==r.converter.lines.length)throw new Vt(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(g,v,E,y){const x=a[g];let A="",T=-1,w=-1;if(v===0&&(T=0),E===0&&(w=0),E===Number.POSITIVE_INFINITY&&(w=x.children.length),T===-1||w===-1)for(let O=0;O<x.children.length;O++)A+=ND(x.children[O]),T===-1&&A.length===v&&(T=O+1),w===-1&&A.length===E&&(w=O+1);if(T===-1)throw new Vt(`Failed to find start index for decoration ${JSON.stringify(y.start)}`);if(w===-1)throw new Vt(`Failed to find end index for decoration ${JSON.stringify(y.end)}`);const C=x.children.slice(T,w);if(!y.alwaysWrap&&C.length===x.children.length)u(x,y,"line");else if(!y.alwaysWrap&&C.length===1&&C[0].type==="element")u(C[0],y,"token");else{const O={type:"element",tagName:"span",properties:{},children:C};u(O,y,"wrapper"),x.children.splice(T,C.length,O)}}function l(g,v){a[g]=u(a[g],v,"line")}function u(g,v,E){var A;const y=v.properties||{},x=v.transform||(T=>T);return g.tagName=v.tagName||"span",g.properties={...g.properties,...y,class:g.properties.class},(A=v.properties)!=null&&A.class&&RD(g,v.properties.class),g=x(g,E)||g,g}const d=[],f=r.decorations.sort((g,v)=>v.start.offset-g.start.offset||g.end.offset-v.end.offset);for(const g of f){const{start:v,end:E}=g;if(v.line===E.line)s(v.line,v.character,E.character,g);else if(v.line<E.line){s(v.line,v.character,Number.POSITIVE_INFINITY,g);for(let y=v.line+1;y<E.line;y++)d.unshift(()=>l(y,g));s(E.line,0,E.character,g)}}d.forEach(g=>g())}}}function cQ(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Vt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],s=n.start.offset<=a.start.offset&&a.start.offset<n.end.offset,l=n.start.offset<a.end.offset&&a.end.offset<=n.end.offset,u=a.start.offset<=n.start.offset&&n.start.offset<a.end.offset,d=a.start.offset<n.end.offset&&n.end.offset<=a.end.offset;if(s||l||u||d){if(s&&l||u&&d)continue;throw new Vt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function ND(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(ND).join(""):""}const uQ=[lQ()];function zf(e){return[...e.transformers||[],...uQ]}var Xa=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Kg={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function dQ(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 MT(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 fQ(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)Kg[r]&&t.push({type:"setDecoration",value:Kg[r]});else if(r<=29){const a=Kg[r-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Xa[r-30]}});else if(r===38){const a=MT(e);a&&t.push({type:"setForegroundColor",value:a})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Xa[r-40]}});else if(r===48){const a=MT(e);a&&t.push({type:"setBackgroundColor",value:a})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Xa[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Xa[r-100+8]}})}return t}function hQ(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let s=0;do{const l=dQ(r,s),u=l.sequence?r.substring(s,l.startPosition):r.substring(s);if(u.length>0&&a.push({value:u,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const d=fQ(l.sequence);for(const f of d)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of d)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}s=l.position}while(s<r.length);return a}}}var mQ={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 pQ(e=mQ){function t(u){return e[u]}function n(u){return`#${u.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(){if(r)return r;r=[];for(let f=0;f<Xa.length;f++)r.push(t(Xa[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let m=0;m<6;m++)for(let g=0;g<6;g++)r.push(n([u[f],u[m],u[g]]));let d=8;for(let f=0;f<24;f++,d+=10)r.push(n([d,d,d]));return r}function s(u){return a()[u]}function l(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return s(u.index)}}return{value:l}}function gQ(e,t,n){const r=Mf(e,n),a=Eh(t),s=pQ(Object.fromEntries(Xa.map(u=>{var d;return[u,(d=e.colors)==null?void 0:d[`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`]]}))),l=hQ();return a.map(u=>l.parse(u[0]).map(d=>{let f,m;d.decorations.has("reverse")?(f=d.background?s.value(d.background):e.bg,m=d.foreground?s.value(d.foreground):e.fg):(f=d.foreground?s.value(d.foreground):e.fg,m=d.background?s.value(d.background):void 0),f=na(f,r),m=na(m,r),d.decorations.has("dim")&&(f=yQ(f));let g=pn.None;return d.decorations.has("bold")&&(g|=pn.Bold),d.decorations.has("italic")&&(g|=pn.Italic),d.decorations.has("underline")&&(g|=pn.Underline),d.decorations.has("strikethrough")&&(g|=pn.Strikethrough),{content:d.value,offset:u[1],color:f,bgColor:m,fontStyle:g}}))}function yQ(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 o0(e,t,n={}){const{lang:r="text",theme:a=e.getLoadedThemes()[0]}=n;if(r0(r)||i0(a))return Eh(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:s,colorMap:l}=e.setTheme(a);if(r==="ansi")return gQ(s,t,n);const u=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==u.name)throw new Vt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Vt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return bQ(t,u,s,l,n)}function vQ(...e){if(e.length===2)return kc(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:s=t.getLoadedThemes()[0]}=r;if(r0(a)||i0(s))throw new Vt("Plain language does not have grammar state");if(a==="ansi")throw new Vt("ANSI language does not have grammar state");const{theme:l,colorMap:u}=t.setTheme(s),d=t.getLanguage(a);return new Bs(Vf(n,d,l,u,r).stateStack,d.name,l.name)}function bQ(e,t,n,r,a){const s=Vf(e,t,n,r,a),l=new Bs(Vf(e,t,n,r,a).stateStack,t.name,n.name);return Sh(s.tokens,l),s.tokens}function Vf(e,t,n,r,a){const s=Mf(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:u=500}=a,d=Eh(e);let f=a.grammarState?sQ(a.grammarState,n.name)??av:a.grammarContextCode!=null?Vf(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:av,m=[];const g=[];for(let v=0,E=d.length;v<E;v++){const[y,x]=d[v];if(y===""){m=[],g.push([]);continue}if(l>0&&y.length>=l){m=[],g.push([{content:y,offset:x,color:"",fontStyle:0}]);continue}let A,T,w;a.includeExplanation&&(A=t.tokenizeLine(y,f,u),T=A.tokens,w=0);const C=t.tokenizeLine2(y,f,u),O=C.tokens.length/2;for(let N=0;N<O;N++){const j=C.tokens[2*N],D=N+1<O?C.tokens[2*N+2]:y.length;if(j===D)continue;const L=C.tokens[2*N+1],z=na(r[Ss.getForeground(L)],s),U=Ss.getFontStyle(L),fe={content:y.substring(j,D),offset:x+j,color:z,fontStyle:U};if(a.includeExplanation){const ie=[];if(a.includeExplanation!=="scopeName")for(const W of n.settings){let ee;switch(typeof W.scope){case"string":ee=W.scope.split(/,/).map(H=>H.trim());break;case"object":ee=W.scope;break;default:continue}ie.push({settings:W,selectors:ee.map(H=>H.split(/ /))})}fe.explanation=[];let le=0;for(;j+le<D;){const W=T[w],ee=y.substring(W.startIndex,W.endIndex);le+=ee.length,fe.explanation.push({content:ee,scopes:a.includeExplanation==="scopeName"?_Q(W.scopes):xQ(ie,W.scopes)}),w+=1}}m.push(fe)}g.push(m),m=[],f=C.ruleStack}return{tokens:g,stateStack:f}}function _Q(e){return e.map(t=>({scopeName:t}))}function xQ(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const s=t[r];n[r]={scopeName:s,themeMatches:SQ(e,s,t.slice(0,r))}}return n}function PT(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function EQ(e,t,n){if(!PT(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)PT(e[r],n[a])&&(r-=1),a-=1;return r===-1}function SQ(e,t,n){const r=[];for(const{selectors:a,settings:s}of e)for(const l of a)if(EQ(l,t,n)){r.push(s);break}return r}function kD(e,t,n){const r=Object.entries(n.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),a=r.map(d=>{const f=o0(e,t,{...n,theme:d.theme}),m=kc(f),g=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:f,state:m,theme:g}}),s=AQ(...a.map(d=>d.tokens)),l=s[0].map((d,f)=>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((E,y)=>{const{content:x,explanation:A,offset:T,...w}=E[f][g];v.variants[r[y].color]=w}),v})),u=a[0].state?new Bs(Object.fromEntries(a.map(d=>{var f;return[d.theme,(f=d.state)==null?void 0:f.getInternalStack(d.theme)]})),a[0].state.lang):void 0;return u&&Sh(l,u),l}function AQ(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(d=>d[r]),s=t.map(()=>[]);t.forEach((d,f)=>d.push(s[f]));const l=a.map(()=>0),u=a.map(d=>d[0]);for(;u.every(d=>d);){const d=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const m=u[f];m.content.length===d?(s[f].push(m),l[f]+=1,u[f]=a[f][l[f]]):(s[f].push({...m,content:m.content.slice(0,d)}),u[f]={...m,content:m.content.slice(d),offset:m.offset+d})}}}return t}function Bf(e,t,n){let r,a,s,l,u,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:m="--shiki-",colorsRendering:g="css-vars"}=n,v=Object.entries(n.themes).filter(T=>T[1]).map(T=>({color:T[0],theme:T[1]})).sort((T,w)=>T.color===f?-1:w.color===f?1:0);if(v.length===0)throw new Vt("`themes` option must not be empty");const E=kD(e,t,n);if(d=kc(E),f&&a0!==f&&!v.find(T=>T.color===f))throw new Vt(`\`themes\` option must contain the defaultColor key \`${f}\``);const y=v.map(T=>e.getTheme(T.theme)),x=v.map(T=>T.color);s=E.map(T=>T.map(w=>aQ(w,x,m,f,g))),d&&Sh(s,d);const A=v.map(T=>Mf(T.theme,n));a=zT(v,y,A,m,f,"fg",g),r=zT(v,y,A,m,f,"bg",g),l=`shiki-themes ${y.map(T=>T.name).join(" ")}`,u=f?void 0:[a,r].join(";")}else if("theme"in n){const f=Mf(n.theme,n);s=o0(e,t,n);const m=e.getTheme(n.theme);r=na(m.bg,f),a=na(m.fg,f),l=m.name,d=kc(s)}else throw new Vt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:a,bg:r,themeName:l,rootStyle:u,grammarState:d}}function zT(e,t,n,r,a,s,l){return e.map((u,d)=>{const f=na(t[d][s],n[d])||"inherit",m=`${r+u.color}${s==="bg"?"-bg":""}:${f}`;if(d===0&&a){if(a===a0&&e.length>1){const g=e.findIndex(x=>x.color==="light"),v=e.findIndex(x=>x.color==="dark");if(g===-1||v===-1)throw new Vt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const E=na(t[g][s],n[g])||"inherit",y=na(t[v][s],n[v])||"inherit";return`light-dark(${E}, ${y});${m}`}return f}return l==="css-vars"?m:null}).filter(u=>!!u).join(";")}function Uf(e,t,n,r={meta:{},options:n,codeToHast:(a,s)=>Uf(e,a,s),codeToTokens:(a,s)=>Bf(e,a,s)}){var y,x;let a=t;for(const A of zf(n))a=((y=A.preprocess)==null?void 0:y.call(r,a,n))||a;let{tokens:s,fg:l,bg:u,themeName:d,rootStyle:f,grammarState:m}=Bf(e,a,n);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:v=!1}=n;g===!0?s=TQ(s):g==="never"&&(s=RQ(s)),v&&(s=CQ(s));const E={...r,get source(){return a}};for(const A of zf(n))s=((x=A.tokens)==null?void 0:x.call(E,s))||s;return wQ(s,{...n,fg:l,bg:u,themeName:d,rootStyle:f},E,m)}function wQ(e,t,n,r=kc(e)){var y,x,A;const a=zf(t),s=[],l={type:"root",children:[]},{structure:u="classic",tabindex:d="0"}=t;let f={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...d!==!1&&d!=null?{tabindex:d.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([T])=>!T.startsWith("_")))},children:[]},m={type:"element",tagName:"code",properties:{},children:s};const g=[],v={...n,structure:u,addClassToHast:RD,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return f},get code(){return m},get lines(){return g}};if(e.forEach((T,w)=>{var N,j;w&&(u==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&s.push({type:"text",value:`
302
- `}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},O=0;for(const D of T){let L={type:"element",tagName:"span",properties:{...D.htmlAttrs},children:[{type:"text",value:D.content}]};const z=uv(D.htmlStyle||Pf(D));z&&(L.properties.style=z);for(const U of a)L=((N=U==null?void 0:U.span)==null?void 0:N.call(v,L,w+1,O,C,D))||L;u==="inline"?l.children.push(L):u==="classic"&&C.children.push(L),O+=D.content.length}if(u==="classic"){for(const D of a)C=((j=D==null?void 0:D.line)==null?void 0:j.call(v,C,w+1))||C;g.push(C),s.push(C)}}),u==="classic"){for(const T of a)m=((y=T==null?void 0:T.code)==null?void 0:y.call(v,m))||m;f.children.push(m);for(const T of a)f=((x=T==null?void 0:T.pre)==null?void 0:x.call(v,f))||f;l.children.push(f)}let E=l;for(const T of a)E=((A=T==null?void 0:T.root)==null?void 0:A.call(v,E))||E;return r&&Sh(E,r),E}function TQ(e){return e.map(t=>{const n=[];let r="",a=0;return t.forEach((s,l)=>{const d=!(s.fontStyle&&(s.fontStyle&pn.Underline||s.fontStyle&pn.Strikethrough));d&&s.content.match(/^\s+$/)&&t[l+1]?(a||(a=s.offset),r+=s.content):r?(d?n.push({...s,offset:a,content:r+s.content}):n.push({content:r,offset:a},s),a=0,r=""):n.push(s)}),n})}function RQ(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,a,s,l]=r;if(!a&&!l)return n;const u=[{...n,offset:n.offset+a.length,content:s}];return a&&u.unshift({content:a,offset:n.offset}),l&&u.push({content:l,offset:n.offset+a.length+s.length}),u}))}function CQ(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const a=n[n.length-1],s=uv(a.htmlStyle||Pf(a)),l=uv(r.htmlStyle||Pf(r)),u=a.fontStyle&&(a.fontStyle&pn.Underline||a.fontStyle&pn.Strikethrough),d=r.fontStyle&&(r.fontStyle&pn.Underline||r.fontStyle&pn.Strikethrough);!u&&!d&&s===l?a.content+=r.content:n.push({...r})}return n})}const NQ=XX;function kQ(e,t,n){var s;const r={meta:{},options:n,codeToHast:(l,u)=>Uf(e,l,u),codeToTokens:(l,u)=>Bf(e,l,u)};let a=NQ(Uf(e,t,n,r));for(const l of zf(n))a=((s=l.postprocess)==null?void 0:s.call(r,a,n))||a;return a}const VT={light:"#333333",dark:"#bbbbbb"},BT={light:"#fffffe",dark:"#1e1e1e"},UT="__shiki_resolved";function s0(e){var u,d,f,m,g;if(e!=null&&e[UT])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const v=t.settings?t.settings.find(E=>!E.name&&!E.scope):void 0;(u=v==null?void 0:v.settings)!=null&&u.foreground&&(r=v.settings.foreground),(d=v==null?void 0:v.settings)!=null&&d.background&&(n=v.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((m=t==null?void 0:t.colors)!=null&&m["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?VT.light:VT.dark),n||(n=t.type==="light"?BT.light:BT.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const s=new Map;function l(v){var y;if(s.has(v))return s.get(v);a+=1;const E=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return(y=t.colorReplacements)!=null&&y[`#${E}`]?l(v):(s.set(v,E),E)}t.settings=t.settings.map(v=>{var A,T;const E=((A=v.settings)==null?void 0:A.foreground)&&!v.settings.foreground.startsWith("#"),y=((T=v.settings)==null?void 0:T.background)&&!v.settings.background.startsWith("#");if(!E&&!y)return v;const x={...v,settings:{...v.settings}};if(E){const w=l(v.settings.foreground);t.colorReplacements[w]=v.settings.foreground,x.settings.foreground=w}if(y){const w=l(v.settings.background);t.colorReplacements[w]=v.settings.background,x.settings.background=w}return x});for(const v of Object.keys(t.colors||{}))if((v==="editor.foreground"||v==="editor.background"||v.startsWith("terminal.ansi"))&&!((g=t.colors[v])!=null&&g.startsWith("#"))){const E=l(t.colors[v]);t.colorReplacements[E]=t.colors[v],t.colors[v]=E}return Object.defineProperty(t,UT,{enumerable:!1,writable:!1,value:!0}),t}async function OD(e){return Array.from(new Set((await Promise.all(e.filter(t=>!wD(t)).map(async t=>await AD(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function DD(e){return(await Promise.all(e.map(async n=>TD(n)?null:s0(await AD(n))))).filter(n=>!!n)}let OQ=3;function DQ(e,t=3){t>OQ||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let us=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class IQ extends PY{constructor(n,r,a,s={}){super(n);ce(this,"_resolvedThemes",new Map);ce(this,"_resolvedGrammars",new Map);ce(this,"_langMap",new Map);ce(this,"_langGraph",new Map);ce(this,"_textmateThemeCache",new WeakMap);ce(this,"_loadedThemesCache",null);ce(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=a,this._alias=s,this._themes.map(l=>this.loadTheme(l)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=s0(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Of.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new us(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var l,u,d,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(m=>{var g;return(g=m.embeddedLangsLazy)==null?void 0:g.includes(n.name)}));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,a);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(m=>{this._alias[m]=n.name}),this._loadedLanguagesCache=null,r.size)for(const m of r)this._resolvedGrammars.delete(m.name),this._loadedLanguagesCache=null,(u=(l=this._syncRegistry)==null?void 0:l._injectionGrammars)==null||u.delete(m.scopeName),(f=(d=this._syncRegistry)==null?void 0:d._grammars)==null||f.delete(m.scopeName),this.loadLanguage(this._langMap.get(m.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const r=Array.from(this._langGraph.entries()),a=r.filter(([s,l])=>!l);if(a.length){const s=r.filter(([l,u])=>{var d;return u&&((d=u.embeddedLangs)==null?void 0:d.some(f=>a.map(([m])=>m).includes(f)))}).filter(l=>!a.includes(l));throw new us(`Missing languages ${a.map(([l])=>`\`${l}\``).join(", ")}, required by ${s.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[s,l]of r)this._resolver.addLanguage(l);for(const[s,l]of r)this.loadLanguage(l)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){if(this._langMap.set(n.name,n),this._langGraph.set(n.name,n),n.embeddedLangs)for(const r of n.embeddedLangs)this._langGraph.set(r,this._langMap.get(r))}}class LQ{constructor(t,n){ce(this,"_langs",new Map);ce(this,"_scopeToLang",new Map);ce(this,"_injections",new Map);ce(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let a=1;a<=n.length;a++){const s=n.slice(0,a).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let Yl=0;function jQ(e){Yl+=1,e.warnings!==!1&&Yl>=10&&Yl%10===0&&console.warn(`[Shiki] ${Yl} 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 us("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(s0),a=new LQ(e.engine,n),s=new IQ(a,r,n,e.langAlias);let l;function u(w){A();const C=s.getGrammar(typeof w=="string"?w:w.name);if(!C)throw new us(`Language \`${w}\` not found, you may need to load it first`);return C}function d(w){if(w==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const C=s.getTheme(w);if(!C)throw new us(`Theme \`${w}\` not found, you may need to load it first`);return C}function f(w){A();const C=d(w);l!==w&&(s.setTheme(C),l=w);const O=s.getColorMap();return{theme:C,colorMap:O}}function m(){return A(),s.getLoadedThemes()}function g(){return A(),s.getLoadedLanguages()}function v(...w){A(),s.loadLanguages(w.flat(1))}async function E(...w){return v(await OD(w))}function y(...w){A();for(const C of w.flat(1))s.loadTheme(C)}async function x(...w){return A(),y(await DD(w))}function A(){if(t)throw new us("Shiki instance has been disposed")}function T(){t||(t=!0,s.dispose(),Yl-=1)}return{setTheme:f,getTheme:d,getLanguage:u,getLoadedThemes:m,getLoadedLanguages:g,loadLanguage:E,loadLanguageSync:v,loadTheme:x,loadThemeSync:y,dispose:T,[Symbol.dispose]:T}}async function MQ(e){e.engine||DQ("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([DD(e.themes||[]),OD(e.langs||[]),e.engine]);return jQ({...e,themes:t,langs:n,engine:r})}async function PQ(e){const t=await MQ(e);return{getLastGrammarState:(...n)=>vQ(t,...n),codeToTokensBase:(n,r)=>o0(t,n,r),codeToTokensWithThemes:(n,r)=>kD(t,n,r),codeToTokens:(n,r)=>Bf(t,n,r),codeToHast:(n,r)=>Uf(t,n,r),codeToHtml:(n,r)=>kQ(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function zQ(e){const t=e.langs,n=e.themes,r=e.engine;async function a(s){function l(g){if(typeof g=="string"){if(wD(g))return[];const v=t[g];if(!v)throw new Vt(`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(TD(g))return"none";if(typeof g=="string"){const v=n[g];if(!v)throw new Vt(`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)),f=(s.langs??[]).map(g=>l(g)),m=await PQ({engine:s.engine??r(),...s,themes:d,langs:f});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 a}function VQ(e){let t;async function n(r={}){if(t){const a=await t;return await Promise.all([a.loadTheme(...r.themes||[]),a.loadLanguage(...r.langs||[])]),a}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}function BQ(e,t){const n=VQ(e);async function r(a,s){var d;const l=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),u=await((d=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:d.call(t,a,s.lang,l));return u&&await l.loadLanguage(...u),l}return{getSingletonHighlighter(a){return n(a)},async codeToHtml(a,s){return(await r(a,s)).codeToHtml(a,s)},async codeToHast(a,s){return(await r(a,s)).codeToHast(a,s)},async codeToTokens(a,s){return(await r(a,s)).codeToTokens(a,s)},async codeToTokensBase(a,s){return(await r(a,s)).codeToTokensBase(a,s)},async codeToTokensWithThemes(a,s){return(await r(a,s)).codeToTokensWithThemes(a,s)},async getLastGrammarState(a,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(a,s)}}}const ID=[{id:"abap",name:"ABAP",import:()=>I(()=>import("./abap-BdImnpbu.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>I(()=>import("./actionscript-3-CfeIJUat.js"),[])},{id:"ada",name:"Ada",import:()=>I(()=>import("./ada-bCR0ucgS.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>I(()=>import("./angular-html-Bbf3ZyxA.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>I(()=>import("./angular-ts-C26w9mnW.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>I(()=>import("./apache-Pmp26Uib.js"),[])},{id:"apex",name:"Apex",import:()=>I(()=>import("./apex-C7Pw0Ztw.js"),[])},{id:"apl",name:"APL",import:()=>I(()=>import("./apl-e980N3t4.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>I(()=>import("./applescript-Co6uUVPk.js"),[])},{id:"ara",name:"Ara",import:()=>I(()=>import("./ara-BRHolxvo.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>I(()=>import("./asciidoc-CdggvHu8.js"),[])},{id:"asm",name:"Assembly",import:()=>I(()=>import("./asm-D_Q5rh1f.js"),[])},{id:"astro",name:"Astro",import:()=>I(()=>import("./astro-DAp1zUbp.js"),__vite__mapDeps([10,9,2,11,3,12]))},{id:"awk",name:"AWK",import:()=>I(()=>import("./awk-DMzUqQB5.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>I(()=>import("./ballerina-BFfxhgS-.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>I(()=>import("./bat-BkioyH1T.js"),[])},{id:"beancount",name:"Beancount",import:()=>I(()=>import("./beancount-BoKiGodi.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>I(()=>import("./berry-D08WgyRC.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>I(()=>import("./bibtex-CHM0blh-.js"),[])},{id:"bicep",name:"Bicep",import:()=>I(()=>import("./bicep-6nHXG8SA.js"),[])},{id:"blade",name:"Blade",import:()=>I(()=>import("./blade-DGJDb2eD.js"),__vite__mapDeps([13,14,1,2,3,7,8,15,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>I(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([16,17]))},{id:"c",name:"C",import:()=>I(()=>import("./c-BIGW1oBm.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>I(()=>import("./cadence-D2CYqzqI.js"),[])},{id:"cairo",name:"Cairo",import:()=>I(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([18,19]))},{id:"clarity",name:"Clarity",import:()=>I(()=>import("./clarity-CHh-QcGE.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>I(()=>import("./clojure-P80f7IUj.js"),[])},{id:"cmake",name:"CMake",import:()=>I(()=>import("./cmake-D1j8_8rp.js"),[])},{id:"cobol",name:"COBOL",import:()=>I(()=>import("./cobol-CCPHrsME.js"),__vite__mapDeps([20,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>I(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>I(()=>import("./codeql-DsOJ9woJ.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>I(()=>import("./coffee-JUOWOZUj.js"),__vite__mapDeps([21,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>I(()=>import("./common-lisp-Cg-RD9OK.js"),[])},{id:"coq",name:"Coq",import:()=>I(()=>import("./coq-DkFqJrB1.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>I(()=>import("./cpp-ChttZZSa.js"),__vite__mapDeps([22,23,24,25,15]))},{id:"crystal",name:"Crystal",import:()=>I(()=>import("./crystal-CfkhwHAQ.js"),__vite__mapDeps([26,1,2,3,15,25,27]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>I(()=>import("./csharp-CHadp7IV.js"),[])},{id:"css",name:"CSS",import:()=>I(()=>import("./css-DPfMkruS.js"),[])},{id:"csv",name:"CSV",import:()=>I(()=>import("./csv-fuZLfV_i.js"),[])},{id:"cue",name:"CUE",import:()=>I(()=>import("./cue-D82EKSYY.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>I(()=>import("./cypher-COkxafJQ.js"),[])},{id:"d",name:"D",import:()=>I(()=>import("./d-85-TOEBH.js"),[])},{id:"dart",name:"Dart",import:()=>I(()=>import("./dart-CF10PKvl.js"),[])},{id:"dax",name:"DAX",import:()=>I(()=>import("./dax-CEL-wOlO.js"),[])},{id:"desktop",name:"Desktop",import:()=>I(()=>import("./desktop-BmXAJ9_W.js"),[])},{id:"diff",name:"Diff",import:()=>I(()=>import("./diff-D97Zzqfu.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>I(()=>import("./docker-BcOcwvcX.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>I(()=>import("./dotenv-Da5cRb03.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>I(()=>import("./dream-maker-BtqSS_iP.js"),[])},{id:"edge",name:"Edge",import:()=>I(()=>import("./edge-CKszZCnI.js"),__vite__mapDeps([28,11,1,2,3,14]))},{id:"elixir",name:"Elixir",import:()=>I(()=>import("./elixir-Cc7HHYVZ.js"),__vite__mapDeps([29,1,2,3]))},{id:"elm",name:"Elm",import:()=>I(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([30,24,25]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>I(()=>import("./emacs-lisp-C9XAeP06.js"),[])},{id:"erb",name:"ERB",import:()=>I(()=>import("./erb-D3EuUlpm.js"),__vite__mapDeps([31,1,2,3,32,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>I(()=>import("./erlang-DpOm0zC4.js"),[])},{id:"fennel",name:"Fennel",import:()=>I(()=>import("./fennel-BYunw83y.js"),[])},{id:"fish",name:"Fish",import:()=>I(()=>import("./fish-Bl2oy6fF.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>I(()=>import("./fluent-C4IJs8-o.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>I(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([39,40]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>I(()=>import("./fortran-free-form-D22FLkUw.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>I(()=>import("./fsharp-DQy8In2x.js"),__vite__mapDeps([41,42]))},{id:"gdresource",name:"GDResource",import:()=>I(()=>import("./gdresource-BSDf9Pz1.js"),__vite__mapDeps([43,44,45]))},{id:"gdscript",name:"GDScript",import:()=>I(()=>import("./gdscript-Bty6elJm.js"),[])},{id:"gdshader",name:"GDShader",import:()=>I(()=>import("./gdshader-DkwncUOv.js"),[])},{id:"genie",name:"Genie",import:()=>I(()=>import("./genie-D0YGMca9.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>I(()=>import("./gherkin-DyxjwDmM.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>I(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([46,47]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>I(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([48,27]))},{id:"gleam",name:"Gleam",import:()=>I(()=>import("./gleam-BspZqrRM.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>I(()=>import("./glimmer-js-Dz9X99Cm.js"),__vite__mapDeps([49,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>I(()=>import("./glimmer-ts-aQ3p29eY.js"),__vite__mapDeps([50,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>I(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([24,25]))},{id:"gnuplot",name:"Gnuplot",import:()=>I(()=>import("./gnuplot-DdkO51Og.js"),[])},{id:"go",name:"Go",import:()=>I(()=>import("./go-ByKsyG03.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>I(()=>import("./graphql-Caa12_AY.js"),__vite__mapDeps([34,2,11,35,36]))},{id:"groovy",name:"Groovy",import:()=>I(()=>import("./groovy-gcz8RCvz.js"),[])},{id:"hack",name:"Hack",import:()=>I(()=>import("./hack-C1oSbnf3.js"),__vite__mapDeps([51,1,2,3,15]))},{id:"haml",name:"Ruby Haml",import:()=>I(()=>import("./haml-AZXGPtNI.js"),__vite__mapDeps([33,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>I(()=>import("./handlebars-YebKLiTq.js"),__vite__mapDeps([52,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>I(()=>import("./haskell-Df6bDoY_.js"),[])},{id:"haxe",name:"Haxe",import:()=>I(()=>import("./haxe-BP3HzMA6.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>I(()=>import("./hcl-BWvSN4gD.js"),[])},{id:"hjson",name:"Hjson",import:()=>I(()=>import("./hjson-D5-asLiD.js"),[])},{id:"hlsl",name:"HLSL",import:()=>I(()=>import("./hlsl-D3lLCCz7.js"),[])},{id:"html",name:"HTML",import:()=>I(()=>import("./html-B8pBdPMQ.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>I(()=>import("./html-derivative-ZQ8onl8Z.js"),__vite__mapDeps([14,1,2,3]))},{id:"http",name:"HTTP",import:()=>I(()=>import("./http-C38VWM-o.js"),__vite__mapDeps([53,27,9,7,8,34,2,11,35,36]))},{id:"hxml",name:"HXML",import:()=>I(()=>import("./hxml-B2Z6b3nn.js"),__vite__mapDeps([54,55]))},{id:"hy",name:"Hy",import:()=>I(()=>import("./hy-DFXneXwc.js"),[])},{id:"imba",name:"Imba",import:()=>I(()=>import("./imba-DGztddWO.js"),[])},{id:"ini",name:"INI",aliases:["properties"],import:()=>I(()=>import("./ini-BEwlwnbL.js"),[])},{id:"java",name:"Java",import:()=>I(()=>import("./java-CylS5w8V.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>I(()=>import("./javascript-BMMyXqK5.js"),[])},{id:"jinja",name:"Jinja",import:()=>I(()=>import("./jinja-BJmZiE_F.js"),__vite__mapDeps([56,1,2,3]))},{id:"jison",name:"Jison",import:()=>I(()=>import("./jison-BCRtk9Os.js"),__vite__mapDeps([57,2]))},{id:"json",name:"JSON",import:()=>I(()=>import("./json-Cp-IABpG.js"),[])},{id:"json5",name:"JSON5",import:()=>I(()=>import("./json5-C9tS-k6U.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>I(()=>import("./jsonc-Des-eS-w.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>I(()=>import("./jsonl-DcaNXYhu.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>I(()=>import("./jsonnet-DFQXde-d.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>I(()=>import("./jssm-C2t-YnRu.js"),[])},{id:"jsx",name:"JSX",import:()=>I(()=>import("./jsx-g9-lgVsj.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>I(()=>import("./julia-Dn4fBTUU.js"),__vite__mapDeps([58,22,23,24,25,15,19,2,59]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>I(()=>import("./kotlin-BdnUsdx6.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>I(()=>import("./kusto-BvAqAH-y.js"),[])},{id:"latex",name:"LaTeX",import:()=>I(()=>import("./latex-DoYF_zFQ.js"),__vite__mapDeps([60,61,59]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>I(()=>import("./lean-c1G5yEKj.js"),[])},{id:"less",name:"Less",import:()=>I(()=>import("./less-B1dDrJ26.js"),[])},{id:"liquid",name:"Liquid",import:()=>I(()=>import("./liquid-DFk8BABL.js"),__vite__mapDeps([62,1,2,3,9]))},{id:"llvm",name:"LLVM IR",import:()=>I(()=>import("./llvm-D32k8WzR.js"),[])},{id:"log",name:"Log file",import:()=>I(()=>import("./log-2UxHyX5q.js"),[])},{id:"logo",name:"Logo",import:()=>I(()=>import("./logo-BtOb2qkB.js"),[])},{id:"lua",name:"Lua",import:()=>I(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,25]))},{id:"luau",name:"Luau",import:()=>I(()=>import("./luau-irsrSlf-.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>I(()=>import("./make-CHLpvVh8.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>I(()=>import("./markdown-RrBGtqGR.js"),[])},{id:"marko",name:"Marko",import:()=>I(()=>import("./marko-C0z8HR23.js"),__vite__mapDeps([63,3,64,5,2]))},{id:"matlab",name:"MATLAB",import:()=>I(()=>import("./matlab-D7o27uSR.js"),[])},{id:"mdc",name:"MDC",import:()=>I(()=>import("./mdc-02rxpBA4.js"),__vite__mapDeps([65,42,38,14,1,2,3]))},{id:"mdx",name:"MDX",import:()=>I(()=>import("./mdx-Cmh6b_Ma.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>I(()=>import("./mermaid-DfEE3Bzs.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>I(()=>import("./mipsasm-CKIfxQSi.js"),[])},{id:"mojo",name:"Mojo",import:()=>I(()=>import("./mojo-1DNp92w6.js"),[])},{id:"move",name:"Move",import:()=>I(()=>import("./move-BkPM1oy1.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>I(()=>import("./narrat-DRg8JJMk.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>I(()=>import("./nextflow-Bk5OV074.js"),[])},{id:"nginx",name:"Nginx",import:()=>I(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([66,37,25]))},{id:"nim",name:"Nim",import:()=>I(()=>import("./nim-ANgMEeb1.js"),__vite__mapDeps([67,25,1,2,3,7,8,24,42]))},{id:"nix",name:"Nix",import:()=>I(()=>import("./nix-BepWV7mh.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>I(()=>import("./nushell-I3RK9BU8.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>I(()=>import("./objective-c-DXmwc3jG.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>I(()=>import("./objective-cpp-CLxacb5B.js"),[])},{id:"ocaml",name:"OCaml",import:()=>I(()=>import("./ocaml-C0hk2d4L.js"),[])},{id:"pascal",name:"Pascal",import:()=>I(()=>import("./pascal-D93ZcfNL.js"),[])},{id:"perl",name:"Perl",import:()=>I(()=>import("./perl-EWVMYlR0.js"),__vite__mapDeps([68,1,2,3,7,8,15]))},{id:"php",name:"PHP",import:()=>I(()=>import("./php-9PMsNEzE.js"),__vite__mapDeps([69,1,2,3,7,8,15,9]))},{id:"plsql",name:"PL/SQL",import:()=>I(()=>import("./plsql-ChMvpjG-.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>I(()=>import("./po-BTJTHyun.js"),[])},{id:"polar",name:"Polar",import:()=>I(()=>import("./polar-C0HS_06l.js"),[])},{id:"postcss",name:"PostCSS",import:()=>I(()=>import("./postcss-CXtECtnM.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>I(()=>import("./powerquery-CEu0bR-o.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>I(()=>import("./powershell-Dpen1YoG.js"),[])},{id:"prisma",name:"Prisma",import:()=>I(()=>import("./prisma-Dd19v3D-.js"),[])},{id:"prolog",name:"Prolog",import:()=>I(()=>import("./prolog-CbFg5uaA.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>I(()=>import("./proto-DyJlTyXw.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>I(()=>import("./pug-Ch9lOoSd.js"),__vite__mapDeps([70,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>I(()=>import("./puppet-BMWR74SV.js"),[])},{id:"purescript",name:"PureScript",import:()=>I(()=>import("./purescript-CtrldY6v.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>I(()=>import("./python-B6aJPvgy.js"),[])},{id:"qml",name:"QML",import:()=>I(()=>import("./qml-CHzV51_b.js"),__vite__mapDeps([71,2]))},{id:"qmldir",name:"QML Directory",import:()=>I(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>I(()=>import("./qss-IeuSbFQv.js"),[])},{id:"r",name:"R",import:()=>I(()=>import("./r-DyVeJk2s.js"),[])},{id:"racket",name:"Racket",import:()=>I(()=>import("./racket-BqYA7rlc.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>I(()=>import("./raku-DXvB9xmW.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>I(()=>import("./razor-CNXmhs1n.js"),__vite__mapDeps([72,1,2,3,73]))},{id:"reg",name:"Windows Registry Script",import:()=>I(()=>import("./reg-C-SQnVFl.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>I(()=>import("./regexp-CDVJQ6XC.js"),[])},{id:"rel",name:"Rel",import:()=>I(()=>import("./rel-C3B-1QV4.js"),[])},{id:"riscv",name:"RISC-V",import:()=>I(()=>import("./riscv-BM1_JUlF.js"),[])},{id:"rst",name:"reStructuredText",import:()=>I(()=>import("./rst-DHpKpUMA.js"),__vite__mapDeps([74,14,1,2,3,22,23,24,25,15,19,27,38,75,32,33,7,8,34,11,35,36,37]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>I(()=>import("./ruby-C5MNRm7z.js"),__vite__mapDeps([32,1,2,3,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>I(()=>import("./rust-B1yitclQ.js"),[])},{id:"sas",name:"SAS",import:()=>I(()=>import("./sas-Dlf3BogE.js"),__vite__mapDeps([76,15]))},{id:"sass",name:"Sass",import:()=>I(()=>import("./sass-Cj5Yp3dK.js"),[])},{id:"scala",name:"Scala",import:()=>I(()=>import("./scala-C151Ov-r.js"),[])},{id:"scheme",name:"Scheme",import:()=>I(()=>import("./scheme-C98Dy4si.js"),[])},{id:"scss",name:"SCSS",import:()=>I(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>I(()=>import("./sdbl-DVxCFoDh.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>I(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([77,78]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>I(()=>import("./shellscript-Yzrsuije.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>I(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([79,27]))},{id:"smalltalk",name:"Smalltalk",import:()=>I(()=>import("./smalltalk-BERRCDM3.js"),[])},{id:"solidity",name:"Solidity",import:()=>I(()=>import("./solidity-BbcW6ACK.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>I(()=>import("./soy-B_7ge1HE.js"),__vite__mapDeps([80,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>I(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([81,82]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>I(()=>import("./splunk-BtCnVYZw.js"),[])},{id:"sql",name:"SQL",import:()=>I(()=>import("./sql-B9xm8XSJ.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>I(()=>import("./ssh-config-_ykCGR6B.js"),[])},{id:"stata",name:"Stata",import:()=>I(()=>import("./stata-C5TGba-T.js"),__vite__mapDeps([83,15]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>I(()=>import("./stylus-BEDo0Tqx.js"),[])},{id:"svelte",name:"Svelte",import:()=>I(()=>import("./svelte-Dt5jNKfG.js"),__vite__mapDeps([84,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>I(()=>import("./swift-fve9TYiY.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>I(()=>import("./system-verilog-CnnmHF94.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>I(()=>import("./systemd-4A_iFExJ.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>I(()=>import("./talonscript-CkByrt1z.js"),[])},{id:"tasl",name:"Tasl",import:()=>I(()=>import("./tasl-QIJgUcNo.js"),[])},{id:"tcl",name:"Tcl",import:()=>I(()=>import("./tcl-dwOrl1Do.js"),[])},{id:"templ",name:"Templ",import:()=>I(()=>import("./templ-DN2Co29m.js"),__vite__mapDeps([85,86,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>I(()=>import("./terraform-BETggiCN.js"),[])},{id:"tex",name:"TeX",import:()=>I(()=>import("./tex-BTEcxGmc.js"),__vite__mapDeps([61,59]))},{id:"toml",name:"TOML",import:()=>I(()=>import("./toml-vGWfd6FD.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>I(()=>import("./ts-tags-CHnADXob.js"),__vite__mapDeps([87,11,3,2,24,25,1,15,7,8]))},{id:"tsv",name:"TSV",import:()=>I(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>I(()=>import("./tsx-COt5Ahok.js"),[])},{id:"turtle",name:"Turtle",import:()=>I(()=>import("./turtle-BsS91CYL.js"),[])},{id:"twig",name:"Twig",import:()=>I(()=>import("./twig-febACT8g.js"),__vite__mapDeps([88,3,2,5,69,1,7,8,15,9,19,32,33,34,11,35,36,22,23,24,25,27,37,38]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>I(()=>import("./typescript-DlfHMoPT.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>I(()=>import("./typespec-Df68jz8_.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>I(()=>import("./typst-DHCkPAjA.js"),[])},{id:"v",name:"V",import:()=>I(()=>import("./v-DljmTZ5-.js"),[])},{id:"vala",name:"Vala",import:()=>I(()=>import("./vala-CsfeWuGM.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>I(()=>import("./vb-D17OF-Vu.js"),[])},{id:"verilog",name:"Verilog",import:()=>I(()=>import("./verilog-BQ8w6xss.js"),[])},{id:"vhdl",name:"VHDL",import:()=>I(()=>import("./vhdl-CeAyd5Ju.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>I(()=>import("./viml-CJc9bBzg.js"),[])},{id:"vue",name:"Vue",import:()=>I(()=>import("./vue-CqZX_ekU.js"),__vite__mapDeps([89,3,2,11,9,14,1]))},{id:"vue-html",name:"Vue HTML",import:()=>I(()=>import("./vue-html-DJL_i-Ck.js"),__vite__mapDeps([90,89,3,2,11,9,14,1]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>I(()=>import("./vyper-CDx5xZoG.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>I(()=>import("./wasm-MzD3tlZU.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>I(()=>import("./wenyan-BV7otONQ.js"),[])},{id:"wgsl",name:"WGSL",import:()=>I(()=>import("./wgsl-Dx-B1_4e.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>I(()=>import("./wikitext-BhOHFoWU.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>I(()=>import("./wit-5i3qLPDT.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>I(()=>import("./wolfram-lXgVvXCa.js"),[])},{id:"xml",name:"XML",import:()=>I(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>I(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([91,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>I(()=>import("./yaml-Buea-lGh.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>I(()=>import("./zenscript-DVFEvuxE.js"),[])},{id:"zig",name:"Zig",import:()=>I(()=>import("./zig-CK-KhNJq.js"),[])}],UQ=Object.fromEntries(ID.map(e=>[e.id,e.import])),$Q=Object.fromEntries(ID.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),HQ={...UQ,...$Q},FQ=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>I(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>I(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>I(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>I(()=>import("./catppuccin-frappe-Btyk0a-E.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>I(()=>import("./catppuccin-latte-q-j0iyEw.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>I(()=>import("./catppuccin-macchiato-brDaU2vB.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>I(()=>import("./catppuccin-mocha-BR7mELCv.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>I(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>I(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>I(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>I(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>I(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>I(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>I(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>I(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>I(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>I(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>I(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>I(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>I(()=>import("./gruvbox-dark-hard-Hhtzho9R.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>I(()=>import("./gruvbox-dark-medium-DFR6f4Jn.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>I(()=>import("./gruvbox-dark-soft-BFVdkX1U.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>I(()=>import("./gruvbox-light-hard-7i6GEmcB.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>I(()=>import("./gruvbox-light-medium-Dcsh5twl.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>I(()=>import("./gruvbox-light-soft-leinZj1a.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>I(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>I(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>I(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>I(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>I(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>I(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>I(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>I(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>I(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>I(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>I(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>I(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>I(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>I(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>I(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>I(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>I(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>I(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>I(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>I(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>I(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>I(()=>import("./rose-pine-BHrmToEH.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>I(()=>import("./rose-pine-dawn-CnK8MTSM.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>I(()=>import("./rose-pine-moon-NleAzG8P.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>I(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>I(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>I(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>I(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>I(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>I(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>I(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>I(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>I(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>I(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>I(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],GQ=Object.fromEntries(FQ.map(e=>[e.id,e.import]));class l0 extends Error{constructor(t){super(t),this.name="ShikiError"}}function KQ(){return 2147483648}function ZQ(){return typeof performance<"u"?performance.now():Date.now()}const qQ=(e,t)=>e+(t-e%t)%t;async function WQ(e){let t,n;const r={};function a(E){n=E,r.HEAPU8=new Uint8Array(E),r.HEAPU32=new Uint32Array(E)}function s(E,y,x){r.HEAPU8.copyWithin(E,y,y+x)}function l(E){try{return t.grow(E-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function u(E){const y=r.HEAPU8.length;E=E>>>0;const x=KQ();if(E>x)return!1;for(let A=1;A<=4;A*=2){let T=y*(1+.2/A);T=Math.min(T,E+100663296);const w=Math.min(x,qQ(Math.max(E,T),65536));if(l(w))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(E,y,x=1024){const A=y+x;let T=y;for(;E[T]&&!(T>=A);)++T;if(T-y>16&&E.buffer&&d)return d.decode(E.subarray(y,T));let w="";for(;y<T;){let C=E[y++];if(!(C&128)){w+=String.fromCharCode(C);continue}const O=E[y++]&63;if((C&224)===192){w+=String.fromCharCode((C&31)<<6|O);continue}const N=E[y++]&63;if((C&240)===224?C=(C&15)<<12|O<<6|N:C=(C&7)<<18|O<<12|N<<6|E[y++]&63,C<65536)w+=String.fromCharCode(C);else{const j=C-65536;w+=String.fromCharCode(55296|j>>10,56320|j&1023)}}return w}function m(E,y){return E?f(r.HEAPU8,E,y):""}const g={emscripten_get_now:ZQ,emscripten_memcpy_big:s,emscripten_resize_heap:u,fd_write:()=>0};async function v(){const y=await e({env:g,wasi_snapshot_preview1:g});t=y.memory,a(t.buffer),Object.assign(r,y),r.UTF8ToString=m}return await v(),r}var YQ=Object.defineProperty,XQ=(e,t,n)=>t in e?YQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gt=(e,t,n)=>XQ(e,typeof t!="symbol"?t+"":t,n);let Qt=null;function QQ(e){throw new l0(e.UTF8ToString(e.getLastOnigError()))}class Ah{constructor(t){Gt(this,"utf16Length"),Gt(this,"utf8Length"),Gt(this,"utf16Value"),Gt(this,"utf8Value"),Gt(this,"utf16OffsetToUtf8"),Gt(this,"utf8OffsetToUtf16");const n=t.length,r=Ah._utf8ByteLength(t),a=r!==n,s=a?new Uint32Array(n+1):null;a&&(s[n]=r);const l=a?new Uint32Array(r+1):null;a&&(l[r]=n);const u=new Uint8Array(r);let d=0;for(let f=0;f<n;f++){const m=t.charCodeAt(f);let g=m,v=!1;if(m>=55296&&m<=56319&&f+1<n){const E=t.charCodeAt(f+1);E>=56320&&E<=57343&&(g=(m-55296<<10)+65536|E-56320,v=!0)}a&&(s[f]=d,v&&(s[f+1]=d),g<=127?l[d+0]=f:g<=2047?(l[d+0]=f,l[d+1]=f):g<=65535?(l[d+0]=f,l[d+1]=f,l[d+2]=f):(l[d+0]=f,l[d+1]=f,l[d+2]=f,l[d+3]=f)),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&&f++}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,a=t.length;r<a;r++){const s=t.charCodeAt(r);let l=s,u=!1;if(s>=55296&&s<=56319&&r+1<a){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 wh=class Ir{constructor(t){if(Gt(this,"id",++Ir.LAST_ID),Gt(this,"_onigBinding"),Gt(this,"content"),Gt(this,"utf16Length"),Gt(this,"utf8Length"),Gt(this,"utf16OffsetToUtf8"),Gt(this,"utf8OffsetToUtf16"),Gt(this,"ptr"),!Qt)throw new l0("Must invoke loadWasm first.");this._onigBinding=Qt,this.content=t;const n=new Ah(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ir._sharedPtrInUse?(Ir._sharedPtr||(Ir._sharedPtr=Qt.omalloc(1e4)),Ir._sharedPtrInUse=!0,Qt.HEAPU8.set(n.utf8Value,Ir._sharedPtr),this.ptr=Ir._sharedPtr):this.ptr=n.createString(Qt)}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===Ir._sharedPtr?Ir._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Gt(wh,"LAST_ID",0);Gt(wh,"_sharedPtr",0);Gt(wh,"_sharedPtrInUse",!1);let LD=wh;class JQ{constructor(t){if(Gt(this,"_onigBinding"),Gt(this,"_ptr"),!Qt)throw new l0("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,d=t.length;u<d;u++){const f=new Ah(t[u]);n[u]=f.createString(Qt),r[u]=f.utf8Length}const a=Qt.omalloc(4*t.length);Qt.HEAPU32.set(n,a/4);const s=Qt.omalloc(4*t.length);Qt.HEAPU32.set(r,s/4);const l=Qt.createOnigScanner(a,s,t.length);for(let u=0,d=t.length;u<d;u++)Qt.ofree(n[u]);Qt.ofree(s),Qt.ofree(a),l===0&&QQ(Qt),this._onigBinding=Qt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new LD(t);const s=this._findNextMatchSync(t,n,!1,a);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const s=this._onigBinding,l=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(l===0)return null;const u=s.HEAPU32;let d=l/4;const f=u[d++],m=u[d++],g=[];for(let v=0;v<m;v++){const E=t.convertUtf8OffsetToUtf16(u[d++]),y=t.convertUtf8OffsetToUtf16(u[d++]);g[v]={start:E,end:y,length:y-E}}return{index:f,captureIndices:g}}}function eJ(e){return typeof e.instantiator=="function"}function tJ(e){return typeof e.default=="function"}function nJ(e){return typeof e.data<"u"}function rJ(e){return typeof Response<"u"&&e instanceof Response}function iJ(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let zd;function aJ(e){if(zd)return zd;async function t(){Qt=await WQ(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),eJ(r)?r=await r.instantiator(n):tJ(r)?r=await r.default(n):(nJ(r)&&(r=r.data),rJ(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await oJ(r)(n):r=await sJ(r)(n):iJ(r)?r=await Zg(r)(n):r instanceof WebAssembly.Module?r=await Zg(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Zg(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return zd=t(),zd}function Zg(e){return t=>WebAssembly.instantiate(e,t)}function oJ(e){return t=>WebAssembly.instantiateStreaming(e,t)}function sJ(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function lJ(e){return e&&await aJ(e),{createScanner(t){return new JQ(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new LD(t)}}}const cJ=zQ({langs:HQ,themes:GQ,engine:()=>lJ(I(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:uJ}=BQ(cJ,{guessEmbeddedLanguages:nQ}),dJ=({children:e})=>b.jsx("div",{children:b.jsx("pre",{children:b.jsx("code",{children:e.split(`
303
- `).map((t,n)=>b.jsx("span",{className:"line block w-full",children:t},n))})})}),fJ=({children:e,lang:t,isDarkMode:n,onChange:r,...a})=>{const[s,l]=S.useState(null),u=S.useMemo(()=>({lang:t,theme:n?"github-dark":"github-light",transformers:[UW(),HW(),WW(),$W(),MW(),zW()]}),[t,n]);return S.useEffect(()=>{uJ(e,u).then(d=>l(d)).catch(d=>console.error(d))},[u,e]),s?b.jsx("div",{dangerouslySetInnerHTML:{__html:s},...a,style:{backgroundColor:"transparent"}}):b.jsx(dJ,{children:e})},hJ=({className:e,onChange:t,isEditable:n,...r})=>b.jsx(fJ,{className:Ae("flex w-full",e),contentEditable:n,onInput:a=>t==null?void 0:t(a.currentTarget.textContent??""),...r}),jD=S.createContext({packageManager:"npm",setPackageManager:()=>{},codeFormat:"typescript",setCodeFormat:()=>{},contentDeclarationFormat:"typescript",setContentDeclarationFormat:()=>{}}),Th=()=>S.useContext(jD),mJ=({children:e})=>{const[t,n]=dc("packageManager","npm"),[r,a]=dc("codeFormat","typescript"),[s,l]=dc("contentDeclarationFormat","typescript");return b.jsx(jD,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:a,contentDeclarationFormat:s,setContentDeclarationFormat:l},children:e})},pJ=({children:e,...t})=>{const{packageManager:n,codeFormat:r,contentDeclarationFormat:a}=Th(),s=typeof t.packageManager>"u",l=n===t.packageManager,u=typeof t.codeFormat>"u",d=r===t.codeFormat,f=typeof t.contentDeclarationFormat>"u",m=a===t.contentDeclarationFormat;return(s||l)&&(u||d)&&(f||m)?e:b.jsx(b.Fragment,{})},gJ=()=>{const{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=Th();return b.jsxs(Ie,{value:e,onValueChange:r=>{t(r),n(r)},children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:"Code Format"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"typescript",children:"TypeScript"}),b.jsx(Ie.Item,{value:"esm",children:"ESM"}),b.jsx(Ie.Item,{value:"commonjs",children:"CommonJS"})]})]})},yJ=()=>{const{contentDeclarationFormat:e,setContentDeclarationFormat:t}=Th();return b.jsxs(Ie,{value:e,onValueChange:t,children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:"Dictionary Format"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"typescript",children:"TypeScript"}),b.jsx(Ie.Item,{value:"commonjs",children:"CommonJS"}),b.jsx(Ie.Item,{value:"esm",children:"ESM"}),b.jsx(Ie.Item,{value:"json",children:"JSON"})]})]})},vJ={key:"copy-button",content:{label:ge({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:"Копировать содержимое"})}},MD=({content:e})=>{const[t,n]=S.useState(!1),{label:r}=Jt(vJ),a=async()=>{try{await navigator.clipboard.writeText(e),n(!0)}catch(s){console.error("Failed to copy text: ",s)}};return S.useEffect(()=>{const s=setTimeout(()=>{n(!1)},1e3);return()=>clearTimeout(s)},[t]),b.jsx(ut,{Icon:t?Pz:Vz,onClick:a,variant:"hoverable",color:"text",label:r.value,size:"icon-sm"})},bJ=()=>{const{packageManager:e,setPackageManager:t}=Th();return b.jsxs(Ie,{value:e,onValueChange:t,children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:"Package Manager"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"npm",children:"npm"}),b.jsx(Ie.Item,{value:"pnpm",children:"pnpm"}),b.jsx(Ie.Item,{value:"yarn",children:"yarn"})]})]})},_J=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:a=!0,className:s,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:f,...m})=>{const g=e.endsWith(`
304
- `)?e.slice(0,-1):e,v=u||d||f;return b.jsx(pJ,{packageManager:u,codeFormat:d,contentDeclarationFormat:f,children:b.jsxs(Wr,{className:Ae("relative text-sm leading-6",a&&"with-line-number ml-0",s),transparency:"lg",...m,children:[r&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"bg-card/50 text-neutral grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl py-1.5 pl-4 pr-12 text-xs",children:[b.jsx("span",{className:"truncate",children:l??t}),b.jsxs("div",{className:"flex items-center gap-2",children:[u&&b.jsx(bJ,{}),d&&b.jsx(gJ,{}),f&&b.jsx(yJ,{})]})]}),b.jsx("div",{className:"sticky top-28",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center",v&&"h-11"),children:b.jsx(MD,{content:g})})})]}),b.jsx("div",{className:"grid size-full grid-cols-[0px] overflow-auto p-3",children:b.jsx(hJ,{lang:t,isDarkMode:n,children:g})})]})})},xJ=e=>{const t=e.split(/\r?\n/),n=t.find(s=>s.trim()!=="");if(!n||n.trim()!=="---")return e;let r=!1,a=-1;for(let s=0;s<t.length;s++)if(t[s].trim()==="---")if(r){a=s;break}else{r=!0;continue}return a>-1?t.slice(a+1).join(`
305
- `):e},EJ=({children:e,isDarkMode:t,locale:n,options:r})=>{const{overrides:a,...s}=r??{},l=xJ(e);return b.jsx(mJ,{children:b.jsx(NW,{options:{overrides:{h1:u=>b.jsx(cZ,{isClickable:!0,...u}),h2:u=>b.jsx(uZ,{isClickable:!0,...u}),h3:u=>b.jsx(Kb,{isClickable:!0,...u}),h4:u=>b.jsx(dZ,{isClickable:!0,...u}),code:u=>{var d;return typeof u.className>"u"?b.jsx("strong",{className:"bg-card/60 rounded p-1 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur",children:u.children}):b.jsx(_J,{isDarkMode:t,language:(d=u.className)==null?void 0:d.replace("lang-",""),...u})},blockquote:({className:u,...d})=>b.jsx("blockquote",{className:Ae("border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5",u),...d}),ul:({className:u,...d})=>b.jsx("ul",{className:Ae("mt-5 flex flex-col gap-3 pl-5",u),...d}),ol:({className:u,...d})=>b.jsx("ol",{className:Ae("mt-5 flex flex-col gap-3 pl-5",u),...d}),li:({className:u,...d})=>b.jsx("li",{className:Ae("list-disc",u),...d}),img:({className:u,...d})=>b.jsx("img",{...d,loading:"lazy",className:Ae("max-w-full rounded-md",u),src:`${d.src}?raw=true`}),a:u=>{var d;return b.jsx(Zb,{color:"neutral",isExternalLink:(d=u.href)==null?void 0:d.startsWith("http"),underlined:!0,locale:n,...u})},pre:u=>u.children,table:({className:u,...d})=>b.jsx("div",{className:"grid w-full max-w-full overflow-auto rounded",children:b.jsx("table",{className:Ae("max-w-full table-auto overflow-hidden text-left",u),...d})}),th:({className:u,...d})=>b.jsx("th",{className:Ae("border-neutral bg-neutral/10 border-b p-4",u),...d}),tr:({className:u,...d})=>b.jsx("tr",{className:Ae("hover:bg-neutral/10 hover:/10",u),...d}),td:({className:u,...d})=>b.jsx("td",{className:Ae("border-b border-neutral-500/50 p-4",u),...d}),...a},wrapper:({className:u,...d})=>b.jsxs(b.Fragment,{children:[b.jsx(OW,{}),b.jsx("div",{className:Ae("flex flex-col gap-8 p-10",u),...d})]}),...s},children:l??""})})},SJ=e=>{let t,n;if(typeof e=="number"||!isNaN(Number(e)))t="=",n=e.toString();else if(typeof e=="string"){const a=["<=",">=","<",">","="].find(s=>e.startsWith(s));a&&(t=a,n=e.slice(a.length))}return{comparator:t,numberValue:n}},AJ=({value:e,onChange:t})=>{const{comparator:n,numberValue:r}=S.useMemo(()=>SJ(e),[e]),[a,s]=S.useState(n??null),[l,u]=S.useState(r??null);return S.useEffect(()=>{if(a&&l&&(a!==n||l!==r)){const d=`${a}${l}`;t(d)}},[a,n,r,l,t]),b.jsxs("div",{className:"flex gap-1",children:[b.jsxs(Ie,{onValueChange:s,defaultValue:n,children:[b.jsx(Ie.Trigger,{className:"w-20",children:b.jsx(Ie.Value,{placeholder:"Select a comparator"})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:"<",children:"<"}),b.jsx(Ie.Item,{value:"<=",children:"<="}),b.jsx(Ie.Item,{value:"=",children:"="}),b.jsx(Ie.Item,{value:">=",children:">="}),b.jsx(Ie.Item,{value:">",children:">"})]})]}),b.jsx(Os,{type:"number","aria-label":"Quantity",defaultValue:l??void 0,onChange:d=>u(d.target.value),className:"min-w-4"})]})},Rh={key:"navigation-view",content:{tsxNotEditable:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:"Добавить новое условие"})}}},wJ=({keyPath:e,dictionary:t,...n})=>{const{editedContent:r,addEditedContent:a}=En(),s=Gr(),{auditContentDeclarationField:l,isLoading:u}=vU();return b.jsx(Sq,{variant:"default",onContentChange:d=>a(t.key,d,e),additionalButtons:b.jsx(ut,{Icon:$1,label:"Audit",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",isLoading:u,onClick:()=>{l({fileContent:JSON.stringify({...t,...(r==null?void 0:r[t.key])??{}}),keyPath:e,locales:s.internationalization.locales??[],openAiApiKey:s.editor.openAiApiKey,model:s.editor.openAiApiModel,temperature:s.editor.openAiApiTemperature}).then(d=>{if(d!=null&&d.data)try{const f=d.data.fileContent;a(t.key,f,e)}catch(f){console.error(f)}})}}),...n})},TJ=({keyPath:e,dictionary:t,...n})=>{const{addEditedContent:r}=En();return b.jsx(Jy,{variant:"default",onContentChange:a=>r(t.key,a,e),...n})},RJ=[{content:"False",value:!1},{content:"True",value:!0}],CJ=({dictionary:e,keyPath:t,...n})=>{const{addEditedContent:r}=En();return b.jsx(Zc,{choices:RJ,value:!0,onChange:a=>r(e.key,a,t),color:"text",size:"sm",...n})},NJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{locale:a,defaultLocale:s}=yv(),{selectedLocales:l,availableLocales:u}=VO(),d=e[K.Translation],f=Object.keys(d),g=u.length>l.length?l:[...new Set([...u,...f])],v=e[K.Translation];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:g.map(E=>b.jsxs(S.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full p-2 text-xs",children:Hd(E,a)}),b.jsx("tr",{children:b.jsx(mo,{section:v[E]??ar(v[s]),keyPath:[...t,{type:K.Translation,key:E}],dictionary:n,renderSection:r})})]},E))})})},kJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=En(),{addNewEnumeration:s,removeEnumeration:l}=Jt(Rh),u=e[K.Enumeration],d=Object.keys(u)[0];return b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:Object.keys(e[K.Enumeration]).map(f=>{const m=[...t,{type:K.Enumeration}];return b.jsxs(S.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full",children:b.jsx("div",{className:"flex flex-1",children:b.jsx(ut,{label:l.label.value,variant:"hoverable",color:"text",Icon:Yf,className:"ml-auto",onClick:()=>a(n.key,void 0,m),children:l.text})})}),b.jsx("tr",{className:"w-full p-2",children:b.jsx(AJ,{value:f,onChange:g=>{const v=e[K.Enumeration],E=_q(v,f,g),y={...e,[K.Enumeration]:E};a(n.key,y,t)}})}),b.jsx("tr",{className:"block w-full",children:b.jsx(c0,{section:u[f]??ar(u[d]),keyPath:m,dictionary:n,renderSection:r})})]},f)})})}),b.jsx(ut,{label:s.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>a(n.key,ar(u[d])??"",[...t,{type:K.Enumeration,key:"unknown"}]),Icon:Wf,className:"m-2",children:s.text})]})},OJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const a=e[K.Condition];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:["true","false","fallback"].map(s=>b.jsxs(S.Fragment,{children:[b.jsx("tr",{className:"mt-2 block w-full p-2 text-xs",children:String(s)},s),b.jsx("tr",{className:"block w-full",children:b.jsx(mo,{section:a[s]??ar(a.true),keyPath:[...t,{type:K.Condition,key:s}],dictionary:n,renderSection:r})},s)]},s))})})},DJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=En(),{addNewElement:s,removeElement:l}=Jt(Rh);return b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:e.map((u,d)=>b.jsxs(S.Fragment,{children:[b.jsxs("tr",{className:"mt-2 flex w-full justify-between gap-2 p-2",children:[b.jsx("span",{className:"text-xs",children:String(d)}),b.jsx(ut,{label:l.label.value,variant:"hoverable",color:"neutral",className:"ml-auto",textAlign:"left",onClick:()=>{const f=[...t,{type:K.Array,key:e.length}];a(n.key,void 0,f)},Icon:Yf,children:l.text})]}),b.jsx("tr",{className:"block w-full",children:b.jsx(mo,{section:u??ar(e[0]),keyPath:[...t,{type:K.Array,key:d}],dictionary:n,renderSection:r})})]},JSON.stringify(u)))})}),b.jsx(ut,{label:s.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>{const u=[...t,{type:K.Array,key:e.length}];a(n.key,ar(e[0])??"",u,!1)},Icon:Wf,children:s.text})]})},IJ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>b.jsx(b.Fragment,{children:b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex flex-col gap-2",children:Object.keys(e).map(a=>{const s=[...t,{type:K.Object,key:a}],l=e,u=Object.keys(l)[0],d=l[a]??ar(l[u]);return b.jsxs(S.Fragment,{children:[b.jsx("tr",{className:"mt-2 p-2 text-xs",children:String(a)},JSON.stringify(d)),b.jsx("tr",{className:"block w-full",children:b.jsx(c0,{section:d,keyPath:s,dictionary:n,renderSection:r})},JSON.stringify(d))]},a)})})})}),LJ=({section:e,keyPath:t,dictionary:n,isDarkMode:r,onContentChange:a})=>{const[s,l]=S.useState(0),u=[{content:"Edit",value:0},{content:"Preview",value:1}],d=[...t,{type:K.Markdown}],f=e[K.Markdown];return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsx(Zc,{choices:u,value:s,onChange:l,color:"text",size:"sm",className:"ml-auto"}),b.jsx(mo,{section:f,keyPath:d,dictionary:n,renderSection:s===1?m=>b.jsx(EJ,{isDarkMode:r,children:m}):void 0,onContentChange:a})]})},jJ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:K.Insertion}],a=e[K.Insertion];return b.jsx("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:b.jsx(mo,{section:a,keyPath:r,...n})})},MJ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:K.File}],a=e[K.File],{content:s}=e;return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsxs("span",{className:"text-neutral text-sm",children:[a," "]}),b.jsx(mo,{section:s,keyPath:r,...n})]})},PJ=({keyPath:e,dictionary:t,renderSection:n,section:r,...a})=>{const{addEditedContent:s}=En(),l=r[K.Nested],u=[...e,{type:K.Nested}];return b.jsxs("div",{className:"w-full p-2",children:[b.jsx(my,{children:"Dictionary key"}),b.jsx(Jy,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{s(t.key,{...l,dictionaryKey:String(d)},u)},children:l.dictionaryKey??""}),b.jsx(my,{children:"Path (optional)"}),b.jsx(Jy,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{s(t.key,{...l,path:d!==""?d:void 0},u)},children:l.path??""})]})},c0=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:a})=>{const{tsxNotEditable:s}=Jt(Rh),l=As(e);return l===K.ReactNode?b.jsxs(b.Fragment,{children:[b.jsx("span",{children:"[React Node]"}),b.jsx("span",{className:"text-neutral text-xs",children:s})]}):l===K.Nested?b.jsx(PJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Translation?b.jsx(NJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Enumeration?b.jsx(kJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Condition?b.jsx(OJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Insertion?b.jsx(jJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Markdown?b.jsx(LJ,{dictionary:n,keyPath:t,section:e,isDarkMode:a}):l===K.File?b.jsx(MJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Array?b.jsx(DJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Object?b.jsx(IJ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Number?b.jsx("div",{className:"w-full p-2",children:b.jsx(TJ,{dictionary:n,keyPath:t,type:"number","aria-label":"Edit field",children:e})}):l===K.Text?b.jsx("div",{className:"w-full p-2",children:typeof r=="function"?r(e):b.jsx(wJ,{variant:"default","aria-label":"Edit field",keyPath:t,dictionary:n,children:e})}):l===K.Boolean?b.jsx("div",{className:"w-full p-2",children:b.jsx(CJ,{dictionary:n,keyPath:t,value:e})}):b.jsxs("div",{className:"w-full p-2",children:["Error. Format not supported.",JSON.stringify(e,null,2),JSON.stringify(t,null,2),"NodeType : ",l]})},mo=e=>b.jsx(Wr,{border:!0,background:"none",className:"top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky",roundedSize:"xl",children:b.jsx(c0,{...e})}),Oc=e=>{const t=QT(e),n=As(e);return t&&(n===K.ReactNode||n===K.File)?!0:t&&typeof t.nodeType=="string"?Oc(t[t.nodeType]):typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"},zJ=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r})=>{const a=[{text:t,onClick:()=>n([])},...e.map((s,l)=>{var u;return{onClick:()=>n(e.slice(0,l+1)),text:((u=s.key)==null?void 0:u.toString())??""}})];return b.jsx(bZ,{links:a,locale:r,elementType:"location"})},of=e=>String(e).replace(/([A-Z])/g," $1").toLowerCase().trim(),is=({section:e,keyPath:t,dictionaryKey:n})=>{const{locales:r}=qe==null?void 0:qe.internationalization,a=zr(e,t),{addEditedContent:s}=ws(),{setFocusedContentKeyPath:l,focusedContent:u}=ca(),{addNewElement:d,goToField:f}=Jt(Rh),m=As(a),g=E=>{var y;return(((y=u==null?void 0:u.keyPath)==null?void 0:y.length)??0)>0&&Lc(E,(u==null?void 0:u.keyPath)??[])},v=Oc(a);if(!a)return b.jsx(b.Fragment,{});if(v)return b.jsx(ut,{label:f.label.value,variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(t),IconRight:uf,children:of(t[t.length-1].key)});if(typeof a=="object"){if(m===K.ReactNode)return b.jsx(b.Fragment,{children:"React Node"});if(m===K.Translation)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:r.map(y=>{const x=[...t,{type:K.Translation,key:y}];return b.jsx(is,{keyPath:x,section:e,dictionaryKey:n},y)})});if(m===K.Enumeration||m===K.Condition)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:Object.keys(a[m]).map(y=>{const x=[...t,{type:m,key:y}];return b.jsx(is,{keyPath:x,section:e,dictionaryKey:n},y)})});if(m===K.Array)return b.jsxs("div",{className:"flex flex-col justify-between gap-2",children:[a.map((y,x)=>{const A=[...t,{type:K.Array,key:x}];return b.jsx(is,{keyPath:A,section:e,dictionaryKey:n},JSON.stringify(A))}),b.jsx(ut,{label:d.label.value,variant:"hoverable",color:"neutral",textAlign:"left",onClick:()=>{const y=[...t,{type:K.Array,key:a.length}],x=a,A=ar(x[x.length-1])??"";s(n,A,y,!1),l(y)},Icon:Wf,children:d.text})]});if(typeof a.nodeType=="string"){const y=[...t,{type:a.nodeType}];return b.jsx(is,{keyPath:y,section:e,dictionaryKey:n})}const E=Object.keys(a);return b.jsx("div",{className:"flex w-full max-w-full flex-col justify-between gap-2",children:E.map(y=>{const x=[...t,{type:K.Object,key:y}],A=zr(e,x);return Oc(A)?b.jsx(ut,{label:`${f.label.value} ${y}`,isActive:g(x),variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(x),IconRight:uf,children:of(y)},y):b.jsx(nR,{label:`${f.label.value} ${y}`,isActive:g(x),onClick:()=>l(x),header:of(y),children:b.jsx("div",{className:"mt-2 flex w-full max-w-full",children:b.jsx("div",{className:"flex-1 pl-10",children:b.jsx(is,{keyPath:x,section:e,dictionaryKey:n})})})},y)})})}return b.jsxs(b.Fragment,{children:["Error loading section --",m,"--",JSON.stringify(a),"--",JSON.stringify(t)]})},VJ=({dictionary:e,isDarkMode:t})=>{var v,E;const{content:n,key:r}=e,{editedContent:a}=En(),{focusedContent:s,setFocusedContentKeyPath:l}=ca(),u=s==null?void 0:s.keyPath,d=typeof((v=a==null?void 0:a[e.key])==null?void 0:v.content)>"u"?n:(E=a==null?void 0:a[r])==null?void 0:E.content,f=zr(d,u??[]),m=Oc(d),g=Oc(f);return S.useEffect(()=>{var y;typeof f>"u"&&l(((y=s==null?void 0:s.keyPath)==null?void 0:y.slice(0,-1))??[])},[]),b.jsxs("div",{children:[b.jsxs("div",{className:"mb-6 flex items-center justify-between gap-2",children:[b.jsx(zJ,{dictionaryKey:r,keyPath:u??[],onClickKeyPath:l}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsx(bq,{})})]}),b.jsxs("div",{className:"flex gap-2 max-md:flex-col",children:[typeof d=="object"&&d&&!m&&Object.keys(d).length>0&&b.jsx(Wr,{border:!0,background:"none",className:"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]",roundedSize:"xl",transparency:"sm",children:b.jsx(is,{keyPath:[],section:d,dictionaryKey:r})}),(g||(u??[]).length>0)&&b.jsx(mo,{keyPath:u??[],section:f,dictionary:e,isDarkMode:t})]})]})},BJ={key:"dictionary-details",content:{titleInput:{label:ge({en:"Title","en-GB":"Title",fr:"Titre",es:"Título",de:"Titel",ja:"タイトル",ko:"제목",zh:"标题",it:"Titolo",pt:"Título",hi:"शीर्षक",ar:"العنوان",ru:"Заголовок"}),description:ge({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:ge({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:ge({en:"Key","en-GB":"Key",fr:"Clé",es:"Clave",de:"Schlüssel",ja:"キー",ko:"키",zh:"键",it:"Chiave",pt:"Chave",hi:"कुंजी",ar:"مفتاح",ru:"Ключ"}),description:ge({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:ge({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:ge({en:"Description","en-GB":"Description",fr:"Description",es:"Descripción",de:"Beschreibung",ja:"説明",ko:"설명",zh:"描述",it:"Descrizione",pt:"Descrição",hi:"विवरण",ar:"الوصف",ru:"Описание"}),placeholder:ge({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:ge({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:ge({en:"Projects","en-GB":"Projects",fr:"Projets",es:"Proyectos",de:"Projekte",ja:"プロジェクト",ko:"프로젝트",zh:"项目",it:"Progetti",pt:"Projetos",hi:"परियोजनाएँ",ar:"المشاريع",ru:"Проекты"}),description:ge({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:ge({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:ge({en:"Tags","en-GB":"Tags",fr:"Tags",es:"Etiquetas",de:"Tags",ja:"タグ",ko:"태그",zh:"标签",it:"Tag",pt:"Tags",hi:"टैग",ar:"الوسوم",ru:"Теги"}),description:ge({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:ge({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:ge({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"}),text:ge({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"})}}},UJ={key:"dictionary-detail-schema",content:{titleRequiredError:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:ge({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:"Пожалуйста, введите действительный тег"})}},$J=e=>{const{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:a,keyInvalidTypeError:s,keySpaceError:l,keyMinLengthError:u,descriptionRequiredError:d,descriptionInvalidTypeError:f,requiredErrorProjectId:m,invalidTypeErrorProjectId:g,invalidTypeErrorTags:v}=Jt(UJ);return WG({title:Kl({error:E=>E.input===void 0?t.value:n.value}).refine(E=>E.length===0||E.length>=4,{error:r.value}).optional(),key:Kl({error:E=>E.input===void 0?a.value:s.value}).min(4,{error:u.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:l.value}).default(""),description:Kl({error:E=>E.input===void 0?d.value:f.value}).optional(),projectIds:Ay(Kl({error:E=>E.input===void 0?m.value:g.value})).default([e]),tags:Ay(Kl({error:()=>v.value})).default([])})},HJ=({dictionary:e})=>{var N,j;const{session:t}=Vc(),{project:n}=t??{},{data:r,isLoading:a}=fU(),{data:s}=gU(),l=$J(String(n==null?void 0:n._id)),{form:u,isSubmitting:d}=C2(l,{defaultValues:e}),{editedContent:f,setEditedDictionary:m}=En(),{titleInput:g,keyInput:v,descriptionInput:E,projectInput:y,tagsSelect:x,auditButton:A}=Jt(BJ),{auditContentDeclaration:T,isLoading:w}=yU(),C=f==null?void 0:f[e.key];S.useEffect(()=>{u.reset(e)},[e,u==null?void 0:u.reset]),S.useEffect(()=>{typeof C>"u"&&u.reset(e)},[C]);const O=async()=>{const D={...e,...C};await T({fileContent:JSON.stringify(D)}).then(L=>{if(L!=null&&L.data)try{const z=JSON.parse(L.data.fileContent);m(U=>({...U,...D,...z})),u.reset({...D,...z})}catch(z){console.error(z)}})};return b.jsx(Wr,{background:"none",border:!0,roundedSize:"2xl",className:"w-full px-5 pb-3 pt-5",children:b.jsxs(Ze,{className:"flex w-full flex-col gap-8",...u,schema:l,onChange:D=>m(L=>({...L,...D})),children:[b.jsxs("div",{className:"flex w-full flex-1 gap-8 max-md:flex-col",children:[b.jsx(Ze.EditableFieldInput,{name:"key",label:v.label,placeholder:v.label.value,description:v.description,disabled:d,isRequired:!0,onSave:D=>{u.setValue("key",D),m(L=>({...e,...L??{},key:D}))}}),b.jsx(Ze.EditableFieldInput,{name:"title",label:g.label,placeholder:g.placeholder.value,description:g.description,disabled:d,onSave:D=>{u.setValue("title",D),m(L=>({...e,...L??{},title:D}))}})]}),b.jsx(Ze.EditableFieldTextArea,{name:"description",label:E.label,placeholder:E.placeholder.value,description:E.description,disabled:d,onSave:D=>{u.setValue("description",D),m(L=>({...e,...L??{},description:D}))}}),b.jsxs("div",{className:"flex size-full flex-1 gap-8 max-md:flex-col",children:[b.jsxs(Ze.MultiSelect,{name:"projectIds",label:y.label.value,description:y.description.value,onValueChange:D=>{const L=[D].flat();u.setValue("projectIds",L),m(z=>({...e,...z??{},projectIds:L}))},children:[b.jsx(mn.Trigger,{getBadgeValue:D=>{var L,z;return((z=(L=r==null?void 0:r.data)==null?void 0:L.find(U=>String(U._id)===D))==null?void 0:z.name)??D},children:b.jsx(mn.Input,{placeholder:y.placeholder.value})}),b.jsx(mn.Content,{children:b.jsx(ys,{isLoading:a,children:b.jsx(mn.List,{children:(N=r==null?void 0:r.data)==null?void 0:N.map(D=>b.jsx(mn.Item,{value:String(D._id),children:D.name},String(D._id)))})})})]}),b.jsxs(Ze.MultiSelect,{name:"tags",label:x.label.value,description:x.description.value,onValueChange:D=>{u.setValue("tags",[D].flat()),m(L=>({...e,...L??{},tags:[D].flat()}))},children:[b.jsx(mn.Trigger,{getBadgeValue:D=>{var L,z;return((z=(L=r==null?void 0:r.data)==null?void 0:L.find(U=>String(U._id)===D))==null?void 0:z.name)??D},children:b.jsx(mn.Input,{placeholder:x.placeholder.value})}),b.jsx(mn.Content,{children:b.jsx(ys,{isLoading:a,children:b.jsx(mn.List,{children:(j=s==null?void 0:s.data)==null?void 0:j.map(D=>b.jsx(mn.Item,{value:String(D.key),children:D.name??D.key},String(D.key)))})})})]})]}),b.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 max-md:flex-col",children:b.jsx(Ze.Button,{type:"button",label:A.label.value,Icon:$1,variant:"outline",color:"text",className:"max-md:w-full",onClick:O,disabled:d||w,isLoading:w,children:A.text})})]})})},FJ={key:"dictionary-field-editor",content:{returnToDictionaryList:{label:ge({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:ge({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 GJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$T(Object(n),!0).forEach(function(r){GJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$T(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function ZJ(e,t){if(e==null)return{};var n=KJ(e,t),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qJ(e,t){return WJ(e)||YJ(e,t)||XJ(e,t)||QJ()}function WJ(e){if(Array.isArray(e))return e}function YJ(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!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){a=!0,s=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw s}}return n}}function XJ(e,t){if(e){if(typeof e=="string")return FT(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 FT(e,t)}}function FT(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 QJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
306
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function KT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(n),!0).forEach(function(r){JJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(a,s){return s(a)},r)}}function ec(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function $f(e){return{}.toString.call(e).includes("Object")}function tee(e){return!Object.keys(e).length}function Dc(e){return typeof e=="function"}function nee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ree(e,t){return $f(t)||ra("changeType"),Object.keys(t).some(function(n){return!nee(e,n)})&&ra("changeField"),t}function iee(e){Dc(e)||ra("selectorType")}function aee(e){Dc(e)||$f(e)||ra("handlerType"),$f(e)&&Object.values(e).some(function(t){return!Dc(t)})&&ra("handlersType")}function oee(e){e||ra("initialIsRequired"),$f(e)||ra("initialType"),tee(e)&&ra("initialContent")}function see(e,t){throw new Error(e[t]||e.default)}var lee={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"},ra=ec(see)(lee),Vd={changes:ree,selector:iee,handler:aee,initial:oee};function cee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vd.initial(e),Vd.handler(t);var n={current:e},r=ec(fee)(n,t),a=ec(dee)(n),s=ec(Vd.changes)(e),l=ec(uee)(n);function u(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return Vd.selector(f),f(n.current)}function d(f){eee(r,a,s,l)(f)}return[u,d]}function uee(e,t){return Dc(t)?t(e.current):t}function dee(e,t){return e.current=KT(KT({},e.current),t),t}function fee(e,t,n){return Dc(t)?t(e.current):Object.keys(n).forEach(function(r){var a;return(a=t[r])===null||a===void 0?void 0:a.call(t,e.current[r])}),n}var hee={create:cee},mee={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function pee(e){return function t(){for(var n=this,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return a.length>=e.length?e.apply(this,a):function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return t.apply(n,[].concat(a,u))}}}function gee(e){return{}.toString.call(e).includes("Object")}function yee(e){return e||ZT("configIsRequired"),gee(e)||ZT("configType"),e.urls?(vee(),{paths:{vs:e.urls.monacoBase}}):e}function vee(){console.warn(PD.deprecation)}function bee(e,t){throw new Error(e[t]||e.default)}var PD={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!
307
- You are using deprecated way of configuration.
308
-
309
- Instead of using
310
- monaco.config({ urls: { monacoBase: '...' } })
311
- use
312
- monaco.config({ paths: { vs: '...' } })
313
-
314
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
315
- `},ZT=pee(bee)(PD),_ee={config:yee},xee=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(a){return n.reduceRight(function(s,l){return l(s)},a)}};function zD(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],zD(e[n],t[n]))}),HT(HT({},e),t)}var Eee={type:"cancelation",msg:"operation is manually canceled"};function qg(e){var t=!1,n=new Promise(function(r,a){e.then(function(s){return t?a(Eee):r(s)}),e.catch(a)});return n.cancel=function(){return t=!0},n}var See=hee.create({config:mee,isInitialized:!1,resolve:null,reject:null,monaco:null}),VD=qJ(See,2),tu=VD[0],Ch=VD[1];function Aee(e){var t=_ee.config(e),n=t.monaco,r=ZJ(t,["monaco"]);Ch(function(a){return{config:zD(a.config,r),monaco:n}})}function wee(){var e=tu(function(t){var n=t.monaco,r=t.isInitialized,a=t.resolve;return{monaco:n,isInitialized:r,resolve:a}});if(!e.isInitialized){if(Ch({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),qg(Wg);if(window.monaco&&window.monaco.editor)return BD(window.monaco),e.resolve(window.monaco),qg(Wg);xee(Tee,Cee)(Nee)}return qg(Wg)}function Tee(e){return document.body.appendChild(e)}function Ree(e){var t=document.createElement("script");return e&&(t.src=e),t}function Cee(e){var t=tu(function(r){var a=r.config,s=r.reject;return{config:a,reject:s}}),n=Ree("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function Nee(){var e=tu(function(n){var r=n.config,a=n.resolve,s=n.reject;return{config:r,resolve:a,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){BD(n),e.resolve(n)},function(n){e.reject(n)})}function BD(e){tu().monaco||Ch({monaco:e})}function kee(){return tu(function(e){var t=e.monaco;return t})}var Wg=new Promise(function(e,t){return Ch({resolve:e,reject:t})}),UD={config:Aee,init:wee,__getMonacoInstance:kee},Oee={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Yg=Oee,Dee={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Iee=Dee;function Lee({children:e}){return Be.createElement("div",{style:Iee.container},e)}var jee=Lee,Mee=jee;function Pee({width:e,height:t,isEditorReady:n,loading:r,_ref:a,className:s,wrapperProps:l}){return Be.createElement("section",{style:{...Yg.wrapper,width:e,height:t},...l},!n&&Be.createElement(Mee,null,r),Be.createElement("div",{ref:a,style:{...Yg.fullWidth,...!n&&Yg.hide},className:s}))}var zee=Pee,$D=S.memo(zee);function Vee(e){S.useEffect(e,[])}var HD=Vee;function Bee(e,t,n=!0){let r=S.useRef(!0);S.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Vn=Bee;function mc(){}function ds(e,t,n,r){return Uee(e,r)||$ee(e,t,n,r)}function Uee(e,t){return e.editor.getModel(FD(e,t))}function $ee(e,t,n,r){return e.editor.createModel(t,n,r?FD(e,r):void 0)}function FD(e,t){return e.Uri.parse(t)}function Hee({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:a,originalModelPath:s,modifiedModelPath:l,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:d=!1,theme:f="light",loading:m="Loading...",options:g={},height:v="100%",width:E="100%",className:y,wrapperProps:x={},beforeMount:A=mc,onMount:T=mc}){let[w,C]=S.useState(!1),[O,N]=S.useState(!0),j=S.useRef(null),D=S.useRef(null),L=S.useRef(null),z=S.useRef(T),U=S.useRef(A),fe=S.useRef(!1);HD(()=>{let ee=UD.init();return ee.then(H=>(D.current=H)&&N(!1)).catch(H=>(H==null?void 0:H.type)!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>j.current?W():ee.cancel()}),Vn(()=>{if(j.current&&D.current){let ee=j.current.getOriginalEditor(),H=ds(D.current,e||"",r||n||"text",s||"");H!==ee.getModel()&&ee.setModel(H)}},[s],w),Vn(()=>{if(j.current&&D.current){let ee=j.current.getModifiedEditor(),H=ds(D.current,t||"",a||n||"text",l||"");H!==ee.getModel()&&ee.setModel(H)}},[l],w),Vn(()=>{let ee=j.current.getModifiedEditor();ee.getOption(D.current.editor.EditorOption.readOnly)?ee.setValue(t||""):t!==ee.getValue()&&(ee.executeEdits("",[{range:ee.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ee.pushUndoStop())},[t],w),Vn(()=>{var ee,H;(H=(ee=j.current)==null?void 0:ee.getModel())==null||H.original.setValue(e||"")},[e],w),Vn(()=>{let{original:ee,modified:H}=j.current.getModel();D.current.editor.setModelLanguage(ee,r||n||"text"),D.current.editor.setModelLanguage(H,a||n||"text")},[n,r,a],w),Vn(()=>{var ee;(ee=D.current)==null||ee.editor.setTheme(f)},[f],w),Vn(()=>{var ee;(ee=j.current)==null||ee.updateOptions(g)},[g],w);let ie=S.useCallback(()=>{var re;if(!D.current)return;U.current(D.current);let ee=ds(D.current,e||"",r||n||"text",s||""),H=ds(D.current,t||"",a||n||"text",l||"");(re=j.current)==null||re.setModel({original:ee,modified:H})},[n,t,a,e,r,s,l]),le=S.useCallback(()=>{var ee;!fe.current&&L.current&&(j.current=D.current.editor.createDiffEditor(L.current,{automaticLayout:!0,...g}),ie(),(ee=D.current)==null||ee.editor.setTheme(f),C(!0),fe.current=!0)},[g,f,ie]);S.useEffect(()=>{w&&z.current(j.current,D.current)},[w]),S.useEffect(()=>{!O&&!w&&le()},[O,w,le]);function W(){var H,re,Z,ve;let ee=(H=j.current)==null?void 0:H.getModel();u||((re=ee==null?void 0:ee.original)==null||re.dispose()),d||((Z=ee==null?void 0:ee.modified)==null||Z.dispose()),(ve=j.current)==null||ve.dispose()}return Be.createElement($D,{width:E,height:v,isEditorReady:w,loading:m,_ref:L,className:y,wrapperProps:x})}var Fee=Hee;S.memo(Fee);function Gee(e){let t=S.useRef();return S.useEffect(()=>{t.current=e},[e]),t.current}var Kee=Gee,Bd=new Map;function Zee({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:a,path:s,theme:l="light",line:u,loading:d="Loading...",options:f={},overrideServices:m={},saveViewState:g=!0,keepCurrentModel:v=!1,width:E="100%",height:y="100%",className:x,wrapperProps:A={},beforeMount:T=mc,onMount:w=mc,onChange:C,onValidate:O=mc}){let[N,j]=S.useState(!1),[D,L]=S.useState(!0),z=S.useRef(null),U=S.useRef(null),fe=S.useRef(null),ie=S.useRef(w),le=S.useRef(T),W=S.useRef(),ee=S.useRef(r),H=Kee(s),re=S.useRef(!1),Z=S.useRef(!1);HD(()=>{let X=UD.init();return X.then($=>(z.current=$)&&L(!1)).catch($=>($==null?void 0:$.type)!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>U.current?P():X.cancel()}),Vn(()=>{var $,Q,ne,he;let X=ds(z.current,e||r||"",t||a||"",s||n||"");X!==(($=U.current)==null?void 0:$.getModel())&&(g&&Bd.set(H,(Q=U.current)==null?void 0:Q.saveViewState()),(ne=U.current)==null||ne.setModel(X),g&&((he=U.current)==null||he.restoreViewState(Bd.get(s))))},[s],N),Vn(()=>{var X;(X=U.current)==null||X.updateOptions(f)},[f],N),Vn(()=>{!U.current||r===void 0||(U.current.getOption(z.current.editor.EditorOption.readOnly)?U.current.setValue(r):r!==U.current.getValue()&&(Z.current=!0,U.current.executeEdits("",[{range:U.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),U.current.pushUndoStop(),Z.current=!1))},[r],N),Vn(()=>{var $,Q;let X=($=U.current)==null?void 0:$.getModel();X&&a&&((Q=z.current)==null||Q.editor.setModelLanguage(X,a))},[a],N),Vn(()=>{var X;u!==void 0&&((X=U.current)==null||X.revealLine(u))},[u],N),Vn(()=>{var X;(X=z.current)==null||X.editor.setTheme(l)},[l],N);let ve=S.useCallback(()=>{var X;if(!(!fe.current||!z.current)&&!re.current){le.current(z.current);let $=s||n,Q=ds(z.current,r||e||"",t||a||"",$||"");U.current=(X=z.current)==null?void 0:X.editor.create(fe.current,{model:Q,automaticLayout:!0,...f},m),g&&U.current.restoreViewState(Bd.get($)),z.current.editor.setTheme(l),u!==void 0&&U.current.revealLine(u),j(!0),re.current=!0}},[e,t,n,r,a,s,f,m,g,l,u]);S.useEffect(()=>{N&&ie.current(U.current,z.current)},[N]),S.useEffect(()=>{!D&&!N&&ve()},[D,N,ve]),ee.current=r,S.useEffect(()=>{var X,$;N&&C&&((X=W.current)==null||X.dispose(),W.current=($=U.current)==null?void 0:$.onDidChangeModelContent(Q=>{Z.current||C(U.current.getValue(),Q)}))},[N,C]),S.useEffect(()=>{if(N){let X=z.current.editor.onDidChangeMarkers($=>{var ne;let Q=(ne=U.current.getModel())==null?void 0:ne.uri;if(Q&&$.find(he=>he.path===Q.path)){let he=z.current.editor.getModelMarkers({resource:Q});O==null||O(he)}});return()=>{X==null||X.dispose()}}return()=>{}},[N,O]);function P(){var X,$;(X=W.current)==null||X.dispose(),v?g&&Bd.set(s,U.current.saveViewState()):($=U.current.getModel())==null||$.dispose(),U.current.dispose()}return Be.createElement($D,{width:E,height:y,isEditorReady:N,loading:d,_ref:fe,className:x,wrapperProps:A})}var qee=Zee,Wee=S.memo(qee);const Yee=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:a=!0,isReadOnly:s=!1,onChange:l})=>{const u=S.useRef(null),d=S.useRef(null),[f,m]=S.useState({height:0,width:0}),g=S.useMemo(()=>n?"vs-dark-transparent":"hc-light-theme",[n]),v=(y,x)=>{var T;d.current=y;const A=(y.getContentHeight()??0)+25;x.editor.defineTheme("vs-dark-transparent",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),x.editor.defineTheme("hc-light-theme",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),x.editor.setTheme(g),x.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),x.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),x.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),x.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),m({height:A,width:((T=u.current)==null?void 0:T.clientWidth)??0})},E=r??e.split(`
316
- `).length>1;return b.jsxs("div",{className:Ae("relative h-full w-full text-sm",r&&"ml-0"),children:[a&&b.jsx("div",{className:"sticky top-5 z-10",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center"),children:b.jsx(MD,{content:e})})}),b.jsx("div",{className:"z-0 grid size-full grid-cols-[0px] overflow-auto",ref:u,children:b.jsx(Wee,{...f,defaultLanguage:"typescript",language:t,loading:b.jsx(ys,{}),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:E?"on":"off"},theme:g,className:"my-2 rounded-md"})})]})},Xee=({dictionary:e,isDarkMode:t})=>{const{setEditedContent:n,editedContent:r}=En(),a=l=>{try{return JSON.parse(l),!0}catch{return!1}},s=S.useMemo(()=>{var l;return((l=r==null?void 0:r[e.key])==null?void 0:l.content)??(e==null?void 0:e.content)??{}},[e]);return b.jsx(Wr,{background:"none",border:!0,roundedSize:"xl",className:"w-full overflow-hidden p-3",children:b.jsx(Yee,{language:"json",onChange:l=>{a(l??"{}")&&n(e.key,JSON.parse(l??"{}"))},isDarkMode:t,children:JSON.stringify(s,null,2)})})},Qee={key:"node-type-selector",content:{triggerPlaceHolder:ge({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:ge({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:ge({en:"Text","en-GB":"Text",fr:"Texte",es:"Texto",de:"Text",ja:"テキスト",ko:"텍스트",zh:"文本",it:"Testo",pt:"Texto",hi:"पाठ",ar:"نص",ru:"Текст"}),number:ge({en:"Number","en-GB":"Number",fr:"Nombre",es:"Número",de:"Zahl",ja:"数字",ko:"숫자",zh:"数字",it:"Numero",pt:"Número",hi:"संख्या",ar:"رقم",ru:"Число"}),boolean:ge({en:"Boolean","en-GB":"Boolean",fr:"Booléen",es:"Booleano",de:"Bool",ja:"ブール",ko:"불리언",zh:"布尔",it:"Booleano",pt:"Booleano",hi:"बूलियन",ar:"منطقي",ru:"Булево"}),node:ge({en:"Object","en-GB":"Object",fr:"Objet",es:"Objeto",de:"Objekt",ja:"オブジェクト",ko:"객체",zh:"对象",it:"Oggetto",pt:"Objeto",hi:"ऑब्जेक्ट",ar:"كائن",ru:"Объект"}),array:ge({en:"Array","en-GB":"Array",fr:"Tableau",es:"Arreglo",de:"Array",ja:"配列",ko:"배열",zh:"数组",it:"Array",pt:"Array",hi:"ऐरे",ar:"مصفوفة",ru:"Массив"}),enumeration:ge({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:ge({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:ge({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:ge({en:"Condition","en-GB":"Condition",fr:"Condition",es:"Condición",de:"Bedingung",ja:"条件",ko:"조건",zh:"条件",it:"Condizione",pt:"Condição",hi:"शर्त्ता",ar:"شرط",ru:"Условие"}),file:ge({en:"File","en-GB":"File",fr:"Fichier",es:"Archivo",de:"Datei",ja:"ファイル",ko:"파일",zh:"文件",it:"File",pt:"Arquivo",hi:"फ़ाइल",ar:"ملف",ru:"Файл"}),markdown:ge({en:"Markdown","en-GB":"Markdown",fr:"Markdown",es:"Markdown",de:"Markdown",ja:"マークダウン",ko:"마크다운",zh:"Markdown",it:"Markdown",pt:"Markdown",hi:"मार्कडाउन",ar:"مارك داون",ru:"Markdown"}),reactNode:ge({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:"Реакт узел"})}},Ud=({section:e,onValueChange:t})=>{const{multilingual:n,text:r,number:a,boolean:s,node:l,array:u,enumeration:d,triggerPlaceHolder:f,nest:m,condition:g,markdown:v,insertion:E,reactNode:y,file:x}=Jt(Qee),A=As(e),[T,w]=S.useState(A),C=O=>{w(O),t(O)};return b.jsxs(Ie,{value:T,onValueChange:C,children:[b.jsx(Ie.Trigger,{children:b.jsx(Ie.Value,{placeholder:f})}),b.jsxs(Ie.Content,{children:[b.jsx(Ie.Item,{value:K.Translation,children:n}),b.jsx(Ie.Item,{value:K.Text,children:r}),b.jsx(Ie.Item,{value:K.Number,children:a}),b.jsx(Ie.Item,{value:K.Boolean,children:s}),b.jsx(Ie.Item,{value:K.Object,children:l}),b.jsx(Ie.Item,{value:K.Array,children:u}),b.jsx(Ie.Item,{value:K.Enumeration,children:d}),b.jsx(Ie.Item,{value:K.Insertion,children:E}),b.jsx(Ie.Item,{value:K.Markdown,children:v}),b.jsx(Ie.Item,{value:K.Nested,children:m}),b.jsx(Ie.Item,{value:K.Condition,children:g}),b.jsx(Ie.Item,{value:K.ReactNode,disabled:!0,children:y}),b.jsx(Ie.Item,{value:K.File,children:x})]})]})},GD={key:"editor-view",content:{titleInput:{placeholder:ge({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:ge({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:ge({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:ge({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:"Добавить новый узел"})}}},dv=({section:e,dictionaryKey:t,keyPath:n,onNodeTypeChange:r})=>{var d;const a=((d=Gr())==null?void 0:d.internationalization.locales)??[],s=As(e),l=QT(e),u=f=>{const m=zl(s,a,f);r(m)};if(s===K.Translation||s===K.Condition||s===K.Enumeration){const f=Object.keys(e[s])[0],m=[...n,{type:s,key:f}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(Ud,{section:e,onValueChange:g=>r(zl(g,a))}),b.jsx(dv,{section:l,keyPath:m,dictionaryKey:t,onNodeTypeChange:u})]})}if(s===K.Array){const f=[...n,{type:s,key:0}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(Ud,{section:e,onValueChange:m=>r(zl(m,a))}),b.jsx(dv,{section:l,keyPath:f,dictionaryKey:t,onNodeTypeChange:u})]})}return s===K.Object?b.jsxs(b.Fragment,{children:[b.jsx(Ud,{section:e,onValueChange:f=>r(zl(f,a))}),b.jsx("div",{className:"ml-10 mt-6",children:b.jsx(ete,{keyPath:n,section:e,dictionaryKey:t})})]}):b.jsx(Ud,{section:e,onValueChange:f=>r(zl(f,a))})},u0=({sectionKey:e,section:t,keyPath:n,dictionaryKey:r})=>{const{focusedContent:a,setFocusedContentKeyPath:s}=ca(),{renameEditedContent:l,addEditedContent:u}=ws(),{titleInput:d,deleteButton:f}=Jt(GD),m=g=>{l(r,g,n);const v=n.slice(0,-1),E=n[n.length-1],y=[...v,{...E,key:g}];s(y)};return b.jsx(Wr,{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":Lc(n,(a==null?void 0:a.keyPath)??[]),onClick:()=>s(n),children:b.jsxs("div",{className:"flex w-full flex-col items-start justify-between gap-3",children:[typeof e=="string"&&b.jsxs("div",{className:"w-full",children:[b.jsxs("div",{className:"flex w-full items-center justify-between gap-10",children:[b.jsx(QR,{name:"key","aria-label":"Key",placeholder:d.placeholder.value,defaultValue:e,onSave:g=>m(g),variant:"invisible"}),b.jsx(ut,{label:f.label.value,variant:"hoverable",size:"icon-sm",color:"text",className:"translate-x-2",Icon:Yf,onClick:()=>{u(r,void 0,n);const g=n.slice(0,-1);s(g)}})]}),b.jsxs("span",{className:"text-neutral ml-3 text-sm",children:["( ",of(e)," )"]})]}),b.jsx(dv,{keyPath:n,dictionaryKey:r,section:t,onNodeTypeChange:g=>{u(r,g,n)}})]})})},Jee=({section:e,keyPath:t,dictionaryKey:n})=>{const{addNodeButton:r}=Jt(GD),{setFocusedContentKeyPath:a}=mv(),{addEditedContent:s}=ws();return!e||typeof e!="object"?b.jsx("div",{children:"Not an object"}):b.jsxs("div",{className:"flex flex-col gap-2 overflow-y-auto",children:[b.jsx("ul",{className:"mr-auto flex flex-col gap-4",children:Object.keys(e).map(l=>b.jsx("li",{className:"flex w-full",children:b.jsx(u0,{sectionKey:l,section:e==null?void 0:e[l],keyPath:[...t,{type:K.Object,key:l}],dictionaryKey:n})},l))}),b.jsx(ut,{label:r.label.value,variant:"hoverable",size:"md",color:"text",Icon:Wf,className:"flex-1",onClick:()=>{const u=[...t,{type:K.Object,key:"newKey"}];s(n,"",u),a(u)},children:r.text})]})},ete=({section:e,keyPath:t,dictionaryKey:n})=>!e||typeof e!="object"||typeof e.nodeType=="string"?b.jsx(u0,{sectionKey:"content",section:e,keyPath:t,dictionaryKey:n}):b.jsx(Jee,{section:e,keyPath:t,dictionaryKey:n}),tte=({dictionary:e})=>{var s,l;const{content:t,key:n}=e,{editedContent:r}=En(),a=typeof((s=r==null?void 0:r[n])==null?void 0:s.content)>"u"?t:(l=r==null?void 0:r[n])==null?void 0:l.content;return b.jsx(u0,{section:a,keyPath:[],dictionaryKey:e.key})},nte=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:a})=>{const s=Gr(),[l,u]=S.useState(1),{returnToDictionaryList:d}=Jt(FJ),{setFocusedContent:f}=mv(),{setLocaleDictionaries:m}=Gf();return S.useEffect(()=>{f(g=>({...g??{},dictionaryKey:e.key})),m(g=>({...g,[e.key]:e}))},[]),b.jsx(vq,{availableLocales:(s==null?void 0:s.internationalization.locales)??[],children:b.jsxs("div",{className:"flex size-full flex-col gap-6 px-2",children:[b.jsx(ut,{onClick:t,variant:"hoverable",className:"z-10 ml-5 mr-auto",color:"text",Icon:Az,label:d.label.value,children:d.text}),b.jsx(Zc,{defaultValue:l,onChange:g=>u(g),color:"text",size:"sm",className:"m-auto w-full max-w-xl",choices:[{content:"Details",value:0},{content:"Structure",value:2},{content:"Content",value:1},{content:"JSON",value:3}].filter(({value:g})=>!(!r.includes("remote")&&g===0))}),l===0&&b.jsx(HJ,{dictionary:e}),l===2&&b.jsx(tte,{dictionary:e}),l===1&&b.jsx(VJ,{dictionary:e,isDarkMode:n}),l===3&&b.jsx(Xee,{dictionary:e,isDarkMode:n}),b.jsx(TO,{dictionary:e,mode:r,onDelete:()=>{f(null),a==null||a()}})]})})},rte=({children:e,isHidden:t,minWidth:n=0,align:r="left",className:a,...s})=>b.jsx("div",{className:Ae("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out",t?"":"grid-cols-[1fr]",a),"aria-hidden":t,...s,children:b.jsx("div",{style:{minWidth:`${n}px`},tabIndex:t!==!1?void 0:-1,className:Ae(r==="right"&&"ml-auto"),children:e})}),ite=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}},ate=()=>{var t;if(typeof window>"u")return;const e=(t=window.navigator)==null?void 0:t.userAgent;if(!(typeof e>"u"))return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},ote=e=>{if(!(typeof window>"u"))return((window==null?void 0:window.innerWidth)??0)<=e},qT=(e="md")=>{const t=ite(e),n=ate(),r=ote(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n}},ste=(e="md")=>{const[t,n]=S.useState(qT(e));return S.useEffect(()=>{const r=()=>{n(qT(e))};return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[e]),t},lte=e=>{const t=e.getBoundingClientRect(),n=t.top,r=t.bottom;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},Nh=TR((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})),KD=({title:e,identifier:t,children:n,header:r,closeOnOutsideClick:a=!0,backButton:s,isOpen:l,onClose:u})=>{const{isMobile:d}=ste("md"),f=S.useRef(null),m=S.useRef(null),{close:g,open:v,isOpen:E}=Nh(EO(x=>({close:()=>x.close(t),open:()=>x.open(t),isOpen:x.isOpen(t)})));SO({disableScroll:E,key:t?`right_drawer_${t}`:"right_drawer"}),S.useEffect(()=>{const x=A=>{try{if(!f.current)return;const T=E&&a,w=A.target&&!f.current.contains(A.target),C=lte(f.current);(T&&w&&C||!A.target)&&(g(),u==null||u())}catch{g(),u==null||u()}};return window.addEventListener("mousedown",x),()=>window.removeEventListener("mousedown",x)},[E,g,u,a,t]),S.useEffect(()=>{l!==void 0&&(l?v():(g(),u==null||u()))},[g,v,u,l,t]);const y=x=>{x.target===x.currentTarget&&d&&(g(),u==null||u())};return b.jsx("div",{className:"fixed right-0 top-0 z-50 flex h-full justify-end",children:b.jsx(rte,{isHidden:!E,align:"right",children:b.jsxs(Wr,{className:"text-text relative flex h-screen w-screen flex-col md:w-[400px]",ref:f,roundedSize:"none",children:[b.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[b.jsxs("div",{className:"flex justify-between gap-3",children:[b.jsx("div",{children:s&&b.jsx(ut,{variant:"hoverable",color:"text",label:s.text??"Go back",onClick:s.onBack,Icon:kz,children:s==null?void 0:s.text})}),b.jsx("div",{children:b.jsx(ut,{variant:"hoverable",color:"text",label:"Close",className:"ml-auto",onClick:g,Icon:uo,size:"icon-md"})})]}),e&&b.jsx("h2",{className:"flex items-center justify-center text-lg font-bold",children:e}),r]}),b.jsx("div",{className:"flex h-full flex-col overflow-y-auto p-2",children:b.jsx("div",{className:"flex flex-1 flex-col",onClick:y,ref:m,children:n})})]})})})},cte=()=>{const{toasts:e}=ER();return b.jsxs(YB.Provider,{children:[e.map(({id:t,title:n,description:r,action:a,...s})=>b.jsxs(JB,{...s,children:[b.jsxs("div",{className:"grid gap-1",children:[n&&b.jsx(tU,{children:n}),r&&b.jsx(nU,{children:r})]}),a,b.jsx(eU,{})]},t)),b.jsx(XB,{})]})},ZD=(...e)=>{const{localeDictionaries:t}=c1(),{data:n,isWaitingData:r}=hU(...e),a=S.useMemo(()=>((n==null?void 0:n.data)??[]).reduce((l,u)=>(l[u.key]=u,l),{}),[n]),s=S.useMemo(()=>AU(a??{},t),[a,t]);return{online:a,locale:t,all:s,isLoading:r}},ute=({children:e})=>b.jsx(y9,{features:XK,children:e}),dte=({children:e})=>b.jsx(ute,{children:b.jsxs(FV,{children:[b.jsx(cte,{}),e]})}),fte=({children:e})=>b.jsx(sz,{children:b.jsx(PP,{children:b.jsx(D1,{path:"*",element:e})})}),fv="dictionaryList",qD={key:"dictionary-edition-drawer",content:{openDictionaryEditor:{label:ge({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:ge({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:ge({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:ge({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"})}},d0=e=>`dictionary_edition_${e}`,WD=e=>{const t=d0(e),{isOpen:n,open:r,close:a}=Nh(),{getEditedContentValue:s}=ws(),{focusedContent:l,setFocusedContent:u}=ca();return S.useEffect(()=>{var d;l&&(((d=l.keyPath)==null?void 0:d.length)??0)>0&&r(t)},[l,r,t]),{isOpen:n(t),focusedContent:l,getEditedContentValue:s,close:()=>{a(t),u(d=>d!=null&&d.dictionaryKey?{...d,keyPath:[]}:d)}}},hte=({locale:e,identifier:t,handleOnBack:n,isDarkMode:r})=>{const{modalTitle:a,openDictionaryEditor:s}=Jt(qD),[l,u]=S.useState(!1),{all:d}=ZD(),{focusedContent:f}=WD(t),m=S.useCallback(()=>{u(!1),n()},[n]),g=f==null?void 0:f.dictionaryKey;if(!g)return b.jsx(b.Fragment,{children:"No dictionary focused"});const v=d[g];return v?b.jsxs(b.Fragment,{children:[b.jsx(AO,{isOpen:l,onClose:()=>u(!1),hasCloseButton:!0,title:a.value,size:"xl",transparency:"lg",children:b.jsx("div",{className:"size-full px-3 pt-5",children:b.jsx(nte,{dictionary:v,onClickDictionaryList:m,isDarkMode:r,mode:["local","remote"],onDelete:()=>{u(!1),n()}})})}),b.jsxs("div",{className:"border-text/20 /20 mb-5 flex w-full border-b border-dashed px-3 pb-2",children:[b.jsx("h3",{className:"w-full text-center text-lg",children:v.title?v.title:v.key}),b.jsx(ut,{variant:"hoverable",color:"text",size:"icon-md",IconRight:U1,label:s.label.value,onClick:()=>u(!0)})]}),b.jsx(NZ,{dictionary:v,locale:e,mode:["local","remote"]})]}):b.jsx(b.Fragment,{children:"No dictionary focused"})},mte=({locale:e,dictionaryKey:t,isDarkMode:n})=>{const{backButtonText:r}=Jt(qD),a=d0(t),{focusedContent:s,close:l}=WD(t),{openDictionaryListDrawer:u}=Nh(f=>({openDictionaryListDrawer:()=>f.open(fv)})),d=()=>{l(),u()};return b.jsx(KD,{identifier:a,backButton:{onBack:d,text:r.value},onClose:l,children:s&&b.jsx(hte,{focusedContent:s,locale:e,identifier:a,handleOnBack:d,isDarkMode:n})})},pte=({locale:e,isDarkMode:t})=>{const{focusedContent:n}=ca(),r=n==null?void 0:n.dictionaryKey;return r?b.jsx(mte,{locale:e,dictionaryKey:r,isDarkMode:t}):b.jsx(b.Fragment,{})},gte=()=>{const{all:e}=ZD(),t=Object.keys(e),{close:n,open:r}=Nh(),{editedContent:a}=En(),{setFocusedContent:s}=ca(),l=d=>{n(fv);const{filePath:f}=e[d];s({dictionaryKey:d,dictionaryPath:f}),r(d0(d))},u=d=>Object.keys(a??{}).includes(d);return b.jsx(KD,{title:"Dictionary list",identifier:fv,children:t.map(d=>b.jsx("div",{children:b.jsx(ut,{label:`Open dictionary editor ${d}`,onClick:()=>l(d),variant:"hoverable",color:"text",IconRight:uf,size:"md",isFullWidth:!0,children:u(d)?`✎ ${d}`:d})},d))})},yte=({children:e})=>{const[t]=lo(lr.INTLAYER_CURRENT_LOCALE,void 0,{receive:!0,emit:!1}),{data:n}=xU({autoFetch:!0}),{setLocaleDictionaries:r}=Gf();return S.useEffect(()=>{n&&r(n)},[n]),b.jsxs("div",{className:"bg-card relative size-full p-3",children:[e,b.jsx(pte,{locale:t}),b.jsx(gte,{})]})},vte=()=>{const[e,t]=S.useState();return S.useEffect(()=>{fetch("/api/config").then(n=>n.json()).then(n=>t(n.data))},[]),e},bte=({children:e,iframeRef:t})=>{const n=vte(),r=n!=null&&n.editor.applicationURL?n==null?void 0:n.editor.applicationURL:"*",a=(n==null?void 0:n.editor.editorURL)??"*";return n?b.jsx(TM,{postMessage:s=>{var l,u;window==null||window.postMessage(s,a),(u=(l=t.current)==null?void 0:l.contentWindow)==null||u.postMessage(s,r)},allowedOrigins:[r,a],mode:"editor",configuration:n,children:e}):b.jsx(ys,{})},_te=()=>{const{editedContent:e,setEditedContentState:t}=En(),n=()=>{const r=localStorage==null?void 0:localStorage.getItem("INTLAYER_EDITED_CONTENT_CHANGED");if(r)try{const a=JSON.parse(r);t(a)}catch(a){console.error(a)}};return S.useEffect(()=>{typeof e>"u"||localStorage==null||localStorage.setItem("INTLAYER_EDITED_CONTENT_CHANGED",JSON.stringify(e))},[e]),S.useEffect(()=>{typeof e<"u"||n()},[]),n},xte=(...e)=>eR(Xf(e)),Ete={key:"no-application-url-view",content:{title:ge({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:ge({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:ge({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:ge({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:"查看如何配置编辑器"})}}},Ste=()=>{const{title:e,description:t,documentationLink:n}=Jt(Ete);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsx(Kb,{className:"mb-8",children:e}),b.jsx("strong",{className:"text-neutral block",children:t}),b.jsx(Zb,{label:n.label.value,href:"https://intlayer.org/doc/concept/configuration#editor-configuration",color:"text",children:n.text})]})},Ate=({iframeRef:e,applicationPath:t})=>{const{editor:n}=Gr(),r=()=>a(n.enabled),a=xM();h1(r),_te(),CM();const[s,l]=S.useState(!1),[u]=RM(void 0,{receive:!0,emit:!1});return S.useEffect(()=>{typeof u=="string"&&window.history.replaceState({},"",u)},[u]),n.applicationURL?b.jsxs("div",{className:"size-full overflow-hidden rounded-lg",children:[b.jsx(ys,{isLoading:s}),b.jsx("iframe",{src:`${n.applicationURL}${t}`,title:"Intlayer Application",className:xte("size-full",s&&"hidden"),ref:e,onLoad:()=>{l(!1),r()}})]}):b.jsx("div",{className:"flex size-full items-center justify-center",children:b.jsx(Wr,{className:"flex max-w-xl flex-col gap-4 p-6",children:b.jsx(Ste,{})})})},wte=()=>{const e=S.useRef(null),t=ua();return b.jsx(bte,{iframeRef:e,children:b.jsx(IM,{disableEditor:!0,children:b.jsx(yte,{children:b.jsx(Ate,{iframeRef:e,applicationPath:t.pathname})})})})},Tte=()=>b.jsx(fte,{children:b.jsx(dte,{children:b.jsx(wte,{})})});xj.createRoot(document.getElementById("root")).render(b.jsx(S.StrictMode,{children:b.jsx(Tte,{})}));