intlayer-editor 8.10.0 → 8.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/client/dist/assets/{CodeBlockClient-D5WgslqJ.js → CodeBlockClient-CGYlwZgx.js} +3 -3
  2. package/client/dist/assets/{CodeBlockShiki-B_wH38il.js → CodeBlockShiki-Cpt5HGwF.js} +2 -2
  3. package/client/dist/assets/{MarkDownRender-QZTdMbU7.js → MarkDownRender-C8K2RDjG.js} +3 -3
  4. package/client/dist/assets/angular-html-BUmUiTKE.js +1 -0
  5. package/client/dist/assets/{angular-html-CE3otiUy.js → angular-html-DYy3DhQW.js} +1 -1
  6. package/client/dist/assets/{angular-ts-BUzv9BDy.js → angular-ts-DO6rE7bo.js} +1 -1
  7. package/client/dist/assets/angular-ts-Nt1CD7Dm.js +1 -0
  8. package/client/dist/assets/astro-BQhWM6R0.js +1 -0
  9. package/client/dist/assets/{astro-s6ED5Jas.js → astro-CBK40Bhd.js} +1 -1
  10. package/client/dist/assets/bash-DCKTcNcP.js +1 -0
  11. package/client/dist/assets/{blade-iyS__DOF.js → blade-B5sHZh5P.js} +1 -1
  12. package/client/dist/assets/{bundle-web-B2gdZhaa.js → bundle-web-C5Yf7ySe.js} +3 -3
  13. package/client/dist/assets/{c-li75WgRD.js → c-BgrG-ibm.js} +1 -1
  14. package/client/dist/assets/{coffee-DBVTLXqW.js → coffee-DOXkiwK5.js} +1 -1
  15. package/client/dist/assets/{cpp-BvlB0xo-.js → cpp-GjIBNCSz.js} +1 -1
  16. package/client/dist/assets/css-CbdT3Eet.js +1 -0
  17. package/client/dist/assets/{css-Cv-0uTl9.js → css-Ce7Cq_kZ.js} +1 -1
  18. package/client/dist/assets/{dist-C0cpm0sk.js → dist-B54x4iXk.js} +1 -1
  19. package/client/dist/assets/{glsl-B29dFVE3.js → glsl-B6kxl7gK.js} +1 -1
  20. package/client/dist/assets/{graphql-CwN1fPSP.js → graphql-xITpFznH.js} +1 -1
  21. package/client/dist/assets/{haml-D0BvqmUQ.js → haml-DS9reqa4.js} +1 -1
  22. package/client/dist/assets/{handlebars-Dz9dLL_n.js → handlebars-CL8QJPOg.js} +1 -1
  23. package/client/dist/assets/{html-DTk6qeab.js → html-CL73O1EU.js} +1 -1
  24. package/client/dist/assets/html-U3RjWafQ.js +1 -0
  25. package/client/dist/assets/{html-derivative-qTfsfCIU.js → html-derivative-D_BZk_iM.js} +1 -1
  26. package/client/dist/assets/{http-C2pEVrSg.js → http-CatvHVir.js} +1 -1
  27. package/client/dist/assets/{hurl-B8iIMCLT.js → hurl-CwFuXObF.js} +1 -1
  28. package/client/dist/assets/index-BdLCH4X-.css +2 -0
  29. package/client/dist/assets/{index-DHi4UjPi.js → index-CNTZ-LFA.js} +19 -19
  30. package/client/dist/assets/{java-Clp705Jl.js → java-CZwQjE1c.js} +1 -1
  31. package/client/dist/assets/{javascript-tl3rutNt.js → javascript-Bi_NBXX1.js} +1 -1
  32. package/client/dist/assets/javascript-Cik_BlLW.js +1 -0
  33. package/client/dist/assets/{jinja-JWdT3vhE.js → jinja-BXCh8wSi.js} +1 -1
  34. package/client/dist/assets/{jison-D9GetYTU.js → jison-DNflJeKw.js} +1 -1
  35. package/client/dist/assets/json-BLkFYsub.js +1 -0
  36. package/client/dist/assets/{json-D5AqEK7x.js → json-Cdeztd2f.js} +1 -1
  37. package/client/dist/assets/{jsx-BX1vueTu.js → jsx-CdR5L4xp.js} +1 -1
  38. package/client/dist/assets/{julia-Ub5rF2Hp.js → julia-DM1LmkEE.js} +1 -1
  39. package/client/dist/assets/{marko-CxMkL8ln.js → marko-DddaYAal.js} +1 -1
  40. package/client/dist/assets/{mdc-aY0j9VIV.js → mdc-CXBdMl9l.js} +1 -1
  41. package/client/dist/assets/{php-BmsANmwY.js → php-D9q_KGsS.js} +1 -1
  42. package/client/dist/assets/{postcss-B-EsXMtI.js → postcss-Bxjt-ieP.js} +1 -1
  43. package/client/dist/assets/{pug-CLZ1vEuM.js → pug-Dh2B5GON.js} +1 -1
  44. package/client/dist/assets/{regexp-BQMG0klI.js → regexp-CyKEQwhn.js} +1 -1
  45. package/client/dist/assets/{scss-OuHSvaw3.js → scss-vGlQxEP8.js} +1 -1
  46. package/client/dist/assets/{shellscript-dnaPaV1w.js → shellscript-DI9QPrUY.js} +1 -1
  47. package/client/dist/assets/{sql-C07FrV-N.js → sql-DYLSqOT0.js} +1 -1
  48. package/client/dist/assets/svelte-D-t3qq2x.js +1 -0
  49. package/client/dist/assets/{svelte-BC7wA30j.js → svelte-DO3IOucy.js} +1 -1
  50. package/client/dist/assets/{ts-tags-BVILR3S9.js → ts-tags-Do0BM0AT.js} +1 -1
  51. package/client/dist/assets/tsx-D19UdK9K.js +1 -0
  52. package/client/dist/assets/{tsx-Sr5ukDfF.js → tsx-D6Y0f3Nf.js} +1 -1
  53. package/client/dist/assets/typescript-B0BqzeG5.js +1 -0
  54. package/client/dist/assets/{typescript-BmM7GiLG.js → typescript-ClSI2AXW.js} +1 -1
  55. package/client/dist/assets/vue-CNjVGrAR.js +1 -0
  56. package/client/dist/assets/{vue-BJBFlDDL.js → vue-DFnIl2P0.js} +1 -1
  57. package/client/dist/assets/{vue-html-CLt2hoQG.js → vue-html-CsZaswvU.js} +1 -1
  58. package/client/dist/assets/{vue-vine-5Q7ZKtzR.js → vue-vine-CDO1nFGJ.js} +1 -1
  59. package/client/dist/assets/xml-BRwiwGf_.js +1 -0
  60. package/client/dist/assets/{xml-G-JuPLi7.js → xml-Br8WXO3q.js} +1 -1
  61. package/client/dist/index.html +2 -2
  62. package/package.json +7 -7
  63. package/client/dist/assets/angular-html-CMxlAhMx.js +0 -1
  64. package/client/dist/assets/angular-ts-BVBVSKOg.js +0 -1
  65. package/client/dist/assets/astro-C55V25Yu.js +0 -1
  66. package/client/dist/assets/bash-DsaOnx0l.js +0 -1
  67. package/client/dist/assets/css-BcSmsATC.js +0 -1
  68. package/client/dist/assets/html-BjVVaoAj.js +0 -1
  69. package/client/dist/assets/index-BycL-Q1C.css +0 -2
  70. package/client/dist/assets/javascript-pJt8b2js.js +0 -1
  71. package/client/dist/assets/json-D6PYjNhV.js +0 -1
  72. package/client/dist/assets/svelte-IjTG6CC9.js +0 -1
  73. package/client/dist/assets/tsx-_rfYoOQ7.js +0 -1
  74. package/client/dist/assets/typescript-P2ELeusa.js +0 -1
  75. package/client/dist/assets/vue-DGRECZie.js +0 -1
  76. package/client/dist/assets/xml-B4IP4PY_.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-QZTdMbU7.js","assets/CodeBlockClient-D5WgslqJ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-C8K2RDjG.js","assets/CodeBlockClient-CGYlwZgx.js"])))=>i.map(i=>d[i]);
2
2
  var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function re(e){return{current:e}}function R(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function z(e,t){ne++,te[ne]=e.current,e.current=t}var ie=re(null),ae=re(null),oe=re(null),se=re(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(ie),z(ie,e)}function le(){R(ie),R(ae),R(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Xd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(R(ie),R(ae)),se.current===e&&(R(se),ap._currentValue=ee)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -9,7 +9,7 @@ Error generating stack: `+e.message+`
9
9
  `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:Re,Le=Math.log,B=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Le(e)/B|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+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 Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ie(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:xp(e.type)):e}function nt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yf(e);e!==null;){if(n=e[it])return n;e=yf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=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]*$`),Ct={},wt={};function Tt(e){return ye.call(wt,e)?!0:ye.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Dt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ot(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function At(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function jt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mt(e){if(!e._valueTracker){var t=At(e)?`checked`:`value`;e._valueTracker=jt(e,t,``+e[t])}}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=At(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Pt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ft=/[\n"\\]/g;function It(e){return e.replace(Ft,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Lt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):zt(e,o,kt(n)):zt(e,o,kt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+kt(s):e.removeAttribute(`name`)}function Rt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Mt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Mt(e)}function zt(e,t,n){t===`number`&&Pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Bt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+kt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vt(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function Ht(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Mt(e)}function Ut(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wt=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 Gt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Wt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Kt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Gt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Gt(e,o,t[o])}function qt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Jt=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`]]),Yt=/^[\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 Xt(e){return Yt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Zt(){}var Qt=null;function $t(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var en=null,tn=null;function nn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Lt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+It(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));Lt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Nt(r)}break a;case`textarea`:Vt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Bt(e,!!n.multiple,t,!1)}}}var rn=!1;function an(e,t,n){if(rn)return e(t,n);rn=!0;try{return e(t)}finally{if(rn=!1,(en!==null||tn!==null)&&(Tu(),en&&(t=en,e=tn,tn=en=null,nn(t),e)))for(t=0;t<e.length;t++)nn(e[t])}}function on(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,`passive`,{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return fn=i.slice(e,1<r?1-r:void 0)}function mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hn(){return!0}function gn(){return!1}function _n(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?hn:gn,this.isPropagationStopped=gn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){},isPersistent:hn}),t}var vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yn=_n(vn),bn=f({},vn,{view:0,detail:0}),xn=_n(bn),Sn,Cn,wn,Tn=f({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=_n(Tn),Dn=_n(f({},Tn,{dataTransfer:0})),On=_n(f({},bn,{relatedTarget:0})),kn=_n(f({},vn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=_n(f({},vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),jn=_n(f({},vn,{data:0})),Mn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Nn={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`},Pn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Fn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pn[e])?!!t[e]:!1}function In(){return Fn}var Ln=_n(f({},bn,{key:function(e){if(e.key){var t=Mn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Nn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return e.type===`keypress`?mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Rn=_n(f({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zn=_n(f({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Bn=_n(f({},vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vn=_n(f({},Tn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Hn=_n(f({},vn,{newState:0,oldState:0})),Un=[9,13,27,32],Wn=sn&&`CompositionEvent`in window,Gn=null;sn&&`documentMode`in document&&(Gn=document.documentMode);var Kn=sn&&`TextEvent`in window&&!Gn,qn=sn&&(!Wn||Gn&&8<Gn&&11>=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=pn(),fn=dn=un=null,Qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return qn&&t.locale!==`ko`?null:t.data;default:return null}}var tr={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 nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!tr[e.type]:t===`textarea`}function rr(e,t,n,r){en?tn?tn.push(r):tn=[r]:en=r,t=Nd(t,`onChange`),0<t.length&&(n=new yn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ir=null,ar=null;function or(e){Td(e,0)}function sr(e){if(Nt(ht(e)))return e}function cr(e,t){if(e===`change`)return t}var lr=!1;if(sn){var ur;if(sn){var dr=`oninput`in document;if(!dr){var fr=document.createElement(`div`);fr.setAttribute(`oninput`,`return;`),dr=typeof fr.oninput==`function`}ur=dr}else ur=!1;lr=ur&&(!document.documentMode||9<document.documentMode)}function pr(){ir&&(ir.detachEvent(`onpropertychange`,mr),ar=ir=null)}function mr(e){if(e.propertyName===`value`&&sr(ar)){var t=[];rr(t,ar,e,$t(e)),an(or,t)}}function hr(e,t,n){e===`focusin`?(pr(),ir=t,ar=n,ir.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return sr(ar)}function _r(e,t){if(e===`click`)return sr(t)}function vr(e,t){if(e===`input`||e===`change`)return sr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function xr(e,t){if(br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!br(e[i],t[i]))return!1}return!0}function Sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=Sr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pt(e.document)}return t}function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Dr=sn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Pt(r)||(r=Or,`selectionStart`in r&&Er(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&xr(Ar,r)||(Ar=r,r=Nd(kr,`onSelect`),0<r.length&&(t=new yn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};sn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),bt(t,[e])}var Jr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<gu)throw gu=0,_u=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function li(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Xf(e,n,ie.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=oi(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Ie(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,Ni=!1,Pi=null,Fi=!1,Ii=Error(i(519));function Li(e){throw Ui(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ii}function Ri(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:Ed(`cancel`,t),Ed(`close`,t);break;case`iframe`:case`object`:case`embed`:Ed(`load`,t);break;case`video`:case`audio`:for(n=0;n<Cd.length;n++)Ed(Cd[n],t);break;case`source`:Ed(`error`,t);break;case`img`:case`image`:case`link`:Ed(`error`,t),Ed(`load`,t);break;case`details`:Ed(`toggle`,t);break;case`input`:Ed(`invalid`,t),Rt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Ed(`invalid`,t);break;case`textarea`:Ed(`invalid`,t),Ht(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||zd(t.textContent,n)?(r.popover!=null&&(Ed(`beforetoggle`,t),Ed(`toggle`,t)),r.onScroll!=null&&Ed(`scroll`,t),r.onScrollEnd!=null&&Ed(`scrollend`,t),r.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||Li(e,!0)}function zi(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:ji=ji.return}}function Bi(e){if(e!==ji)return!1;if(!Ni)return zi(e),Ni=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Zd(e.type,e.memoizedProps)),n=!n),n&&Mi&&Li(e),zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=vf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=vf(e)}else t===27?(t=Mi,of(e.type)?(e=_f,_f=null,Mi=e):Mi=t):Mi=ji?gf(e.stateNode.nextSibling):null;return!0}function Vi(){Mi=ji=null,Ni=!1}function Hi(){var e=Pi;return e!==null&&(nu===null?nu=e:nu.push.apply(nu,e),Pi=null),e}function Ui(e){Pi===null?Pi=[e]:Pi.push(e)}var Wi=re(null),Gi=null,Ki=null;function qi(e,t,n){z(Wi,t._currentValue),t._currentValue=n}function Ji(e){e._currentValue=Wi.current,R(Wi)}function Yi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Xi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Yi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Yi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Zi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ap]:e.push(ap))}a=a.return}e!==null&&Xi(t,e,n,r),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Gi=e,Ki=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ea(e){return na(Gi,e)}function ta(e,t){return Gi===null&&$i(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ki===null){if(e===null)throw Error(i(308));Ki=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ki=Ki.next=t;return n}var ra=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=_d(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ga=I.S;I.S=function(e,t){au=we(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=re(null);function va(){var e=_a.current;return e===null?Bl.pooledCache:e}function ya(e,t){t===null?z(_a,_a.current):z(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var xa=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e;default:if(typeof t.status==`string`)t.then(Zt,Zt);else{if(e=Bl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e}throw Oa=t,xa}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,xa):e}}var Oa=null;function ka(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Aa(e){if(e===xa||e===Ca)throw Error(i(483))}var ja=null,Ma=0;function Na(e){var t=Ma;return Ma+=1,ja===null&&(ja=[]),Ea(ja,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ia(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Da(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Pa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ui(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Da(t),f(e,t,n)}if(F(t)||M(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Na(t),n);if(t.$$typeof===C)return f(e,ta(e,t),n);Fa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Da(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Na(n),r);if(n.$$typeof===C)return p(e,t,ta(e,n),r);Fa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Da(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Na(r),i);if(r.$$typeof===C)return m(e,t,n,ta(t,r),i);Fa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ni&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ni&&Ei(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ni&&Ei(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ni&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ni&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ni&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Da(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,zl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Hl&p)===p:(r&p)===p){p!==0&&p===da&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:za=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Xl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=re(null),Qa=re(0);function $a(e,t){e=Jl,z(Qa,e),z(Za,t),Jl=e|t.baseLanes}function eo(){z(Qa,Jl),z(Za,Za.current)}function to(){Jl=Qa.current,R(Za),R(Qa)}var no=re(null),ro=null;function io(e){var t=e.alternate;z(lo,lo.current&1),z(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){z(lo,lo.current),z(no,e),ro===null&&(ro=e)}function oo(e){e.tag===22?(z(lo,lo.current),z(no,e),ro===null&&(ro=e)):so(e)}function so(){z(lo,lo.current),z(no,no.current)}function co(e){R(no),ro===e&&(ro=null),R(lo)}var lo=re(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||pf(n)||mf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fo=0,V=null,po=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return fo=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Vs:H,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){I.H=Bs;var t=po!==null&&po.next!==null;if(fo=0,mo=po=V=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Qi(e)&&(rc=!0))}function Eo(e,t,n,r){V=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Hs,o=t(n,r)}while(go);return o}function Do(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(po===null?null:po.memoizedState)!==e&&(V.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}fo=0,mo=po=V=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?V.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(po===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=po.next;var t=mo===null?V.memoizedState:mo.next;if(t!==null)mo=t,po=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));po=e,e={memoizedState:po.memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},mo===null?V.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ea(bo,e,t),t=V,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Vs:H),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===C)return ea(e)}throw Error(i(438,String(e)))}function Io(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=No(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),po,e)}function zo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(fo&f)===f:(Hl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===da&&(d=!0);else if((fo&p)===p){u=u.next,p===da&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,V.lanes|=p,Xl|=p;f=u.action,_o&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,V.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(rc=!0,d&&(n=fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Bo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);br(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=V,a=Mo(),o=Ni;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!br((po||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,fs(Wo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,a,n,t),null),Bl===null)throw Error(i(349));o||fo&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=No(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Ko(e){var t=ti(e,2);t!==null&&bu(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,po,typeof r==`function`?r:Lo)}function Yo(e,t,n,r,a){if(Ls(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(Ni){var n=Bl.formState;if(n!==null){a:{var r=V;if(Ni){if(Mi){b:{for(var i=Mi,a=Fi;i.nodeType!==8;){if(!a){i=null;break b}if(i=gf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=gf(i.nextSibling),r=i.data===`F!`;break a}}Li(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ps.bind(null,V,r),r.dispatch=n,r=qo(!1),a=Is.bind(null,V,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),po,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===xa?Ca:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=po;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=No(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function cs(){return Mo().memoizedState}function ls(e,t,n,r){var i=jo();V.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;po!==null&&r!==null&&Co(r,po.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(V.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=No(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(zl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||fo&1073741824&&!(Hl&261930)?e.memoizedState=t:(e.memoizedState=n,e=yu(),V.lanes|=e,Xl|=e,n)}function Cs(e,t,n,r){return br(n,t)?n:Za.current===null?!(fo&42)||fo&1073741824&&!(Hl&261930)?(rc=!0,e.memoizedState=n):(e=yu(),V.lanes|=e,Xl|=e,t):(e=Ss(e,n,r),br(e,t)||(rc=!0),e)}function ws(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,Is(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,ha(c,r),vu(e)):Fs(e,t,r,vu(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},vu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ds(e).queue;ws(e,a,t,ee,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Os(e){var t=Ds(e);t.next===null&&(t=e.alternate.memoizedState),Fs(e,t.next.queue,{},vu())}function ks(){return ea(ap)}function As(){return Mo().memoizedState}function js(){return Mo().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(bu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=vu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=ei(e,t,n,r),n!==null&&(bu(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,vu())}function Fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return $r(e,t,i,0),Bl===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return bu(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:_d(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&bu(t,e,2)}function Ls(e){var t=e.alternate;return e===V||t!==null&&t===V}function Rs(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Bs={readContext:ea,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Bs.useEffectEvent=So;var Vs={readContext:ea,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){Fe(!0);try{n(t)}finally{Fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ns.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ps.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=ws.bind(null,V,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=jo();if(Ni){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Bl===null)throw Error(i(349));Hl&127||Ho(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=Bl.identifierPrefix;if(Ni){var n=Ti,r=wi;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Is.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ms.bind(null,V)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(zl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},H={readContext:ea,use:Fo,useCallback:bs,useContext:ea,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Mo(),po.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),po,e,t)},useMemoCache:Io,useCacheRefresh:js};H.useEffectEvent=ms;var Hs={readContext:ea,use:Fo,useCallback:bs,useContext:ea,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return po===null?Ss(n,e,t):Cs(n,po.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return po===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,po,e,t)},useMemoCache:Io,useCacheRefresh:js};Hs.useEffectEvent=ms;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(bu(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(bu(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vu(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(bu(t,e,n),Wa(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!xr(n,r)||!xr(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ws.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){Jr(e)}function U(e){console.error(e)}function Ys(e){Jr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ha(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(cu===null?cu=new Set([this]):cu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Zi(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?Mu():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Zu(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Zu(e,r,a)),!1}throw Error(i(435,n.tag))}return Zu(e,r,a),Mu(),!1}if(Ni)return t=no.current,t===null?(r!==Ii&&(t=Error(i(423),{cause:r}),Ui(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=Qs(e.stateNode,r,a),Ga(e,a),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ii&&(e=Error(i(422),{cause:r}),Ui(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),tu===null?tu=[o]:tu.push(o),Yl!==4&&(Yl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ga(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(cu===null||!cu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return $i(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!rc?(ko(e,t,i),G(e,t,i)):(Ni&&s&&Oi(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?xr:n,n(o,r)&&e.ref===t.ref)return G(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(xr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,G(e,t,i)}return mc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),oo(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),eo(),so(t)):(ya(t,a.cachePool),$a(t,a),so(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),eo(),oo(t),e!==null&&Zi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=Cc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return La(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,co(t),t.memoizedState=null,e}function W(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ni){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ao(t),(e=Mi)?(e=ff(e,Fi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Zi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Bl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),bu(r,e,s),nc;Mu(),t=fc(e,t,n)}else e=o.treeContext,Mi=gf(s.nextSibling),ji=t,Ni=!0,Pi=null,Fi=!1,e!==null&&Ai(t,e),t=dc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mc(e,t,n,r,i){return $i(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!rc?(ko(e,t,i),G(e,t,i)):(Ni&&r&&Oi(t),t.flags|=1,ic(e,t,n,i),t.child)}function hc(e,t,n,r,i,a){return $i(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!rc?(ko(e,t,a),G(e,t,a)):(Ni&&r&&Oi(t),t.flags|=1,ic(e,t,n,a),t.child)}function gc(e,t,n,r,i){if($i(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?ea(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ws.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=za||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Va(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=za||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Qi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,pc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=La(t,e.child,null,i),t.child=La(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=G(e,t,i),e}function _c(e,t,n,r){return Vi(),t.flags|=256,ic(e,t,n,r),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:ba()}}function bc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=$l),e}function xc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(lo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ni){if(a?io(t):so(t),(e=Mi)?(e=ff(e,Fi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Li(t);return mf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(so(t),a=t.mode,c=Cc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,lc(null,r)):(io(t),Sc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=wc(e,t,n)):t.memoizedState===null?(so(t),c=r.fallback,a=t.mode,r=Cc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,t=lc(null,r)):(so(t),t.child=e.child,t.flags|=128,t=null);else if(io(t),mf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ui({value:r,source:null,stack:null}),t=wc(e,t,n)}else if(rc||Zi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Bl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),bu(s,e,r),nc;pf(c)||Mu(),t=wc(e,t,n)}else pf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=gf(c.nextSibling),ji=t,Ni=!0,Pi=null,Fi=!1,e!==null&&Ai(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return a?(so(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=yc(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=bc(e,s,n),t.memoizedState=vc,lc(e.child,r)):(io(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Sc(e,t){return t=Cc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Cc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function wc(e,t,n){return La(t,e.child,null,n),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yi(e.return,t,n)}function Ec(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=lo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,z(lo,o),ic(e,t,r,n),r=Ni?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tc(e,n,t);else if(e.tag===19)Tc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,a,r);break;case`together`:Ec(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function G(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Zi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Qi(e))):!0}function kc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),qi(t,oa,e.memoizedState.cache),Vi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=G(e,t,n),e===null?null:e.sibling):xc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),z(lo,lo.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:qi(t,oa,e.memoizedState.cache)}return G(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return rc=!1,kc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,Ni&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=qs(e,r),t.tag=1,t=gc(null,t,e,r,n)):(t.tag=0,t=mc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=qs(r,t.pendingProps),gc(e,t,r,a,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,qi(t,oa,r),r!==o.cache&&Xi(t,[oa],n,!0),qa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=_c(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Ui(a),t=_c(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=gf(e.firstChild),ji=t,Ni=!0,Pi=null,Fi=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Vi(),r===a){t=G(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return pc(e,t),e===null?(n=If(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ni||(n=t.type,e=t.pendingProps,r=Jd(oe.current).createElement(n),r[it]=t,r[at]=e,Hd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=If(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&Ni&&(r=t.stateNode=bf(t.type,t.pendingProps,oe.current),ji=t,Fi=!0,a=Mi,of(t.type)?(_f=a,Mi=gf(r.firstChild)):Mi=a),ic(e,t,t.pendingProps.children,n),pc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ni&&((a=r=Mi)&&(r=uf(r,t.type,t.pendingProps,Fi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=gf(r.firstChild),Fi=!1,a=!0)),a||Li(t)),ue(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Zd(a,o)?r=null:s!==null&&Zd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),ap._currentValue=a),pc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&Ni&&((e=n=Mi)&&(n=df(n,t.pendingProps,Fi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Li(t)),null;case 13:return xc(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,qi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,$i(t),a=ea(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Dc(e,t,n);case 31:return W(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return $i(t),r=ea(oa),e===null?(a=va(),a===null&&(a=Bl,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),qi(t,oa,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,qi(t,oa,r),r!==a.cache&&Xi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),qi(t,oa,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(ku())e.flags|=8192;else throw Oa=wa,Sa}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zf(t))if(ku())e.flags|=8192;else throw Oa=wa,Sa}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,eu|=t)}function Fc(e,t){if(!Ni)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ic(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ji(oa),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hi())),Ic(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,a,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,a,e,r,n)),null;case 27:if(de(t),n=oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}e=ie.current,Bi(t)?Ri(t,e):(e=bf(a,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}if(o=ie.current,Bi(t))Ri(t,o);else{var s=Jd(oe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[it]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Hd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=oe.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||zd(e.nodeValue,n)),e||Li(t,!0)}else e=Jd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[it]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[it]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return le(),e===null&&kd(t.stateNode.containerInfo),Ic(t),null;case 10:return Ji(t.type),Ic(t),null;case 19:if(R(lo),r=t.memoizedState,r===null)return Ic(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Fc(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return z(lo,lo.current&1|2),Ni&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>ou&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ni)return Ic(t),null}else 2*we()-r.renderingStartTime>ou&&n!==536870912&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=lo.current,z(lo,a?n&1|2:n&1),Ni&&Ei(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&R(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),Ic(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(lo),null;case 4:return le(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&R(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function zc(e,t){switch(ki(t),t.tag){case 3:Ji(oa),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:R(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&R(_a);break;case 24:Ji(oa)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Xu(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Xu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Xu(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Xu(e,e.return,t)}}}function Uc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Xu(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Xu(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Xu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Xu(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Xu(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Ud(r,e.type,n,t),r[at]=t}catch(t){Xu(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&of(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&of(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(r!==4&&(r===27&&of(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&of(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Hd(t,r,n),t[it]=e,t[at]=n}catch(t){Xu(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Kd=mp,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(qd={focusedElem:e,selectionRange:n},mp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Xu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)lf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:lf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Xu(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Xu(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Xa(e,t)}catch(e){Xu(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ed.bind(null,n),hf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;of(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),xf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Xu(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Xu(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,sf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Bp(e)):sf(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bp(e)}catch(e){Xu(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bp(e)}catch(e){Xu(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=td.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(of(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(i(160));ul(o,s,a),sl=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Hd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=Jf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Hd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Jf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Hd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[it]=e,_t(o),r=o}e.stateNode=r}else Yf(a,e.type,e.stateNode);else e.stateNode=Uf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Yf(a,e.type,e.stateNode):Uf(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){a=e.stateNode;try{Ut(a,``)}catch(t){Xu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Xu(e,e.return,t)}}break;case 3:if(qf=null,a=gl,gl=Cf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bp(t.containerInfo)}catch(t){Xu(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=Cf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(iu=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||a,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||$c||el||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Xu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Xu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?cf(m,!0):cf(l.stateNode,!1)}catch(e){Xu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Zc(e,Yc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ut(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(i(161))}}catch(t){Xu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:xf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Xu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ya(c[i],s)}catch(e){Xu(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ca(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Xu(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Qf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=Cf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=ea(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ea(oa).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,zl=0,Bl=null,Vl=null,Hl=0,Ul=0,Wl=null,Gl=!1,Kl=!1,ql=!1,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=null,nu=null,ru=!1,iu=0,au=0,ou=1/0,su=null,cu=null,lu=0,uu=null,du=null,fu=0,pu=0,mu=null,hu=null,gu=0,_u=null;function vu(){return zl&2&&Hl!==0?Hl&-Hl:I.T===null?tt():_d()}function yu(){if($l===0)if(!(Hl&536870912)||Ni){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),$l=e}else $l=536870912;return e=no.current,e!==null&&(e.flags|=32),$l}function bu(e,t,n){(e===Bl&&(Ul===2||Ul===9)||e.cancelPendingCommit!==null)&&(Du(e,0),wu(e,Hl,$l,!1)),Je(e,n),(!(zl&2)||e!==Bl)&&(e===Bl&&(!(zl&2)&&(Zl|=n),Yl===4&&wu(e,Hl,$l,!1)),ld(e))}function xu(e,t,n){if(zl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||We(e,t),a=r?Fu(e,t):Nu(e,t,!0),o=r;do{if(a===0){Kl&&!r&&wu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Cu(n)){a=Nu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=tu;var l=c.current.memoizedState.isDehydrated;if(l&&(Du(c,s).flags|=256),s=Nu(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=o,Zl|=o,a=4;break a}o=nu,nu=a,o!==null&&(nu===null?nu=o:nu.push.apply(nu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Du(e,0),wu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:wu(r,t,$l,!Gl);break a;case 2:nu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=iu+300-we(),10<a)){if(wu(r,t,$l,!Gl),Ue(r,0,!0)!==0)break a;fu=t,r.timeoutHandle=ef(Su.bind(null,r,n,nu,su,ru,t,$l,Zl,eu,Gl,o,`Throttled`,-0,0),a);break a}Su(r,n,nu,su,ru,t,$l,Zl,eu,Gl,o,null,-0,0)}}break}while(1);ld(e)}function Su(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},jl(t,a,d);var m=(a&62914560)===a?iu-we():(a&4194048)===a?au-we():0;if(m=ep(d,m),m!==null){fu=a,e.cancelPendingCommit=m(Hu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),wu(e,a,o,!l);return}}Hu(e,t,a,n,r,i,o,s,c)}function Cu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!br(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wu(e,t,n,r){t&=~Ql,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function Tu(){return zl&6?!0:(ud(0,!1),!1)}function Eu(){if(Vl!==null){if(Ul===0)var e=Vl.return;else e=Vl,Ki=Gi=null,Ao(e),ja=null,Ma=0,e=Vl;for(;e!==null;)zc(e.alternate,e),e=e.return;Vl=null}}function Du(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,tf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),fu=0,Eu(),Bl=e,Vl=n=ci(e.current,null),Hl=t,Ul=0,Wl=null,Gl=!1,Kl=We(e,t),ql=!1,eu=$l=Ql=Zl=Xl=Yl=0,nu=tu=null,ru=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,Qr(),n}function Ou(e,t){V=null,I.H=Bs,t===xa||t===Ca?(t=ka(),Ul=3):t===Sa?(t=ka(),Ul=4):Ul=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,Vl===null&&(Yl=1,Xs(e,gi(t,e.current)))}function ku(){var e=no.current;return e===null?!0:(Hl&4194048)===Hl?ro===null:(Hl&62914560)===Hl||Hl&536870912?e===ro:!1}function Au(){var e=I.H;return I.H=Bs,e===null?Bs:e}function ju(){var e=I.A;return I.A=Ll,e}function Mu(){Yl=4,Gl||(Hl&4194048)!==Hl&&no.current!==null||(Kl=!0),!(Xl&134217727)&&!(Zl&134217727)||Bl===null||wu(Bl,Hl,$l,!1)}function Nu(e,t,n){var r=zl;zl|=2;var i=Au(),a=ju();(Bl!==e||Hl!==t)&&(su=null,Du(e,t)),t=!1;var o=Yl;a:do try{if(Ul!==0&&Vl!==null){var s=Vl,c=Wl;switch(Ul){case 8:Eu(),o=6;break a;case 3:case 2:case 9:case 6:no.current===null&&(t=!0);var l=Ul;if(Ul=0,Wl=null,zu(e,s,c,l),n&&Kl){o=0;break a}break;default:l=Ul,Ul=0,Wl=null,zu(e,s,c,l)}}Pu(),o=Yl;break}catch(t){Ou(e,t)}while(1);return t&&e.shellSuspendCounter++,Ki=Gi=null,zl=r,I.H=i,I.A=a,Vl===null&&(Bl=null,Hl=0,Qr()),o}function Pu(){for(;Vl!==null;)Lu(Vl)}function Fu(e,t){var n=zl;zl|=2;var r=Au(),a=ju();Bl!==e||Hl!==t?(su=null,ou=we()+500,Du(e,t)):Kl=We(e,t);a:do try{if(Ul!==0&&Vl!==null){t=Vl;var o=Wl;b:switch(Ul){case 1:Ul=0,Wl=null,zu(e,t,o,1);break;case 2:case 9:if(Ta(o)){Ul=0,Wl=null,Ru(t);break}t=function(){Ul!==2&&Ul!==9||Bl!==e||(Ul=7),ld(e)},o.then(t,t);break a;case 3:Ul=7;break a;case 4:Ul=5;break a;case 7:Ta(o)?(Ul=0,Wl=null,Ru(t)):(Ul=0,Wl=null,zu(e,t,o,7));break;case 5:var s=null;switch(Vl.tag){case 26:s=Vl.memoizedState;case 5:case 27:var c=Vl;if(s?Zf(s):c.stateNode.complete){Ul=0,Wl=null;var l=c.sibling;if(l!==null)Vl=l;else{var u=c.return;u===null?Vl=null:(Vl=u,Bu(u))}break b}}Ul=0,Wl=null,zu(e,t,o,5);break;case 6:Ul=0,Wl=null,zu(e,t,o,6);break;case 8:Eu(),Yl=6;break a;default:throw Error(i(462))}}Iu();break}catch(t){Ou(e,t)}while(1);return Ki=Gi=null,I.H=r,I.A=a,zl=n,Vl===null?(Bl=null,Hl=0,Qr(),Yl):0}function Iu(){for(;Vl!==null&&!Se();)Lu(Vl)}function Lu(e){var t=Ac(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?Bu(e):Vl=t}function Ru(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hc(n,t,t.pendingProps,t.type,void 0,Hl);break;case 11:t=hc(n,t,t.pendingProps,t.type.render,t.ref,Hl);break;case 5:Ao(t);default:zc(n,t),t=Vl=li(t,Jl),t=Ac(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?Bu(e):Vl=t}function zu(e,t,n,r){Ki=Gi=null,Ao(t),ja=null,Ma=0;var i=t.return;try{if(tc(e,i,t,n,Hl)){Yl=1,Xs(e,gi(n,e.current)),Vl=null;return}}catch(t){if(i!==null)throw Vl=i,t;Yl=1,Xs(e,gi(n,e.current)),Vl=null;return}t.flags&32768?(Ni||r===1?e=!0:Kl||Hl&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.current,r!==null&&r.tag===13&&(r.flags|=16384))),Vu(t,e)):Bu(t)}function Bu(e){var t=e;do{if(t.flags&32768){Vu(t,Gl);return}e=t.return;var n=Lc(t.alternate,t,Jl);if(n!==null){Vl=n;return}if(t=t.sibling,t!==null){Vl=t;return}Vl=t=e}while(t!==null);Yl===0&&(Yl=5)}function Vu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,Vl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Vl=e;return}Vl=e=n}while(e!==null);Yl=6,Vl=null}function Hu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do qu();while(lu!==0);if(zl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,Ye(e,n,o,s,c,l),e===Bl&&(Vl=Bl=null,Hl=0),du=t,uu=e,fu=n,pu=o,mu=a,hu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,nd(Oe,function(){return Ju(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=zl,zl|=4;try{il(e,t,n)}finally{zl=s,L.p=a,I.T=r}}lu=1,Uu(),Wu(),Gu()}}function Uu(){if(lu===1){lu=0;var e=uu,t=du,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=zl;zl|=4;try{_l(t,e);var a=qd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Cr(s,h),v=Cr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}mp=!!Kd,qd=Kd=null}finally{zl=i,L.p=r,I.T=n}}e.current=t,lu=2}}function Wu(){if(lu===2){lu=0;var e=uu,t=du,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=zl;zl|=4;try{al(e,t.alternate,t)}finally{zl=i,L.p=r,I.T=n}}lu=3}}function Gu(){if(lu===4||lu===3){lu=0,Ce();var e=uu,t=du,n=fu,r=hu;t.subtreeFlags&10256||t.flags&10256?lu=5:(lu=0,du=uu=null,Ku(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(cu=null),et(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}fu&3&&qu(),ld(e),i=e.pendingLanes,n&261930&&i&42?e===_u?gu++:(gu=0,_u=e):gu=0,ud(0,!1)}}function Ku(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function qu(){return Uu(),Wu(),Gu(),Ju()}function Ju(){if(lu!==5)return!1;var e=uu,t=pu;pu=0;var n=et(fu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=mu,mu=null;var o=uu,s=fu;if(lu=0,du=uu=null,fu=0,zl&6)throw Error(i(331));var c=zl;if(zl|=4,Pl(o.current),El(o,o.current,s,n),zl=c,ud(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{L.p=a,I.T=r,Ku(e,t)}}function Yu(e,t,n){t=gi(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Je(e,2),ld(e))}function Xu(e,t,n){if(e.tag===3)Yu(e,e,n);else for(;t!==null;){if(t.tag===3){Yu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(cu===null||!cu.has(r))){e=gi(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),Je(r,2),ld(r));break}}t=t.return}}function Zu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ql=!0,i.add(n),e=Qu.bind(null,e,t,n),t.then(e,e))}function Qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Bl===e&&(Hl&n)===n&&(Yl===4||Yl===3&&(Hl&62914560)===Hl&&300>we()-iu?!(zl&2)&&Du(e,0):Ql|=n,eu===Hl&&(eu=0)),ld(e)}function $u(e,t){t===0&&(t=Ke()),e=ti(e,t),e!==null&&(Je(e,t),ld(e))}function ed(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$u(e,n)}function td(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),$u(e,n)}function nd(e,t){return be(e,t)}var rd=null,id=null,ad=!1,od=!1,sd=!1,cd=0;function ld(e){e!==id&&e.next===null&&(id===null?rd=id=e:id=id.next=e),od=!0,ad||(ad=!0,gd())}function ud(e,t){if(!sd&&od){sd=!0;do for(var n=!1,r=rd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,hd(r,a))}else a=Hl,a=Ue(r,r===Bl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,hd(r,a));r=r.next}while(n);sd=!1}}function dd(){fd()}function fd(){od=ad=!1;var e=0;cd!==0&&$d()&&(e=cd);for(var t=we(),n=null,r=rd;r!==null;){var i=r.next,a=pd(r,t);a===0?(r.next=null,n===null?rd=i:n.next=i,i===null&&(id=n)):(n=r,(e!==0||a&3)&&(od=!0)),r=i}lu!==0&&lu!==5||ud(e,!1),cd!==0&&(cd=0)}function pd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Bl,n=Hl,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ul===2||Ul===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),et(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=md.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function md(e,t){if(lu!==0&&lu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qu()&&e.callbackNode!==n)return null;var r=Hl;return r=Ue(e,e===Bl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(xu(e,r,t),pd(e,we()),e.callbackNode!=null&&e.callbackNode===n?md.bind(null,e):null)}function hd(e,t){if(qu())return null;xu(e,t,!0)}function gd(){rf(function(){zl&6?be(Ee,dd):fd()})}function _d(){if(cd===0){var e=da;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),cd=e}return cd}function vd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Xt(``+e)}function yd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function bd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=vd((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?vd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new yn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(cd!==0){var e=o?yd(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?yd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var xd=0;xd<Kr.length;xd++){var Sd=Kr[xd];qr(Sd.toLowerCase(),`on`+(Sd[0].toUpperCase()+Sd.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Cd=`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(` `),wd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Cd));function Td(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}}}}function Ed(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Ad(t,e,2,!1),n.add(r))}function Dd(e,t,n){var r=0;t&&(r|=4),Ad(n,e,r,t)}var Od=`_reactListening`+Math.random().toString(36).slice(2);function kd(e){if(!e[Od]){e[Od]=!0,vt.forEach(function(t){t!==`selectionchange`&&(wd.has(t)||Dd(t,!1,e),Dd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Od]||(t[Od]=!0,Dd(`selectionchange`,!1,t))}}function Ad(e,t,n,r){switch(xp(t)){case 2:var i=hp;break;case 8:i=gp;break;default:i=_p}n=i.bind(null,t,n,e),i=void 0,!cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function jd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}an(function(){var r=a,i=$t(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=yn,u=e;switch(e){case`keypress`:if(mn(n)===0)break a;case`keydown`:case`keyup`:l=Ln;break;case`focusin`:u=`focus`,l=On;break;case`focusout`:u=`blur`,l=On;break;case`beforeblur`:case`afterblur`:l=On;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=zn;break;case Rr:case zr:case Br:l=kn;break;case Wr:l=Bn;break;case`scroll`:case`scrollend`:l=xn;break;case`wheel`:l=Vn;break;case`copy`:case`cut`:case`paste`:l=An;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Rn;break;case`toggle`:case`beforetoggle`:l=Hn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=on(m,p),g!=null&&d.push(Md(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Qt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Rn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Pd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Fd(s,c,l,d,!1),u!==null&&f!==null&&Fd(s,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=cr;else if(nr(c))if(lr)v=vr;else{v=gr;var y=hr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&qt(r.elementType)&&(v=cr):v=_r;if(v&&=v(e,r)){rr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&zt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(nr(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(s,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(s,n,i)}var b;if(Wn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Qn?Xn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(qn&&n.locale!==`ko`&&(Qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Qn&&(b=pn()):(un=i,dn=`value`in un?un.value:un.textContent,Qn=!0)),y=Nd(r,x),0<y.length&&(x=new jn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Zn(n),b!==null&&(x.data=b)))),(b=Kn?$n(e,n):er(e,n))&&(x=Nd(r,`onBeforeInput`),0<x.length&&(y=new jn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),bd(s,e,r,n,i)}Td(s,t)})}function Md(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Nd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=on(e,n),i!=null&&r.unshift(Md(e,i,a)),i=on(e,t),i!=null&&r.push(Md(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Pd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=on(n,a),l!=null&&o.unshift(Md(n,l,c))):i||(l=on(n,a),l!=null&&o.push(Md(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Id=/\r\n?/g,Ld=/\u0000|\uFFFD/g;function Rd(e){return(typeof e==`string`?e:``+e).replace(Id,`
10
10
  `).replace(Ld,``)}function zd(e,t){return t=Rd(t),Rd(e)===t}function Bd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ut(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Kt(e,r,o);break;case`data`:if(t!==`object`){Dt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Bd(e,t,`name`,a.name,a,null),Bd(e,t,`formEncType`,a.formEncType,a,null),Bd(e,t,`formMethod`,a.formMethod,a,null),Bd(e,t,`formTarget`,a.formTarget,a,null)):(Bd(e,t,`encType`,a.encType,a,null),Bd(e,t,`method`,a.method,a,null),Bd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Xt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ed(`beforetoggle`,e),Ed(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Jt.get(n)||n,Et(e,n,r))}}function Vd(e,t,n,r,a,o){switch(n){case`style`:Kt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ut(e,``+r);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[at]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Et(e,n,r)}}}function Hd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Ed(`error`,e),Ed(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Bd(e,t,o,s,n,null)}}a&&Bd(e,t,`srcSet`,n.srcSet,n,null),r&&Bd(e,t,`src`,n.src,n,null);return;case`input`:Ed(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Bd(e,t,r,d,n,null)}}Rt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Ed(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Bd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Bt(e,!!r,n,!0):Bt(e,!!r,t,!1);return;case`textarea`:for(s in Ed(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Bd(e,t,s,c,n,null)}Ht(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Bd(e,t,l,r,n,null)}return;case`dialog`:Ed(`beforetoggle`,e),Ed(`toggle`,e),Ed(`cancel`,e),Ed(`close`,e);break;case`iframe`:case`object`:Ed(`load`,e);break;case`video`:case`audio`:for(r=0;r<Cd.length;r++)Ed(Cd[r],e);break;case`image`:Ed(`error`,e),Ed(`load`,e);break;case`details`:Ed(`toggle`,e);break;case`embed`:case`source`:case`link`:Ed(`error`,e),Ed(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Bd(e,t,u,r,n,null)}return;default:if(qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Vd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Bd(e,t,c,r,n,null))}function Ud(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Bd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Bd(e,t,p,m,r,f)}}Lt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Bd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Bd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Bt(e,!!n,n?[]:``,!1):Bt(e,!!n,t,!0)):Bt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Bd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Bd(e,t,s,a,r,o)}Vt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Bd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Bd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Bd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Bd(e,t,u,p,r,m)}return;default:if(qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Vd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Vd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Bd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Bd(e,t,f,p,r,m)}function Wd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Gd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Wd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Wd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Kd=null,qd=null;function Jd(e){return e.nodeType===9?e:e.ownerDocument}function Yd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Xd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Zd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qd=null;function $d(){var e=window.event;return e&&e.type===`popstate`?e===Qd?!1:(Qd=e,!0):(Qd=null,!1)}var ef=typeof setTimeout==`function`?setTimeout:void 0,tf=typeof clearTimeout==`function`?clearTimeout:void 0,nf=typeof Promise==`function`?Promise:void 0,rf=typeof queueMicrotask==`function`?queueMicrotask:nf===void 0?ef:function(e){return nf.resolve(null).then(e).catch(af)};function af(e){setTimeout(function(){throw e})}function of(e){return e===`head`}function sf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Bp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xf(e.ownerDocument.body);n=i}while(n);Bp(t)}function cf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function lf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:lf(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function uf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=gf(e.nextSibling),e===null)break}return null}function df(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=gf(e.nextSibling),e===null))return null;return e}function ff(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=gf(e.nextSibling),e===null))return null;return e}function pf(e){return e.data===`$?`||e.data===`$~`}function mf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function hf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function gf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var _f=null;function vf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return gf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function yf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function bf(e,t,n){switch(t=Jd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function xf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var K=new Map,Sf=new Set;function Cf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wf=L.d;L.d={f:Tf,r:Ef,D:kf,C:Af,L:jf,m:Mf,X:Pf,S:Nf,M:Ff};function Tf(){var e=wf.f(),t=Tu();return e||t}function Ef(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):wf.r(e)}var Df=typeof document>`u`?null:document;function Of(e,t,n){var r=Df;if(r&&typeof t==`string`&&t){var i=It(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sf.has(i)||(Sf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Hd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function kf(e){wf.D(e),Of(`dns-prefetch`,e,null)}function Af(e,t){wf.C(e,t),Of(`preconnect`,e,t)}function jf(e,t,n){wf.L(e,t,n);var r=Df;if(r&&e&&t){var i=`link[rel="preload"][as="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(e)+`"]`;var a=i;switch(t){case`style`:a=Lf(e);break;case`script`:a=Vf(e)}K.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),K.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rf(a))||t===`script`&&r.querySelector(Hf(a))||(t=r.createElement(`link`),Hd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Mf(e,t){wf.m(e,t);var n=Df;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+It(r)+`"][href="`+It(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vf(e)}if(!K.has(a)&&(e=f({rel:`modulepreload`,href:e},t),K.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hf(a)))return}r=n.createElement(`link`),Hd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Nf(e,t,n){wf.S(e,t,n);var r=Df;if(r&&e){var i=gt(r).hoistableStyles,a=Lf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=K.get(a))&&Gf(e,n);var c=o=r.createElement(`link`);_t(c),Hd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pf(e,t){wf.X(e,t);var n=Df;if(n&&e){var r=gt(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0},t),(t=K.get(i))&&Kf(e,t),a=n.createElement(`script`),_t(a),Hd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t){wf.M(e,t);var n=Df;if(n&&e){var r=gt(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=K.get(i))&&Kf(e,t),a=n.createElement(`script`),_t(a),Hd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t,n,r){var a=(a=oe.current)?Cf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Lf(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lf(n.href);var o=gt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),K.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},K.set(e,n),o||Bf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Vf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lf(e){return`href="`+It(e)+`"`}function Rf(e){return`link[rel="stylesheet"][`+e+`]`}function zf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Bf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Hd(t,`link`,n),_t(t),e.head.appendChild(t))}function Vf(e){return`[src="`+It(e)+`"]`}function Hf(e){return`script[async]`+e}function Uf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Hd(r,`style`,a),Wf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lf(n.href);var o=e.querySelector(Rf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=zf(n),(a=K.get(a))&&Gf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Hd(o,`link`,r),t.state.loading|=4,Wf(o,n.precedence,e),t.instance=o;case`script`:return o=Vf(n.src),(a=e.querySelector(Hf(o)))?(t.instance=a,_t(a),a):(r=n,(a=K.get(o))&&(r=f({},n),Kf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),Hd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wf(r,n.precedence,e));return t.instance}function Wf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Kf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qf=null;function Jf(e,t,n){if(qf===null){var r=new Map,i=qf=new Map;i.set(n,r)}else i=qf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[dt]||a[it]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Yf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lf(r.href),a=t.querySelector(Rf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=tp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=zf(r),(i=K.get(i))&&Gf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Hd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=tp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $f=0;function ep(e,t){return e.stylesheets&&e.count===0&&rp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$f===0&&($f=62500*Gd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&rp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$f?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function tp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var np=null;function rp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,np=new Map,t.forEach(ip,e),np=null,tp.call(e))}function ip(e,t){if(!(t.state.loading&4)){var n=np.get(e);if(n)var r=n.get(null);else{n=new Map,np.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=tp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ap={$$typeof:C,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function op(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function sp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new op(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function cp(e){return e?(e=ii,e):ii}function lp(e,t,n,r,i,a){i=cp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(bu(n,e,t),Wa(n,e,t))}function up(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dp(e,t){up(e,t),(e=e.alternate)&&up(e,t)}function fp(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&bu(t,e,67108864),dp(e,67108864)}}function pp(e){if(e.tag===13||e.tag===31){var t=vu();t=$e(t);var n=ti(e,t);n!==null&&bu(n,e,t),dp(e,t)}}var mp=!0;function hp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,_p(e,t,n,r)}finally{L.p=a,I.T=i}}function gp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,_p(e,t,n,r)}finally{L.p=a,I.T=i}}function _p(e,t,n,r){if(mp){var i=vp(r);if(i===null)jd(e,t,r,yp,n),Ap(e,r);else if(Mp(i,e,t,n,r))r.stopPropagation();else if(Ap(e,r),t&4&&-1<kp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}ld(a),!(zl&6)&&(ou=we()+500,ud(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&bu(s,a,2),Tu(),dp(a,2)}if(a=vp(r),a===null&&jd(e,t,r,yp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else jd(e,t,r,null,n)}}function vp(e){return e=$t(e),bp(e)}var yp=null;function bp(e){if(yp=null,e=pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yp=e,null}function xp(e){switch(e){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(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var Sp=!1,Cp=null,wp=null,Tp=null,Ep=new Map,Dp=new Map,Op=[],kp=`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 Ap(e,t){switch(e){case`focusin`:case`focusout`:Cp=null;break;case`dragenter`:case`dragleave`:wp=null;break;case`mouseover`:case`mouseout`:Tp=null;break;case`pointerover`:case`pointerout`:Ep.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Dp.delete(t.pointerId)}}function jp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=mt(t),t!==null&&fp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Mp(e,t,n,r,i){switch(t){case`focusin`:return Cp=jp(Cp,e,t,n,r,i),!0;case`dragenter`:return wp=jp(wp,e,t,n,r,i),!0;case`mouseover`:return Tp=jp(Tp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ep.set(a,jp(Ep.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Dp.set(a,jp(Dp.get(a)||null,e,t,n,r,i)),!0}return!1}function Np(e){var t=pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,nt(e.priority,function(){pp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){pp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qt=r,n.target.dispatchEvent(r),Qt=null}else return t=mt(n),t!==null&&fp(t),e.blockedOn=n,!1;t.shift()}return!0}function Fp(e,t,n){Pp(e)&&n.delete(t)}function Ip(){Sp=!1,Cp!==null&&Pp(Cp)&&(Cp=null),wp!==null&&Pp(wp)&&(wp=null),Tp!==null&&Pp(Tp)&&(Tp=null),Ep.forEach(Fp),Dp.forEach(Fp)}function Lp(e,n){e.blockedOn===n&&(e.blockedOn=null,Sp||(Sp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ip)))}var Rp=null;function zp(e){Rp!==e&&(Rp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rp===e&&(Rp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(bp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Bp(e){function t(t){return Lp(t,e)}Cp!==null&&Lp(Cp,e),wp!==null&&Lp(wp,e),Tp!==null&&Lp(Tp,e),Ep.forEach(t),Dp.forEach(t);for(var n=0;n<Op.length;n++){var r=Op[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Op.length&&(n=Op[0],n.blockedOn===null);)Np(n),n.blockedOn===null&&Op.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[at]||null;if(typeof a==`function`)o||zp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(bp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),zp(n)}}}function Vp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Hp(e){this._internalRoot=e}Up.prototype.render=Hp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;lp(n,vu(),e,t,null,null)},Up.prototype.unmount=Hp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lp(e.current,2,null,e,null,null),Tu(),t[ot]=null}};function Up(e){this._internalRoot=e}Up.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Op.length&&t!==0&&t<Op[n].priority;n++);Op.splice(n,0,e),n===0&&Np(e)}};var Wp=n.version;if(Wp!==`19.2.6`)throw Error(i(527,Wp,`19.2.6`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Gp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Kp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kp.isDisabled&&Kp.supportsFiber)try{Ne=Kp.inject(Gp),Pe=Kp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=U,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=sp(e,1,!1,null,null,n,r,null,o,s,c,Vp),e[ot]=t.current,kd(e),new Hp(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=s((e=>{var t=p().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),x=s(((e,t)=>{t.exports=b()})),S={locales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],requiredLocales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],strictMode:`strict`,defaultLocale:`en`},C={mode:`prefix-no-default`,storage:{cookies:[{name:`INTLAYER_LOCALE`,attributes:{}}],headers:[{name:`x-intlayer-locale`}]},basePath:``},w={editorURL:`http://localhost:8000`,cmsURL:`https://app.intlayer.org`,backendURL:`https://back.intlayer.org`,port:8e3,enabled:!1,dictionaryPriorityStrategy:`local_first`,liveSync:!1,liveSyncPort:4e3,liveSyncURL:`http://localhost:4000`},T={internationalization:S,routing:C,editor:w,log:{mode:`default`,prefix:`\x1B[38;5;239m[intlayer] \x1B[0m`},system:{baseDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor`,moduleAugmentationDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/types`,unmergedDictionariesDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/unmerged_dictionary`,remoteDictionariesDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/remote_dictionary`,dictionariesDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/dictionary`,dynamicDictionariesDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/dynamic_dictionary`,fetchDictionariesDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/fetch_dictionary`,typesDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/types`,mainDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/main`,configDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/config`,cacheDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/cache`,tempDir:`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/.intlayer/tmp`},content:{fileExtensions:[`.content.ts`,`.content.js`,`.content.cjs`,`.content.mjs`,`.content.json`,`.content.json5`,`.content.jsonc`,`.content.tsx`,`.content.jsx`,`.content.md`,`.content.mdx`,`.content.yaml`,`.content.yml`],contentDir:[`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/client/src`,`/Users/aymericpineau/Documents/intlayer_/packages/@intlayer/design-system/dist/esm/components`],codeDir:[`/Users/aymericpineau/Documents/intlayer_/packages/intlayer-editor/client/src`,`/Users/aymericpineau/Documents/intlayer_/packages/@intlayer/design-system/dist/esm/components`],excludedPath:[`**/node_modules/**`,`**/dist/**`,`**/build/**`,`**/.intlayer/**`,`**/.next/**`,`**/.nuxt/**`,`**/.expo/**`,`**/.vercel/**`,`**/.turbo/**`,`**/.tanstack/**`],watch:!0},ai:{},dictionary:{fill:!0,contentAutoTransformation:!1,location:`local`,importMode:`static`},build:{mode:`auto`,optimize:!0,minify:!1,purge:!1,traversePattern:[`client/src/**/*.{ts,tsx,mjs}`,`/Users/aymericpineau/Documents/intlayer_/packages/@intlayer/design-system/dist/esm/components/**/*`],outputFormat:[`esm`,`cjs`],cache:!0,checkTypes:!1},compiler:{enabled:!0,dictionaryKeyPrefix:``,noMetadata:!1,saveComponents:!1}},E=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),D=s(((e,t)=>{t.exports=E()})),O=u(p(),1),k=D(),A=({children:e,value:t,additionalProps:n})=>{let r=(0,O.isValidElement)(e)?e:(0,k.jsx)(k.Fragment,{children:e});return new Proxy(r,{get(e,r,i){if(r===`value`)return t;if(r===Symbol.toPrimitive)return()=>t??``;if(r===`toString`)return()=>String(t??``);if(r===`valueOf`)return()=>t;if(n&&r in n)return n[r];if(t!=null&&typeof r==`string`&&r!==`constructor`&&!(r in e)){let e=Object(t);if(r in e){let n=e[r];return typeof n==`function`?n.bind(t):n}}return Reflect.get(e,r,i)}})},j=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},M=`translation`,N=`enumeration`,P=`plural`,F=`condition`,I=`insertion`,L=`file`,ee=`object`,te=`array`,ne=`nested`,re=`reactNode`,R=`markdown`,z=`html`,ie=`text`,ae=`number`,oe=`boolean`,se=`gender`,ce=`null`,le=`unknown`,ue=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,(e,t)=>ue(e,t));if(typeof e!=`object`||!e||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0||typeof e==`function`)return e;if(Array.isArray(e))return e.map((e,n)=>ue(e,{...t,children:e,keyPath:[...t.keyPath,{type:te,key:n}]}));let n={};for(let r in e){let i={...t,children:e[r],keyPath:[...t.keyPath,{type:ee,key:r}]};if(t.eager){n[r]=ue(e[r],i);continue}Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:function(){let t=ue(e[r],i);return Object.defineProperty(this,r,{value:t,enumerable:!0,configurable:!0}),t}})}return n},de=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),fe=50,pe=new Map,me=(e,t,n)=>{let r=t??S?.defaultLocale,i=`${r}|${n?JSON.stringify(n):``}`,a=pe.get(e);a||(a=new Map,pe.set(e,a));let o=a.get(i);return o||(a.size>fe&&a.clear(),o=new e(r,n),a.set(i,o)),o},he={Collator:function(e,t){return me(Intl.Collator,e,t)},DateTimeFormat:function(e,t){return me(Intl.DateTimeFormat,e,t)},DisplayNames:function(e,t){return me(Intl.DisplayNames,e,t)},ListFormat:function(e,t){return me(Intl.ListFormat,e,t)},NumberFormat:function(e,t){return me(Intl.NumberFormat,e,t)},PluralRules:function(e,t){return me(Intl.PluralRules,e,t)},RelativeTimeFormat:function(e,t){return me(Intl.RelativeTimeFormat,e,t)},Segmenter:function(e,t){return me(Intl.Segmenter,e,t)}},ge=e=>{if(typeof e!=`object`||!e||typeof e.then==`function`||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Array.isArray(e)},_e=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e))return e;if(ge(e)&&ge(t)){let n={...e};for(let r of Object.keys(t))r===`__proto__`||r===`constructor`||t[r]===void 0||(n[r]=e[r]===void 0?t[r]:_e(e[r],t[r]));return n}return e},ve=(e,t,n)=>{let r=t=>e[t],i=new Set,a=[],o=e=>{e&&!i.has(e)&&(i.add(e),a.push(e))};o(t),t.includes(`-`)&&o(t.split(`-`)[0]),o(n),n?.includes(`-`)&&o(n.split(`-`)[0]);let s=[];for(let e of a){let t=r(e);if(t!==void 0){if(typeof t==`string`){if(s.length===0)return t;continue}s.push(t)}}if(s.length!==0)return s.length===1||Array.isArray(s[0])?s[0]:s.reduce((e,t)=>_e(e,t))},ye={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},be=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?ye:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a=n.translation??{},o={};for(let e in a){let t={...r,children:a[e],keyPath:[...r.keyPath,{type:M,key:e}]};o[e]=i(a[e],t)}return ve(o,e,t)}},xe=ye,Se=e=>ye,Ce={}.INTLAYER_NODE_TYPE_CONDITION===`false`?ye:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r=e[F],i={};for(let e in r){let a=r[e];i[e]=n(a,{...t,children:a,keyPath:[...t.keyPath,{type:F,key:e}]})}return e=>{let t=j(i,typeof e==`boolean`?e:e.value);return typeof t==`function`&&typeof e==`object`?t(e):t}}},we={}.INTLAYER_NODE_TYPE_INSERTION===`false`?ye:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:I}],i=e[I],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,r)=>{let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=de(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},Te=ye,Ee=e=>ye,De=ye,Oe=(e,t=!0)=>[be(e??S.defaultLocale,t?S.defaultLocale:void 0),xe,Ce,we,Ee(e??S.defaultLocale),De,Te],ke=(e,t,n=[])=>ue(e,{...t,plugins:n}),Ae=(e,t,n=Oe(t))=>{let r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return ke(e.content,r,n)},je=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,Me=/\{\{\s*(.*?)\s*\}\}/g,Ne=(e,t={})=>{if(!Object.values(t).some(je))return{isSimple:!0,parts:e.replace(Me,(e,n)=>(t[n.trim()]??``).toString())};let n=e.split(Me),r=[];for(let e=0;e<n.length;e++)if(e%2==0)n[e]&&r.push(n[e]);else{let i=t[n[e].trim()];i!=null&&r.push(i)}return{isSimple:!1,parts:r}},Pe=`modulepreload`,Fe=function(e){return`/`+e},Ie={},Le=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=document.getElementsByTagName(`link`),a=document.querySelector(`meta[property=csp-nonce]`),o=a?.nonce||a?.getAttribute(`nonce`);r=e(t.map(e=>{if(e=Fe(e,n),e in Ie)return;Ie[e]=!0;let t=e.endsWith(`.css`),r=t?`[rel="stylesheet"]`:``;if(n)for(let n=i.length-1;n>=0;n--){let r=i[n];if(r.href===e&&(!t||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;let a=document.createElement(`link`);if(a.rel=t?`stylesheet`:Pe,t||(a.as=`script`),a.crossOrigin=``,a.href=e,o&&a.setAttribute(`nonce`,o),document.head.appendChild(a),t)return new Promise((t,n)=>{a.addEventListener(`load`,t),a.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${e}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},B=x(),Re={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:t,...n})=>A({...n,value:n.children,children:n.children})},ze=ye,Be=(e,t)=>{let n=Ne(e,t);return n.isSimple?n.parts:(0,O.createElement)(O.Fragment,null,...n.parts.map((e,t)=>(0,O.createElement)(O.Fragment,{key:t},e)))},Ve={}.INTLAYER_NODE_TYPE_INSERTION===`false`?ye:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:I}],i=e[I],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,r)=>{let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=Be(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return typeof i==`object`&&i&&`nodeType`in i&&[`enumeration`,`condition`].includes(i.nodeType)?e=>t=>{let n=o(t);return typeof n==`function`?n(e):n}:o}},He=ye,Ue=ye,We=new Map,Ge=(e,t=!0)=>{let n=`${e??S.defaultLocale}_${t}`;if(We.has(n))return We.get(n);let r=[be(e??S.defaultLocale,t?S.defaultLocale:void 0),xe,Se(e??S.defaultLocale),Ce,Ee(e??S.defaultLocale),De,Te,Re,ze,Ve,He,Ue];return We.set(n,r),r},Ke=(e,t)=>Ae(e,t,Ge(t)),qe=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),Je=(e,t=S?.locales)=>{let n=qe(e),r=e;e?.endsWith(`/`)&&(r=e.slice(0,-1));let i=n?new URL(r):new URL(r,`http://example.com`),a=i.pathname;a.startsWith(`/`)||(i.pathname=`/${a}`);{let e=a.split(`/`),n=e[1];t?.includes(n)&&(e.splice(1,1),i.pathname=e.join(`/`)??`/`)}return n?i.toString():i.toString().replace(`http://example.com`,``)},Ye=`https://back.intlayer.org`,Xe=[`en`],Ze=(e={})=>({defaultLocale:S?.defaultLocale??`en`,mode:C?.mode??`prefix-no-default`,locales:S?.locales??Xe,rewrite:C?.rewrite,domains:C?.domains,...e}),Qe=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i,domains:a}=Ze(t);return!e||!i.includes(e)?{prefix:``,localePrefix:void 0}:r===`prefix-all`||r===`prefix-no-default`&&n!==e?{prefix:`${e}/`,localePrefix:e}:{prefix:``,localePrefix:void 0}},$e=(e,t,n)=>e,et=(e,t,n)=>({path:e,isRewritten:!1}),tt=(e,t=S?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o,domains:s,currentDomain:c}=Ze(n),l=Je(e,a),u=qe(l),d=u?new URL(l):new URL(l,`http://example.com`),f=et($e(d.pathname,void 0,void 0),t,void 0).path,p=u?`${d.protocol}//${d.host}`:``,{prefix:m}=Qe(t,{defaultLocale:r,mode:i,locales:a,domains:s}),h=`/${m}${f}`.replace(/\/+/g,`/`);return h.length>1&&h.endsWith(`/`)&&(h=h.slice(0,-1)),`${p}${h}${d.search}${d.hash}`},nt=(e,t=S?.locales,n=S?.defaultLocale)=>{let r=[e].flat(),i=e=>e.trim().toLowerCase();try{for(let e of r){let n=i(e),r=t.find(e=>i(e)===n);if(r)return r;let[a]=n.split(`-`),o=t.find(e=>i(e).split(`-`)[0]===a);if(o)return o}}catch{}return n},rt={}.INTLAYER_ROUTING_STORAGE_COOKIES===`false`;({}).INTLAYER_ROUTING_STORAGE_HEADERS;var it=(e,t,n)=>{let r=[`${e}=${encodeURIComponent(t)}`];return n.path&&r.push(`Path=${n.path}`),n.domain&&r.push(`Domain=${n.domain}`),n.expires instanceof Date&&r.push(`Expires=${n.expires.toUTCString()}`),n.secure&&r.push(`Secure`),n.sameSite&&r.push(`SameSite=${n.sameSite}`),r.join(`; `)},at=(e=st)=>{let{locales:t}=S;if(e?.isCookieEnabled===!1)return;let n=e=>!!e&&t.includes(e);if(!rt)for(let t=0;t<(C.storage.cookies??[]).length;t++)try{let r=e?.getCookie?.(C.storage.cookies[t].name);if(n(r))return r}catch{}},ot=(e,t)=>{if(t?.isCookieEnabled!==!1&&!rt&&C.storage.cookies)for(let n=0;n<C.storage.cookies.length;n++){let{name:r,attributes:i}=C.storage.cookies[n];try{t?.setCookieStore&&t.setCookieStore(r,e,{...i,expires:i.expires instanceof Date?i.expires.getTime():i.expires})}catch{try{t?.setCookieString&&t.setCookieString(r,it(r,e,i))}catch{}}}},st={getCookie:e=>document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.split(`=`)[1],getLocaleStorage:e=>localStorage.getItem(e),getSessionStorage:e=>sessionStorage.getItem(e),isCookieEnabled:!0,setCookieStore:(e,t,n)=>cookieStore.set({name:e,value:t,path:n.path,domain:n.domain,expires:n.expires,sameSite:n.sameSite}),setCookieString:(e,t)=>{document.cookie=t},setSessionStorage:(e,t)=>sessionStorage.setItem(e,t),setLocaleStorage:(e,t)=>localStorage.setItem(e,t)},ct=e=>{if(!e)return`ltr`;try{let t=new Intl.Locale(e);if(`getTextInfo`in t)return t.getTextInfo().direction;if(`textInfo`in t)return t.textInfo.direction;let n=t.maximize();return[`Arab`,`Hebr`,`Thaa`,`Syrc`,`Mand`,`Adlm`,`Rohg`,`Nkoo`].includes(n.script??``)?`rtl`:`ltr`}catch{return`ltr`}},lt=(e,t=e)=>new he.DisplayNames(t,{type:`language`}).of(e)??`Unknown locale`,ut=e=>typeof e==`object`&&e?.key!==void 0&&e?.props!==void 0,dt=(e,t)=>e.every((e,n)=>t[n]&&t[n].key===e.key&&t[n].type===e.type),ft=at(st),pt=(e,t)=>ot(e,{...st,isCookieEnabled:t}),mt=()=>{typeof window<`u`&&(window.intlayer={enabled:!0})},ht=e=>{if(!e||typeof e!=`string`)return``;let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},gt=(0,O.createContext)({locale:ft??S?.defaultLocale,setLocale:()=>null,isCookieEnabled:!0}),_t=e=>{let t=(0,B.c)(6),{locale:n,defaultLocale:r,children:i,setLocale:a,disableEditor:o,isCookieEnabled:s}=e,{locales:c,defaultLocale:l}=S??{},[u,d]=(0,O.useState)(n??ft??r??l),f;t[0]!==u||t[1]!==n?(f=()=>{n&&n!==u&&d(n)},t[0]=u,t[1]=n,t[2]=f):f=t[2];let p;t[3]===n?p=t[4]:(p=[n],t[3]=n,t[4]=p),(0,O.useEffect)(f,p);let m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],t[5]=m):m=t[5],(0,O.useEffect)(vt,m);let h=a??(e=>{if(u.toString()!==e.toString()){if(!c?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}d(e),pt(e,s)}}),g=nt(u);return(0,k.jsx)(gt.Provider,{value:{locale:g,setLocale:h,disableEditor:o},children:i})};function vt(){mt()}var yt=(e,t)=>{let{locale:n}=(0,O.useContext)(gt)??{};return(0,O.useMemo)(()=>Ke(e,t??n),[e.key,n,t])},bt=({isCookieEnabled:e,onLocaleChange:t}={})=>{let{defaultLocale:n,locales:r}=S??{},{locale:i,setLocale:a,isCookieEnabled:o}=(0,O.useContext)(gt)??{};return{locale:i,defaultLocale:n,availableLocales:r,setLocale:(0,O.useCallback)(n=>{if(!r?.map(String).includes(n)){console.error(`Locale ${n} is not available`);return}a(n),pt(n,e??o??!0),t?.(n)},[r,t,a,e])}},xt=`popstate`;function St(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Ct(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Ot(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:kt(t)}return jt(t,n,null,e)}function wt(e,t){if(e===!1||e==null)throw Error(t)}function Tt(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Et(){return Math.random().toString(36).substring(2,10)}function Dt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ot(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?At(t):t,state:n,key:t&&t.key||r||Et(),mask:i}}function kt({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 At(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 jt(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=St(e)?e:Ot(h.location,e,t);n&&n(r,e),l=u()+1;let d=Dt(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=St(e)?e:Ot(h.location,e,t);n&&n(r,e),l=u();let i=Dt(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Mt(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(xt,d),c=e,()=>{i.removeEventListener(xt,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Mt(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),wt(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:kt(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function Nt(e,t,n=`/`){return Pt(e,t,n,!1)}function Pt(e,t,n,r,i){let a=$t((typeof t==`string`?At(t):t).pathname||`/`,n);if(a==null)return null;let o=i??It(e),s=null,c=Qt(a);for(let e=0;s==null&&e<o.length;++e)s=Yt(o[e],c,r);return s}function Ft(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function It(e){let t=Lt(e);return zt(t),t}function Lt(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;wt(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ln([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(wt(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Lt(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:qt(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Rt(e.path))a(e,t,!0,n)}),t}function Rt(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Rt(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function zt(e){e.sort((e,t)=>e.score===t.score?Jt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Bt=/^:[\w-]+$/,Vt=3,Ht=2,Ut=1,Wt=10,Gt=-2,Kt=e=>e===`*`;function qt(e,t){let n=e.split(`/`),r=n.length;return n.some(Kt)&&(r+=Gt),t&&(r+=Ht),n.filter(e=>!Kt(e)).reduce((e,t)=>e+(Bt.test(t)?Vt:t===``?Ut:Wt),r)}function Jt(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Yt(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=Xt({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Xt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:ln([a,u.pathname]),pathnameBase:dn(ln([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=ln([a,u.pathnameBase]))}return o}function Xt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Zt(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Zt(e,t=!1,n=!0){Tt(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=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Qt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Tt(!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 $t(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)||`/`}var en=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function tn(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?At(e):e,a;return n?(n=cn(n),a=n.startsWith(`/`)?nn(n.substring(1),`/`):nn(n,t)):a=t,{pathname:a,search:fn(r),hash:pn(i)}}function nn(e,t){let n=un(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function rn(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 an(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function on(e){let t=an(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function sn(e,t,n,r=!1){let i;typeof e==`string`?i=At(e):(i={...e},wt(!i.pathname||!i.pathname.includes(`?`),rn(`?`,`pathname`,`search`,i)),wt(!i.pathname||!i.pathname.includes(`#`),rn(`#`,`pathname`,`hash`,i)),wt(!i.search||!i.search.includes(`#`),rn(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=tn(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var cn=e=>e.replace(/\/\/+/g,`/`),ln=e=>cn(e.join(`/`)),un=e=>e.replace(/\/+$/,``),dn=e=>un(e).replace(/^\/*/,`/`),fn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,pn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,mn=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function hn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function gn(e){return ln(e.map(e=>e.route.path).filter(Boolean))||`/`}var _n=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function vn(e,t){let n=e;if(typeof n!=`string`||!en.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(_n)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=$t(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Tt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var yn=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(yn);var bn=[`GET`,...yn];new Set(bn);var xn=O.createContext(null);xn.displayName=`DataRouter`;var Sn=O.createContext(null);Sn.displayName=`DataRouterState`;var Cn=O.createContext(!1);function wn(){return O.useContext(Cn)}var Tn=O.createContext({isTransitioning:!1});Tn.displayName=`ViewTransition`;var En=O.createContext(new Map);En.displayName=`Fetchers`;var Dn=O.createContext(null);Dn.displayName=`Await`;var On=O.createContext(null);On.displayName=`Navigation`;var kn=O.createContext(null);kn.displayName=`Location`;var An=O.createContext({outlet:null,matches:[],isDataRoute:!1});An.displayName=`Route`;var jn=O.createContext(null);jn.displayName=`RouteError`;var Mn=`REACT_ROUTER_ERROR`,Nn=`REDIRECT`,Pn=`ROUTE_ERROR_RESPONSE`;function Fn(e){if(e.startsWith(`${Mn}:${Nn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function In(e){if(e.startsWith(`${Mn}:${Pn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new mn(t.status,t.statusText,t.data)}catch{}}function Ln(e,{relative:t}={}){wt(Rn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=O.useContext(On),{hash:i,pathname:a,search:o}=Wn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ln([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Rn(){return O.useContext(kn)!=null}function zn(){return wt(Rn(),`useLocation() may be used only in the context of a <Router> component.`),O.useContext(kn).location}var Bn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Vn(e){O.useContext(On).static||O.useLayoutEffect(e)}function Hn(){let{isDataRoute:e}=O.useContext(An);return e?lr():Un()}function Un(){wt(Rn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=O.useContext(xn),{basename:t,navigator:n}=O.useContext(On),{matches:r}=O.useContext(An),{pathname:i}=zn(),a=JSON.stringify(on(r)),o=O.useRef(!1);return Vn(()=>{o.current=!0}),O.useCallback((r,s={})=>{if(Tt(o.current,Bn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=sn(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ln([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}O.createContext(null);function Wn(e,{relative:t}={}){let{matches:n}=O.useContext(An),{pathname:r}=zn(),i=JSON.stringify(on(n));return O.useMemo(()=>sn(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Gn(e,t){return Kn(e,t)}function Kn(e,t,n){wt(Rn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=O.useContext(On),{matches:i}=O.useContext(An),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;dr(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) 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.
11
11
 
12
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=zn(),d;if(t){let e=typeof t==`string`?At(t):t;wt(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Nt(e,{pathname:p});Tt(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Tt(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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 h=$n(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ln([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:ln([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?O.createElement(kn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function qn(){let e=cr(),t=hn(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)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=O.createElement(O.Fragment,null,O.createElement(`p`,null,`💿 Hey developer 👋`),O.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,O.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,O.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),O.createElement(O.Fragment,null,O.createElement(`h2`,null,`Unexpected Application Error!`),O.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?O.createElement(`pre`,{style:i},n):null,o)}var Jn=O.createElement(qn,null),Yn=class extends O.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?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=In(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:O.createElement(An.Provider,{value:this.props.routeContext},O.createElement(jn.Provider,{value:e,children:this.props.component}));return this.context?O.createElement(Zn,{error:e},t):t}};Yn.contextType=Cn;var Xn=new WeakMap;function Zn({children:e,error:t}){let{basename:n}=O.useContext(On);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Fn(t.digest);if(e){let r=Xn.get(t);if(r)throw r;let i=vn(e.location,n);if(_n&&!Xn.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Xn.set(t,n),n}return O.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Qn({routeContext:e,match:t,children:n}){let r=O.useContext(xn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(An.Provider,{value:e},n)}function $n(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);wt(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:gn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Jn,o&&(s<0&&c===0?(dr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?O.createElement(n.route.Component,null):n.route.element?n.route.element:e,O.createElement(Qn,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?O.createElement(Yn,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function er(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tr(e){let t=O.useContext(xn);return wt(t,er(e)),t}function nr(e){let t=O.useContext(Sn);return wt(t,er(e)),t}function rr(e){let t=O.useContext(An);return wt(t,er(e)),t}function ir(e){let t=rr(e),n=t.matches[t.matches.length-1];return wt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ar(){return ir(`useRouteId`)}function or(){return nr(`useNavigation`).navigation}function sr(){let{matches:e,loaderData:t}=nr(`useMatches`);return O.useMemo(()=>e.map(e=>Ft(e,t)),[e,t])}function cr(){let e=O.useContext(jn),t=nr(`useRouteError`),n=ir(`useRouteError`);return e===void 0?t.errors?.[n]:e}function lr(){let{router:e}=tr(`useNavigate`),t=ir(`useNavigate`),n=O.useRef(!1);return Vn(()=>{n.current=!0}),O.useCallback(async(r,i={})=>{Tt(n.current,Bn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ur={};function dr(e,t,n){!t&&!ur[e]&&(ur[e]=!0,Tt(!1,n))}O.memo(fr);function fr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Kn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function pr(e){wt(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function mr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){wt(!Rn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=O.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=At(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=O.useMemo(()=>{let e=$t(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Tt(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:O.createElement(On.Provider,{value:c},O.createElement(kn.Provider,{children:t,value:h}))}function hr({children:e,location:t}){return Gn(gr(e),t)}O.Component;function gr(e,t=[]){let n=[];return O.Children.forEach(e,(e,r)=>{if(!O.isValidElement(e))return;let i=[...t,r];if(e.type===O.Fragment){n.push.apply(n,gr(e.props.children,i));return}wt(e.type===pr,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),wt(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=gr(e.props.children,i)),n.push(a)}),n}var _r=`get`,vr=`application/x-www-form-urlencoded`;function yr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function br(e){return yr(e)&&e.tagName.toLowerCase()===`button`}function xr(e){return yr(e)&&e.tagName.toLowerCase()===`form`}function Sr(e){return yr(e)&&e.tagName.toLowerCase()===`input`}function Cr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wr(e,t){return e.button===0&&(!t||t===`_self`)&&!Cr(e)}var Tr=null;function Er(){if(Tr===null)try{new FormData(document.createElement(`form`),0),Tr=!1}catch{Tr=!0}return Tr}var Dr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Or(e){return e!=null&&!Dr.has(e)?(Tt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vr}"`),null):e}function kr(e,t){let n,r,i,a,o;if(xr(e)){let o=e.getAttribute(`action`);r=o?$t(o,t):null,n=e.getAttribute(`method`)||_r,i=Or(e.getAttribute(`enctype`))||vr,a=new FormData(e)}else if(br(e)||Sr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?$t(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||_r,i=Or(e.getAttribute(`formenctype`))||Or(o.getAttribute(`enctype`))||vr,a=new FormData(o,e),!Er()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(yr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=_r,r=null,i=vr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ar={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},jr=/[&><\u2028\u2029]/g;function Mr(e){return e.replace(jr,e=>Ar[e])}function Nr(e,t){if(e===!1||e==null)throw Error(t)}function Pr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&$t(i.pathname,t)===`/`?i.pathname=`${un(t)}/_root.${r}`:i.pathname=`${un(i.pathname)}.${r}`,i}async function Fr(e,t){if(e.id in t)return t[e.id];try{let n=await Le(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ir(e){return e!=null&&typeof e.page==`string`}function Lr(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 Rr(e,t,n){return Ur((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Fr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Lr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function zr(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Br(e,t,{includeHydrateFallback:n}={}){return Vr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Vr(e){return[...new Set(e)]}function Hr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ur(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ir(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Hr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Wr(){let e=O.useContext(xn);return Nr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Gr(){let e=O.useContext(Sn);return Nr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Kr=O.createContext(void 0);Kr.displayName=`FrameworkContext`;function qr(){let e=O.useContext(Kr);return Nr(e,`You must render this element inside a <HydratedRouter> element`),e}function Jr(e,t){let n=O.useContext(Kr),[r,i]=O.useState(!1),[a,o]=O.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=O.useRef(null);O.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),O.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Yr(s,p),onBlur:Yr(c,m),onMouseEnter:Yr(l,p),onMouseLeave:Yr(u,m),onTouchStart:Yr(d,p)}]:[a,f,{}]:[!1,f,{}]}function Yr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Xr({page:e,...t}){let n=wn(),{router:r}=Wr(),i=O.useMemo(()=>Nt(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?O.createElement(Qr,{page:e,matches:i,...t}):O.createElement($r,{page:e,matches:i,...t}):null}function Zr(e){let{manifest:t,routeModules:n}=qr(),[r,i]=O.useState([]);return O.useEffect(()=>{let r=!1;return Rr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Qr({page:e,matches:t,...n}){let r=zn(),{future:i}=qr(),{basename:a}=Wr(),o=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Pr(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return O.createElement(O.Fragment,null,o.map(e=>O.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function $r({page:e,matches:t,...n}){let r=zn(),{future:i,manifest:a,routeModules:o}=qr(),{basename:s}=Wr(),{loaderData:c,matches:l}=Gr(),u=O.useMemo(()=>zr(e,t,l,a,r,`data`),[e,t,l,a,r]),d=O.useMemo(()=>zr(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Pr(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=O.useMemo(()=>Br(d,a),[d,a]),m=Zr(d);return O.createElement(O.Fragment,null,f.map(e=>O.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>O.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>O.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ei(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}O.Component;var ti=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ti&&(window.__reactRouterVersion=`7.15.0`)}catch{}function ni({basename:e,children:t,useTransitions:n,window:r}){let i=O.useRef();i.current??=Ct({window:r,v5Compat:!0});let a=i.current,[o,s]=O.useState({action:a.action,location:a.location}),c=O.useCallback(e=>{n===!1?s(e):O.startTransition(()=>s(e))},[n]);return O.useLayoutEffect(()=>a.listen(c),[a,c]),O.createElement(mr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function ri({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=O.useState({action:n.action,location:n.location}),o=O.useCallback(e=>{r===!1?a(e):O.startTransition(()=>a(e))},[r]);return O.useLayoutEffect(()=>n.listen(o),[n,o]),O.createElement(mr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}ri.displayName=`unstable_HistoryRouter`;var ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ai=O.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=O.useContext(On),v=typeof l==`string`&&ii.test(l),y=vn(l,h);l=y.to;let b=Ln(l,{relative:r}),x=zn(),S=null;if(o){let e=sn(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ln([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=Jr(n,p),E=fi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let k=!(y.isExternal||i),A=O.createElement(`a`,{...p,...T,href:(k?S:void 0)||y.absoluteURL||b,onClick:k?D:e,ref:ei(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?O.createElement(O.Fragment,null,A,O.createElement(Xr,{page:b})):A});ai.displayName=`Link`;var oi=O.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Wn(a,{relative:c.relative}),d=zn(),f=O.useContext(Sn),{navigator:p,basename:m}=O.useContext(On),h=f!=null&&Si(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=$t(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return O.createElement(ai,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});oi.displayName=`NavLink`;var si=O.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=_r,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=O.useContext(On),g=hi(),_=gi(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&ii.test(s);return O.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?O.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});si.displayName=`Form`;function ci({getKey:e,storageKey:t,...n}){let r=O.useContext(Kr),{basename:i}=O.useContext(On),a=zn(),o=sr();bi({getKey:e,storageKey:t});let s=O.useMemo(()=>{if(!r||!e)return null;let t=yi(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return O.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Mr(JSON.stringify(t||_i))}, ${Mr(JSON.stringify(s))})`}})}ci.displayName=`ScrollRestoration`;function li(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ui(e){let t=O.useContext(xn);return wt(t,li(e)),t}function di(e){let t=O.useContext(Sn);return wt(t,li(e)),t}function fi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Hn(),d=zn(),f=Wn(e,{relative:o});return O.useCallback(p=>{if(wr(p,t)){p.preventDefault();let t=n===void 0?kt(d)===kt(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?O.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var pi=0,mi=()=>`__${String(++pi)}__`;function hi(){let{router:e}=ui(`useSubmit`),{basename:t}=O.useContext(On),n=ar(),r=e.fetch,i=e.navigate;return O.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=kr(e,t);a.navigate===!1?await r(a.fetcherKey||mi(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function gi(e,{relative:t}={}){let{basename:n}=O.useContext(On),r=O.useContext(An);wt(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Wn(e||`.`,{relative:t})},o=zn();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ln([n,a.pathname])),kt(a)}var _i=`react-router-scroll-positions`,vi={};function yi(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:$t(e.pathname,n)||e.pathname},t)),i??=e.key,i}function bi({getKey:e,storageKey:t}={}){let{router:n}=ui(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=di(`useScrollRestoration`),{basename:a}=O.useContext(On),o=zn(),s=sr(),c=or();O.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),xi(O.useCallback(()=>{if(c.state===`idle`){let t=yi(o,s,a,e);vi[t]=window.scrollY}try{sessionStorage.setItem(t||_i,JSON.stringify(vi))}catch(e){Tt(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(O.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||_i);e&&(vi=JSON.parse(e))}catch{}},[t]),O.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(vi,()=>window.scrollY,e?(t,n)=>yi(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),O.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Tt(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function xi(e,t){let{capture:n}=t||{};O.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Si(e,{relative:t}={}){let n=O.useContext(Tn);wt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ui(`useViewTransitionState`),i=Wn(e,{relative:t});if(!n.isTransitioning)return!1;let a=$t(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=$t(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Xt(i.pathname,o)!=null||Xt(i.pathname,a)!=null}var Ci=1,wi=900*1e3,Ti=0,Ei=()=>(Ti=(Ti+1)%(2**53-1),Ti.toString()),Di=new Map,Oi=e=>{if(Di.has(e))return;let t=setTimeout(()=>{Di.delete(e),Mi({type:`REMOVE_TOAST`,toastId:e})},wi);Di.set(e,t)},ki=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,Ci)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?Oi(n):e.toasts.forEach(e=>{Oi(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},Ai=[],ji={toasts:[]},Mi=e=>{ji=ki(ji,e),Ai.forEach(e=>{e(ji)})},Ni=({...e})=>{let t=Ei(),n=e=>Mi({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>Mi({type:`DISMISS_TOAST`,toastId:t});return Mi({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},Pi=()=>{let e=(0,B.c)(5),[t,n]=(0,O.useState)(ji),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>(Ai.push(n),()=>{let e=Ai.indexOf(n);e>-1&&Ai.splice(e,1)}),e[0]=r):r=e[0];let i;e[1]===t?i=e[2]:(i=[t],e[1]=t,e[2]=i),(0,O.useEffect)(r,i);let a;return e[3]===t?a=e[4]:(a={...t,toast:Ni,dismiss:Fi},e[3]=t,e[4]=a),a};function Fi(e){return Mi({type:`DISMISS_TOAST`,toastId:e})}var Ii={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Li=new class{#e=Ii;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};typeof window>`u`||`Deno`in globalThis;function Ri(){}function zi(e){let t;if(e.then(e=>(t=e,e),Ri)?.catch(Ri),t!==void 0)return{data:t}}function Bi(e){return e}function Vi(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function Hi(e,t,n){let r=()=>{let r=e.promise?.then(t).catch(e=>n(e)?Promise.reject(Error(`redacted`)):Promise.reject(e));return r?.catch(Ri),r};return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status===`pending`&&{promise:r()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function Ui(e){return e.state.isPaused}function Wi(e){return e.state.status===`success`}function Gi(e){return!0}function Ki(e,t={}){let n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??Ui,r=e.getMutationCache().getAll().flatMap(e=>n(e)?[Vi(e)]:[]),i=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??Wi,a=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??Gi,o=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??Bi;return{mutations:r,queries:e.getQueryCache().getAll().flatMap(e=>i(e)?[Hi(e,o,a)]:[])}}function qi(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??Bi,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?zi(c):void 0,f=r.data===void 0?d?.data:r.data,p=f===void 0?f:a(f),m=i.get(o),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&l!==void 0&&l>m.state.dataUpdatedAt;if(r.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;m.setState({...t,data:p,...r.status===`pending`&&p!==void 0&&{status:`success`,...!g&&{fetchStatus:`idle`}}})}}else m=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:p,fetchStatus:`idle`,status:r.status===`pending`&&p!==void 0?`success`:r.status});c&&!d&&!h&&!g&&(l===void 0||l>m.state.dataUpdatedAt)&&m.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(Ri)})}function Ji(){}function Yi(e,{interval:t=1e3,onError:n=Ji}={}){if(typeof e!=`function`)throw Error(`argument is not function.`);let r=0,i=null,a=!1,o=!1;return async(...s)=>{if(i=s,!o){for(o=!0;a;)await new Promise(e=>Li.setTimeout(e,t));for(;Date.now()<r;)await new Promise(e=>Li.setTimeout(e,r-Date.now()));o=!1,a=!0;try{await e(...i)}catch(e){try{n(e)}catch{}}r=Date.now()+t,a=!1}}}var Xi=({storage:e,key:t=`REACT_QUERY_OFFLINE_CACHE`,throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:i=JSON.parse,retry:a})=>{if(e){let o=async n=>{try{let i=await r(n);await e.setItem(t,i);return}catch(e){return e}};return{persistClient:Yi(async e=>{let t=e,n=await o(t),r=0;for(;n&&t;)r++,t=await a?.({persistedClient:t,error:n,errorCount:r}),t&&(n=await o(t))},{interval:n}),restoreClient:async()=>{let n=await e.getItem(t);if(n)return await i(n)},removeClient:()=>e.removeItem(t)}}return{persistClient:Ji,restoreClient:()=>Promise.resolve(void 0),removeClient:Ji}},Zi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qi=new class extends Zi{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},$i={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ea=new class{#e=$i;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ta(e){setTimeout(e,0)}var na=typeof window>`u`||`Deno`in globalThis;function ra(){}function ia(e,t){return typeof e==`function`?e(t):e}function aa(e){return typeof e==`number`&&e>=0&&e!==1/0}function oa(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sa(e,t){return typeof e==`function`?e(t):e}function ca(e,t){return typeof e==`function`?e(t):e}function la(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==da(o,t.options))return!1}else if(!pa(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ua(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(fa(t.options.mutationKey)!==fa(a))return!1}else if(!pa(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function da(e,t){return(t?.queryKeyHashFn||fa)(e)}function fa(e){return JSON.stringify(e,(e,t)=>va(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function pa(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>pa(e[n],t[n])):!1}var ma=Object.prototype.hasOwnProperty;function ha(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=_a(e)&&_a(t);if(!r&&!(va(e)&&va(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ma.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ha(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ga(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function _a(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function va(e){if(!ya(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ya(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ya(e){return Object.prototype.toString.call(e)===`[object Object]`}function ba(e){return new Promise(t=>{ea.setTimeout(t,e)})}function xa(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ha(e,t)}function Sa(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ca(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wa=Symbol();function Ta(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===wa?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ea(e,t){return typeof e==`function`?e(...t):!!e}function Da(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Oa=(()=>{let e=()=>na;return{isServer(){return e()},setIsServer(t){e=t}}})();function ka(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Aa=ta;function ja(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Aa,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Ma=ja(),Na=new class extends Zi{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Pa(e){return Math.min(1e3*2**e,3e4)}function Fa(e){return(e??`online`)===`online`?Na.isOnline():!0}var Ia=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function La(e){let t=!1,n=0,r,i=ka(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Ia(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Qi.isFocused()&&(e.networkMode===`always`||Na.isOnline())&&e.canRun(),u=()=>Fa(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Oa.isServer()?0:3),o=e.retryDelay??Pa,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),ba(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Ra=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),aa(this.gcTime)&&(this.#e=ea.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Oa.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ea.clearTimeout(this.#e),this.#e=void 0)}};function za(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Da(e,()=>t.signal,()=>n=!0)},u=Ta(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Ca:Sa;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Va:Ba,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ba(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Ba(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Va(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ha=class extends Ra{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ga(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ga(this.options);e.data!==void 0&&(this.setState(Wa(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=xa(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ra).catch(ra):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ca(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wa||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>sa(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!oa(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ta(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?za(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=La({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ia&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ia){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ua(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Wa(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Ma.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ua(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fa(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Wa(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ga(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ka=class extends Zi{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=ka(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ja(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ya(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ya(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ca(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ga(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Xa(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ca(this.options.enabled,this.#t)!==ca(t.enabled,this.#t)||sa(this.options.staleTime,this.#t)!==sa(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ca(this.options.enabled,this.#t)!==ca(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Qa(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ra)),t}#g(){this.#b();let e=sa(this.options.staleTime,this.#t);if(Oa.isServer()||this.#r.isStale||!aa(e))return;let t=oa(this.#r.dataUpdatedAt,e)+1;this.#d=ea.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Oa.isServer()||ca(this.options.enabled,this.#t)===!1||!aa(this.#p)||this.#p===0)&&(this.#f=ea.setInterval(()=>{(this.options.refetchIntervalInBackground||Qi.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(ea.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(ea.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ja(e,t),o=i&&Xa(e,n,t,r);(a||o)&&(l={...l,...Ua(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=xa(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=xa(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Za(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ca(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=ka())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ga(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Ma.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function qa(e,t){return ca(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&ca(t.retryOnMount,e)===!1)}function Ja(e,t){return qa(e,t)||e.state.data!==void 0&&Ya(e,t,t.refetchOnMount)}function Ya(e,t,n){if(ca(t.enabled,e)!==!1&&sa(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Za(e,t)}return!1}function Xa(e,t,n,r){return(e!==t||ca(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Za(e,n)}function Za(e,t){return ca(t.enabled,e)!==!1&&e.isStaleByTime(sa(t.staleTime,e))}function Qa(e,t){return!ga(e.getCurrentResult(),t)}var $a=class extends Ra{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||eo(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=La({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Ma.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function eo(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var to=class extends Zi{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new $a({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=no(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=no(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=no(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=no(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Ma.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ua(t,e))}findAll(e={}){return this.getAll().filter(t=>ua(e,t))}notify(e){Ma.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Ma.batch(()=>Promise.all(e.map(e=>e.continue().catch(ra))))}};function no(e){return e.options.scope?.id}var ro=class extends Zi{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ga(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&fa(t.mutationKey)!==fa(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??eo();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Ma.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},io=class extends Zi{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??da(r,t),a=this.get(i);return a||(a=new Ha({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Ma.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>la(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>la(e,t)):t}notify(e){Ma.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ma.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ma.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ao=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new io,this.#t=e.mutationCache||new to,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Qi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Na.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sa(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ia(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ma.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Ma.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Ma.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Ma.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ra).catch(ra)}invalidateQueries(e,t={}){return Ma.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ma.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ra)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(ra)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(sa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ra).catch(ra)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ra).catch(ra)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Na.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(fa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{pa(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(fa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{pa(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=da(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===wa&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},oo=O.createContext(void 0),so=e=>{let t=O.useContext(oo);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},co=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,k.jsx)(oo.Provider,{value:e,children:t})),lo=O.createContext(!1),uo=()=>O.useContext(lo),fo=lo.Provider;function V(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var po=O.createContext(V()),mo=()=>O.useContext(po),ho=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Ea(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},go=e=>{O.useEffect(()=>{e.clearReset()},[e])},_o=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Ea(n,[e.error,r])),vo=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},yo=(e,t)=>e.isLoading&&e.isFetching&&!t,bo=(e,t)=>e?.suspense&&t.isPending,xo=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function So(e,t,n){let r=uo(),i=mo(),a=so(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,vo(o),ho(o,i,s),go(i);let c=!a.getQueryCache().get(o.queryHash),[l]=O.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(e=>{let t=d?l.subscribe(Ma.batchCalls(e)):ra;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),O.useEffect(()=>{l.setOptions(o)},[o,l]),bo(o,u))throw xo(o,l,i);if(_o({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!Oa.isServer()&&yo(u,r)&&(c?xo(o,l,i):s?.promise)?.catch(ra).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function Co(e,t){return So(e,Ka,t)}function wo(e,t){let n=so(t),[r]=O.useState(()=>new ro(n,e));O.useEffect(()=>{r.setOptions(e)},[r,e]);let i=O.useSyncExternalStore(O.useCallback(e=>r.subscribe(Ma.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=O.useCallback((e,t)=>{r.mutate(e,t).catch(ra)},[r]);if(i.error&&Ea(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var To=[`added`,`removed`,`updated`];function Eo(e){return To.includes(e)}async function Do({queryClient:e,persister:t,maxAge:n=1e3*60*60*24,buster:r=``,hydrateOptions:i}){try{let a=await t.restoreClient();if(a)if(a.timestamp){let o=Date.now()-a.timestamp>n,s=a.buster!==r;if(o||s)return t.removeClient();qi(e,a.clientState,i)}else return t.removeClient()}catch(e){throw await t.removeClient(),e}}async function Oo({queryClient:e,persister:t,buster:n=``,dehydrateOptions:r}){let i={buster:n,timestamp:Date.now(),clientState:Ki(e,r)};await t.persistClient(i)}function ko(e){let t=e.queryClient.getQueryCache().subscribe(t=>{Eo(t.type)&&Oo(e)}),n=e.queryClient.getMutationCache().subscribe(t=>{Eo(t.type)&&Oo(e)});return()=>{t(),n()}}var Ao=({children:e,persistOptions:t,onSuccess:n,onError:r,...i})=>{let[a,o]=O.useState(!0),s=O.useRef({persistOptions:t,onSuccess:n,onError:r}),c=O.useRef(!1);return O.useEffect(()=>{s.current={persistOptions:t,onSuccess:n,onError:r}}),O.useEffect(()=>{let e={...s.current.persistOptions,queryClient:i.client};return c.current||(c.current=!0,Do(e).then(()=>s.current.onSuccess?.()).catch(()=>s.current.onError?.()).finally(()=>{o(!1)})),a?void 0:ko(e)},[i.client,a]),(0,k.jsx)(co,{...i,children:(0,k.jsx)(fo,{value:a,children:e})})},jo=1e3*60*60*24,Mo=`v1`,No={queries:{retry:1,staleTime:30*1e3,gcTime:jo,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1},mutations:{retry:0}},Po=Xi({storage:typeof window<`u`?{getItem:e=>Promise.resolve(window.localStorage.getItem(e)),setItem:(e,t)=>Promise.resolve(window.localStorage.setItem(e,t)),removeItem:e=>Promise.resolve(window.localStorage.removeItem(e))}:{getItem:()=>Promise.resolve(null),setItem:()=>Promise.resolve(),removeItem:()=>Promise.resolve()},key:`intlayer-rq-cache`}),Fo=e=>e.split(`_`).join(` `),Io=()=>{let e=(0,B.c)(7),{toast:t}=Pi(),n;e[0]===t?n=e[1]:(n=e=>{[(()=>{try{if(typeof e==`string`)return JSON.parse(e);if(e instanceof Error)return JSON.parse(e.message)}catch{}return e})()].flat().forEach(e=>{let n=e?.error??e;if(n?.code===`RATE_LIMIT_EXCEEDED_UNAUTHENTICATED`){t({title:n.message,variant:`error`});return}t({title:Fo(n?.title??e?.title??`Error`),description:n?.message??e?.message??String(n??`An error occurred`),variant:`error`})})},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=e=>{e?.error&&t({title:Fo(e.error.title??e.error.code??`Error`),description:e.error.message??e.error.code??`An error occurred`,variant:`error`}),e?.message&&t({title:e.message,description:e.description,variant:`success`})},e[2]=t,e[3]=i);let a=i,o;return e[4]!==r||e[5]!==a?(o={onError:r,onSuccess:a},e[4]=r,e[5]=a,e[6]=o):o=e[6],o},Lo=({children:e,client:t})=>{let{onError:n,onSuccess:r}=Io(),i=(0,O.useRef)({onSuccess:r,onError:n});i.current={onSuccess:r,onError:n};let a=(0,O.useRef)(t??null);a.current||=new ao({defaultOptions:No,mutationCache:new to});let o=(0,O.useRef)(!1);if(!o.current){o.current=!0;let e=a.current.getMutationCache();e.config.onSuccess=(e,t,n,r,a)=>i.current.onSuccess?.(e,t,n,r,a),e.config.onError=(e,t,n,r,a)=>i.current.onError?.(e,t,n,r,a),e.config.onSettled=(e,t,n,r,i)=>{i.meta?.invalidateQueries&&i.meta.invalidateQueries.forEach(e=>{a.current?.invalidateQueries({queryKey:e})}),i.meta?.resetQueries&&i.meta.resetQueries.forEach(e=>{a.current?.resetQueries({queryKey:e})})}}return t?(0,k.jsx)(co,{client:a.current,children:e}):(0,k.jsx)(Ao,{client:a.current,persistOptions:{persister:Po,maxAge:jo,buster:Mo,dehydrateOptions:{shouldDehydrateQuery:e=>e.state.status===`success`}},children:e})},Ro=y();function zo(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Bo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zo(e))&&(r&&(r+=` `),r+=t);return r}var Vo=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ho=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Wo=`-`,Go=[],Ko=`arbitrary..`,qo=e=>{let t=Xo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Yo(e);let n=e.split(Wo);return Jo(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Vo(i,t):t:i||Go}return n[e]||Go}}},Jo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Jo(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Wo):e.slice(t).join(Wo),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Yo=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ko+r:void 0})(),Xo=e=>{let{theme:t,classGroups:n}=e;return Zo(n,t)},Zo=(e,t)=>{let n=Uo();for(let r in e){let i=e[r];Qo(i,n,r,t)}return n},Qo=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];$o(i,t,n,r)}},$o=(e,t,n,r)=>{if(typeof e==`string`){es(e,t,n);return}if(typeof e==`function`){ts(e,t,n,r);return}ns(e,t,n,r)},es=(e,t,n)=>{let r=e===``?t:rs(t,e);r.classGroupId=n},ts=(e,t,n,r)=>{if(is(e)){Qo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ho(n,e))},ns=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Qo(o,rs(t,a),n,r)}},rs=(e,t)=>{let n=e,r=t.split(Wo),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Uo(),n.nextPart.set(t,i)),n=i}return n},is=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,as=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},os=`!`,ss=`:`,cs=[],ls=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),us=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ss){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(os)?(c=s.slice(0,-1),l=!0):s.startsWith(os)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ls(t,l,c,u)};if(t){let e=t+ss,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ls(cs,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ds=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},fs=e=>({cache:as(e.cacheSize),parseClassName:us(e),sortModifiers:ds(e),postfixLookupClassGroupIds:ps(e),...qo(e)}),ps=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ms=/\s+/,hs=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ms),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+os:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},gs=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=_s(n))&&(i&&(i+=` `),i+=r);return i},_s=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=_s(e[r]))&&(n&&(n+=` `),n+=t);return n},vs=(e,...t)=>{let n,r,i,a,o=o=>(n=fs(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=hs(e,n);return i(e,a),a};return a=o,(...e)=>a(gs(...e))},ys=[],bs=e=>{let t=t=>t[e]||ys;return t.isThemeGetter=!0,t},xs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ss=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ws=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ts=/\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$/,Es=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ds=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Os=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ks=e=>Cs.test(e),As=e=>!!e&&!Number.isNaN(Number(e)),js=e=>!!e&&Number.isInteger(Number(e)),Ms=e=>e.endsWith(`%`)&&As(e.slice(0,-1)),Ns=e=>ws.test(e),Ps=()=>!0,Fs=e=>Ts.test(e)&&!Es.test(e),Is=()=>!1,Ls=e=>Ds.test(e),Rs=e=>Os.test(e),zs=e=>!H(e)&&!U(e),Bs=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Vs=e=>nc(e,oc,Is),H=e=>xs.test(e),Hs=e=>nc(e,sc,Fs),Us=e=>nc(e,cc,As),Ws=e=>nc(e,uc,Ps),Gs=e=>nc(e,lc,Is),Ks=e=>nc(e,ic,Is),qs=e=>nc(e,ac,Rs),Js=e=>nc(e,dc,Ls),U=e=>Ss.test(e),Ys=e=>rc(e,sc),Xs=e=>rc(e,lc),Zs=e=>rc(e,ic),Qs=e=>rc(e,oc),$s=e=>rc(e,ac),ec=e=>rc(e,dc,!0),tc=e=>rc(e,uc,!0),nc=(e,t,n)=>{let r=xs.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rc=(e,t,n=!1)=>{let r=Ss.exec(e);return r?r[1]?t(r[1]):n:!1},ic=e=>e===`position`||e===`percentage`,ac=e=>e===`image`||e===`url`,oc=e=>e===`length`||e===`size`||e===`bg-size`,sc=e=>e===`length`,cc=e=>e===`number`,lc=e=>e===`family-name`,uc=e=>e===`number`||e===`weight`,dc=e=>e===`shadow`,fc=vs(()=>{let e=bs(`color`),t=bs(`font`),n=bs(`text`),r=bs(`font-weight`),i=bs(`tracking`),a=bs(`leading`),o=bs(`breakpoint`),s=bs(`container`),c=bs(`spacing`),l=bs(`radius`),u=bs(`shadow`),d=bs(`inset-shadow`),f=bs(`text-shadow`),p=bs(`drop-shadow`),m=bs(`blur`),h=bs(`perspective`),g=bs(`aspect`),_=bs(`ease`),v=bs(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),U,H],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[U,H,c],T=()=>[ks,`full`,`auto`,...w()],E=()=>[js,`none`,`subgrid`,U,H],D=()=>[`auto`,{span:[`full`,js,U,H]},js,U,H],O=()=>[js,`auto`,U,H],k=()=>[`auto`,`min`,`max`,`fr`,U,H],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ks,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ks,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ks,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,U,H],L=()=>[...b(),Zs,Ks,{position:[U,H]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,Qs,Vs,{size:[U,H]}],ne=()=>[Ms,Ys,Hs],re=()=>[``,`none`,`full`,l,U,H],R=()=>[``,As,Ys,Hs],z=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ae=()=>[As,Ms,Zs,Ks],oe=()=>[``,`none`,m,U,H],se=()=>[`none`,As,U,H],ce=()=>[`none`,As,U,H],le=()=>[As,U,H],ue=()=>[ks,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ns],breakpoint:[Ns],color:[Ps],container:[Ns],"drop-shadow":[Ns],ease:[`in`,`out`,`in-out`],font:[zs],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ns],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ns],shadow:[Ns],spacing:[`px`,As],text:[Ns],"text-shadow":[Ns],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ks,H,U,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,U,H]}],"container-named":[Bs],columns:[{columns:[As,H,U,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[js,`auto`,U,H]}],basis:[{basis:[ks,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[As,ks,`auto`,`initial`,`none`,H]}],grow:[{grow:[``,As,U,H]}],shrink:[{shrink:[``,As,U,H]}],order:[{order:[js,`first`,`last`,`none`,U,H]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ys,Hs]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,tc,Ws]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ms,H]}],"font-family":[{font:[Xs,Gs,t]}],"font-features":[{"font-features":[H]}],"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:[i,U,H]}],"line-clamp":[{"line-clamp":[As,`none`,U,Us]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,U,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,U,H]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[As,`from-font`,`auto`,U,Hs]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[As,`auto`,U,H]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[js,U,H]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,U,H]}],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`,U,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},js,U,H],radial:[``,U,H],conic:[js,U,H]},$s,qs]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[As,U,H]}],"outline-w":[{outline:[``,As,Ys,Hs]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,ec,Js]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,ec,Js]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[As,Hs]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,ec,Js]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[As,U,H]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"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":[As]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[U,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[As]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,U,H]}],filter:[{filter:[``,`none`,U,H]}],blur:[{blur:oe()}],brightness:[{brightness:[As,U,H]}],contrast:[{contrast:[As,U,H]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ec,Js]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,As,U,H]}],"hue-rotate":[{"hue-rotate":[As,U,H]}],invert:[{invert:[``,As,U,H]}],saturate:[{saturate:[As,U,H]}],sepia:[{sepia:[``,As,U,H]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,U,H]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[As,U,H]}],"backdrop-contrast":[{"backdrop-contrast":[As,U,H]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,As,U,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[As,U,H]}],"backdrop-invert":[{"backdrop-invert":[``,As,U,H]}],"backdrop-opacity":[{"backdrop-opacity":[As,U,H]}],"backdrop-saturate":[{"backdrop-saturate":[As,U,H]}],"backdrop-sepia":[{"backdrop-sepia":[``,As,U,H]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,U,H]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[As,`initial`,U,H]}],ease:[{ease:[`linear`,`initial`,_,U,H]}],delay:[{delay:[As,U,H]}],animate:[{animate:[`none`,v,U,H]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,U,H]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[U,H,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[js,U,H]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,U,H]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,U,H]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[As,Ys,Hs,Us]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),W=(...e)=>fc(Bo(e));typeof window<`u`&&window.document&&window.document.createElement;function pc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function mc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function hc(...e){return t=>{let n=!1,r=e.map(e=>{let r=mc(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():mc(e[t],null)}}}}function gc(...e){return O.useCallback(hc(...e),e)}function _c(e,t){let n=O.createContext(t),r=e=>{let{children:t,...r}=e,i=O.useMemo(()=>r,Object.values(r));return(0,k.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=O.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function vc(e,t=[]){let n=[];function r(t,r){let i=O.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=O.useMemo(()=>o,Object.values(o));return(0,k.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=O.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>O.createContext(e));return function(n){let r=n?.[e]||t;return O.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,yc(i,...t)]}function yc(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return O.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function bc(e){let t=xc(e),n=O.forwardRef((e,n)=>{let{children:r,...i}=e,a=O.Children.toArray(r),o=a.find(Cc);if(o){let e=o.props.children,r=a.map(t=>t===o?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t);return(0,k.jsx)(t,{...i,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return(0,k.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function xc(e){let t=O.forwardRef((e,t)=>{let{children:n,...r}=e;if(O.isValidElement(n)){let e=Tc(n),i=wc(r,n.props);return n.type!==O.Fragment&&(i.ref=t?hc(t,e):e),O.cloneElement(n,i)}return O.Children.count(n)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sc=Symbol(`radix.slottable`);function Cc(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Sc}function wc(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Tc(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ec(e){let t=e+`CollectionProvider`,[n,r]=vc(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=O.useRef(null),a=O.useRef(new Map).current;return(0,k.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=bc(s),l=O.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,k.jsx)(c,{ref:gc(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=bc(u),p=O.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=O.useRef(null),s=gc(t,o),c=a(u,n);return O.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,k.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return O.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Dc=u(_(),1),G=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=bc(`Primitive.${t}`),r=O.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,k.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Oc(e,t){e&&Dc.flushSync(()=>e.dispatchEvent(t))}function kc(e){let t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ac(e,t=globalThis?.document){let n=kc(e);O.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var jc=`DismissableLayer`,Mc=`dismissableLayer.update`,Nc=`dismissableLayer.pointerDownOutside`,Pc=`dismissableLayer.focusOutside`,Fc,Ic=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lc=O.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=O.useContext(Ic),[u,d]=O.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=O.useState({}),m=gc(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Bc(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=Vc(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ac(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),O.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Fc=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Fc)}},[u,f,n,l]),O.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hc())},[u,l]),O.useEffect(()=>{let e=()=>p({});return document.addEventListener(Mc,e),()=>document.removeEventListener(Mc,e)},[]),(0,k.jsx)(G.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:pc(e.onFocusCapture,S.onFocusCapture),onBlurCapture:pc(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:pc(e.onPointerDownCapture,x.onPointerDownCapture)})});Lc.displayName=jc;var Rc=`DismissableLayerBranch`,zc=O.forwardRef((e,t)=>{let n=O.useContext(Ic),r=O.useRef(null),i=gc(t,r);return O.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,k.jsx)(G.div,{...e,ref:i})});zc.displayName=Rc;function Bc(e,t=globalThis?.document){let n=kc(e),r=O.useRef(!1),i=O.useRef(()=>{});return O.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Uc(Nc,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Vc(e,t=globalThis?.document){let n=kc(e),r=O.useRef(!1);return O.useEffect(()=>{let e=e=>{e.target&&!r.current&&Uc(Pc,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hc(){let e=new CustomEvent(Mc);document.dispatchEvent(e)}function Uc(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Oc(i,a):i.dispatchEvent(a)}var Wc=Lc,Gc=zc,Kc=globalThis?.document?O.useLayoutEffect:()=>{},qc=`Portal`,Jc=O.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=O.useState(!1);Kc(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Dc.createPortal((0,k.jsx)(G.div,{...r,ref:t}),o):null});Jc.displayName=qc;function Yc(e,t){return O.useReducer((e,n)=>t[e][n]??e,e)}var Xc=e=>{let{present:t,children:n}=e,r=Zc(t),i=typeof n==`function`?n({present:r.isPresent}):O.Children.only(n),a=gc(r.ref,$c(i));return typeof n==`function`||r.isPresent?O.cloneElement(i,{ref:a}):null};Xc.displayName=`Presence`;function Zc(e){let[t,n]=O.useState(),r=O.useRef(null),i=O.useRef(e),a=O.useRef(`none`),[o,s]=Yc(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return O.useEffect(()=>{let e=Qc(r.current);a.current=o===`mounted`?e:`none`},[o]),Kc(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Qc(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Kc(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Qc(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Qc(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:O.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Qc(e){return e?.animationName||`none`}function $c(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var el=O.useInsertionEffect||Kc;function tl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=nl({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=O.useRef(e!==void 0);O.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,O.useCallback(t=>{if(s){let n=rl(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function nl({defaultProp:e,onChange:t}){let[n,r]=O.useState(e),i=O.useRef(n),a=O.useRef(t);return el(()=>{a.current=t},[t]),O.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function rl(e){return typeof e==`function`}var il=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`}),al=`VisuallyHidden`,ol=O.forwardRef((e,t)=>(0,k.jsx)(G.span,{...e,ref:t,style:{...il,...e.style}}));ol.displayName=al;var sl=c({Action:()=>tu,Close:()=>nu,Description:()=>eu,Provider:()=>Xl,Root:()=>Ql,Title:()=>$l,Toast:()=>kl,ToastAction:()=>zl,ToastClose:()=>Vl,ToastDescription:()=>Ll,ToastProvider:()=>gl,ToastTitle:()=>Fl,ToastViewport:()=>xl,Viewport:()=>Zl,createToastScope:()=>pl}),cl=`ToastProvider`,[ll,ul,dl]=Ec(`Toast`),[fl,pl]=vc(`Toast`,[dl]),[ml,hl]=fl(cl),gl=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=O.useState(null),[l,u]=O.useState(0),d=O.useRef(!1),f=O.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${cl}\`. Expected non-empty \`string\`.`),(0,k.jsx)(ll.Provider,{scope:t,children:(0,k.jsx)(ml,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:O.useCallback(()=>u(e=>e+1),[]),onToastRemove:O.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};gl.displayName=cl;var _l=`ToastViewport`,vl=[`F8`],yl=`toast.viewportPause`,bl=`toast.viewportResume`,xl=O.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=vl,label:i=`Notifications ({hotkey})`,...a}=e,o=hl(_l,n),s=ul(n),c=O.useRef(null),l=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=gc(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;O.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),O.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(yl);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(bl);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=O.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...Jl(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return O.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Yl(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,k.jsxs)(Gc,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,k.jsx)(Cl,{ref:l,onFocusFromOutsideViewport:()=>{Yl(h({tabbingDirection:`forwards`}))}}),(0,k.jsx)(ll.Slot,{scope:n,children:(0,k.jsx)(G.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,k.jsx)(Cl,{ref:u,onFocusFromOutsideViewport:()=>{Yl(h({tabbingDirection:`backwards`}))}})]})});xl.displayName=_l;var Sl=`ToastFocusProxy`,Cl=O.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=hl(Sl,n);return(0,k.jsx)(ol,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});Cl.displayName=Sl;var wl=`Toast`,Tl=`toast.swipeStart`,El=`toast.swipeMove`,Dl=`toast.swipeCancel`,Ol=`toast.swipeEnd`,kl=O.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=tl({prop:r,defaultProp:i??!0,onChange:a,caller:wl});return(0,k.jsx)(Xc,{present:n||s,children:(0,k.jsx)(Ml,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:kc(e.onPause),onResume:kc(e.onResume),onSwipeStart:pc(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:pc(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:pc(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:pc(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});kl.displayName=wl;var[Al,jl]=fl(wl,{onClose(){}}),Ml=O.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=hl(wl,n),[g,_]=O.useState(null),v=gc(t,e=>_(e)),y=O.useRef(null),b=O.useRef(null),x=i||h.duration,S=O.useRef(0),C=O.useRef(x),w=O.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=kc(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),A=O.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);O.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{A(C.current),l?.()},n=()=>{let e=new Date().getTime()-S.current;C.current-=e,window.clearTimeout(w.current),c?.()};return e.addEventListener(yl,n),e.addEventListener(bl,t),()=>{e.removeEventListener(yl,n),e.removeEventListener(bl,t)}}},[h.viewport,x,c,l,A]),O.useEffect(()=>{a&&!h.isClosePausedRef.current&&A(x)},[a,x,h.isClosePausedRef,A]),O.useEffect(()=>(T(),()=>E()),[T,E]);let j=O.useMemo(()=>g?Ul(g):null,[g]);return h.viewport?(0,k.jsxs)(k.Fragment,{children:[j&&(0,k.jsx)(Nl,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:j}),(0,k.jsx)(Al,{scope:n,onClose:D,children:Dc.createPortal((0,k.jsx)(ll.ItemSlot,{scope:n,children:(0,k.jsx)(Wc,{asChild:!0,onEscapeKeyDown:pc(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,k.jsx)(G.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:pc(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:pc(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:pc(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!b.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(b.current=l,Wl(El,d,f,{discrete:!1})):Gl(l,h.swipeDirection,c)?(b.current=l,Wl(Tl,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:pc(e.onPointerUp,e=>{let t=b.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),b.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Gl(t,h.swipeDirection,h.swipeThreshold)?Wl(Ol,p,r,{discrete:!0}):Wl(Dl,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Nl=e=>{let{__scopeToast:t,children:n,...r}=e,i=hl(wl,t),[a,o]=O.useState(!1),[s,c]=O.useState(!1);return Kl(()=>o(!0)),O.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,k.jsx)(Jc,{asChild:!0,children:(0,k.jsx)(ol,{...r,children:a&&(0,k.jsxs)(k.Fragment,{children:[i.label,` `,n]})})})},Pl=`ToastTitle`,Fl=O.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,k.jsx)(G.div,{...r,ref:t})});Fl.displayName=Pl;var Il=`ToastDescription`,Ll=O.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,k.jsx)(G.div,{...r,ref:t})});Ll.displayName=Il;var Rl=`ToastAction`,zl=O.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,k.jsx)(Hl,{altText:n,asChild:!0,children:(0,k.jsx)(Vl,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Rl}\`. Expected non-empty \`string\`.`),null)});zl.displayName=Rl;var Bl=`ToastClose`,Vl=O.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=jl(Bl,n);return(0,k.jsx)(Hl,{asChild:!0,children:(0,k.jsx)(G.button,{type:`button`,...r,ref:t,onClick:pc(e.onClick,i.onClose)})})});Vl.displayName=Bl;var Hl=O.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,k.jsx)(G.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Ul(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),ql(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Ul(e))}}),t}function Wl(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Oc(i,a):i.dispatchEvent(a)}var Gl=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function Kl(e=()=>{}){let t=kc(e);Kc(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function ql(e){return e.nodeType===e.ELEMENT_NODE}function Jl(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yl(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var Xl=gl,Zl=xl,Ql=kl,$l=Fl,eu=Ll,tu=zl,nu=Vl,ru=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,iu=Bo,au=(e,t)=>n=>{if(t?.variants==null)return iu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=ru(t)||ru(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return iu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},ou=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),su=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),cu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),lu=e=>{let t=cu(e);return t.charAt(0).toUpperCase()+t.slice(1)},uu={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`},du=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},fu=(0,O.createContext)({}),pu=()=>(0,O.useContext)(fu),mu=(0,O.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=pu()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,O.createElement)(`svg`,{ref:c,...uu,width:t??l??uu.width,height:t??l??uu.height,stroke:e??f,strokeWidth:m,className:ou(`lucide`,p,i),...!a&&!du(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,O.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),hu=(e,t)=>{let n=(0,O.forwardRef)(({className:n,...r},i)=>(0,O.createElement)(mu,{ref:i,iconNode:t,className:ou(`lucide-${su(lu(e))}`,`lucide-${e}`,n),...r}));return n.displayName=lu(e),n},gu=hu(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),_u=hu(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),vu=hu(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),yu=hu(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),bu=hu(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),xu=hu(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Su=hu(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Cu=hu(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),wu=hu(`copy-check`,[[`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`}]]),Tu=hu(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Eu=hu(`download`,[[`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`}]]),Du=hu(`external-link`,[[`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`}]]),Ou=hu(`eye-off`,[[`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`}]]),ku=hu(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Au=hu(`globe`,[[`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`}]]),ju=hu(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Mu=hu(`move-right`,[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]),Nu=hu(`move-vertical`,[[`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`}]]),Pu=hu(`pencil`,[[`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`}]]),Fu=hu(`pencil-ruler`,[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`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`}]]),Iu=hu(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Lu=hu(`rotate-ccw`,[[`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`}]]),Ru=hu(`save`,[[`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`}]]),zu=hu(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Bu=hu(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Vu=hu(`wand-sparkles`,[[`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`}]]),Hu=hu(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Uu=sl,Wu=({className:e,...t})=>(0,k.jsx)(Zl,{className:W(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]`,e),...t}),Gu=au(`group 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 pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-xl p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all [corner-shape:squircle] 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-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none supports-[corner-shape:squircle]:rounded-3xl`,{variants:{variant:{error:`bg-error/40 text-text`,success:`bg-success/30 text-text`,default:`bg-card/80 text-text`}},defaultVariants:{variant:`default`}}),Ku=({className:e,variant:t,...n})=>(0,k.jsx)(Ql,{className:W(Gu({variant:t}),e),...n}),qu=({className:e,...t})=>(0,k.jsx)(nu,{className:W(`absolute top-1 right-1 rounded-md p-1 text-text/50 opacity-0 transition-opacity hover:text-text/80 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 group-[.destructive]:hover:text-red-50`,e),"toast-close":``,...t,children:(0,k.jsx)(Hu,{className:`size-5`})}),Ju=({className:e,...t})=>(0,k.jsx)($l,{className:W(`font-semibold text-sm [&+div]:text-xs`,e),...t}),Yu=({className:e,...t})=>(0,k.jsx)(eu,{className:W(`text-sm opacity-90`,e),...t}),Xu=()=>{let e=(0,B.c)(2),{toasts:t}=Pi(),n;return e[0]===t?n=e[1]:(n=(0,k.jsxs)(Uu.Provider,{children:[t.map(Zu),(0,k.jsx)(Wu,{})]}),e[0]=t,e[1]=n),n};function Zu(e){let{id:t,title:n,description:r,action:i,...a}=e;return(0,k.jsxs)(Ku,{...a,children:[(0,k.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,k.jsx)(Ju,{children:n}),r&&(0,k.jsx)(Yu,{children:r})]}),i,(0,k.jsx)(qu,{})]},t)}var Qu=(0,O.createContext)({});function $u(e){let t=(0,O.useRef)(null);return t.current===null&&(t.current=e()),t.current}var ed=typeof window<`u`?O.useLayoutEffect:O.useEffect,td=(0,O.createContext)(null);function nd(e,t){e.indexOf(t)===-1&&e.push(t)}function rd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var id=(e,t,n)=>n>t?t:n<e?e:n,ad={},od=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),sd=e=>typeof e==`object`&&!!e,cd=e=>/^0[^.\s]+$/u.test(e);function ld(e){let t;return()=>(t===void 0&&(t=e()),t)}var ud=e=>e,dd=(...e)=>e.reduce((e,t)=>n=>t(e(n))),fd=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},pd=class{constructor(){this.subscriptions=[]}add(e){return nd(this.subscriptions,e),()=>rd(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},md=e=>e*1e3,hd=e=>e/1e3,gd=(e,t)=>t?1e3/t*e:0,_d=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,vd=1e-7,yd=12;function bd(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=_d(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>vd&&++s<yd);return o}function xd(e,t,n,r){if(e===t&&n===r)return ud;let i=t=>bd(t,0,1,e,n);return e=>e===0||e===1?e:_d(i(e),t,r)}var Sd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cd=e=>t=>1-e(1-t),wd=xd(.33,1.53,.69,.99),Td=Cd(wd),Ed=Sd(Td),Dd=e=>e>=1?1:(e*=2)<1?.5*Td(e):.5*(2-2**(-10*(e-1))),Od=e=>1-Math.sin(Math.acos(e)),kd=Cd(Od),Ad=Sd(Od),jd=xd(.42,0,1,1),Md=xd(0,0,.58,1),Nd=xd(.42,0,.58,1),Pd=e=>Array.isArray(e)&&typeof e[0]!=`number`,Fd=e=>Array.isArray(e)&&typeof e[0]==`number`,Id={linear:ud,easeIn:jd,easeInOut:Nd,easeOut:Md,circIn:Od,circInOut:Ad,circOut:kd,backIn:Td,backInOut:Ed,backOut:wd,anticipate:Dd},Ld=e=>typeof e==`string`,Rd=e=>{if(Fd(e)){e.length;let[t,n,r,i]=e;return xd(t,n,r,i)}else if(Ld(e))return Id[e],`${e}`,Id[e];return e},zd=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Bd={value:null,addProjectionMetrics:null};function Vd(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Bd.value&&Bd.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Hd=40;function Ud(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=zd.reduce((e,n)=>(e[n]=Vd(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ad.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Hd),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:zd.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<zd.length;t++)o[zd[t]].cancel(e)},state:i,steps:o}}var{schedule:Wd,cancel:Gd,state:Kd,steps:qd}=Ud(typeof requestAnimationFrame<`u`?requestAnimationFrame:ud,!0),Jd;function Yd(){Jd=void 0}var Xd={now:()=>(Jd===void 0&&Xd.set(Kd.isProcessing||ad.useManualTiming?Kd.timestamp:performance.now()),Jd),set:e=>{Jd=e,queueMicrotask(Yd)}},Zd={layout:0,mainThread:0,waapi:0},Qd=e=>t=>typeof t==`string`&&t.startsWith(e),$d=Qd(`--`),ef=Qd(`var(--`),tf=e=>ef(e)?nf.test(e.split(`/*`)[0].trim()):!1,nf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function rf(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var af={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},of={...af,transform:e=>id(0,1,e)},sf={...af,default:1},cf=e=>Math.round(e*1e5)/1e5,lf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uf(e){return e==null}var df=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ff=(e,t)=>n=>!!(typeof n==`string`&&df.test(n)&&n.startsWith(e)||t&&!uf(n)&&Object.prototype.hasOwnProperty.call(n,t)),pf=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(lf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},mf=e=>id(0,255,e),hf={...af,transform:e=>Math.round(mf(e))},gf={test:ff(`rgb`,`red`),parse:pf(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+hf.transform(e)+`, `+hf.transform(t)+`, `+hf.transform(n)+`, `+cf(of.transform(r))+`)`};function _f(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var vf={test:ff(`#`),parse:_f,transform:gf.transform},yf=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bf=yf(`deg`),xf=yf(`%`),K=yf(`px`),Sf=yf(`vh`),Cf=yf(`vw`),wf={...xf,parse:e=>xf.parse(e)/100,transform:e=>xf.transform(e*100)},Tf={test:ff(`hsl`,`hue`),parse:pf(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+xf.transform(cf(t))+`, `+xf.transform(cf(n))+`, `+cf(of.transform(r))+`)`},Ef={test:e=>gf.test(e)||vf.test(e)||Tf.test(e),parse:e=>gf.test(e)?gf.parse(e):Tf.test(e)?Tf.parse(e):vf.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?gf.transform(e):Tf.transform(e),getAnimatableNone:e=>{let t=Ef.parse(e);return t.alpha=0,Ef.transform(t)}},Df=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Of(e){return isNaN(e)&&typeof e==`string`&&(e.match(lf)?.length||0)+(e.match(Df)?.length||0)>0}var kf=`number`,Af=`color`,jf=`var`,Mf=`var(`,Nf="${}",Pf=/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 Ff(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Pf,e=>(Ef.test(e)?(r.color.push(a),i.push(Af),n.push(Ef.parse(e))):e.startsWith(Mf)?(r.var.push(a),i.push(jf),n.push(e)):(r.number.push(a),i.push(kf),n.push(parseFloat(e))),++a,Nf)).split(Nf),indexes:r,types:i}}function If(e){return Ff(e).values}function Lf({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===kf?i+=cf(r[a]):e===Af?i+=Ef.transform(r[a]):i+=r[a]}return i}}function Rf(e){return Lf(Ff(e))}var zf=e=>typeof e==`number`?0:Ef.test(e)?Ef.getAnimatableNone(e):e,Bf=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:zf(e);function Vf(e){let t=Ff(e);return Lf(t)(t.values.map((e,n)=>Bf(e,t.split[n])))}var Hf={test:Of,parse:If,createTransformer:Rf,getAnimatableNone:Vf};function Uf(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Wf({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Uf(s,r,e+1/3),a=Uf(s,r,e),o=Uf(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Gf(e,t){return n=>n>0?t:e}var Kf=(e,t,n)=>e+(t-e)*n,qf=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Jf=[vf,gf,Tf],Yf=e=>Jf.find(t=>t.test(e));function Xf(e){let t=Yf(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Tf&&(n=Wf(n)),n}var Zf=(e,t)=>{let n=Xf(e),r=Xf(t);if(!n||!r)return Gf(e,t);let i={...n};return e=>(i.red=qf(n.red,r.red,e),i.green=qf(n.green,r.green,e),i.blue=qf(n.blue,r.blue,e),i.alpha=Kf(n.alpha,r.alpha,e),gf.transform(i))},Qf=new Set([`none`,`hidden`]);function $f(e,t){return Qf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ep(e,t){return n=>Kf(e,t,n)}function tp(e){return typeof e==`number`?ep:typeof e==`string`?tf(e)?Gf:Ef.test(e)?Zf:ap:Array.isArray(e)?np:typeof e==`object`?Ef.test(e)?Zf:rp:Gf}function np(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>tp(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function rp(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=tp(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function ip(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var ap=(e,t)=>{let n=Hf.createTransformer(t),r=Ff(e),i=Ff(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Qf.has(e)&&!i.values.length||Qf.has(t)&&!r.values.length?$f(e,t):dd(np(ip(r,i),i.values),n):(`${e}${t}`,Gf(e,t))};function op(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Kf(e,t,n):tp(e)(e,t)}var sp=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Wd.update(t,e),stop:()=>Gd(t),now:()=>Kd.isProcessing?Kd.timestamp:Xd.now()}},cp=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},lp=2e4;function up(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function dp(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(up(r),lp);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:hd(i)}}var fp={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function pp(e,t){return e*Math.sqrt(1-t*t)}var mp=12;function hp(e,t,n){let r=n;for(let n=1;n<mp;n++)r-=e(r)/t(r);return r}var gp=.001;function _p({duration:e=fp.duration,bounce:t=fp.bounce,velocity:n=fp.velocity,mass:r=fp.mass}){let i,a;fp.maxDuration;let o=1-t;o=id(fp.minDamping,fp.maxDamping,o),e=id(fp.minDuration,fp.maxDuration,hd(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=pp(t,o),c=Math.exp(-i);return gp-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=pp(t**2,o);return(-i(t)+gp>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-gp+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=hp(i,a,s);if(e=md(e),isNaN(c))return{stiffness:fp.stiffness,damping:fp.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var vp=[`duration`,`bounce`],yp=[`stiffness`,`damping`,`mass`];function bp(e,t){return t.some(t=>e[t]!==void 0)}function xp(e){let t={velocity:fp.velocity,stiffness:fp.stiffness,damping:fp.damping,mass:fp.mass,isResolvedFromDuration:!1,...e};if(!bp(e,yp)&&bp(e,vp))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*id(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:fp.mass,stiffness:i,damping:a}}else{let n=_p({...e,velocity:0});t={...t,...n,mass:fp.mass},t.isResolvedFromDuration=!0}return t}function Sp(e=fp.visualDuration,t=fp.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=xp({...n,velocity:-hd(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=hd(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?fp.restSpeed.granular:fp.restSpeed.default,i||=v?fp.restDelta.granular:fp.restDelta.default;let y,b,x,S,C,w;if(h<1)x=pp(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>md(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=md(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=md(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(up(T),lp),t=cp(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Sp.applyToOptions=e=>{let t=dp(e,100,Sp);return e.ease=t.ease,e.duration=md(t.duration),e.type=`keyframes`,e};var Cp=5;function wp(e,t,n){let r=Math.max(t-Cp,0);return gd(n-e(r),t-r)}function Tp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Sp({keyframes:[f.value,m(f.value)],velocity:wp(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Ep(e,t,n){let r=[],i=n||ad.mix||op,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=dd(Array.isArray(t)?t[n]||ud:t,a)),r.push(a)}return r}function Dp(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Ep(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=fd(e[r],e[r+1],n);return s[r](i)};return n?t=>l(id(e[0],e[a-1],t)):l}function Op(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=fd(0,t,r);e.push(Kf(n,1,i))}}function kp(e){let t=[0];return Op(t,e.length-1),t}function Ap(e,t){return e.map(e=>e*t)}function jp(e,t){return e.map(()=>t||Nd).splice(0,e.length-1)}function Mp({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Pd(r)?r.map(Rd):Rd(r),a={done:!1,value:t[0]},o=Dp(Ap(n&&n.length===t.length?n:kp(t),e),t,{ease:Array.isArray(i)?i:jp(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Np=e=>e!==null;function Pp(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Np),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Fp={decay:Tp,inertia:Tp,tween:Mp,keyframes:Mp,spring:Sp};function Ip(e){typeof e.type==`string`&&(e.type=Fp[e.type])}var Lp=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Rp=e=>e/100,zp=class extends Lp{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Xd.now()&&this.tick(Xd.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Zd.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Ip(e);let{type:t=Mp,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Mp;s!==Mp&&typeof o[0]!=`number`&&(this.mixKeyframes=dd(Rp,op(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=up(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=id(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Tp&&(b.value=Pp(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return hd(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+hd(e)}get time(){return hd(this.currentTime)}set time(e){e=md(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return wp(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Xd.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=hd(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=sp,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(Xd.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Zd.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Bp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Vp=e=>e*180/Math.PI,Hp=e=>Wp(Vp(Math.atan2(e[1],e[0]))),Up={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Hp,rotateZ:Hp,skewX:e=>Vp(Math.atan(e[1])),skewY:e=>Vp(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Wp=e=>(e%=360,e<0&&(e+=360),e),Gp=Hp,Kp=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Jp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kp,scaleY:qp,scale:e=>(Kp(e)+qp(e))/2,rotateX:e=>Wp(Vp(Math.atan2(e[6],e[5]))),rotateY:e=>Wp(Vp(Math.atan2(-e[2],e[0]))),rotateZ:Gp,rotate:Gp,skewX:e=>Vp(Math.atan(e[4])),skewY:e=>Vp(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Yp(e){return+!!e.includes(`scale`)}function Xp(e,t){if(!e||e===`none`)return Yp(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Jp,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Up,i=t}if(!i)return Yp(t);let a=r[t],o=i[1].split(`,`).map(Qp);return typeof a==`function`?a(o):o[a]}var Zp=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Xp(n,t)};function Qp(e){return parseFloat(e.trim())}var $p=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],em=new Set($p),tm=e=>e===af||e===K,nm=new Set([`x`,`y`,`z`]),rm=$p.filter(e=>!nm.has(e));function im(e){let t=[];return rm.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var am={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Xp(t,`x`),y:(e,{transform:t})=>Xp(t,`y`)};am.translateX=am.x,am.translateY=am.y;var om=new Set,sm=!1,cm=!1,lm=!1;function um(){if(cm){let e=Array.from(om).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=im(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}cm=!1,sm=!1,om.forEach(e=>e.complete(lm)),om.clear()}function dm(){om.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cm=!0)})}function fm(){lm=!0,dm(),um(),lm=!1}var pm=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(om.add(this),sm||(sm=!0,Wd.read(dm),Wd.resolveKeyframes(um))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Bp(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),om.delete(this)}cancel(){this.state===`scheduled`&&(om.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},mm=e=>e.startsWith(`--`);function hm(e,t,n){mm(t)?e.style.setProperty(t,n):e.style[t]=n}var gm={};function _m(e,t){let n=ld(e);return()=>gm[t]??n()}var vm=_m(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),ym=_m(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),bm=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xm={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:bm([0,.65,.55,1]),circOut:bm([.55,0,1,.45]),backIn:bm([.31,.01,.66,-.59]),backOut:bm([.33,1.53,.69,.99])};function Sm(e,t){if(e)return typeof e==`function`?ym()?cp(e,t):`ease-out`:Fd(e)?bm(e):Array.isArray(e)?e.map(e=>Sm(e,t)||xm.easeOut):xm[e]}function Cm(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Sm(s,i);Array.isArray(d)&&(u.easing=d),Bd.value&&Zd.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Bd.value&&p.finished.finally(()=>{Zd.waapi--}),p}function wm(e){return typeof e==`function`&&`applyToOptions`in e}function Tm({type:e,...t}){return wm(e)&&ym()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Em=class extends Lp{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Tm(e);this.animation=Cm(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Pp(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),hm(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return hd(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+hd(e)}get time(){return hd(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=md(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&vm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ud):r(this)}},Dm={anticipate:Dd,backInOut:Ed,circInOut:Ad};function Om(e){return e in Dm}function km(e){typeof e.ease==`string`&&Om(e.ease)&&(e.ease=Dm[e.ease])}var Am=10,jm=class extends Em{constructor(e){km(e),Ip(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new zp({...a,autoplay:!1}),s=Math.max(Am,Xd.now()-this.startTime),c=id(0,Am,s-Am),l=o.sample(s).value,{name:u}=this.options;i&&u&&hm(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Mm=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Hf.test(e)||e===`0`)&&!e.startsWith(`url(`));function Nm(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Pm(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Mm(i,t),s=Mm(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Nm(e)||(n===`spring`||wm(n))&&r}function Fm(e){e.duration=0,e.type=`keyframes`}var Im=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Lm=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Rm(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Lm.test(e[t]))return!0;return!1}var zm=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Bm=ld(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Vm(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Bm()&&n&&(Im.has(n)||zm.has(n)&&Rm(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Hm=40,Um=class extends Lp{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Xd.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||pm;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Xd.now();let u=!0;Pm(e,i,a,o)||(u=!1,(ad.instantAnimations||!s)&&l?.(Pp(e,n,t)),e[0]=e[e.length-1],Fm(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Hm?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Vm(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new jm({...d,element:p})}catch{m=new zp(d)}else m=new zp(d);m.finished.then(()=>{this.notifyFinished()}).catch(ud),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),fm()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Wm(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Gm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Km(e){let t=Gm.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function qm(e,t,n=1){`${e}`;let[r,i]=Km(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return od(e)?parseFloat(e):e}return tf(i)?qm(i,t,n+1):i}var Jm={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ym=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xm={type:`keyframes`,duration:.8},Zm={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Qm=(e,{keyframes:t})=>t.length>2?Xm:em.has(e)?e.startsWith(`scale`)?Ym(t[1]):Jm:Zm;function $m(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function eh(e,t){let n=e?.[t]??e?.default??e;return n===e?n:$m(n,e)}var th=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function nh(e){for(let t in e)if(!th.has(t))return!0;return!1}var rh=(e,t,n,r={},i,a)=>o=>{let s=eh(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=md(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};nh(s)||Object.assign(u,Qm(e,u)),u.duration&&=md(u.duration),u.repeatDelay&&=md(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Fm(u),u.delay===0&&(d=!0)),(ad.instantAnimations||ad.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Fm(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Pp(u.keyframes,s);if(e!==void 0){Wd.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new zp(u):new Um(u)};function ih(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ah(e,t,n,r){if(typeof t==`function`){let[i,a]=ih(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ih(r);t=t(n===void 0?e.custom:n,i,a)}return t}function oh(e,t,n){let r=e.getProps();return ah(r,t,n===void 0?r.custom:n,e)}var sh=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...$p]),ch=30,lh=e=>!isNaN(parseFloat(e)),uh={current:void 0},dh=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Xd.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Xd.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=lh(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new pd);let n=this.events[e].add(t);return e===`change`?()=>{n(),Wd.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return uh.current&&uh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Xd.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ch)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ch);return gd(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function fh(e,t){return new dh(e,t)}var ph=e=>Array.isArray(e);function mh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fh(n))}function hh(e){return ph(e)?e[e.length-1]||0:e}function gh(e,t){let{transitionEnd:n={},transition:r={},...i}=oh(e,t)||{};i={...i,...n};for(let t in i)mh(e,t,hh(i[t]))}var _h=e=>!!(e&&e.getVelocity);function vh(e){return!!(_h(e)&&e.add)}function yh(e,t){let n=e.getValue(`willChange`);if(vh(n))return n.add(t);if(!n&&ad.WillChange){let n=new ad.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function bh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var xh=`data-`+bh(`framerAppearId`);function Sh(e){return e.props[xh]}function Ch({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?$m(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ch(f,t))continue;let o={delay:n,...eh(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Wd.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=Sh(e);if(n){let e=window.MotionHandoffAnimation(n,t,Wd);e!==null&&(o.startTime=e,p=!0)}}yh(e,t);let m=l??e.shouldReduceMotion;r.start(rh(t,r,i,m&&sh.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Wd.update(()=>{o&&gh(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Th(e,t,n={}){let r=oh(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(wh(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Eh(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Eh(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Th(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Wm(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Dh(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Th(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Th(e,t,n);else{let i=typeof t==`function`?oh(e,t,n.custom):t;r=Promise.all(wh(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Oh={test:e=>e===`auto`,parse:e=>e},kh=e=>t=>t.test(e),Ah=[af,K,xf,bf,Cf,Sf,Oh],jh=e=>Ah.find(kh(e));function Mh(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||cd(e)}var Nh=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Ph(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(lf)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Nh.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Fh=/\b([a-z-]*)\(.*?\)/gu,Ih={...Hf,getAnimatableNone:e=>{let t=e.match(Fh);return t?t.map(Ph).join(` `):e}},Lh={...Hf,getAnimatableNone:e=>{let t=Hf.parse(e);return Hf.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Rh={...af,transform:Math.round},zh={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,rotate:bf,rotateX:bf,rotateY:bf,rotateZ:bf,scale:sf,scaleX:sf,scaleY:sf,scaleZ:sf,skew:bf,skewX:bf,skewY:bf,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:of,originX:wf,originY:wf,originZ:K,zIndex:Rh,fillOpacity:of,strokeOpacity:of,numOctaves:Rh},Bh={...zh,color:Ef,backgroundColor:Ef,outlineColor:Ef,fill:Ef,stroke:Ef,borderColor:Ef,borderTopColor:Ef,borderRightColor:Ef,borderBottomColor:Ef,borderLeftColor:Ef,filter:Ih,WebkitFilter:Ih,mask:Lh,WebkitMask:Lh},Vh=e=>Bh[e],Hh=new Set([Ih,Lh]);function Uh(e,t){let n=Vh(e);return Hh.has(n)||(n=Hf),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Wh=new Set([`auto`,`none`,`0`]);function Gh(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Wh.has(t)&&Ff(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Uh(n,i)}var Kh=class extends pm{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),tf(r))){let i=qm(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!sh.has(n)||e.length!==2)return;let[r,i]=e,a=jh(r),o=jh(i);if(rf(r)!==rf(i)&&am[n]){this.needsMeasurement=!0;return}if(a!==o)if(tm(a)&&tm(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else am[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Mh(e[t]))&&n.push(t);n.length&&Gh(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=am[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=am[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function qh(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Jh=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Yh(e){return sd(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Xh,cancel:Zh}=Ud(queueMicrotask,!1),Qh={x:!1,y:!1};function $h(){return Qh.x||Qh.y}function eg(e){return e===`x`||e===`y`?Qh[e]?null:(Qh[e]=!0,()=>{Qh[e]=!1}):Qh.x||Qh.y?null:(Qh.x=Qh.y=!0,()=>{Qh.x=Qh.y=!1})}function tg(e,t){let n=qh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ng(e){return!(e.pointerType===`touch`||$h())}function rg(e,t,n={}){let[r,i,a]=tg(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!ng(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ig=(e,t)=>t?e===t?!0:ig(e,t.parentElement):!1,ag=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,og=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function sg(e){return og.has(e.tagName)||e.isContentEditable===!0}var cg=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function lg(e){return cg.has(e.tagName)||e.isContentEditable===!0}var ug=new WeakSet;function dg(e){return t=>{t.key===`Enter`&&e(t)}}function fg(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var pg=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=dg(()=>{if(ug.has(n))return;fg(n,`down`);let e=dg(()=>{fg(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>fg(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function mg(e){return ag(e)&&!$h()}var hg=new WeakSet;function gg(e,t,n={}){let[r,i,a]=tg(e,n),o=e=>{let r=e.currentTarget;if(!mg(e)||hg.has(e))return;ug.add(r),n.stopPropagation&&hg.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ug.has(r)&&ug.delete(r),mg(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||ig(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Yh(e)&&(e.addEventListener(`focus`,e=>pg(e,i)),!sg(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function _g(e){return sd(e)&&`ownerSVGElement`in e}var vg=new WeakMap,yg,bg=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:_g(r)&&`getBBox`in r?r.getBBox()[t]:r[n],xg=bg(`inline`,`width`,`offsetWidth`),Sg=bg(`block`,`height`,`offsetHeight`);function Cg({target:e,borderBoxSize:t}){vg.get(e)?.forEach(n=>{n(e,{get width(){return xg(e,t)},get height(){return Sg(e,t)}})})}function wg(e){e.forEach(Cg)}function Tg(){typeof ResizeObserver>`u`||(yg=new ResizeObserver(wg))}function Eg(e,t){yg||Tg();let n=qh(e);return n.forEach(e=>{let n=vg.get(e);n||(n=new Set,vg.set(e,n)),n.add(t),yg?.observe(e)}),()=>{n.forEach(e=>{let n=vg.get(e);n?.delete(t),n?.size||yg?.unobserve(e)})}}var Dg=new Set,Og;function kg(){Og=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Dg.forEach(t=>t(e))},window.addEventListener(`resize`,Og)}function Ag(e){return Dg.add(e),Og||kg(),()=>{Dg.delete(e),!Dg.size&&typeof Og==`function`&&(window.removeEventListener(`resize`,Og),Og=void 0)}}function jg(e,t){return typeof e==`function`?Ag(e):Eg(e,t)}function Mg(e){return _g(e)&&e.tagName===`svg`}var Ng=[...Ah,Ef,Hf],Pg=e=>Ng.find(kh(e)),Fg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ig=()=>({x:Fg(),y:Fg()}),Lg=()=>({min:0,max:0}),Rg=()=>({x:Lg(),y:Lg()}),zg=new WeakMap;function Bg(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Vg(e){return typeof e==`string`||Array.isArray(e)}var Hg=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Ug=[`initial`,...Hg];function Wg(e){return Bg(e.animate)||Ug.some(t=>Vg(e[t]))}function Gg(e){return!!(Wg(e)||e.variants)}function Kg(e,t,n){for(let r in t){let i=t[r],a=n[r];if(_h(i))e.addValue(r,i);else if(_h(a))e.addValue(r,fh(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,fh(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var qg={current:null},Jg={current:!1},Yg=typeof window<`u`;function Xg(){if(Jg.current=!0,Yg)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>qg.current=e.matches;e.addEventListener(`change`,t),t()}else qg.current=!1}var Zg=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Qg={};function $g(e){Qg=e}function e_(){return Qg}var t_=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=pm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Xd.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Wd.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Wg(t),this.isVariantNode=Gg(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&_h(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,zg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Jg.current||Xg(),this.shouldReduceMotion=qg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Gd(this.notifyUpdate),Gd(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Im.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Em({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:md(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=em.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Wd.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Qg){let t=Qg[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Rg()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Zg.length;t++){let n=Zg[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Kg(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=fh(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(od(n)||cd(n))?n=parseFloat(n):!Pg(n)&&Hf.test(t)&&(n=Uh(e,t)),this.setBaseTarget(e,_h(n)?n.get():n)),_h(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=ah(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!_h(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new pd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Xh.render(this.render)}},n_=class extends t_{constructor(){super(...arguments),this.KeyframeResolver=Kh}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;_h(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},r_=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function i_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function a_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function o_(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function s_(e){return e===void 0||e===1}function c_({scale:e,scaleX:t,scaleY:n}){return!s_(e)||!s_(t)||!s_(n)}function l_(e){return c_(e)||u_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function u_(e){return d_(e.x)||d_(e.y)}function d_(e){return e&&e!==`0%`}function f_(e,t,n){return n+t*(e-n)}function p_(e,t,n,r,i){return i!==void 0&&(e=f_(e,i,r)),f_(e,n,r)+t}function m_(e,t=0,n=1,r,i){e.min=p_(e.min,t,n,r,i),e.max=p_(e.max,t,n,r,i)}function h_(e,{x:t,y:n}){m_(e.x,t.translate,t.scale,t.originPoint),m_(e.y,n.translate,n.scale,n.originPoint)}var g_=.999999999999,__=1.0000000000001;function v_(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(y_(e.x,-a.scroll.offset.x),y_(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,h_(e,o)),r&&l_(a.latestValues)&&S_(e,a.latestValues,a.layout?.layoutBox))}t.x<__&&t.x>g_&&(t.x=1),t.y<__&&t.y>g_&&(t.y=1)}function y_(e,t){e.min+=t,e.max+=t}function b_(e,t,n,r,i=.5){m_(e,t,n,Kf(e.min,e.max,i),r)}function x_(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function S_(e,t,n){let r=n??e;b_(e.x,x_(t.x,r.x),t.scaleX,t.scale,t.originX),b_(e.y,x_(t.y,r.y),t.scaleY,t.scale,t.originY)}function C_(e,t){return i_(o_(e.getBoundingClientRect(),t))}function w_(e,t,n){let r=C_(e,n),{scroll:i}=t;return i&&(y_(r.x,i.offset.x),y_(r.y,i.offset.y)),r}var T_={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},E_=$p.length;function D_(e,t,n){let r=``,i=!0;for(let a=0;a<E_;a++){let o=$p[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Jh(s,zh[o]);if(!c){i=!1;let t=T_[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function O_(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(em.has(e)){o=!0;continue}else if($d(e)){i[e]=n;continue}else{let t=Jh(n,zh[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=D_(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function k_(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function A_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var j_={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(K.test(e))e=parseFloat(e);else return e;return`${A_(e,t.target.x)}% ${A_(e,t.target.y)}%`}},M_={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Hf.parse(e);if(i.length>5)return r;let a=Hf.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Kf(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},N_={borderRadius:{...j_,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:j_,borderTopRightRadius:j_,borderBottomLeftRadius:j_,borderBottomRightRadius:j_,boxShadow:M_};function P_(e,{layout:t,layoutId:n}){return em.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!N_[e]||e===`opacity`)}function F_(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(_h(r[t])||i&&_h(i[t])||P_(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function I_(e){return window.getComputedStyle(e)}var L_=class extends n_{constructor(){super(...arguments),this.type=`html`,this.renderInstance=k_}readValueFromInstance(e,t){if(em.has(t))return this.projection?.isProjecting?Yp(t):Zp(e,t);{let n=I_(e),r=($d(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return C_(e,t)}build(e,t,n){O_(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return F_(e,t,n)}},R_={offset:`stroke-dashoffset`,array:`stroke-dasharray`},z_={offset:`strokeDashoffset`,array:`strokeDasharray`};function B_(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?R_:z_;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var V_=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function H_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(O_(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of V_)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&B_(d,i,a,o,!1)}var U_=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`]),W_=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function G_(e,t,n,r){k_(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(U_.has(n)?n:bh(n),t.attrs[n])}function K_(e,t,n){let r=F_(e,t,n);for(let n in e)if(_h(e[n])||_h(t[n])){let t=$p.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var q_=class extends n_{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Rg}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(em.has(t)){let e=Vh(t);return e&&e.default||0}return t=U_.has(t)?t:bh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return K_(e,t,n)}build(e,t,n){H_(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){G_(e,t,n,r)}mount(e){this.isSVGTag=W_(e.tagName),super.mount(e)}},J_=Ug.length;function Y_(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Y_(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<J_;n++){let r=Ug[n],i=e.props[r];(Vg(i)||i===!1)&&(t[r]=i)}return t}function X_(e,t){if(!Array.isArray(t))return!1;let 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}var Z_=[...Hg].reverse(),Q_=Hg.length;function $_(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Dh(e,t,n)))}function ev(e){let t=$_(e),n=rv(),r=!0,i=!1,a=t=>(n,r)=>{let i=oh(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=Y_(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Q_;t++){let p=Z_[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Vg(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Bg(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=tv(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=ph(t)&&ph(n)?!X_(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=oh(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Wm(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=oh(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=rv(),i=!0}}}function tv(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!X_(t,e):!1}function nv(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rv(){return{animate:nv(!0),whileInView:nv(),whileHover:nv(),whileTap:nv(),whileDrag:nv(),whileFocus:nv(),exit:nv()}}function iv(e,t){e.min=t.min,e.max=t.max}function av(e,t){iv(e.x,t.x),iv(e.y,t.y)}function ov(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var sv=1e-4,cv=1-sv,lv=1+sv,uv=.01,dv=0-uv,fv=0+uv;function pv(e){return e.max-e.min}function mv(e,t,n){return Math.abs(e-t)<=n}function hv(e,t,n,r=.5){e.origin=r,e.originPoint=Kf(t.min,t.max,e.origin),e.scale=pv(n)/pv(t),e.translate=Kf(n.min,n.max,e.origin)-e.originPoint,(e.scale>=cv&&e.scale<=lv||isNaN(e.scale))&&(e.scale=1),(e.translate>=dv&&e.translate<=fv||isNaN(e.translate))&&(e.translate=0)}function gv(e,t,n,r){hv(e.x,t.x,n.x,r?r.originX:void 0),hv(e.y,t.y,n.y,r?r.originY:void 0)}function _v(e,t,n,r=0){e.min=(r?Kf(n.min,n.max,r):n.min)+t.min,e.max=e.min+pv(t)}function vv(e,t,n,r){_v(e.x,t.x,n.x,r?.x),_v(e.y,t.y,n.y,r?.y)}function yv(e,t,n,r=0){let i=r?Kf(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+pv(t)}function bv(e,t,n,r){yv(e.x,t.x,n.x,r?.x),yv(e.y,t.y,n.y,r?.y)}function xv(e,t,n,r,i){return e-=t,e=f_(e,1/n,r),i!==void 0&&(e=f_(e,1/i,r)),e}function Sv(e,t=0,n=1,r=.5,i,a=e,o=e){if(xf.test(t)&&(t=parseFloat(t),t=Kf(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Kf(a.min,a.max,r);e===a&&(s-=t),e.min=xv(e.min,t,n,s,i),e.max=xv(e.max,t,n,s,i)}function Cv(e,t,[n,r,i],a,o){Sv(e,t[n],t[r],t[i],t.scale,a,o)}var wv=[`x`,`scaleX`,`originX`],Tv=[`y`,`scaleY`,`originY`];function Ev(e,t,n,r){Cv(e.x,t,wv,n?n.x:void 0,r?r.x:void 0),Cv(e.y,t,Tv,n?n.y:void 0,r?r.y:void 0)}function Dv(e){return e.translate===0&&e.scale===1}function Ov(e){return Dv(e.x)&&Dv(e.y)}function kv(e,t){return e.min===t.min&&e.max===t.max}function Av(e,t){return kv(e.x,t.x)&&kv(e.y,t.y)}function jv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mv(e,t){return jv(e.x,t.x)&&jv(e.y,t.y)}function Nv(e){return pv(e.x)/pv(e.y)}function Pv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Fv(e){return[e(`x`),e(`y`)]}function Iv(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Lv=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Rv=Lv.length,zv=e=>typeof e==`string`?parseFloat(e):e,Bv=e=>typeof e==`number`||K.test(e);function Vv(e,t,n,r,i,a){i?(e.opacity=Kf(0,n.opacity??1,Uv(r)),e.opacityExit=Kf(t.opacity??1,0,Wv(r))):a&&(e.opacity=Kf(t.opacity??1,n.opacity??1,r));for(let i=0;i<Rv;i++){let a=Lv[i],o=Hv(t,a),s=Hv(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Bv(o)===Bv(s)?(e[a]=Math.max(Kf(zv(o),zv(s),r),0),(xf.test(s)||xf.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Kf(t.rotate||0,n.rotate||0,r))}function Hv(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Uv=Gv(0,.5,kd),Wv=Gv(.5,.95,ud);function Gv(e,t,n){return r=>r<e?0:r>t?1:n(fd(e,t,r))}function Kv(e,t,n){let r=_h(e)?e:fh(e);return r.start(rh(``,r,t,n)),r.animation}function qv(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var Jv=(e,t)=>e.depth-t.depth,Yv=class{constructor(){this.children=[],this.isDirty=!1}add(e){nd(this.children,e),this.isDirty=!0}remove(e){rd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Jv),this.isDirty=!1,this.children.forEach(e)}};function Xv(e,t){let n=Xd.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Gd(r),e(a-t))};return Wd.setup(r,!0),()=>Gd(r)}function Zv(e){return _h(e)?e.get():e}var Qv=class{constructor(){this.members=[]}add(e){nd(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(rd(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(rd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},$v={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ey={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ty=[``,`X`,`Y`,`Z`],ny=1e3,ry=0;function iy(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ay(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Sh(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Wd,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ay(r)}function oy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=ry++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Bd.value&&(ey.nodes=ey.calculatedTargetDeltas=ey.calculatedProjections=0),this.nodes.forEach(ly),this.nodes.forEach(vy),this.nodes.forEach(yy),this.nodes.forEach(uy),Bd.addProjectionMetrics&&Bd.addProjectionMetrics(ey)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Yv)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new pd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=_g(t)&&!Mg(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Wd.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Xv(i,250),$v.hasAnimatedSinceResize&&($v.hasAnimatedSinceResize=!1,this.nodes.forEach(_y)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Ey,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Mv(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...eh(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||_y(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Gd(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(by),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ay(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(py),this.nodes.forEach(fy);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(my);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hy),this.nodes.forEach(gy),this.nodes.forEach(sy),this.nodes.forEach(cy)):this.nodes.forEach(my),this.clearAllSnapshots();let e=Xd.now();Kd.delta=id(0,1e3/60,e-Kd.timestamp),Kd.timestamp=e,Kd.isProcessing=!0,qd.update.process(Kd),qd.preRender.process(Kd),qd.render.process(Kd),Kd.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dy),this.sharedNodes.forEach(xy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wd.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wd.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pv(this.snapshot.measuredBox.x)&&!pv(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Rg(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ov(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||l_(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Ay(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Rg();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(My))){let{scroll:e}=this.root;e&&(y_(t.x,e.offset.x),y_(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Rg();if(av(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&av(t,e),y_(t.x,i.offset.x),y_(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Rg();av(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(y_(r.x,-n.scroll.offset.x),y_(r.y,-n.scroll.offset.y)),l_(n.latestValues)&&S_(r,n.latestValues,n.layout?.layoutBox)}return l_(this.latestValues)&&S_(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Rg();av(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!l_(n.latestValues))continue;let r;n.instance&&(c_(n.latestValues)&&n.updateSnapshot(),r=Rg(),av(r,n.measurePageBox())),Ev(t,n.latestValues,n.snapshot?.layoutBox,r)}return l_(this.latestValues)&&Ev(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}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!==Kd.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Kd.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Rg(),this.targetWithTransforms=Rg()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vv(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):av(this.target,this.layout.layoutBox),h_(this.target,this.targetDelta)):av(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Bd.value&&ey.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||c_(this.parent.latestValues)||u_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Rg(),this.relativeTargetOrigin=Rg(),bv(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),av(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Kd.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;av(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;v_(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Rg());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ov(this.prevProjectionDelta.x,this.projectionDelta.x),ov(this.prevProjectionDelta.y,this.projectionDelta.y)),gv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Pv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Bd.value&&ey.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ig(),this.projectionDelta=Ig(),this.projectionDeltaWithTransform=Ig()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Ig();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Rg(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Ty));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Sy(a.x,e.x,n),Sy(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bv(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),wy(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Av(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Rg(),av(d,this.relativeTarget)),s&&(this.animationValues=i,Vv(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Gd(this.pendingAnimation),void 0),this.pendingAnimation=Wd.update(()=>{$v.hasAnimatedSinceResize=!0,Zd.layout++,this.motionValue||=fh(0),this.motionValue.jump(0,!1),this.currentAnimation=Kv(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Zd.layout--},onComplete:()=>{Zd.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ny),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&jy(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Rg();let t=pv(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=pv(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}av(t,n),S_(t,i),gv(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Qv),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&iy(`z`,e,r,this.animationValues);for(let t=0;t<ty.length;t++)iy(`rotate${ty[t]}`,e,r,this.animationValues),iy(`skew${ty[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Zv(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Zv(t?.pointerEvents)||``),this.hasProjected&&!l_(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Iv(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in N_){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=N_[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Zv(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(fy),this.root.sharedNodes.clear()}}}function sy(e){e.updateLayout()}function cy(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Fv(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=pv(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;iv(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else jy(i,t.layoutBox,n)&&Fv(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=pv(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ig();gv(o,n,t.layoutBox);let s=Ig();a?gv(s,e.applyTransform(r,!0),t.measuredBox):gv(s,n,t.layoutBox);let c=!Ov(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Rg();bv(s,t.layoutBox,i.layoutBox,o);let c=Rg();bv(c,n,a.layoutBox,o),Mv(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ly(e){Bd.value&&ey.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function uy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dy(e){e.clearSnapshot()}function fy(e){e.clearMeasurements()}function py(e){e.isLayoutDirty=!0,e.updateLayout()}function my(e){e.isLayoutDirty=!1}function hy(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function gy(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function _y(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vy(e){e.resolveTargetDelta()}function yy(e){e.calcProjection()}function by(e){e.resetSkewAndRotation()}function xy(e){e.removeLeadSnapshot()}function Sy(e,t,n){e.translate=Kf(t.translate,0,n),e.scale=Kf(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Cy(e,t,n,r){e.min=Kf(t.min,n.min,r),e.max=Kf(t.max,n.max,r)}function wy(e,t,n,r){Cy(e.x,t.x,n.x,r),Cy(e.y,t.y,n.y,r)}function Ty(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Ey={duration:.45,ease:[.4,0,.1,1]},Dy=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Oy=Dy(`applewebkit/`)&&!Dy(`chrome/`)?Math.round:ud;function ky(e){e.min=Oy(e.min),e.max=Oy(e.max)}function Ay(e){ky(e.x),ky(e.y)}function jy(e,t,n){return e===`position`||e===`preserve-aspect`&&!mv(Nv(t),Nv(n),.2)}function My(e){return e!==e.root&&e.scroll?.wasRoot}var Ny=oy({attachResizeListener:(e,t)=>qv(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Py={current:void 0},Fy=oy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Py.current){let e=new Ny({});e.mount(window),e.setOptions({layoutScroll:!0}),Py.current=e}return Py.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Iy=(0,O.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Ly(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ry(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ly(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ly(e[t],null)}}}}function zy(...e){return O.useCallback(Ry(...e),e)}var By=class extends O.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Yh(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Yh(e)&&e.offsetWidth||0,r=Yh(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Vy({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,O.useId)(),s=(0,O.useRef)(null),c=(0,O.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,O.useContext)(Iy),u=zy(s,e.props?.ref??e?.ref);return(0,O.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
12
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=zn(),d;if(t){let e=typeof t==`string`?At(t):t;wt(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Nt(e,{pathname:p});Tt(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Tt(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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 h=$n(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ln([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:ln([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?O.createElement(kn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function qn(){let e=cr(),t=hn(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)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=O.createElement(O.Fragment,null,O.createElement(`p`,null,`💿 Hey developer 👋`),O.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,O.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,O.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),O.createElement(O.Fragment,null,O.createElement(`h2`,null,`Unexpected Application Error!`),O.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?O.createElement(`pre`,{style:i},n):null,o)}var Jn=O.createElement(qn,null),Yn=class extends O.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?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=In(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:O.createElement(An.Provider,{value:this.props.routeContext},O.createElement(jn.Provider,{value:e,children:this.props.component}));return this.context?O.createElement(Zn,{error:e},t):t}};Yn.contextType=Cn;var Xn=new WeakMap;function Zn({children:e,error:t}){let{basename:n}=O.useContext(On);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Fn(t.digest);if(e){let r=Xn.get(t);if(r)throw r;let i=vn(e.location,n);if(_n&&!Xn.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Xn.set(t,n),n}return O.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Qn({routeContext:e,match:t,children:n}){let r=O.useContext(xn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(An.Provider,{value:e},n)}function $n(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);wt(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:gn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Jn,o&&(s<0&&c===0?(dr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?O.createElement(n.route.Component,null):n.route.element?n.route.element:e,O.createElement(Qn,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?O.createElement(Yn,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function er(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tr(e){let t=O.useContext(xn);return wt(t,er(e)),t}function nr(e){let t=O.useContext(Sn);return wt(t,er(e)),t}function rr(e){let t=O.useContext(An);return wt(t,er(e)),t}function ir(e){let t=rr(e),n=t.matches[t.matches.length-1];return wt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ar(){return ir(`useRouteId`)}function or(){return nr(`useNavigation`).navigation}function sr(){let{matches:e,loaderData:t}=nr(`useMatches`);return O.useMemo(()=>e.map(e=>Ft(e,t)),[e,t])}function cr(){let e=O.useContext(jn),t=nr(`useRouteError`),n=ir(`useRouteError`);return e===void 0?t.errors?.[n]:e}function lr(){let{router:e}=tr(`useNavigate`),t=ir(`useNavigate`),n=O.useRef(!1);return Vn(()=>{n.current=!0}),O.useCallback(async(r,i={})=>{Tt(n.current,Bn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ur={};function dr(e,t,n){!t&&!ur[e]&&(ur[e]=!0,Tt(!1,n))}O.memo(fr);function fr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Kn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function pr(e){wt(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function mr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){wt(!Rn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=O.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=At(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=O.useMemo(()=>{let e=$t(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Tt(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:O.createElement(On.Provider,{value:c},O.createElement(kn.Provider,{children:t,value:h}))}function hr({children:e,location:t}){return Gn(gr(e),t)}O.Component;function gr(e,t=[]){let n=[];return O.Children.forEach(e,(e,r)=>{if(!O.isValidElement(e))return;let i=[...t,r];if(e.type===O.Fragment){n.push.apply(n,gr(e.props.children,i));return}wt(e.type===pr,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),wt(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=gr(e.props.children,i)),n.push(a)}),n}var _r=`get`,vr=`application/x-www-form-urlencoded`;function yr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function br(e){return yr(e)&&e.tagName.toLowerCase()===`button`}function xr(e){return yr(e)&&e.tagName.toLowerCase()===`form`}function Sr(e){return yr(e)&&e.tagName.toLowerCase()===`input`}function Cr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wr(e,t){return e.button===0&&(!t||t===`_self`)&&!Cr(e)}var Tr=null;function Er(){if(Tr===null)try{new FormData(document.createElement(`form`),0),Tr=!1}catch{Tr=!0}return Tr}var Dr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Or(e){return e!=null&&!Dr.has(e)?(Tt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vr}"`),null):e}function kr(e,t){let n,r,i,a,o;if(xr(e)){let o=e.getAttribute(`action`);r=o?$t(o,t):null,n=e.getAttribute(`method`)||_r,i=Or(e.getAttribute(`enctype`))||vr,a=new FormData(e)}else if(br(e)||Sr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?$t(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||_r,i=Or(e.getAttribute(`formenctype`))||Or(o.getAttribute(`enctype`))||vr,a=new FormData(o,e),!Er()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(yr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=_r,r=null,i=vr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ar={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},jr=/[&><\u2028\u2029]/g;function Mr(e){return e.replace(jr,e=>Ar[e])}function Nr(e,t){if(e===!1||e==null)throw Error(t)}function Pr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&$t(i.pathname,t)===`/`?i.pathname=`${un(t)}/_root.${r}`:i.pathname=`${un(i.pathname)}.${r}`,i}async function Fr(e,t){if(e.id in t)return t[e.id];try{let n=await Le(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ir(e){return e!=null&&typeof e.page==`string`}function Lr(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 Rr(e,t,n){return Ur((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Fr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Lr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function zr(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Br(e,t,{includeHydrateFallback:n}={}){return Vr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Vr(e){return[...new Set(e)]}function Hr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ur(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ir(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Hr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Wr(){let e=O.useContext(xn);return Nr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Gr(){let e=O.useContext(Sn);return Nr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Kr=O.createContext(void 0);Kr.displayName=`FrameworkContext`;function qr(){let e=O.useContext(Kr);return Nr(e,`You must render this element inside a <HydratedRouter> element`),e}function Jr(e,t){let n=O.useContext(Kr),[r,i]=O.useState(!1),[a,o]=O.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=O.useRef(null);O.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),O.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Yr(s,p),onBlur:Yr(c,m),onMouseEnter:Yr(l,p),onMouseLeave:Yr(u,m),onTouchStart:Yr(d,p)}]:[a,f,{}]:[!1,f,{}]}function Yr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Xr({page:e,...t}){let n=wn(),{router:r}=Wr(),i=O.useMemo(()=>Nt(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?O.createElement(Qr,{page:e,matches:i,...t}):O.createElement($r,{page:e,matches:i,...t}):null}function Zr(e){let{manifest:t,routeModules:n}=qr(),[r,i]=O.useState([]);return O.useEffect(()=>{let r=!1;return Rr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Qr({page:e,matches:t,...n}){let r=zn(),{future:i}=qr(),{basename:a}=Wr(),o=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Pr(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return O.createElement(O.Fragment,null,o.map(e=>O.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function $r({page:e,matches:t,...n}){let r=zn(),{future:i,manifest:a,routeModules:o}=qr(),{basename:s}=Wr(),{loaderData:c,matches:l}=Gr(),u=O.useMemo(()=>zr(e,t,l,a,r,`data`),[e,t,l,a,r]),d=O.useMemo(()=>zr(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Pr(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=O.useMemo(()=>Br(d,a),[d,a]),m=Zr(d);return O.createElement(O.Fragment,null,f.map(e=>O.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>O.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>O.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ei(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}O.Component;var ti=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ti&&(window.__reactRouterVersion=`7.15.0`)}catch{}function ni({basename:e,children:t,useTransitions:n,window:r}){let i=O.useRef();i.current??=Ct({window:r,v5Compat:!0});let a=i.current,[o,s]=O.useState({action:a.action,location:a.location}),c=O.useCallback(e=>{n===!1?s(e):O.startTransition(()=>s(e))},[n]);return O.useLayoutEffect(()=>a.listen(c),[a,c]),O.createElement(mr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function ri({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=O.useState({action:n.action,location:n.location}),o=O.useCallback(e=>{r===!1?a(e):O.startTransition(()=>a(e))},[r]);return O.useLayoutEffect(()=>n.listen(o),[n,o]),O.createElement(mr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}ri.displayName=`unstable_HistoryRouter`;var ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ai=O.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=O.useContext(On),v=typeof l==`string`&&ii.test(l),y=vn(l,h);l=y.to;let b=Ln(l,{relative:r}),x=zn(),S=null;if(o){let e=sn(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ln([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=Jr(n,p),E=fi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let k=!(y.isExternal||i),A=O.createElement(`a`,{...p,...T,href:(k?S:void 0)||y.absoluteURL||b,onClick:k?D:e,ref:ei(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?O.createElement(O.Fragment,null,A,O.createElement(Xr,{page:b})):A});ai.displayName=`Link`;var oi=O.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Wn(a,{relative:c.relative}),d=zn(),f=O.useContext(Sn),{navigator:p,basename:m}=O.useContext(On),h=f!=null&&Si(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=$t(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return O.createElement(ai,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});oi.displayName=`NavLink`;var si=O.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=_r,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=O.useContext(On),g=hi(),_=gi(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&ii.test(s);return O.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?O.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});si.displayName=`Form`;function ci({getKey:e,storageKey:t,...n}){let r=O.useContext(Kr),{basename:i}=O.useContext(On),a=zn(),o=sr();bi({getKey:e,storageKey:t});let s=O.useMemo(()=>{if(!r||!e)return null;let t=yi(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return O.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Mr(JSON.stringify(t||_i))}, ${Mr(JSON.stringify(s))})`}})}ci.displayName=`ScrollRestoration`;function li(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ui(e){let t=O.useContext(xn);return wt(t,li(e)),t}function di(e){let t=O.useContext(Sn);return wt(t,li(e)),t}function fi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Hn(),d=zn(),f=Wn(e,{relative:o});return O.useCallback(p=>{if(wr(p,t)){p.preventDefault();let t=n===void 0?kt(d)===kt(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?O.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var pi=0,mi=()=>`__${String(++pi)}__`;function hi(){let{router:e}=ui(`useSubmit`),{basename:t}=O.useContext(On),n=ar(),r=e.fetch,i=e.navigate;return O.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=kr(e,t);a.navigate===!1?await r(a.fetcherKey||mi(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function gi(e,{relative:t}={}){let{basename:n}=O.useContext(On),r=O.useContext(An);wt(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Wn(e||`.`,{relative:t})},o=zn();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ln([n,a.pathname])),kt(a)}var _i=`react-router-scroll-positions`,vi={};function yi(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:$t(e.pathname,n)||e.pathname},t)),i??=e.key,i}function bi({getKey:e,storageKey:t}={}){let{router:n}=ui(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=di(`useScrollRestoration`),{basename:a}=O.useContext(On),o=zn(),s=sr(),c=or();O.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),xi(O.useCallback(()=>{if(c.state===`idle`){let t=yi(o,s,a,e);vi[t]=window.scrollY}try{sessionStorage.setItem(t||_i,JSON.stringify(vi))}catch(e){Tt(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(O.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||_i);e&&(vi=JSON.parse(e))}catch{}},[t]),O.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(vi,()=>window.scrollY,e?(t,n)=>yi(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),O.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Tt(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function xi(e,t){let{capture:n}=t||{};O.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Si(e,{relative:t}={}){let n=O.useContext(Tn);wt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ui(`useViewTransitionState`),i=Wn(e,{relative:t});if(!n.isTransitioning)return!1;let a=$t(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=$t(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Xt(i.pathname,o)!=null||Xt(i.pathname,a)!=null}var Ci=1,wi=900*1e3,Ti=0,Ei=()=>(Ti=(Ti+1)%(2**53-1),Ti.toString()),Di=new Map,Oi=e=>{if(Di.has(e))return;let t=setTimeout(()=>{Di.delete(e),Mi({type:`REMOVE_TOAST`,toastId:e})},wi);Di.set(e,t)},ki=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,Ci)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?Oi(n):e.toasts.forEach(e=>{Oi(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},Ai=[],ji={toasts:[]},Mi=e=>{ji=ki(ji,e),Ai.forEach(e=>{e(ji)})},Ni=({...e})=>{let t=Ei(),n=e=>Mi({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>Mi({type:`DISMISS_TOAST`,toastId:t});return Mi({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},Pi=()=>{let e=(0,B.c)(5),[t,n]=(0,O.useState)(ji),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>(Ai.push(n),()=>{let e=Ai.indexOf(n);e>-1&&Ai.splice(e,1)}),e[0]=r):r=e[0];let i;e[1]===t?i=e[2]:(i=[t],e[1]=t,e[2]=i),(0,O.useEffect)(r,i);let a;return e[3]===t?a=e[4]:(a={...t,toast:Ni,dismiss:Fi},e[3]=t,e[4]=a),a};function Fi(e){return Mi({type:`DISMISS_TOAST`,toastId:e})}var Ii={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Li=new class{#e=Ii;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};typeof window>`u`||`Deno`in globalThis;function Ri(){}function zi(e){let t;if(e.then(e=>(t=e,e),Ri)?.catch(Ri),t!==void 0)return{data:t}}function Bi(e){return e}function Vi(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function Hi(e,t,n){let r=()=>{let r=e.promise?.then(t).catch(e=>n(e)?Promise.reject(Error(`redacted`)):Promise.reject(e));return r?.catch(Ri),r};return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status===`pending`&&{promise:r()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function Ui(e){return e.state.isPaused}function Wi(e){return e.state.status===`success`}function Gi(e){return!0}function Ki(e,t={}){let n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??Ui,r=e.getMutationCache().getAll().flatMap(e=>n(e)?[Vi(e)]:[]),i=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??Wi,a=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??Gi,o=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??Bi;return{mutations:r,queries:e.getQueryCache().getAll().flatMap(e=>i(e)?[Hi(e,o,a)]:[])}}function qi(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??Bi,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?zi(c):void 0,f=r.data===void 0?d?.data:r.data,p=f===void 0?f:a(f),m=i.get(o),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&l!==void 0&&l>m.state.dataUpdatedAt;if(r.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;m.setState({...t,data:p,...r.status===`pending`&&p!==void 0&&{status:`success`,...!g&&{fetchStatus:`idle`}}})}}else m=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:p,fetchStatus:`idle`,status:r.status===`pending`&&p!==void 0?`success`:r.status});c&&!d&&!h&&!g&&(l===void 0||l>m.state.dataUpdatedAt)&&m.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(Ri)})}function Ji(){}function Yi(e,{interval:t=1e3,onError:n=Ji}={}){if(typeof e!=`function`)throw Error(`argument is not function.`);let r=0,i=null,a=!1,o=!1;return async(...s)=>{if(i=s,!o){for(o=!0;a;)await new Promise(e=>Li.setTimeout(e,t));for(;Date.now()<r;)await new Promise(e=>Li.setTimeout(e,r-Date.now()));o=!1,a=!0;try{await e(...i)}catch(e){try{n(e)}catch{}}r=Date.now()+t,a=!1}}}var Xi=({storage:e,key:t=`REACT_QUERY_OFFLINE_CACHE`,throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:i=JSON.parse,retry:a})=>{if(e){let o=async n=>{try{let i=await r(n);await e.setItem(t,i);return}catch(e){return e}};return{persistClient:Yi(async e=>{let t=e,n=await o(t),r=0;for(;n&&t;)r++,t=await a?.({persistedClient:t,error:n,errorCount:r}),t&&(n=await o(t))},{interval:n}),restoreClient:async()=>{let n=await e.getItem(t);if(n)return await i(n)},removeClient:()=>e.removeItem(t)}}return{persistClient:Ji,restoreClient:()=>Promise.resolve(void 0),removeClient:Ji}},Zi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qi=new class extends Zi{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},$i={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ea=new class{#e=$i;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ta(e){setTimeout(e,0)}var na=typeof window>`u`||`Deno`in globalThis;function ra(){}function ia(e,t){return typeof e==`function`?e(t):e}function aa(e){return typeof e==`number`&&e>=0&&e!==1/0}function oa(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sa(e,t){return typeof e==`function`?e(t):e}function ca(e,t){return typeof e==`function`?e(t):e}function la(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==da(o,t.options))return!1}else if(!pa(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ua(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(fa(t.options.mutationKey)!==fa(a))return!1}else if(!pa(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function da(e,t){return(t?.queryKeyHashFn||fa)(e)}function fa(e){return JSON.stringify(e,(e,t)=>va(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function pa(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>pa(e[n],t[n])):!1}var ma=Object.prototype.hasOwnProperty;function ha(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=_a(e)&&_a(t);if(!r&&!(va(e)&&va(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ma.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ha(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ga(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function _a(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function va(e){if(!ya(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ya(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ya(e){return Object.prototype.toString.call(e)===`[object Object]`}function ba(e){return new Promise(t=>{ea.setTimeout(t,e)})}function xa(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ha(e,t)}function Sa(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ca(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wa=Symbol();function Ta(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===wa?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ea(e,t){return typeof e==`function`?e(...t):!!e}function Da(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Oa=(()=>{let e=()=>na;return{isServer(){return e()},setIsServer(t){e=t}}})();function ka(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Aa=ta;function ja(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Aa,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Ma=ja(),Na=new class extends Zi{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Pa(e){return Math.min(1e3*2**e,3e4)}function Fa(e){return(e??`online`)===`online`?Na.isOnline():!0}var Ia=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function La(e){let t=!1,n=0,r,i=ka(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Ia(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Qi.isFocused()&&(e.networkMode===`always`||Na.isOnline())&&e.canRun(),u=()=>Fa(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Oa.isServer()?0:3),o=e.retryDelay??Pa,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),ba(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Ra=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),aa(this.gcTime)&&(this.#e=ea.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Oa.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ea.clearTimeout(this.#e),this.#e=void 0)}};function za(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Da(e,()=>t.signal,()=>n=!0)},u=Ta(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Ca:Sa;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Va:Ba,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ba(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Ba(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Va(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ha=class extends Ra{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ga(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ga(this.options);e.data!==void 0&&(this.setState(Wa(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=xa(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ra).catch(ra):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ca(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wa||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>sa(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!oa(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ta(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?za(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=La({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ia&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ia){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ua(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Wa(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Ma.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ua(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fa(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Wa(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ga(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ka=class extends Zi{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=ka(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ja(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ya(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ya(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ca(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ga(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Xa(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ca(this.options.enabled,this.#t)!==ca(t.enabled,this.#t)||sa(this.options.staleTime,this.#t)!==sa(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ca(this.options.enabled,this.#t)!==ca(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Qa(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ra)),t}#g(){this.#b();let e=sa(this.options.staleTime,this.#t);if(Oa.isServer()||this.#r.isStale||!aa(e))return;let t=oa(this.#r.dataUpdatedAt,e)+1;this.#d=ea.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Oa.isServer()||ca(this.options.enabled,this.#t)===!1||!aa(this.#p)||this.#p===0)&&(this.#f=ea.setInterval(()=>{(this.options.refetchIntervalInBackground||Qi.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(ea.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(ea.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ja(e,t),o=i&&Xa(e,n,t,r);(a||o)&&(l={...l,...Ua(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=xa(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=xa(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Za(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ca(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=ka())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ga(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Ma.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function qa(e,t){return ca(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&ca(t.retryOnMount,e)===!1)}function Ja(e,t){return qa(e,t)||e.state.data!==void 0&&Ya(e,t,t.refetchOnMount)}function Ya(e,t,n){if(ca(t.enabled,e)!==!1&&sa(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Za(e,t)}return!1}function Xa(e,t,n,r){return(e!==t||ca(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Za(e,n)}function Za(e,t){return ca(t.enabled,e)!==!1&&e.isStaleByTime(sa(t.staleTime,e))}function Qa(e,t){return!ga(e.getCurrentResult(),t)}var $a=class extends Ra{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||eo(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=La({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Ma.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function eo(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var to=class extends Zi{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new $a({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=no(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=no(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=no(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=no(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Ma.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ua(t,e))}findAll(e={}){return this.getAll().filter(t=>ua(e,t))}notify(e){Ma.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Ma.batch(()=>Promise.all(e.map(e=>e.continue().catch(ra))))}};function no(e){return e.options.scope?.id}var ro=class extends Zi{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ga(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&fa(t.mutationKey)!==fa(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??eo();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Ma.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},io=class extends Zi{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??da(r,t),a=this.get(i);return a||(a=new Ha({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Ma.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>la(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>la(e,t)):t}notify(e){Ma.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ma.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ma.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ao=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new io,this.#t=e.mutationCache||new to,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Qi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Na.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sa(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ia(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ma.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Ma.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Ma.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Ma.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ra).catch(ra)}invalidateQueries(e,t={}){return Ma.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ma.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ra)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(ra)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(sa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ra).catch(ra)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ra).catch(ra)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Na.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(fa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{pa(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(fa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{pa(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=da(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===wa&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},oo=O.createContext(void 0),so=e=>{let t=O.useContext(oo);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},co=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,k.jsx)(oo.Provider,{value:e,children:t})),lo=O.createContext(!1),uo=()=>O.useContext(lo),fo=lo.Provider;function V(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var po=O.createContext(V()),mo=()=>O.useContext(po),ho=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Ea(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},go=e=>{O.useEffect(()=>{e.clearReset()},[e])},_o=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Ea(n,[e.error,r])),vo=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},yo=(e,t)=>e.isLoading&&e.isFetching&&!t,bo=(e,t)=>e?.suspense&&t.isPending,xo=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function So(e,t,n){let r=uo(),i=mo(),a=so(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,vo(o),ho(o,i,s),go(i);let c=!a.getQueryCache().get(o.queryHash),[l]=O.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(e=>{let t=d?l.subscribe(Ma.batchCalls(e)):ra;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),O.useEffect(()=>{l.setOptions(o)},[o,l]),bo(o,u))throw xo(o,l,i);if(_o({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!Oa.isServer()&&yo(u,r)&&(c?xo(o,l,i):s?.promise)?.catch(ra).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function Co(e,t){return So(e,Ka,t)}function wo(e,t){let n=so(t),[r]=O.useState(()=>new ro(n,e));O.useEffect(()=>{r.setOptions(e)},[r,e]);let i=O.useSyncExternalStore(O.useCallback(e=>r.subscribe(Ma.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=O.useCallback((e,t)=>{r.mutate(e,t).catch(ra)},[r]);if(i.error&&Ea(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var To=[`added`,`removed`,`updated`];function Eo(e){return To.includes(e)}async function Do({queryClient:e,persister:t,maxAge:n=1e3*60*60*24,buster:r=``,hydrateOptions:i}){try{let a=await t.restoreClient();if(a)if(a.timestamp){let o=Date.now()-a.timestamp>n,s=a.buster!==r;if(o||s)return t.removeClient();qi(e,a.clientState,i)}else return t.removeClient()}catch(e){throw await t.removeClient(),e}}async function Oo({queryClient:e,persister:t,buster:n=``,dehydrateOptions:r}){let i={buster:n,timestamp:Date.now(),clientState:Ki(e,r)};await t.persistClient(i)}function ko(e){let t=e.queryClient.getQueryCache().subscribe(t=>{Eo(t.type)&&Oo(e)}),n=e.queryClient.getMutationCache().subscribe(t=>{Eo(t.type)&&Oo(e)});return()=>{t(),n()}}var Ao=({children:e,persistOptions:t,onSuccess:n,onError:r,...i})=>{let[a,o]=O.useState(!0),s=O.useRef({persistOptions:t,onSuccess:n,onError:r}),c=O.useRef(!1);return O.useEffect(()=>{s.current={persistOptions:t,onSuccess:n,onError:r}}),O.useEffect(()=>{let e={...s.current.persistOptions,queryClient:i.client};return c.current||(c.current=!0,Do(e).then(()=>s.current.onSuccess?.()).catch(()=>s.current.onError?.()).finally(()=>{o(!1)})),a?void 0:ko(e)},[i.client,a]),(0,k.jsx)(co,{...i,children:(0,k.jsx)(fo,{value:a,children:e})})},jo=1e3*60*60*24,Mo=`v1`,No={queries:{retry:1,staleTime:30*1e3,gcTime:jo,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1},mutations:{retry:0}},Po=Xi({storage:typeof window<`u`?{getItem:e=>Promise.resolve(window.localStorage.getItem(e)),setItem:(e,t)=>Promise.resolve(window.localStorage.setItem(e,t)),removeItem:e=>Promise.resolve(window.localStorage.removeItem(e))}:{getItem:()=>Promise.resolve(null),setItem:()=>Promise.resolve(),removeItem:()=>Promise.resolve()},key:`intlayer-rq-cache`}),Fo=e=>e.split(`_`).join(` `),Io=()=>{let e=(0,B.c)(7),{toast:t}=Pi(),n;e[0]===t?n=e[1]:(n=e=>{[(()=>{try{if(typeof e==`string`)return JSON.parse(e);if(e instanceof Error)return JSON.parse(e.message)}catch{}return e})()].flat().forEach(e=>{let n=e?.error??e;if(n?.code===`RATE_LIMIT_EXCEEDED_UNAUTHENTICATED`){t({title:n.message,variant:`error`});return}t({title:Fo(n?.title??e?.title??`Error`),description:n?.message??e?.message??String(n??`An error occurred`),variant:`error`})})},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=e=>{e?.error&&t({title:Fo(e.error.title??e.error.code??`Error`),description:e.error.message??e.error.code??`An error occurred`,variant:`error`}),e?.message&&t({title:e.message,description:e.description,variant:`success`})},e[2]=t,e[3]=i);let a=i,o;return e[4]!==r||e[5]!==a?(o={onError:r,onSuccess:a},e[4]=r,e[5]=a,e[6]=o):o=e[6],o},Lo=({children:e,client:t})=>{let{onError:n,onSuccess:r}=Io(),i=(0,O.useRef)({onSuccess:r,onError:n});i.current={onSuccess:r,onError:n};let a=(0,O.useRef)(t??null);a.current||=new ao({defaultOptions:No,mutationCache:new to});let o=(0,O.useRef)(!1);if(!o.current){o.current=!0;let e=a.current.getMutationCache();e.config.onSuccess=(e,t,n,r,a)=>i.current.onSuccess?.(e,t,n,r,a),e.config.onError=(e,t,n,r,a)=>i.current.onError?.(e,t,n,r,a),e.config.onSettled=(e,t,n,r,i)=>{i.meta?.invalidateQueries&&i.meta.invalidateQueries.forEach(e=>{a.current?.invalidateQueries({queryKey:e})}),i.meta?.resetQueries&&i.meta.resetQueries.forEach(e=>{a.current?.resetQueries({queryKey:e})})}}return t?(0,k.jsx)(co,{client:a.current,children:e}):(0,k.jsx)(Ao,{client:a.current,persistOptions:{persister:Po,maxAge:jo,buster:Mo,dehydrateOptions:{shouldDehydrateQuery:e=>e.state.status===`success`}},children:e})},Ro=y();function zo(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Bo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zo(e))&&(r&&(r+=` `),r+=t);return r}var Vo=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ho=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Wo=`-`,Go=[],Ko=`arbitrary..`,qo=e=>{let t=Xo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Yo(e);let n=e.split(Wo);return Jo(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Vo(i,t):t:i||Go}return n[e]||Go}}},Jo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Jo(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Wo):e.slice(t).join(Wo),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Yo=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ko+r:void 0})(),Xo=e=>{let{theme:t,classGroups:n}=e;return Zo(n,t)},Zo=(e,t)=>{let n=Uo();for(let r in e){let i=e[r];Qo(i,n,r,t)}return n},Qo=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];$o(i,t,n,r)}},$o=(e,t,n,r)=>{if(typeof e==`string`){es(e,t,n);return}if(typeof e==`function`){ts(e,t,n,r);return}ns(e,t,n,r)},es=(e,t,n)=>{let r=e===``?t:rs(t,e);r.classGroupId=n},ts=(e,t,n,r)=>{if(is(e)){Qo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ho(n,e))},ns=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Qo(o,rs(t,a),n,r)}},rs=(e,t)=>{let n=e,r=t.split(Wo),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Uo(),n.nextPart.set(t,i)),n=i}return n},is=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,as=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},os=`!`,ss=`:`,cs=[],ls=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),us=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ss){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(os)?(c=s.slice(0,-1),l=!0):s.startsWith(os)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ls(t,l,c,u)};if(t){let e=t+ss,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ls(cs,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ds=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},fs=e=>({cache:as(e.cacheSize),parseClassName:us(e),sortModifiers:ds(e),postfixLookupClassGroupIds:ps(e),...qo(e)}),ps=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ms=/\s+/,hs=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ms),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+os:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},gs=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=_s(n))&&(i&&(i+=` `),i+=r);return i},_s=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=_s(e[r]))&&(n&&(n+=` `),n+=t);return n},vs=(e,...t)=>{let n,r,i,a,o=o=>(n=fs(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=hs(e,n);return i(e,a),a};return a=o,(...e)=>a(gs(...e))},ys=[],bs=e=>{let t=t=>t[e]||ys;return t.isThemeGetter=!0,t},xs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ss=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ws=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ts=/\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$/,Es=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ds=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Os=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ks=e=>Cs.test(e),As=e=>!!e&&!Number.isNaN(Number(e)),js=e=>!!e&&Number.isInteger(Number(e)),Ms=e=>e.endsWith(`%`)&&As(e.slice(0,-1)),Ns=e=>ws.test(e),Ps=()=>!0,Fs=e=>Ts.test(e)&&!Es.test(e),Is=()=>!1,Ls=e=>Ds.test(e),Rs=e=>Os.test(e),zs=e=>!H(e)&&!U(e),Bs=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Vs=e=>nc(e,oc,Is),H=e=>xs.test(e),Hs=e=>nc(e,sc,Fs),Us=e=>nc(e,cc,As),Ws=e=>nc(e,uc,Ps),Gs=e=>nc(e,lc,Is),Ks=e=>nc(e,ic,Is),qs=e=>nc(e,ac,Rs),Js=e=>nc(e,dc,Ls),U=e=>Ss.test(e),Ys=e=>rc(e,sc),Xs=e=>rc(e,lc),Zs=e=>rc(e,ic),Qs=e=>rc(e,oc),$s=e=>rc(e,ac),ec=e=>rc(e,dc,!0),tc=e=>rc(e,uc,!0),nc=(e,t,n)=>{let r=xs.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rc=(e,t,n=!1)=>{let r=Ss.exec(e);return r?r[1]?t(r[1]):n:!1},ic=e=>e===`position`||e===`percentage`,ac=e=>e===`image`||e===`url`,oc=e=>e===`length`||e===`size`||e===`bg-size`,sc=e=>e===`length`,cc=e=>e===`number`,lc=e=>e===`family-name`,uc=e=>e===`number`||e===`weight`,dc=e=>e===`shadow`,fc=vs(()=>{let e=bs(`color`),t=bs(`font`),n=bs(`text`),r=bs(`font-weight`),i=bs(`tracking`),a=bs(`leading`),o=bs(`breakpoint`),s=bs(`container`),c=bs(`spacing`),l=bs(`radius`),u=bs(`shadow`),d=bs(`inset-shadow`),f=bs(`text-shadow`),p=bs(`drop-shadow`),m=bs(`blur`),h=bs(`perspective`),g=bs(`aspect`),_=bs(`ease`),v=bs(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),U,H],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[U,H,c],T=()=>[ks,`full`,`auto`,...w()],E=()=>[js,`none`,`subgrid`,U,H],D=()=>[`auto`,{span:[`full`,js,U,H]},js,U,H],O=()=>[js,`auto`,U,H],k=()=>[`auto`,`min`,`max`,`fr`,U,H],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ks,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ks,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ks,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,U,H],L=()=>[...b(),Zs,Ks,{position:[U,H]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,Qs,Vs,{size:[U,H]}],ne=()=>[Ms,Ys,Hs],re=()=>[``,`none`,`full`,l,U,H],R=()=>[``,As,Ys,Hs],z=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ae=()=>[As,Ms,Zs,Ks],oe=()=>[``,`none`,m,U,H],se=()=>[`none`,As,U,H],ce=()=>[`none`,As,U,H],le=()=>[As,U,H],ue=()=>[ks,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ns],breakpoint:[Ns],color:[Ps],container:[Ns],"drop-shadow":[Ns],ease:[`in`,`out`,`in-out`],font:[zs],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ns],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ns],shadow:[Ns],spacing:[`px`,As],text:[Ns],"text-shadow":[Ns],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ks,H,U,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,U,H]}],"container-named":[Bs],columns:[{columns:[As,H,U,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[js,`auto`,U,H]}],basis:[{basis:[ks,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[As,ks,`auto`,`initial`,`none`,H]}],grow:[{grow:[``,As,U,H]}],shrink:[{shrink:[``,As,U,H]}],order:[{order:[js,`first`,`last`,`none`,U,H]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ys,Hs]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,tc,Ws]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ms,H]}],"font-family":[{font:[Xs,Gs,t]}],"font-features":[{"font-features":[H]}],"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:[i,U,H]}],"line-clamp":[{"line-clamp":[As,`none`,U,Us]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,U,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,U,H]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[As,`from-font`,`auto`,U,Hs]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[As,`auto`,U,H]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[js,U,H]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,U,H]}],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`,U,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},js,U,H],radial:[``,U,H],conic:[js,U,H]},$s,qs]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[As,U,H]}],"outline-w":[{outline:[``,As,Ys,Hs]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,ec,Js]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,ec,Js]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[As,Hs]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,ec,Js]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[As,U,H]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"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":[As]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[U,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[As]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,U,H]}],filter:[{filter:[``,`none`,U,H]}],blur:[{blur:oe()}],brightness:[{brightness:[As,U,H]}],contrast:[{contrast:[As,U,H]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ec,Js]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,As,U,H]}],"hue-rotate":[{"hue-rotate":[As,U,H]}],invert:[{invert:[``,As,U,H]}],saturate:[{saturate:[As,U,H]}],sepia:[{sepia:[``,As,U,H]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,U,H]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[As,U,H]}],"backdrop-contrast":[{"backdrop-contrast":[As,U,H]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,As,U,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[As,U,H]}],"backdrop-invert":[{"backdrop-invert":[``,As,U,H]}],"backdrop-opacity":[{"backdrop-opacity":[As,U,H]}],"backdrop-saturate":[{"backdrop-saturate":[As,U,H]}],"backdrop-sepia":[{"backdrop-sepia":[``,As,U,H]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,U,H]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[As,`initial`,U,H]}],ease:[{ease:[`linear`,`initial`,_,U,H]}],delay:[{delay:[As,U,H]}],animate:[{animate:[`none`,v,U,H]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,U,H]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[U,H,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[js,U,H]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,U,H]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,U,H]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[As,Ys,Hs,Us]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),W=(...e)=>fc(Bo(e));typeof window<`u`&&window.document&&window.document.createElement;function pc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function mc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function hc(...e){return t=>{let n=!1,r=e.map(e=>{let r=mc(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():mc(e[t],null)}}}}function gc(...e){return O.useCallback(hc(...e),e)}function _c(e,t){let n=O.createContext(t),r=e=>{let{children:t,...r}=e,i=O.useMemo(()=>r,Object.values(r));return(0,k.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=O.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function vc(e,t=[]){let n=[];function r(t,r){let i=O.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=O.useMemo(()=>o,Object.values(o));return(0,k.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=O.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>O.createContext(e));return function(n){let r=n?.[e]||t;return O.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,yc(i,...t)]}function yc(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return O.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function bc(e){let t=xc(e),n=O.forwardRef((e,n)=>{let{children:r,...i}=e,a=O.Children.toArray(r),o=a.find(Cc);if(o){let e=o.props.children,r=a.map(t=>t===o?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t);return(0,k.jsx)(t,{...i,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return(0,k.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function xc(e){let t=O.forwardRef((e,t)=>{let{children:n,...r}=e;if(O.isValidElement(n)){let e=Tc(n),i=wc(r,n.props);return n.type!==O.Fragment&&(i.ref=t?hc(t,e):e),O.cloneElement(n,i)}return O.Children.count(n)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sc=Symbol(`radix.slottable`);function Cc(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Sc}function wc(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Tc(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ec(e){let t=e+`CollectionProvider`,[n,r]=vc(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=O.useRef(null),a=O.useRef(new Map).current;return(0,k.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=bc(s),l=O.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,k.jsx)(c,{ref:gc(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=bc(u),p=O.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=O.useRef(null),s=gc(t,o),c=a(u,n);return O.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,k.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return O.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Dc=u(_(),1),G=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=bc(`Primitive.${t}`),r=O.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,k.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Oc(e,t){e&&Dc.flushSync(()=>e.dispatchEvent(t))}function kc(e){let t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ac(e,t=globalThis?.document){let n=kc(e);O.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var jc=`DismissableLayer`,Mc=`dismissableLayer.update`,Nc=`dismissableLayer.pointerDownOutside`,Pc=`dismissableLayer.focusOutside`,Fc,Ic=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lc=O.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=O.useContext(Ic),[u,d]=O.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=O.useState({}),m=gc(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Bc(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=Vc(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ac(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),O.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Fc=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Fc)}},[u,f,n,l]),O.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hc())},[u,l]),O.useEffect(()=>{let e=()=>p({});return document.addEventListener(Mc,e),()=>document.removeEventListener(Mc,e)},[]),(0,k.jsx)(G.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:pc(e.onFocusCapture,S.onFocusCapture),onBlurCapture:pc(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:pc(e.onPointerDownCapture,x.onPointerDownCapture)})});Lc.displayName=jc;var Rc=`DismissableLayerBranch`,zc=O.forwardRef((e,t)=>{let n=O.useContext(Ic),r=O.useRef(null),i=gc(t,r);return O.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,k.jsx)(G.div,{...e,ref:i})});zc.displayName=Rc;function Bc(e,t=globalThis?.document){let n=kc(e),r=O.useRef(!1),i=O.useRef(()=>{});return O.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Uc(Nc,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Vc(e,t=globalThis?.document){let n=kc(e),r=O.useRef(!1);return O.useEffect(()=>{let e=e=>{e.target&&!r.current&&Uc(Pc,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hc(){let e=new CustomEvent(Mc);document.dispatchEvent(e)}function Uc(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Oc(i,a):i.dispatchEvent(a)}var Wc=Lc,Gc=zc,Kc=globalThis?.document?O.useLayoutEffect:()=>{},qc=`Portal`,Jc=O.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=O.useState(!1);Kc(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Dc.createPortal((0,k.jsx)(G.div,{...r,ref:t}),o):null});Jc.displayName=qc;function Yc(e,t){return O.useReducer((e,n)=>t[e][n]??e,e)}var Xc=e=>{let{present:t,children:n}=e,r=Zc(t),i=typeof n==`function`?n({present:r.isPresent}):O.Children.only(n),a=gc(r.ref,$c(i));return typeof n==`function`||r.isPresent?O.cloneElement(i,{ref:a}):null};Xc.displayName=`Presence`;function Zc(e){let[t,n]=O.useState(),r=O.useRef(null),i=O.useRef(e),a=O.useRef(`none`),[o,s]=Yc(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return O.useEffect(()=>{let e=Qc(r.current);a.current=o===`mounted`?e:`none`},[o]),Kc(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Qc(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Kc(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Qc(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Qc(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:O.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Qc(e){return e?.animationName||`none`}function $c(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var el=O.useInsertionEffect||Kc;function tl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=nl({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=O.useRef(e!==void 0);O.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,O.useCallback(t=>{if(s){let n=rl(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function nl({defaultProp:e,onChange:t}){let[n,r]=O.useState(e),i=O.useRef(n),a=O.useRef(t);return el(()=>{a.current=t},[t]),O.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function rl(e){return typeof e==`function`}var il=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`}),al=`VisuallyHidden`,ol=O.forwardRef((e,t)=>(0,k.jsx)(G.span,{...e,ref:t,style:{...il,...e.style}}));ol.displayName=al;var sl=c({Action:()=>tu,Close:()=>nu,Description:()=>eu,Provider:()=>Xl,Root:()=>Ql,Title:()=>$l,Toast:()=>kl,ToastAction:()=>zl,ToastClose:()=>Vl,ToastDescription:()=>Ll,ToastProvider:()=>gl,ToastTitle:()=>Fl,ToastViewport:()=>xl,Viewport:()=>Zl,createToastScope:()=>pl}),cl=`ToastProvider`,[ll,ul,dl]=Ec(`Toast`),[fl,pl]=vc(`Toast`,[dl]),[ml,hl]=fl(cl),gl=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=O.useState(null),[l,u]=O.useState(0),d=O.useRef(!1),f=O.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${cl}\`. Expected non-empty \`string\`.`),(0,k.jsx)(ll.Provider,{scope:t,children:(0,k.jsx)(ml,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:O.useCallback(()=>u(e=>e+1),[]),onToastRemove:O.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};gl.displayName=cl;var _l=`ToastViewport`,vl=[`F8`],yl=`toast.viewportPause`,bl=`toast.viewportResume`,xl=O.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=vl,label:i=`Notifications ({hotkey})`,...a}=e,o=hl(_l,n),s=ul(n),c=O.useRef(null),l=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=gc(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;O.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),O.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(yl);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(bl);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=O.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...Jl(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return O.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Yl(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,k.jsxs)(Gc,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,k.jsx)(Cl,{ref:l,onFocusFromOutsideViewport:()=>{Yl(h({tabbingDirection:`forwards`}))}}),(0,k.jsx)(ll.Slot,{scope:n,children:(0,k.jsx)(G.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,k.jsx)(Cl,{ref:u,onFocusFromOutsideViewport:()=>{Yl(h({tabbingDirection:`backwards`}))}})]})});xl.displayName=_l;var Sl=`ToastFocusProxy`,Cl=O.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=hl(Sl,n);return(0,k.jsx)(ol,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});Cl.displayName=Sl;var wl=`Toast`,Tl=`toast.swipeStart`,El=`toast.swipeMove`,Dl=`toast.swipeCancel`,Ol=`toast.swipeEnd`,kl=O.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=tl({prop:r,defaultProp:i??!0,onChange:a,caller:wl});return(0,k.jsx)(Xc,{present:n||s,children:(0,k.jsx)(Ml,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:kc(e.onPause),onResume:kc(e.onResume),onSwipeStart:pc(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:pc(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:pc(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:pc(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});kl.displayName=wl;var[Al,jl]=fl(wl,{onClose(){}}),Ml=O.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=hl(wl,n),[g,_]=O.useState(null),v=gc(t,e=>_(e)),y=O.useRef(null),b=O.useRef(null),x=i||h.duration,S=O.useRef(0),C=O.useRef(x),w=O.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=kc(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),A=O.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);O.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{A(C.current),l?.()},n=()=>{let e=new Date().getTime()-S.current;C.current-=e,window.clearTimeout(w.current),c?.()};return e.addEventListener(yl,n),e.addEventListener(bl,t),()=>{e.removeEventListener(yl,n),e.removeEventListener(bl,t)}}},[h.viewport,x,c,l,A]),O.useEffect(()=>{a&&!h.isClosePausedRef.current&&A(x)},[a,x,h.isClosePausedRef,A]),O.useEffect(()=>(T(),()=>E()),[T,E]);let j=O.useMemo(()=>g?Ul(g):null,[g]);return h.viewport?(0,k.jsxs)(k.Fragment,{children:[j&&(0,k.jsx)(Nl,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:j}),(0,k.jsx)(Al,{scope:n,onClose:D,children:Dc.createPortal((0,k.jsx)(ll.ItemSlot,{scope:n,children:(0,k.jsx)(Wc,{asChild:!0,onEscapeKeyDown:pc(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,k.jsx)(G.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:pc(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:pc(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:pc(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!b.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(b.current=l,Wl(El,d,f,{discrete:!1})):Gl(l,h.swipeDirection,c)?(b.current=l,Wl(Tl,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:pc(e.onPointerUp,e=>{let t=b.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),b.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Gl(t,h.swipeDirection,h.swipeThreshold)?Wl(Ol,p,r,{discrete:!0}):Wl(Dl,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Nl=e=>{let{__scopeToast:t,children:n,...r}=e,i=hl(wl,t),[a,o]=O.useState(!1),[s,c]=O.useState(!1);return Kl(()=>o(!0)),O.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,k.jsx)(Jc,{asChild:!0,children:(0,k.jsx)(ol,{...r,children:a&&(0,k.jsxs)(k.Fragment,{children:[i.label,` `,n]})})})},Pl=`ToastTitle`,Fl=O.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,k.jsx)(G.div,{...r,ref:t})});Fl.displayName=Pl;var Il=`ToastDescription`,Ll=O.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,k.jsx)(G.div,{...r,ref:t})});Ll.displayName=Il;var Rl=`ToastAction`,zl=O.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,k.jsx)(Hl,{altText:n,asChild:!0,children:(0,k.jsx)(Vl,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Rl}\`. Expected non-empty \`string\`.`),null)});zl.displayName=Rl;var Bl=`ToastClose`,Vl=O.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=jl(Bl,n);return(0,k.jsx)(Hl,{asChild:!0,children:(0,k.jsx)(G.button,{type:`button`,...r,ref:t,onClick:pc(e.onClick,i.onClose)})})});Vl.displayName=Bl;var Hl=O.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,k.jsx)(G.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Ul(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),ql(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Ul(e))}}),t}function Wl(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Oc(i,a):i.dispatchEvent(a)}var Gl=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function Kl(e=()=>{}){let t=kc(e);Kc(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function ql(e){return e.nodeType===e.ELEMENT_NODE}function Jl(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yl(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var Xl=gl,Zl=xl,Ql=kl,$l=Fl,eu=Ll,tu=zl,nu=Vl,ru=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,iu=Bo,au=(e,t)=>n=>{if(t?.variants==null)return iu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=ru(t)||ru(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return iu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},ou=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),su=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),cu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),lu=e=>{let t=cu(e);return t.charAt(0).toUpperCase()+t.slice(1)},uu={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`},du=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},fu=(0,O.createContext)({}),pu=()=>(0,O.useContext)(fu),mu=(0,O.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=pu()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,O.createElement)(`svg`,{ref:c,...uu,width:t??l??uu.width,height:t??l??uu.height,stroke:e??f,strokeWidth:m,className:ou(`lucide`,p,i),...!a&&!du(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,O.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),hu=(e,t)=>{let n=(0,O.forwardRef)(({className:n,...r},i)=>(0,O.createElement)(mu,{ref:i,iconNode:t,className:ou(`lucide-${su(lu(e))}`,`lucide-${e}`,n),...r}));return n.displayName=lu(e),n},gu=hu(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),_u=hu(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),vu=hu(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),yu=hu(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),bu=hu(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),xu=hu(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Su=hu(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Cu=hu(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),wu=hu(`copy-check`,[[`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`}]]),Tu=hu(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Eu=hu(`download`,[[`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`}]]),Du=hu(`external-link`,[[`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`}]]),Ou=hu(`eye-off`,[[`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`}]]),ku=hu(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Au=hu(`globe`,[[`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`}]]),ju=hu(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Mu=hu(`move-right`,[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]),Nu=hu(`move-vertical`,[[`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`}]]),Pu=hu(`pencil`,[[`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`}]]),Fu=hu(`pencil-ruler`,[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`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`}]]),Iu=hu(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Lu=hu(`rotate-ccw`,[[`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`}]]),Ru=hu(`save`,[[`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`}]]),zu=hu(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Bu=hu(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Vu=hu(`wand-sparkles`,[[`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`}]]),Hu=hu(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Uu=sl,Wu=({className:e,...t})=>(0,k.jsx)(Zl,{className:W(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]`,e),...t}),Gu=au(`group 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 pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-xl p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all [corner-shape:squircle] 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-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none supports-[corner-shape:squircle]:rounded-3xl`,{variants:{variant:{error:`bg-error/40 text-text`,success:`bg-success/30 text-text`,default:`bg-card/80 text-text`}},defaultVariants:{variant:`default`}}),Ku=({className:e,variant:t,...n})=>(0,k.jsx)(Ql,{className:W(Gu({variant:t}),e),...n}),qu=({className:e,...t})=>(0,k.jsx)(nu,{className:W(`absolute top-1 right-1 rounded-md p-1 text-text/50 opacity-0 transition-opacity hover:text-text/80 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 group-[.destructive]:hover:text-red-50`,e),"toast-close":``,...t,children:(0,k.jsx)(Hu,{className:`size-5`})}),Ju=({className:e,...t})=>(0,k.jsx)($l,{className:W(`font-semibold text-sm [&+div]:text-xs`,e),...t}),Yu=({className:e,...t})=>(0,k.jsx)(eu,{className:W(`overflow-scroll text-sm opacity-90`,e),...t}),Xu=()=>{let e=(0,B.c)(2),{toasts:t}=Pi(),n;return e[0]===t?n=e[1]:(n=(0,k.jsxs)(Uu.Provider,{children:[t.map(Zu),(0,k.jsx)(Wu,{})]}),e[0]=t,e[1]=n),n};function Zu(e){let{id:t,title:n,description:r,action:i,...a}=e;return(0,k.jsxs)(Ku,{...a,children:[(0,k.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,k.jsx)(Ju,{children:n}),r&&(0,k.jsx)(Yu,{children:r})]}),i,(0,k.jsx)(qu,{})]},t)}var Qu=(0,O.createContext)({});function $u(e){let t=(0,O.useRef)(null);return t.current===null&&(t.current=e()),t.current}var ed=typeof window<`u`?O.useLayoutEffect:O.useEffect,td=(0,O.createContext)(null);function nd(e,t){e.indexOf(t)===-1&&e.push(t)}function rd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var id=(e,t,n)=>n>t?t:n<e?e:n,ad={},od=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),sd=e=>typeof e==`object`&&!!e,cd=e=>/^0[^.\s]+$/u.test(e);function ld(e){let t;return()=>(t===void 0&&(t=e()),t)}var ud=e=>e,dd=(...e)=>e.reduce((e,t)=>n=>t(e(n))),fd=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},pd=class{constructor(){this.subscriptions=[]}add(e){return nd(this.subscriptions,e),()=>rd(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},md=e=>e*1e3,hd=e=>e/1e3,gd=(e,t)=>t?1e3/t*e:0,_d=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,vd=1e-7,yd=12;function bd(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=_d(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>vd&&++s<yd);return o}function xd(e,t,n,r){if(e===t&&n===r)return ud;let i=t=>bd(t,0,1,e,n);return e=>e===0||e===1?e:_d(i(e),t,r)}var Sd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cd=e=>t=>1-e(1-t),wd=xd(.33,1.53,.69,.99),Td=Cd(wd),Ed=Sd(Td),Dd=e=>e>=1?1:(e*=2)<1?.5*Td(e):.5*(2-2**(-10*(e-1))),Od=e=>1-Math.sin(Math.acos(e)),kd=Cd(Od),Ad=Sd(Od),jd=xd(.42,0,1,1),Md=xd(0,0,.58,1),Nd=xd(.42,0,.58,1),Pd=e=>Array.isArray(e)&&typeof e[0]!=`number`,Fd=e=>Array.isArray(e)&&typeof e[0]==`number`,Id={linear:ud,easeIn:jd,easeInOut:Nd,easeOut:Md,circIn:Od,circInOut:Ad,circOut:kd,backIn:Td,backInOut:Ed,backOut:wd,anticipate:Dd},Ld=e=>typeof e==`string`,Rd=e=>{if(Fd(e)){e.length;let[t,n,r,i]=e;return xd(t,n,r,i)}else if(Ld(e))return Id[e],`${e}`,Id[e];return e},zd=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Bd={value:null,addProjectionMetrics:null};function Vd(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Bd.value&&Bd.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Hd=40;function Ud(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=zd.reduce((e,n)=>(e[n]=Vd(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ad.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Hd),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:zd.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<zd.length;t++)o[zd[t]].cancel(e)},state:i,steps:o}}var{schedule:Wd,cancel:Gd,state:Kd,steps:qd}=Ud(typeof requestAnimationFrame<`u`?requestAnimationFrame:ud,!0),Jd;function Yd(){Jd=void 0}var Xd={now:()=>(Jd===void 0&&Xd.set(Kd.isProcessing||ad.useManualTiming?Kd.timestamp:performance.now()),Jd),set:e=>{Jd=e,queueMicrotask(Yd)}},Zd={layout:0,mainThread:0,waapi:0},Qd=e=>t=>typeof t==`string`&&t.startsWith(e),$d=Qd(`--`),ef=Qd(`var(--`),tf=e=>ef(e)?nf.test(e.split(`/*`)[0].trim()):!1,nf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function rf(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var af={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},of={...af,transform:e=>id(0,1,e)},sf={...af,default:1},cf=e=>Math.round(e*1e5)/1e5,lf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uf(e){return e==null}var df=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ff=(e,t)=>n=>!!(typeof n==`string`&&df.test(n)&&n.startsWith(e)||t&&!uf(n)&&Object.prototype.hasOwnProperty.call(n,t)),pf=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(lf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},mf=e=>id(0,255,e),hf={...af,transform:e=>Math.round(mf(e))},gf={test:ff(`rgb`,`red`),parse:pf(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+hf.transform(e)+`, `+hf.transform(t)+`, `+hf.transform(n)+`, `+cf(of.transform(r))+`)`};function _f(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var vf={test:ff(`#`),parse:_f,transform:gf.transform},yf=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bf=yf(`deg`),xf=yf(`%`),K=yf(`px`),Sf=yf(`vh`),Cf=yf(`vw`),wf={...xf,parse:e=>xf.parse(e)/100,transform:e=>xf.transform(e*100)},Tf={test:ff(`hsl`,`hue`),parse:pf(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+xf.transform(cf(t))+`, `+xf.transform(cf(n))+`, `+cf(of.transform(r))+`)`},Ef={test:e=>gf.test(e)||vf.test(e)||Tf.test(e),parse:e=>gf.test(e)?gf.parse(e):Tf.test(e)?Tf.parse(e):vf.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?gf.transform(e):Tf.transform(e),getAnimatableNone:e=>{let t=Ef.parse(e);return t.alpha=0,Ef.transform(t)}},Df=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Of(e){return isNaN(e)&&typeof e==`string`&&(e.match(lf)?.length||0)+(e.match(Df)?.length||0)>0}var kf=`number`,Af=`color`,jf=`var`,Mf=`var(`,Nf="${}",Pf=/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 Ff(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Pf,e=>(Ef.test(e)?(r.color.push(a),i.push(Af),n.push(Ef.parse(e))):e.startsWith(Mf)?(r.var.push(a),i.push(jf),n.push(e)):(r.number.push(a),i.push(kf),n.push(parseFloat(e))),++a,Nf)).split(Nf),indexes:r,types:i}}function If(e){return Ff(e).values}function Lf({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===kf?i+=cf(r[a]):e===Af?i+=Ef.transform(r[a]):i+=r[a]}return i}}function Rf(e){return Lf(Ff(e))}var zf=e=>typeof e==`number`?0:Ef.test(e)?Ef.getAnimatableNone(e):e,Bf=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:zf(e);function Vf(e){let t=Ff(e);return Lf(t)(t.values.map((e,n)=>Bf(e,t.split[n])))}var Hf={test:Of,parse:If,createTransformer:Rf,getAnimatableNone:Vf};function Uf(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Wf({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Uf(s,r,e+1/3),a=Uf(s,r,e),o=Uf(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Gf(e,t){return n=>n>0?t:e}var Kf=(e,t,n)=>e+(t-e)*n,qf=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Jf=[vf,gf,Tf],Yf=e=>Jf.find(t=>t.test(e));function Xf(e){let t=Yf(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Tf&&(n=Wf(n)),n}var Zf=(e,t)=>{let n=Xf(e),r=Xf(t);if(!n||!r)return Gf(e,t);let i={...n};return e=>(i.red=qf(n.red,r.red,e),i.green=qf(n.green,r.green,e),i.blue=qf(n.blue,r.blue,e),i.alpha=Kf(n.alpha,r.alpha,e),gf.transform(i))},Qf=new Set([`none`,`hidden`]);function $f(e,t){return Qf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ep(e,t){return n=>Kf(e,t,n)}function tp(e){return typeof e==`number`?ep:typeof e==`string`?tf(e)?Gf:Ef.test(e)?Zf:ap:Array.isArray(e)?np:typeof e==`object`?Ef.test(e)?Zf:rp:Gf}function np(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>tp(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function rp(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=tp(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function ip(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var ap=(e,t)=>{let n=Hf.createTransformer(t),r=Ff(e),i=Ff(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Qf.has(e)&&!i.values.length||Qf.has(t)&&!r.values.length?$f(e,t):dd(np(ip(r,i),i.values),n):(`${e}${t}`,Gf(e,t))};function op(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Kf(e,t,n):tp(e)(e,t)}var sp=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Wd.update(t,e),stop:()=>Gd(t),now:()=>Kd.isProcessing?Kd.timestamp:Xd.now()}},cp=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},lp=2e4;function up(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function dp(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(up(r),lp);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:hd(i)}}var fp={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function pp(e,t){return e*Math.sqrt(1-t*t)}var mp=12;function hp(e,t,n){let r=n;for(let n=1;n<mp;n++)r-=e(r)/t(r);return r}var gp=.001;function _p({duration:e=fp.duration,bounce:t=fp.bounce,velocity:n=fp.velocity,mass:r=fp.mass}){let i,a;fp.maxDuration;let o=1-t;o=id(fp.minDamping,fp.maxDamping,o),e=id(fp.minDuration,fp.maxDuration,hd(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=pp(t,o),c=Math.exp(-i);return gp-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=pp(t**2,o);return(-i(t)+gp>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-gp+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=hp(i,a,s);if(e=md(e),isNaN(c))return{stiffness:fp.stiffness,damping:fp.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var vp=[`duration`,`bounce`],yp=[`stiffness`,`damping`,`mass`];function bp(e,t){return t.some(t=>e[t]!==void 0)}function xp(e){let t={velocity:fp.velocity,stiffness:fp.stiffness,damping:fp.damping,mass:fp.mass,isResolvedFromDuration:!1,...e};if(!bp(e,yp)&&bp(e,vp))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*id(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:fp.mass,stiffness:i,damping:a}}else{let n=_p({...e,velocity:0});t={...t,...n,mass:fp.mass},t.isResolvedFromDuration=!0}return t}function Sp(e=fp.visualDuration,t=fp.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=xp({...n,velocity:-hd(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=hd(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?fp.restSpeed.granular:fp.restSpeed.default,i||=v?fp.restDelta.granular:fp.restDelta.default;let y,b,x,S,C,w;if(h<1)x=pp(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>md(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=md(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=md(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(up(T),lp),t=cp(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Sp.applyToOptions=e=>{let t=dp(e,100,Sp);return e.ease=t.ease,e.duration=md(t.duration),e.type=`keyframes`,e};var Cp=5;function wp(e,t,n){let r=Math.max(t-Cp,0);return gd(n-e(r),t-r)}function Tp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Sp({keyframes:[f.value,m(f.value)],velocity:wp(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Ep(e,t,n){let r=[],i=n||ad.mix||op,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=dd(Array.isArray(t)?t[n]||ud:t,a)),r.push(a)}return r}function Dp(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Ep(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=fd(e[r],e[r+1],n);return s[r](i)};return n?t=>l(id(e[0],e[a-1],t)):l}function Op(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=fd(0,t,r);e.push(Kf(n,1,i))}}function kp(e){let t=[0];return Op(t,e.length-1),t}function Ap(e,t){return e.map(e=>e*t)}function jp(e,t){return e.map(()=>t||Nd).splice(0,e.length-1)}function Mp({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Pd(r)?r.map(Rd):Rd(r),a={done:!1,value:t[0]},o=Dp(Ap(n&&n.length===t.length?n:kp(t),e),t,{ease:Array.isArray(i)?i:jp(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Np=e=>e!==null;function Pp(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Np),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Fp={decay:Tp,inertia:Tp,tween:Mp,keyframes:Mp,spring:Sp};function Ip(e){typeof e.type==`string`&&(e.type=Fp[e.type])}var Lp=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Rp=e=>e/100,zp=class extends Lp{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Xd.now()&&this.tick(Xd.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Zd.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Ip(e);let{type:t=Mp,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Mp;s!==Mp&&typeof o[0]!=`number`&&(this.mixKeyframes=dd(Rp,op(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=up(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=id(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Tp&&(b.value=Pp(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return hd(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+hd(e)}get time(){return hd(this.currentTime)}set time(e){e=md(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return wp(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Xd.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=hd(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=sp,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(Xd.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Zd.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Bp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Vp=e=>e*180/Math.PI,Hp=e=>Wp(Vp(Math.atan2(e[1],e[0]))),Up={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Hp,rotateZ:Hp,skewX:e=>Vp(Math.atan(e[1])),skewY:e=>Vp(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Wp=e=>(e%=360,e<0&&(e+=360),e),Gp=Hp,Kp=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Jp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kp,scaleY:qp,scale:e=>(Kp(e)+qp(e))/2,rotateX:e=>Wp(Vp(Math.atan2(e[6],e[5]))),rotateY:e=>Wp(Vp(Math.atan2(-e[2],e[0]))),rotateZ:Gp,rotate:Gp,skewX:e=>Vp(Math.atan(e[4])),skewY:e=>Vp(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Yp(e){return+!!e.includes(`scale`)}function Xp(e,t){if(!e||e===`none`)return Yp(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Jp,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Up,i=t}if(!i)return Yp(t);let a=r[t],o=i[1].split(`,`).map(Qp);return typeof a==`function`?a(o):o[a]}var Zp=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Xp(n,t)};function Qp(e){return parseFloat(e.trim())}var $p=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],em=new Set($p),tm=e=>e===af||e===K,nm=new Set([`x`,`y`,`z`]),rm=$p.filter(e=>!nm.has(e));function im(e){let t=[];return rm.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var am={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Xp(t,`x`),y:(e,{transform:t})=>Xp(t,`y`)};am.translateX=am.x,am.translateY=am.y;var om=new Set,sm=!1,cm=!1,lm=!1;function um(){if(cm){let e=Array.from(om).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=im(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}cm=!1,sm=!1,om.forEach(e=>e.complete(lm)),om.clear()}function dm(){om.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cm=!0)})}function fm(){lm=!0,dm(),um(),lm=!1}var pm=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(om.add(this),sm||(sm=!0,Wd.read(dm),Wd.resolveKeyframes(um))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Bp(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),om.delete(this)}cancel(){this.state===`scheduled`&&(om.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},mm=e=>e.startsWith(`--`);function hm(e,t,n){mm(t)?e.style.setProperty(t,n):e.style[t]=n}var gm={};function _m(e,t){let n=ld(e);return()=>gm[t]??n()}var vm=_m(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),ym=_m(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),bm=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xm={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:bm([0,.65,.55,1]),circOut:bm([.55,0,1,.45]),backIn:bm([.31,.01,.66,-.59]),backOut:bm([.33,1.53,.69,.99])};function Sm(e,t){if(e)return typeof e==`function`?ym()?cp(e,t):`ease-out`:Fd(e)?bm(e):Array.isArray(e)?e.map(e=>Sm(e,t)||xm.easeOut):xm[e]}function Cm(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Sm(s,i);Array.isArray(d)&&(u.easing=d),Bd.value&&Zd.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Bd.value&&p.finished.finally(()=>{Zd.waapi--}),p}function wm(e){return typeof e==`function`&&`applyToOptions`in e}function Tm({type:e,...t}){return wm(e)&&ym()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Em=class extends Lp{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Tm(e);this.animation=Cm(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Pp(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),hm(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return hd(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+hd(e)}get time(){return hd(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=md(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&vm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ud):r(this)}},Dm={anticipate:Dd,backInOut:Ed,circInOut:Ad};function Om(e){return e in Dm}function km(e){typeof e.ease==`string`&&Om(e.ease)&&(e.ease=Dm[e.ease])}var Am=10,jm=class extends Em{constructor(e){km(e),Ip(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new zp({...a,autoplay:!1}),s=Math.max(Am,Xd.now()-this.startTime),c=id(0,Am,s-Am),l=o.sample(s).value,{name:u}=this.options;i&&u&&hm(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Mm=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Hf.test(e)||e===`0`)&&!e.startsWith(`url(`));function Nm(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Pm(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Mm(i,t),s=Mm(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Nm(e)||(n===`spring`||wm(n))&&r}function Fm(e){e.duration=0,e.type=`keyframes`}var Im=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Lm=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Rm(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Lm.test(e[t]))return!0;return!1}var zm=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Bm=ld(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Vm(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Bm()&&n&&(Im.has(n)||zm.has(n)&&Rm(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Hm=40,Um=class extends Lp{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Xd.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||pm;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Xd.now();let u=!0;Pm(e,i,a,o)||(u=!1,(ad.instantAnimations||!s)&&l?.(Pp(e,n,t)),e[0]=e[e.length-1],Fm(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Hm?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Vm(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new jm({...d,element:p})}catch{m=new zp(d)}else m=new zp(d);m.finished.then(()=>{this.notifyFinished()}).catch(ud),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),fm()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Wm(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Gm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Km(e){let t=Gm.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function qm(e,t,n=1){`${e}`;let[r,i]=Km(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return od(e)?parseFloat(e):e}return tf(i)?qm(i,t,n+1):i}var Jm={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ym=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xm={type:`keyframes`,duration:.8},Zm={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Qm=(e,{keyframes:t})=>t.length>2?Xm:em.has(e)?e.startsWith(`scale`)?Ym(t[1]):Jm:Zm;function $m(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function eh(e,t){let n=e?.[t]??e?.default??e;return n===e?n:$m(n,e)}var th=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function nh(e){for(let t in e)if(!th.has(t))return!0;return!1}var rh=(e,t,n,r={},i,a)=>o=>{let s=eh(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=md(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};nh(s)||Object.assign(u,Qm(e,u)),u.duration&&=md(u.duration),u.repeatDelay&&=md(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Fm(u),u.delay===0&&(d=!0)),(ad.instantAnimations||ad.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Fm(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Pp(u.keyframes,s);if(e!==void 0){Wd.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new zp(u):new Um(u)};function ih(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ah(e,t,n,r){if(typeof t==`function`){let[i,a]=ih(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ih(r);t=t(n===void 0?e.custom:n,i,a)}return t}function oh(e,t,n){let r=e.getProps();return ah(r,t,n===void 0?r.custom:n,e)}var sh=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...$p]),ch=30,lh=e=>!isNaN(parseFloat(e)),uh={current:void 0},dh=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Xd.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Xd.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=lh(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new pd);let n=this.events[e].add(t);return e===`change`?()=>{n(),Wd.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return uh.current&&uh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Xd.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ch)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ch);return gd(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function fh(e,t){return new dh(e,t)}var ph=e=>Array.isArray(e);function mh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fh(n))}function hh(e){return ph(e)?e[e.length-1]||0:e}function gh(e,t){let{transitionEnd:n={},transition:r={},...i}=oh(e,t)||{};i={...i,...n};for(let t in i)mh(e,t,hh(i[t]))}var _h=e=>!!(e&&e.getVelocity);function vh(e){return!!(_h(e)&&e.add)}function yh(e,t){let n=e.getValue(`willChange`);if(vh(n))return n.add(t);if(!n&&ad.WillChange){let n=new ad.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function bh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var xh=`data-`+bh(`framerAppearId`);function Sh(e){return e.props[xh]}function Ch({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?$m(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ch(f,t))continue;let o={delay:n,...eh(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Wd.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=Sh(e);if(n){let e=window.MotionHandoffAnimation(n,t,Wd);e!==null&&(o.startTime=e,p=!0)}}yh(e,t);let m=l??e.shouldReduceMotion;r.start(rh(t,r,i,m&&sh.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Wd.update(()=>{o&&gh(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Th(e,t,n={}){let r=oh(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(wh(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Eh(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Eh(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Th(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Wm(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Dh(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Th(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Th(e,t,n);else{let i=typeof t==`function`?oh(e,t,n.custom):t;r=Promise.all(wh(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Oh={test:e=>e===`auto`,parse:e=>e},kh=e=>t=>t.test(e),Ah=[af,K,xf,bf,Cf,Sf,Oh],jh=e=>Ah.find(kh(e));function Mh(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||cd(e)}var Nh=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Ph(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(lf)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Nh.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Fh=/\b([a-z-]*)\(.*?\)/gu,Ih={...Hf,getAnimatableNone:e=>{let t=e.match(Fh);return t?t.map(Ph).join(` `):e}},Lh={...Hf,getAnimatableNone:e=>{let t=Hf.parse(e);return Hf.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Rh={...af,transform:Math.round},zh={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,rotate:bf,rotateX:bf,rotateY:bf,rotateZ:bf,scale:sf,scaleX:sf,scaleY:sf,scaleZ:sf,skew:bf,skewX:bf,skewY:bf,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:of,originX:wf,originY:wf,originZ:K,zIndex:Rh,fillOpacity:of,strokeOpacity:of,numOctaves:Rh},Bh={...zh,color:Ef,backgroundColor:Ef,outlineColor:Ef,fill:Ef,stroke:Ef,borderColor:Ef,borderTopColor:Ef,borderRightColor:Ef,borderBottomColor:Ef,borderLeftColor:Ef,filter:Ih,WebkitFilter:Ih,mask:Lh,WebkitMask:Lh},Vh=e=>Bh[e],Hh=new Set([Ih,Lh]);function Uh(e,t){let n=Vh(e);return Hh.has(n)||(n=Hf),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Wh=new Set([`auto`,`none`,`0`]);function Gh(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Wh.has(t)&&Ff(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Uh(n,i)}var Kh=class extends pm{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),tf(r))){let i=qm(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!sh.has(n)||e.length!==2)return;let[r,i]=e,a=jh(r),o=jh(i);if(rf(r)!==rf(i)&&am[n]){this.needsMeasurement=!0;return}if(a!==o)if(tm(a)&&tm(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else am[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Mh(e[t]))&&n.push(t);n.length&&Gh(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=am[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=am[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function qh(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Jh=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Yh(e){return sd(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Xh,cancel:Zh}=Ud(queueMicrotask,!1),Qh={x:!1,y:!1};function $h(){return Qh.x||Qh.y}function eg(e){return e===`x`||e===`y`?Qh[e]?null:(Qh[e]=!0,()=>{Qh[e]=!1}):Qh.x||Qh.y?null:(Qh.x=Qh.y=!0,()=>{Qh.x=Qh.y=!1})}function tg(e,t){let n=qh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ng(e){return!(e.pointerType===`touch`||$h())}function rg(e,t,n={}){let[r,i,a]=tg(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!ng(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ig=(e,t)=>t?e===t?!0:ig(e,t.parentElement):!1,ag=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,og=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function sg(e){return og.has(e.tagName)||e.isContentEditable===!0}var cg=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function lg(e){return cg.has(e.tagName)||e.isContentEditable===!0}var ug=new WeakSet;function dg(e){return t=>{t.key===`Enter`&&e(t)}}function fg(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var pg=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=dg(()=>{if(ug.has(n))return;fg(n,`down`);let e=dg(()=>{fg(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>fg(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function mg(e){return ag(e)&&!$h()}var hg=new WeakSet;function gg(e,t,n={}){let[r,i,a]=tg(e,n),o=e=>{let r=e.currentTarget;if(!mg(e)||hg.has(e))return;ug.add(r),n.stopPropagation&&hg.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ug.has(r)&&ug.delete(r),mg(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||ig(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Yh(e)&&(e.addEventListener(`focus`,e=>pg(e,i)),!sg(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function _g(e){return sd(e)&&`ownerSVGElement`in e}var vg=new WeakMap,yg,bg=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:_g(r)&&`getBBox`in r?r.getBBox()[t]:r[n],xg=bg(`inline`,`width`,`offsetWidth`),Sg=bg(`block`,`height`,`offsetHeight`);function Cg({target:e,borderBoxSize:t}){vg.get(e)?.forEach(n=>{n(e,{get width(){return xg(e,t)},get height(){return Sg(e,t)}})})}function wg(e){e.forEach(Cg)}function Tg(){typeof ResizeObserver>`u`||(yg=new ResizeObserver(wg))}function Eg(e,t){yg||Tg();let n=qh(e);return n.forEach(e=>{let n=vg.get(e);n||(n=new Set,vg.set(e,n)),n.add(t),yg?.observe(e)}),()=>{n.forEach(e=>{let n=vg.get(e);n?.delete(t),n?.size||yg?.unobserve(e)})}}var Dg=new Set,Og;function kg(){Og=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Dg.forEach(t=>t(e))},window.addEventListener(`resize`,Og)}function Ag(e){return Dg.add(e),Og||kg(),()=>{Dg.delete(e),!Dg.size&&typeof Og==`function`&&(window.removeEventListener(`resize`,Og),Og=void 0)}}function jg(e,t){return typeof e==`function`?Ag(e):Eg(e,t)}function Mg(e){return _g(e)&&e.tagName===`svg`}var Ng=[...Ah,Ef,Hf],Pg=e=>Ng.find(kh(e)),Fg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ig=()=>({x:Fg(),y:Fg()}),Lg=()=>({min:0,max:0}),Rg=()=>({x:Lg(),y:Lg()}),zg=new WeakMap;function Bg(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Vg(e){return typeof e==`string`||Array.isArray(e)}var Hg=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Ug=[`initial`,...Hg];function Wg(e){return Bg(e.animate)||Ug.some(t=>Vg(e[t]))}function Gg(e){return!!(Wg(e)||e.variants)}function Kg(e,t,n){for(let r in t){let i=t[r],a=n[r];if(_h(i))e.addValue(r,i);else if(_h(a))e.addValue(r,fh(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,fh(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var qg={current:null},Jg={current:!1},Yg=typeof window<`u`;function Xg(){if(Jg.current=!0,Yg)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>qg.current=e.matches;e.addEventListener(`change`,t),t()}else qg.current=!1}var Zg=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Qg={};function $g(e){Qg=e}function e_(){return Qg}var t_=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=pm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Xd.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Wd.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Wg(t),this.isVariantNode=Gg(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&_h(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,zg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Jg.current||Xg(),this.shouldReduceMotion=qg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Gd(this.notifyUpdate),Gd(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Im.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Em({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:md(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=em.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Wd.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Qg){let t=Qg[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Rg()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Zg.length;t++){let n=Zg[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Kg(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=fh(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(od(n)||cd(n))?n=parseFloat(n):!Pg(n)&&Hf.test(t)&&(n=Uh(e,t)),this.setBaseTarget(e,_h(n)?n.get():n)),_h(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=ah(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!_h(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new pd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Xh.render(this.render)}},n_=class extends t_{constructor(){super(...arguments),this.KeyframeResolver=Kh}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;_h(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},r_=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function i_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function a_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function o_(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function s_(e){return e===void 0||e===1}function c_({scale:e,scaleX:t,scaleY:n}){return!s_(e)||!s_(t)||!s_(n)}function l_(e){return c_(e)||u_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function u_(e){return d_(e.x)||d_(e.y)}function d_(e){return e&&e!==`0%`}function f_(e,t,n){return n+t*(e-n)}function p_(e,t,n,r,i){return i!==void 0&&(e=f_(e,i,r)),f_(e,n,r)+t}function m_(e,t=0,n=1,r,i){e.min=p_(e.min,t,n,r,i),e.max=p_(e.max,t,n,r,i)}function h_(e,{x:t,y:n}){m_(e.x,t.translate,t.scale,t.originPoint),m_(e.y,n.translate,n.scale,n.originPoint)}var g_=.999999999999,__=1.0000000000001;function v_(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(y_(e.x,-a.scroll.offset.x),y_(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,h_(e,o)),r&&l_(a.latestValues)&&S_(e,a.latestValues,a.layout?.layoutBox))}t.x<__&&t.x>g_&&(t.x=1),t.y<__&&t.y>g_&&(t.y=1)}function y_(e,t){e.min+=t,e.max+=t}function b_(e,t,n,r,i=.5){m_(e,t,n,Kf(e.min,e.max,i),r)}function x_(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function S_(e,t,n){let r=n??e;b_(e.x,x_(t.x,r.x),t.scaleX,t.scale,t.originX),b_(e.y,x_(t.y,r.y),t.scaleY,t.scale,t.originY)}function C_(e,t){return i_(o_(e.getBoundingClientRect(),t))}function w_(e,t,n){let r=C_(e,n),{scroll:i}=t;return i&&(y_(r.x,i.offset.x),y_(r.y,i.offset.y)),r}var T_={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},E_=$p.length;function D_(e,t,n){let r=``,i=!0;for(let a=0;a<E_;a++){let o=$p[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Jh(s,zh[o]);if(!c){i=!1;let t=T_[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function O_(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(em.has(e)){o=!0;continue}else if($d(e)){i[e]=n;continue}else{let t=Jh(n,zh[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=D_(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function k_(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function A_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var j_={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(K.test(e))e=parseFloat(e);else return e;return`${A_(e,t.target.x)}% ${A_(e,t.target.y)}%`}},M_={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Hf.parse(e);if(i.length>5)return r;let a=Hf.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Kf(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},N_={borderRadius:{...j_,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:j_,borderTopRightRadius:j_,borderBottomLeftRadius:j_,borderBottomRightRadius:j_,boxShadow:M_};function P_(e,{layout:t,layoutId:n}){return em.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!N_[e]||e===`opacity`)}function F_(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(_h(r[t])||i&&_h(i[t])||P_(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function I_(e){return window.getComputedStyle(e)}var L_=class extends n_{constructor(){super(...arguments),this.type=`html`,this.renderInstance=k_}readValueFromInstance(e,t){if(em.has(t))return this.projection?.isProjecting?Yp(t):Zp(e,t);{let n=I_(e),r=($d(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return C_(e,t)}build(e,t,n){O_(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return F_(e,t,n)}},R_={offset:`stroke-dashoffset`,array:`stroke-dasharray`},z_={offset:`strokeDashoffset`,array:`strokeDasharray`};function B_(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?R_:z_;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var V_=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function H_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(O_(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of V_)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&B_(d,i,a,o,!1)}var U_=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`]),W_=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function G_(e,t,n,r){k_(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(U_.has(n)?n:bh(n),t.attrs[n])}function K_(e,t,n){let r=F_(e,t,n);for(let n in e)if(_h(e[n])||_h(t[n])){let t=$p.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var q_=class extends n_{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Rg}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(em.has(t)){let e=Vh(t);return e&&e.default||0}return t=U_.has(t)?t:bh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return K_(e,t,n)}build(e,t,n){H_(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){G_(e,t,n,r)}mount(e){this.isSVGTag=W_(e.tagName),super.mount(e)}},J_=Ug.length;function Y_(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Y_(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<J_;n++){let r=Ug[n],i=e.props[r];(Vg(i)||i===!1)&&(t[r]=i)}return t}function X_(e,t){if(!Array.isArray(t))return!1;let 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}var Z_=[...Hg].reverse(),Q_=Hg.length;function $_(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Dh(e,t,n)))}function ev(e){let t=$_(e),n=rv(),r=!0,i=!1,a=t=>(n,r)=>{let i=oh(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=Y_(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Q_;t++){let p=Z_[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Vg(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Bg(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=tv(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=ph(t)&&ph(n)?!X_(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=oh(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Wm(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=oh(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=rv(),i=!0}}}function tv(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!X_(t,e):!1}function nv(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rv(){return{animate:nv(!0),whileInView:nv(),whileHover:nv(),whileTap:nv(),whileDrag:nv(),whileFocus:nv(),exit:nv()}}function iv(e,t){e.min=t.min,e.max=t.max}function av(e,t){iv(e.x,t.x),iv(e.y,t.y)}function ov(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var sv=1e-4,cv=1-sv,lv=1+sv,uv=.01,dv=0-uv,fv=0+uv;function pv(e){return e.max-e.min}function mv(e,t,n){return Math.abs(e-t)<=n}function hv(e,t,n,r=.5){e.origin=r,e.originPoint=Kf(t.min,t.max,e.origin),e.scale=pv(n)/pv(t),e.translate=Kf(n.min,n.max,e.origin)-e.originPoint,(e.scale>=cv&&e.scale<=lv||isNaN(e.scale))&&(e.scale=1),(e.translate>=dv&&e.translate<=fv||isNaN(e.translate))&&(e.translate=0)}function gv(e,t,n,r){hv(e.x,t.x,n.x,r?r.originX:void 0),hv(e.y,t.y,n.y,r?r.originY:void 0)}function _v(e,t,n,r=0){e.min=(r?Kf(n.min,n.max,r):n.min)+t.min,e.max=e.min+pv(t)}function vv(e,t,n,r){_v(e.x,t.x,n.x,r?.x),_v(e.y,t.y,n.y,r?.y)}function yv(e,t,n,r=0){let i=r?Kf(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+pv(t)}function bv(e,t,n,r){yv(e.x,t.x,n.x,r?.x),yv(e.y,t.y,n.y,r?.y)}function xv(e,t,n,r,i){return e-=t,e=f_(e,1/n,r),i!==void 0&&(e=f_(e,1/i,r)),e}function Sv(e,t=0,n=1,r=.5,i,a=e,o=e){if(xf.test(t)&&(t=parseFloat(t),t=Kf(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Kf(a.min,a.max,r);e===a&&(s-=t),e.min=xv(e.min,t,n,s,i),e.max=xv(e.max,t,n,s,i)}function Cv(e,t,[n,r,i],a,o){Sv(e,t[n],t[r],t[i],t.scale,a,o)}var wv=[`x`,`scaleX`,`originX`],Tv=[`y`,`scaleY`,`originY`];function Ev(e,t,n,r){Cv(e.x,t,wv,n?n.x:void 0,r?r.x:void 0),Cv(e.y,t,Tv,n?n.y:void 0,r?r.y:void 0)}function Dv(e){return e.translate===0&&e.scale===1}function Ov(e){return Dv(e.x)&&Dv(e.y)}function kv(e,t){return e.min===t.min&&e.max===t.max}function Av(e,t){return kv(e.x,t.x)&&kv(e.y,t.y)}function jv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mv(e,t){return jv(e.x,t.x)&&jv(e.y,t.y)}function Nv(e){return pv(e.x)/pv(e.y)}function Pv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Fv(e){return[e(`x`),e(`y`)]}function Iv(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Lv=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Rv=Lv.length,zv=e=>typeof e==`string`?parseFloat(e):e,Bv=e=>typeof e==`number`||K.test(e);function Vv(e,t,n,r,i,a){i?(e.opacity=Kf(0,n.opacity??1,Uv(r)),e.opacityExit=Kf(t.opacity??1,0,Wv(r))):a&&(e.opacity=Kf(t.opacity??1,n.opacity??1,r));for(let i=0;i<Rv;i++){let a=Lv[i],o=Hv(t,a),s=Hv(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Bv(o)===Bv(s)?(e[a]=Math.max(Kf(zv(o),zv(s),r),0),(xf.test(s)||xf.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Kf(t.rotate||0,n.rotate||0,r))}function Hv(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Uv=Gv(0,.5,kd),Wv=Gv(.5,.95,ud);function Gv(e,t,n){return r=>r<e?0:r>t?1:n(fd(e,t,r))}function Kv(e,t,n){let r=_h(e)?e:fh(e);return r.start(rh(``,r,t,n)),r.animation}function qv(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var Jv=(e,t)=>e.depth-t.depth,Yv=class{constructor(){this.children=[],this.isDirty=!1}add(e){nd(this.children,e),this.isDirty=!0}remove(e){rd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Jv),this.isDirty=!1,this.children.forEach(e)}};function Xv(e,t){let n=Xd.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Gd(r),e(a-t))};return Wd.setup(r,!0),()=>Gd(r)}function Zv(e){return _h(e)?e.get():e}var Qv=class{constructor(){this.members=[]}add(e){nd(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(rd(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(rd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},$v={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ey={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ty=[``,`X`,`Y`,`Z`],ny=1e3,ry=0;function iy(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ay(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Sh(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Wd,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ay(r)}function oy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=ry++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Bd.value&&(ey.nodes=ey.calculatedTargetDeltas=ey.calculatedProjections=0),this.nodes.forEach(ly),this.nodes.forEach(vy),this.nodes.forEach(yy),this.nodes.forEach(uy),Bd.addProjectionMetrics&&Bd.addProjectionMetrics(ey)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Yv)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new pd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=_g(t)&&!Mg(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Wd.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Xv(i,250),$v.hasAnimatedSinceResize&&($v.hasAnimatedSinceResize=!1,this.nodes.forEach(_y)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Ey,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Mv(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...eh(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||_y(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Gd(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(by),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ay(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(py),this.nodes.forEach(fy);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(my);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hy),this.nodes.forEach(gy),this.nodes.forEach(sy),this.nodes.forEach(cy)):this.nodes.forEach(my),this.clearAllSnapshots();let e=Xd.now();Kd.delta=id(0,1e3/60,e-Kd.timestamp),Kd.timestamp=e,Kd.isProcessing=!0,qd.update.process(Kd),qd.preRender.process(Kd),qd.render.process(Kd),Kd.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dy),this.sharedNodes.forEach(xy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wd.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wd.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pv(this.snapshot.measuredBox.x)&&!pv(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Rg(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ov(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||l_(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Ay(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Rg();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(My))){let{scroll:e}=this.root;e&&(y_(t.x,e.offset.x),y_(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Rg();if(av(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&av(t,e),y_(t.x,i.offset.x),y_(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Rg();av(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(y_(r.x,-n.scroll.offset.x),y_(r.y,-n.scroll.offset.y)),l_(n.latestValues)&&S_(r,n.latestValues,n.layout?.layoutBox)}return l_(this.latestValues)&&S_(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Rg();av(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!l_(n.latestValues))continue;let r;n.instance&&(c_(n.latestValues)&&n.updateSnapshot(),r=Rg(),av(r,n.measurePageBox())),Ev(t,n.latestValues,n.snapshot?.layoutBox,r)}return l_(this.latestValues)&&Ev(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}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!==Kd.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Kd.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Rg(),this.targetWithTransforms=Rg()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vv(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):av(this.target,this.layout.layoutBox),h_(this.target,this.targetDelta)):av(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Bd.value&&ey.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||c_(this.parent.latestValues)||u_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Rg(),this.relativeTargetOrigin=Rg(),bv(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),av(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Kd.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;av(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;v_(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Rg());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ov(this.prevProjectionDelta.x,this.projectionDelta.x),ov(this.prevProjectionDelta.y,this.projectionDelta.y)),gv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Pv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Bd.value&&ey.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ig(),this.projectionDelta=Ig(),this.projectionDeltaWithTransform=Ig()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Ig();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Rg(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Ty));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Sy(a.x,e.x,n),Sy(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bv(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),wy(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Av(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Rg(),av(d,this.relativeTarget)),s&&(this.animationValues=i,Vv(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Gd(this.pendingAnimation),void 0),this.pendingAnimation=Wd.update(()=>{$v.hasAnimatedSinceResize=!0,Zd.layout++,this.motionValue||=fh(0),this.motionValue.jump(0,!1),this.currentAnimation=Kv(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Zd.layout--},onComplete:()=>{Zd.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ny),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&jy(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Rg();let t=pv(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=pv(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}av(t,n),S_(t,i),gv(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Qv),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&iy(`z`,e,r,this.animationValues);for(let t=0;t<ty.length;t++)iy(`rotate${ty[t]}`,e,r,this.animationValues),iy(`skew${ty[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Zv(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Zv(t?.pointerEvents)||``),this.hasProjected&&!l_(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Iv(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in N_){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=N_[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Zv(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(fy),this.root.sharedNodes.clear()}}}function sy(e){e.updateLayout()}function cy(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Fv(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=pv(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;iv(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else jy(i,t.layoutBox,n)&&Fv(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=pv(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ig();gv(o,n,t.layoutBox);let s=Ig();a?gv(s,e.applyTransform(r,!0),t.measuredBox):gv(s,n,t.layoutBox);let c=!Ov(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Rg();bv(s,t.layoutBox,i.layoutBox,o);let c=Rg();bv(c,n,a.layoutBox,o),Mv(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ly(e){Bd.value&&ey.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function uy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dy(e){e.clearSnapshot()}function fy(e){e.clearMeasurements()}function py(e){e.isLayoutDirty=!0,e.updateLayout()}function my(e){e.isLayoutDirty=!1}function hy(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function gy(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function _y(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vy(e){e.resolveTargetDelta()}function yy(e){e.calcProjection()}function by(e){e.resetSkewAndRotation()}function xy(e){e.removeLeadSnapshot()}function Sy(e,t,n){e.translate=Kf(t.translate,0,n),e.scale=Kf(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Cy(e,t,n,r){e.min=Kf(t.min,n.min,r),e.max=Kf(t.max,n.max,r)}function wy(e,t,n,r){Cy(e.x,t.x,n.x,r),Cy(e.y,t.y,n.y,r)}function Ty(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Ey={duration:.45,ease:[.4,0,.1,1]},Dy=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Oy=Dy(`applewebkit/`)&&!Dy(`chrome/`)?Math.round:ud;function ky(e){e.min=Oy(e.min),e.max=Oy(e.max)}function Ay(e){ky(e.x),ky(e.y)}function jy(e,t,n){return e===`position`||e===`preserve-aspect`&&!mv(Nv(t),Nv(n),.2)}function My(e){return e!==e.root&&e.scroll?.wasRoot}var Ny=oy({attachResizeListener:(e,t)=>qv(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Py={current:void 0},Fy=oy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Py.current){let e=new Ny({});e.mount(window),e.setOptions({layoutScroll:!0}),Py.current=e}return Py.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Iy=(0,O.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Ly(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ry(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ly(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ly(e[t],null)}}}}function zy(...e){return O.useCallback(Ry(...e),e)}var By=class extends O.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Yh(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Yh(e)&&e.offsetWidth||0,r=Yh(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Vy({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,O.useId)(),s=(0,O.useRef)(null),c=(0,O.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,O.useContext)(Iy),u=zy(s,e.props?.ref??e?.ref);return(0,O.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
13
13
  [data-motion-pop-id="${o}"] {
14
14
  position: absolute !important;
15
15
  width: ${e}px !important;
@@ -37,26 +37,26 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
37
37
  .wrapper[data-active] {
38
38
  outline-color: inherit;
39
39
  }
40
- `,_C=typeof HTMLElement<`u`?HTMLElement:class{},vC=class extends _C{_isSelecting=!1;_pressDuration=hC;_isHovered=!1;_isSelectingState=!1;_wrapper;_pressTimer=null;_clickOutsideHandler=null;static get observedAttributes(){return[`is-selecting`,`press-duration`]}get isSelecting(){return this._isSelecting}set isSelecting(e){this._isSelecting=e,this._updateActiveState()}get pressDuration(){return this._pressDuration}set pressDuration(e){this._pressDuration=e}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=gC,e.appendChild(t);let n=document.createElement(`span`);n.className=`wrapper`,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`),n.appendChild(document.createElement(`slot`)),e.appendChild(n),this._wrapper=n,n.addEventListener(`mousedown`,()=>this._handleMouseDown()),n.addEventListener(`mouseup`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseleave`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseenter`,()=>this._handleMouseEnter()),n.addEventListener(`click`,e=>this._handleClick(e)),n.addEventListener(`touchstart`,()=>this._handleMouseDown()),n.addEventListener(`touchend`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`touchcancel`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`blur`,()=>this._handleBlur())}attributeChangedCallback(e,t,n){e===`is-selecting`?(this._isSelecting=n!==null,this._updateActiveState()):e===`press-duration`&&(this._pressDuration=n===null?hC:parseInt(n,10))}connectedCallback(){this._clickOutsideHandler=e=>{e.composedPath().includes(this)||(this._isSelectingState=!1,this._dispatch(`intlayer:click-outside`),this._updateActiveState())},document.addEventListener(`mousedown`,this._clickOutsideHandler)}disconnectedCallback(){this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),null),this._clearPressTimer()}_updateActiveState(){this._isSelecting||this._isSelectingState||this._isHovered?this._wrapper.setAttribute(`data-active`,``):this._wrapper.removeAttribute(`data-active`)}_clearPressTimer(){this._pressTimer!==null&&(clearTimeout(this._pressTimer),this._pressTimer=null)}_dispatch(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>{this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)},this._pressDuration)}_handleMouseEnter(){this._isHovered=!0,this._updateActiveState(),this._dispatch(`intlayer:hover`)}_handleMouseUpOrLeave(){this._isHovered&&(this._isHovered=!1,this._dispatch(`intlayer:unhover`)),this._clearPressTimer(),this._updateActiveState()}_handleClick(e){(this._isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},yC=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,vC),FS(),RS(),mC())},bC=()=>({allowedOrigins:[w?.editorURL,w?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),xC=0,SC=()=>{xC++;let e=AS();if(e)return e;let t=new dC({mode:`client`,messenger:bC(),configuration:T});return jS(t),yC(),t.start(),t},CC=()=>{xC=Math.max(0,xC-1),!(xC>0)&&(AS()?.stop(),jS(null))},wC=(e,t,n)=>{let r=(0,B.c)(16),i=xS(),a;r[0]===t?a=r[1]:(a=typeof t==`function`?t():t,r[0]=t,r[1]=a);let o=a,[s,c]=(0,O.useState)(o),l=(0,O.useRef)(o),u=(0,O.useRef)(null),d;r[2]!==e||r[3]!==i?.messenger||r[4]!==n||r[5]!==o?(d=()=>{let{emit:t,receive:r}=n??{},a=t===void 0?!0:t,s=r===void 0?!0:r,d=new VS(e,i?.messenger,{emit:a,receive:s,initialValue:o});u.current=d;let f=e=>{let t=e.detail;l.current=t,c(t)};return d.addEventListener(`change`,f),d.start(),()=>{d.removeEventListener(`change`,f),d.stop(),u.current=null}},r[2]=e,r[3]=i?.messenger,r[4]=n,r[5]=o,r[6]=d):d=r[6];let f=i?.messenger,p=n?.emit,m=n?.receive,h;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(h=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=h):h=r[11],(0,O.useEffect)(d,h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=g):g=r[12];let _=g,v;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{u.current?.postCurrentValue()},r[13]=v):v=r[13];let y=v,b;return r[14]===s?b=r[15]:(b=[s,_,y],r[14]=s,r[15]=b),b},TC=(e,t)=>wC(TS.INTLAYER_URL_CHANGE,e,t),EC=()=>{let e=(0,B.c)(13),t=xS(),n;e[0]===t?.localeDictionaries.value?n=e[1]:(n=t?.localeDictionaries.value??{},e[0]=t?.localeDictionaries.value,e[1]=n);let[r,i]=(0,O.useState)(n),a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{if(!t)return;let e=e=>i(e.detail??{});return t.localeDictionaries.addEventListener(`change`,e),()=>t.localeDictionaries.removeEventListener(`change`,e)},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,O.useEffect)(a,o);let s;e[5]===t?.localeDictionaries?s=e[6]:(s=e=>t?.localeDictionaries.set(e),e[5]=t?.localeDictionaries,e[6]=s);let c=s,l;e[7]===t?l=e[8]:(l=e=>t?.setLocaleDictionary(e),e[7]=t,e[8]=l);let u=l,d;return e[9]!==r||e[10]!==c||e[11]!==u?(d={localeDictionaries:r,setLocaleDictionaries:c,setLocaleDictionary:u},e[9]=r,e[10]=c,e[11]=u,e[12]=d):d=e[12],d},DC=()=>{let e=(0,B.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=EC(),r;return e[0]!==t||e[1]!==n?(r={setLocaleDictionaries:t,setLocaleDictionary:n},e[0]=t,e[1]=n,e[2]=r):r=e[2],r},OC=()=>{let e=(0,B.c)(3),t=xS(),[n,r]=(0,O.useState)(t?.currentLocale.value),i,a;return e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.currentLocale.addEventListener(`change`,e),()=>t.currentLocale.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,O.useEffect)(i,a),n},kC=(e,t,n)=>{for(let r of t)try{if(rC(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},AC=()=>{let e=(0,B.c)(12),{localeDictionaries:t}=EC(),n=OC(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=CS(),o;bb0:{if(!a){o=a;break bb0}if(!t){o=a;break bb0}if(a.dictionaryLocalId){o=a;break bb0}let r;if(e[0]!==n||e[1]!==t||e[2]!==a.dictionaryKey||e[3]!==a.keyPath){let i=Object.values(t).filter(e=>e.key===a.dictionaryKey);r=kC(a.keyPath??[],i,n),e[0]=n,e[1]=t,e[2]=a.dictionaryKey,e[3]=a.keyPath,e[4]=r}else r=e[4];let i=r,s;e[5]!==a||e[6]!==i?(s={...a,...i},e[5]=a,e[6]=i,e[7]=s):s=e[7],o=s}let s;return e[8]!==r||e[9]!==i||e[10]!==o?(s={focusedContent:o,setFocusedContent:r,setFocusedContentKeyPath:i},e[8]=r,e[9]=i,e[10]=o,e[11]=s):s=e[11],s},jC=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,O.useRef)(null);i.current||=new dC({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,O.useEffect)(()=>(yC(),jS(a),a.start(),()=>{a.stop(),jS(null)}),[a]),(0,O.useEffect)(()=>{!a||!t||Object.keys(t).length===0||a.configuration.set(t)},[a,t]),(0,k.jsx)(bS,{manager:a,children:e})},MC=(0,O.createContext)(void 0),NC=()=>{let e=(0,B.c)(4),t=xS(),n=(0,O.useContext)(MC),[r,i]=(0,O.useState)(t?.configuration.value??n),a,o;return e[0]!==t||e[1]!==n?(a=()=>{if(!t){i(n);return}let e=e=>{let t=e.detail;i(t??n)};return t.configuration.addEventListener(`change`,e),()=>t.configuration.removeEventListener(`change`,e)},o=[t,n],e[0]=t,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,O.useEffect)(a,o),r??n},PC=()=>{let e=(0,B.c)(23),t=xS(),n;e[0]===t?.editedContent?n=e[1]:(n=e=>t?.editedContent.set(e),e[0]=t?.editedContent,e[1]=n);let r,i,a,o,s,c,l,u,d;e[2]===t?(r=e[3],i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],d=e[11]):(r=e=>t?.setEditedDictionary(e),i=(e,n)=>t?.setEditedContent(e,n),a=(e,n,r,i)=>t?.addContent(e,n,r,i),o=(e,n,r)=>t?.renameContent(e,n,r),s=(e,n)=>t?.removeContent(e,n),c=e=>t?.restoreContent(e),l=e=>t?.clearContent(e),u=()=>t?.clearAllContent(),d=(e,n)=>t?.getContentValue(e,n),e[2]=t,e[3]=r,e[4]=i,e[5]=a,e[6]=o,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d);let f;return e[12]!==n||e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==c||e[19]!==l||e[20]!==u||e[21]!==d?(f={setEditedContentState:n,setEditedDictionary:r,setEditedContent:i,addEditedContent:a,renameEditedContent:o,removeEditedContent:s,restoreEditedContent:c,clearEditedDictionaryContent:l,clearEditedContent:u,getEditedContentValue:d},e[12]=n,e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=s,e[18]=c,e[19]=l,e[20]=u,e[21]=d,e[22]=f):f=e[22],f},FC=()=>{let e=(0,B.c)(6),t=xS(),[n,r]=(0,O.useState)(t?.editedContent.value),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editedContent.addEventListener(`change`,e),()=>t.editedContent.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,O.useEffect)(i,a);let o=PC(),s;return e[3]!==n||e[4]!==o?(s={editedContent:n,...o},e[3]=n,e[4]=o,e[5]=s):s=e[5],s},IC=()=>{let e=(0,B.c)(5),t=xS(),[n,r]=(0,O.useState)(t?.editorEnabled.value??!1),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editorEnabled.addEventListener(`change`,e),()=>t.editorEnabled.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,O.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},LC=()=>{let e=(0,B.c)(2),t=xS(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},RC=(e,t,n)=>{let r=(0,B.c)(11),i=xS(),a;r[0]!==e||r[1]!==i?.messenger||r[2]!==t?(a=()=>{if(t)return i?.messenger.subscribe(e,t)},r[0]=e,r[1]=i?.messenger,r[2]=t,r[3]=a):a=r[3];let o;r[4]!==e||r[5]!==i||r[6]!==n?(o=[i,e,n],r[4]=e,r[5]=i,r[6]=n,r[7]=o):o=r[7],(0,O.useEffect)(a,o);let s;return r[8]!==e||r[9]!==i?.messenger?(s=t=>{i?.messenger.send(e,t)},r[8]=e,r[9]=i?.messenger,r[10]=s):s=r[10],s},zC=()=>{RC(TS.INTLAYER_IFRAME_CLICKED,ES)},BC=e=>{let t=(0,B.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=rC(i,n,OC());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,l=s??r,u;t[1]!==n||t[2]!==o?(u=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=u):u=t[3];let d;return t[4]!==n||t[5]!==a?(d=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=d):d=t[6],(0,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,k.jsx)(vS,{value:l,onChange:d})})},VC=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!dw.includes(e)).map(r=>{let i={type:F,key:r},a=[...t,i],o=n[F][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(fw,{...e,key:r,keyPath:a,section:o})]})})})},HC=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!dw.includes(e)).map(r=>{let i={type:N,key:r},a=[...t,i],o=n[N][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(fw,{...e,key:r,keyPath:a,section:o})]})})})},UC=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,O.useState)(!1),l=(0,O.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,O.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,O.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,k.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,k.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,k.jsx)(rS,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:vu,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,k.jsx)(rS,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Hu,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,k.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,k.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,k.jsx)(rS,{label:`Edit`,Icon:Pu,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},WC=(...e)=>e.filter(Boolean).join(` `),GC=au([`w-full select-text resize-none text-base shadow-none outline-none`,`transition-all duration-300 md:text-sm`,`ring-0`,`disabled:opacity-50`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`].join(` `),{variants:{variant:{default:[`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-text/20`,`disabled:ring-0`,`hover:ring-3`,`focus-within:ring-4`,`focus-visible:outline-none focus-visible:ring-4`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`].join(` `),invisible:`border-none text-inherit outline-none ring-0`},size:{sm:`px-2 py-2 text-sm md:py-1.5 md:text-xs`,md:`px-2 py-3 md:py-2`,lg:`p-4`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,size:`md`,validationStyleEnabled:`disabled`}}),KC=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,k.jsx)(`input`,{className:WC(GC({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),qC=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,k.jsx)(`textarea`,{className:W(`resize-none`,GC({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),JC=24,YC=12,XC=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,O.useRef)(null);(0,O.useImperativeHandle)(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=JC*r+YC,s=JC+YC;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,O.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,k.jsx)(qC,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...a})},ZC=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,O.useRef)(null);return(0,O.useImperativeHandle)(n,()=>i.current),(0,k.jsx)(UC,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,k.jsx)(XC,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},QC=e=>{let t=(0,B.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=OC(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??rC(i,n,l),t[0]=l,t[1]=i,t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=u;if(d&&typeof d!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let f=n.length,p=String(d??r),m;if(t[6]!==p||t[7]!==n||t[8]!==f||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],m=(0,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,k.jsx)(ZC,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:$C})}),t[6]=p,t[7]=n,t[8]=f,t[9]=o,t[10]=s,t[11]=c,t[12]=m}else m=t[12];return m};function $C(){return null}var ew=e=>{let t=(0,B.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=FC(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=rC(e.editedContent,n),s=r[L],{content:c}=r,l=[...n,{type:L}],u;t[5]!==i||t[6]!==n||t[7]!==e.dictionary||t[8]!==r?(u=t=>{i(e.dictionary.localId,{...r,content:t.newValue},n)},t[5]=i,t[6]=n,t[7]=e.dictionary,t[8]=r,t[9]=u):u=t[9],a=(0,k.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,k.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,k.jsx)(QC,{...e,keyPath:l,section:c,editedContentValue:o?.content,onContentChange:u})]}),t[0]=i,t[1]=n,t[2]=e,t[3]=r,t[4]=a}else a=t[4];return a},tw=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:z}],i=n[z];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(fw,{...e,keyPath:r,section:i})})},nw=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:I}],i=n[I];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(fw,{...e,keyPath:r,section:i})})},rw=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(fw,{...e,keyPath:r,section:i})})},iw=(0,O.memo)(e=>{let t=(0,B.c)(11),{keyPath:n,section:r,focusedKeyPath:i,onFocusKeyPath:a}=e,o;t[0]===i?o=t[1]:(o=i===void 0?[]:i,t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=Object.keys(r??{}).filter(aw),t[2]=r,t[3]=c);let l=c,u;return t[4]!==s||t[5]!==n||t[6]!==a||t[7]!==e||t[8]!==r||t[9]!==l?(u=l.map(t=>{let i={key:t,type:ee},o=[...n,i],c=dt(o,s);return(0,k.jsx)(oS,{level:n.length,title:ht(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,k.jsx)(fw,{...e,keyPath:o,section:r[t]})},t)}),t[4]=s,t[5]=n,t[6]=a,t[7]=e,t[8]=r,t[9]=l,t[10]=u):u=t[10],u});function aw(e){return!dw.includes(e)}var ow=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,O.useRef)(null);return(0,O.useImperativeHandle)(n,()=>i.current),(0,k.jsx)(UC,{value:(0,O.useMemo)(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:(0,k.jsx)(KC,{ref:i,...r})})},sw=e=>{let t=(0,B.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=OC(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=rC(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let l=c;if(l!==void 0&&typeof l!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let u=n.length,d=String(l??r),f;if(t[5]!==d||t[6]!==n||t[7]!==u||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],f=(0,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,k.jsx)(ow,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:cw})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function cw(){return null}var lw=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!dw.includes(e)).map(r=>{let i={type:P,key:r},a=[...t,i],o=n[P][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(fw,{...e,key:r,keyPath:a,section:o})]})})})},uw=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:M,key:r},a=[...t,i],o=n[M][r];return(0,k.jsx)(fw,{...e,keyPath:a,section:o})},dw=[`filePath`,`id`,`nodeType`],fw=(0,O.memo)(e=>{let t=OC(),n=(0,O.useMemo)(()=>rC(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,O.useMemo)(()=>lC(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,k.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,k.jsx)(rw,{...e,section:n}):r===`html`?(0,k.jsx)(tw,{...e,section:n}):r===`translation`?(0,k.jsx)(uw,{...e,section:n}):r===`enumeration`?(0,k.jsx)(HC,{...e,section:n}):r===`plural`?(0,k.jsx)(lw,{...e,section:n}):r===`condition`?(0,k.jsx)(VC,{...e,section:n}):r===`insertion`?(0,k.jsx)(nw,{...e,section:n}):r===`array`?(0,k.jsx)(sS,{...e,section:n}):r===`file`?(0,k.jsx)(ew,{...e,section:n}):(0,k.jsx)(iw,{...e,section:n});if(typeof n==`string`)return(0,k.jsx)(QC,{...e,section:n});if(typeof n==`number`)return(0,k.jsx)(sw,{...e,section:n});if(typeof n==`boolean`)return(0,k.jsx)(BC,{...e,section:n})}),pw=e=>{let t=(0,B.c)(6),{dictionary:n,...r}=e,i=OC(),{editedContent:a,addEditedContent:o}=FC(),{focusedContent:s,setFocusedContentKeyPath:c}=AC(),l;t[0]!==n||t[1]!==a?(l=JSON.stringify((a?.[n.localId]??n).content),t[0]=n,t[1]=a,t[2]=l):l=t[2];let u;return t[3]!==o||t[4]!==n.localId?(u=e=>{o(n.localId,e.newValue,e.keyPath)},t[3]=o,t[4]=n.localId,t[5]=u):u=t[5],(0,k.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,O.createElement)(fw,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},mw={key:`navigation-view`,content:{nodeType:`translation`,translation:{en:{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},"en-GB":{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},fr:{tsxNotEditable:`Node React non éditable`,goToField:{label:`Aller au champ`},addNewElement:{label:`Cliquez pour ajouter un élément`,text:`Ajouter un nouvel élément`},removeElement:{label:`Cliquez pour supprimer un élément`,text:`Supprimer l’élément`},addNewEnumeration:{label:`Cliquez pour ajouter une énumération`,text:`Ajouter une nouvelle énumération`},removeEnumeration:{label:`Cliquez pour supprimer une énumération`,text:`Supprimer l’énumération`}},es:{tsxNotEditable:`Nodo React no editable`,goToField:{label:`Ir al campo`},addNewElement:{label:`Haga clic para agregar un elemento`,text:`Agregar nuevo elemento`},removeElement:{label:`Haga clic para eliminar un elemento`,text:`Eliminar elemento`},addNewEnumeration:{label:`Haga clic para agregar una enumeración`,text:`Agregar nueva enumeración`},removeEnumeration:{label:`Haga clic para eliminar una enumeración`,text:`Eliminar enumeración`}},de:{tsxNotEditable:`React-Knoten ist nicht bearbeitbar`,goToField:{label:`Zum Feld gehen`},addNewElement:{label:`Klicken Sie, um ein Element hinzuzufügen`,text:`Neues Element hinzufügen`},removeElement:{label:`Klicken Sie, um ein Element zu entfernen`,text:`Element entfernen`},addNewEnumeration:{label:`Klicken Sie, um eine Aufzählung hinzuzufügen`,text:`Neue Aufzählung hinzufügen`},removeEnumeration:{label:`Klicken Sie, um eine Aufzählung zu entfernen`,text:`Aufzählung entfernen`}},ja:{tsxNotEditable:`編集できないReactノードです`,goToField:{label:`フィールドに移動`},addNewElement:{label:`要素を追加するにはクリック`,text:`新しい要素を追加`},removeElement:{label:`要素を削除するにはクリック`,text:`要素を削除`},addNewEnumeration:{label:`列挙を追加するにはクリック`,text:`新しい列挙を追加`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},removeEnumeration:{label:`点击删除枚举`,text:`删除枚举`}},it:{tsxNotEditable:`Node React non modificabile`,goToField:{label:`Vai al campo`},addNewElement:{label:`Clicca per aggiungere un elemento`,text:`Aggiungi nuovo elemento`},removeElement:{label:`Clicca per rimuovere un elemento`,text:`Rimuovi elemento`},addNewEnumeration:{label:`Clicca per aggiungere un enumerazione`,text:`Aggiungi nuova enumerazione`},removeEnumeration:{label:`Clicca per rimuovere un'enumerazione`,text:`Rimuovi enumerazione`}},pt:{tsxNotEditable:`Nó React não editável`,goToField:{label:`Ir para o campo`},addNewElement:{label:`Clique para adicionar um elemento`,text:`Adicionar novo elemento`},removeElement:{label:`Clique para remover um elemento`,text:`Remover elemento`},addNewEnumeration:{label:`Clique para adicionar uma enumeração`,text:`Adicionar nova enumeração`},removeEnumeration:{label:`Clique para remover uma enumeração`,text:`Remover enumeração`}},hi:{tsxNotEditable:`सम्पादित न करने योग्य React नोड`,goToField:{label:`फ़ील्ड पर जाएं`},addNewElement:{label:`तत्व जोड़ने के लिए क्लिक करें`,text:`नया तत्व जोड़ें`},removeElement:{label:`तत्व निकालने के लिए क्लिक करें`,text:`तत्व निकालें`},addNewEnumeration:{label:`सूची जोड़ने के लिए क्लिक करें`,text:`नया सूची जोड़ें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},localIds:[`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`]},hw=(e,t)=>{let n=(0,B.c)(21),r;n[0]!==t||n[1]!==e?(r=()=>{if(t!==void 0){let n=typeof t==`function`?t():t;if(typeof window>`u`)return n;let r=localStorage?.getItem(e);if(r)try{return JSON.parse(r)}catch(e){console.error(e)}return n}},n[0]=t,n[1]=e,n[2]=r):r=n[2];let[i,a]=(0,O.useState)(r),o;n[3]!==t||n[4]!==e||n[5]!==i?(o=()=>{let n=localStorage?.getItem(e);if(n&&n!==`undefined`&&i===void 0)try{a(JSON.parse(n))}catch(e){console.error(e)}else t!==void 0&&i===void 0&&a(t)},n[3]=t,n[4]=e,n[5]=i,n[6]=o):o=n[6];let s;n[7]!==e||n[8]!==i?(s=[e,i],n[7]=e,n[8]=i,n[9]=s):s=n[9],(0,O.useEffect)(o,s);let c;n[10]===e?c=n[11]:(c=t=>{a(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},n[10]=e,n[11]=c);let l=c,u;n[12]===e?u=n[13]:(u=()=>{let t=localStorage?.getItem(e);t&&a(JSON.parse(t))},n[12]=e,n[13]=u);let d=u,f;n[14]===e?f=n[15]:(f=()=>{localStorage?.removeItem(e),a(void 0)},n[14]=e,n[15]=f);let p=f,m;return n[16]!==p||n[17]!==d||n[18]!==l||n[19]!==i?(m=[i,l,d,p],n[16]=p,n[17]=d,n[18]=l,n[19]=i,n[20]=m):m=n[20],m},gw=(0,O.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),_w=()=>(0,O.useContext)(gw),vw=e=>{let t=(0,B.c)(16),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=bt(),o;t[0]!==r||t[1]!==a?(o=r??[a],t[0]=r,t[1]=a,t[2]=o):o=t[2];let[s,c]=hw(`locale-content-selector-selected-locales`,o),l;t[3]!==n||t[4]!==r||t[5]!==a||t[6]!==s||t[7]!==c?(l=()=>{if(n.length&&!s?.some(e=>n.includes(e))){let e=r?.filter(e=>n.includes(e));c(e?.length?e:[a])}},t[3]=n,t[4]=r,t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===n?u=t[10]:(u=[n],t[9]=n,t[10]=u),(0,O.useEffect)(l,u);let d;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==c?(d=(0,k.jsx)(gw,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[11]=n,t[12]=i,t[13]=s,t[14]=c,t[15]=d):d=t[15],d},yw=e=>{let t=(0,B.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,O.useState)(n),[u,d]=(0,O.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(bw)},t[0]=n,t[1]=p);let m=p,h;t[2]!==c||t[3]!==r?(h=()=>{r(c)},t[2]=c,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{l(e.currentTarget.value)},t[5]=_):_=t[5];let v=_,y=e=>{e.key===`Enter`&&!i&&S?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),m())},b,x;t[6]===n?(b=t[7],x=t[8]):(b=()=>{l(n),d(xw)},x=[n],t[6]=n,t[7]=b,t[8]=x),(0,O.useEffect)(b,x);let S=a?.(c)??!0;return(0,k.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,k.jsx)(KC,{onChange:v,onKeyDown:y,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!S,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,k.jsxs)(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rS,{Icon:vu,label:`Save changes${S?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!S,onClick:g,"aria-describedby":S?void 0:`validation-error`}),(0,k.jsx)(rS,{Icon:Hu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function bw(e){return e+1}function xw(e){return e+1}var Sw={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},Cw=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),ww=e=>e.reduce((e,t)=>{let n=e??{},r=Cw(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=ww([Sw,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=ww([Sw.headers,...t.map(e=>e.headers)]),s=ww(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=ww(t.map(e=>e.body));i=o?.[`Content-Type`]===`application/x-www-form-urlencoded`?new URLSearchParams(e).toString():JSON.stringify(e)}Object.entries(s).length>0&&(r=`?${new URLSearchParams(s).toString()}`);let l={...a,headers:o,body:i,signal:n},u=`${e}${r}`,d=await fetch(u,l);if(!d.ok){let e=await d.json();throw Error(JSON.stringify(e.error)??`An error occurred`)}return await d.json()},Tw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
40
+ `,_C=typeof HTMLElement<`u`?HTMLElement:class{},vC=class extends _C{_isSelecting=!1;_pressDuration=hC;_isHovered=!1;_isSelectingState=!1;_wrapper;_pressTimer=null;_clickOutsideHandler=null;static get observedAttributes(){return[`is-selecting`,`press-duration`]}get isSelecting(){return this._isSelecting}set isSelecting(e){this._isSelecting=e,this._updateActiveState()}get pressDuration(){return this._pressDuration}set pressDuration(e){this._pressDuration=e}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=gC,e.appendChild(t);let n=document.createElement(`span`);n.className=`wrapper`,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`),n.appendChild(document.createElement(`slot`)),e.appendChild(n),this._wrapper=n,n.addEventListener(`mousedown`,()=>this._handleMouseDown()),n.addEventListener(`mouseup`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseleave`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseenter`,()=>this._handleMouseEnter()),n.addEventListener(`click`,e=>this._handleClick(e)),n.addEventListener(`touchstart`,()=>this._handleMouseDown()),n.addEventListener(`touchend`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`touchcancel`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`blur`,()=>this._handleBlur())}attributeChangedCallback(e,t,n){e===`is-selecting`?(this._isSelecting=n!==null,this._updateActiveState()):e===`press-duration`&&(this._pressDuration=n===null?hC:parseInt(n,10))}connectedCallback(){this._clickOutsideHandler=e=>{e.composedPath().includes(this)||(this._isSelectingState=!1,this._dispatch(`intlayer:click-outside`),this._updateActiveState())},document.addEventListener(`mousedown`,this._clickOutsideHandler)}disconnectedCallback(){this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),null),this._clearPressTimer()}_updateActiveState(){this._isSelecting||this._isSelectingState||this._isHovered?this._wrapper.setAttribute(`data-active`,``):this._wrapper.removeAttribute(`data-active`)}_clearPressTimer(){this._pressTimer!==null&&(clearTimeout(this._pressTimer),this._pressTimer=null)}_dispatch(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>{this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)},this._pressDuration)}_handleMouseEnter(){this._isHovered=!0,this._updateActiveState(),this._dispatch(`intlayer:hover`)}_handleMouseUpOrLeave(){this._isHovered&&(this._isHovered=!1,this._dispatch(`intlayer:unhover`)),this._clearPressTimer(),this._updateActiveState()}_handleClick(e){(this._isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},yC=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,vC),FS(),RS(),mC())},bC=()=>({allowedOrigins:[w?.editorURL,w?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),xC=0,SC=()=>{xC++;let e=AS();if(e)return e;let t=new dC({mode:`client`,messenger:bC(),configuration:T});return jS(t),yC(),t.start(),t},CC=()=>{xC=Math.max(0,xC-1),!(xC>0)&&(AS()?.stop(),jS(null))},wC=(e,t,n)=>{let r=(0,B.c)(16),i=xS(),a;r[0]===t?a=r[1]:(a=typeof t==`function`?t():t,r[0]=t,r[1]=a);let o=a,[s,c]=(0,O.useState)(o),l=(0,O.useRef)(o),u=(0,O.useRef)(null),d;r[2]!==e||r[3]!==i?.messenger||r[4]!==n||r[5]!==o?(d=()=>{let{emit:t,receive:r}=n??{},a=t===void 0?!0:t,s=r===void 0?!0:r,d=new VS(e,i?.messenger,{emit:a,receive:s,initialValue:o});u.current=d;let f=e=>{let t=e.detail;l.current=t,c(t)};return d.addEventListener(`change`,f),d.start(),()=>{d.removeEventListener(`change`,f),d.stop(),u.current=null}},r[2]=e,r[3]=i?.messenger,r[4]=n,r[5]=o,r[6]=d):d=r[6];let f=i?.messenger,p=n?.emit,m=n?.receive,h;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(h=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=h):h=r[11],(0,O.useEffect)(d,h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=g):g=r[12];let _=g,v;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{u.current?.postCurrentValue()},r[13]=v):v=r[13];let y=v,b;return r[14]===s?b=r[15]:(b=[s,_,y],r[14]=s,r[15]=b),b},TC=(e,t)=>wC(TS.INTLAYER_URL_CHANGE,e,t),EC=()=>{let e=(0,B.c)(13),t=xS(),n;e[0]===t?.localeDictionaries.value?n=e[1]:(n=t?.localeDictionaries.value??{},e[0]=t?.localeDictionaries.value,e[1]=n);let[r,i]=(0,O.useState)(n),a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{if(!t)return;let e=e=>i(e.detail??{});return t.localeDictionaries.addEventListener(`change`,e),()=>t.localeDictionaries.removeEventListener(`change`,e)},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,O.useEffect)(a,o);let s;e[5]===t?.localeDictionaries?s=e[6]:(s=e=>t?.localeDictionaries.set(e),e[5]=t?.localeDictionaries,e[6]=s);let c=s,l;e[7]===t?l=e[8]:(l=e=>t?.setLocaleDictionary(e),e[7]=t,e[8]=l);let u=l,d;return e[9]!==r||e[10]!==c||e[11]!==u?(d={localeDictionaries:r,setLocaleDictionaries:c,setLocaleDictionary:u},e[9]=r,e[10]=c,e[11]=u,e[12]=d):d=e[12],d},DC=()=>{let e=(0,B.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=EC(),r;return e[0]!==t||e[1]!==n?(r={setLocaleDictionaries:t,setLocaleDictionary:n},e[0]=t,e[1]=n,e[2]=r):r=e[2],r},OC=()=>{let e=(0,B.c)(3),t=xS(),[n,r]=(0,O.useState)(t?.currentLocale.value),i,a;return e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.currentLocale.addEventListener(`change`,e),()=>t.currentLocale.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,O.useEffect)(i,a),n},kC=(e,t,n)=>{for(let r of t)try{if(rC(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},AC=()=>{let e=(0,B.c)(12),{localeDictionaries:t}=EC(),n=OC(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=CS(),o;bb0:{if(!a){o=a;break bb0}if(!t){o=a;break bb0}if(a.dictionaryLocalId){o=a;break bb0}let r;if(e[0]!==n||e[1]!==t||e[2]!==a.dictionaryKey||e[3]!==a.keyPath){let i=Object.values(t).filter(e=>e.key===a.dictionaryKey);r=kC(a.keyPath??[],i,n),e[0]=n,e[1]=t,e[2]=a.dictionaryKey,e[3]=a.keyPath,e[4]=r}else r=e[4];let i=r,s;e[5]!==a||e[6]!==i?(s={...a,...i},e[5]=a,e[6]=i,e[7]=s):s=e[7],o=s}let s;return e[8]!==r||e[9]!==i||e[10]!==o?(s={focusedContent:o,setFocusedContent:r,setFocusedContentKeyPath:i},e[8]=r,e[9]=i,e[10]=o,e[11]=s):s=e[11],s},jC=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,O.useRef)(null);i.current||=new dC({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,O.useEffect)(()=>(yC(),jS(a),a.start(),()=>{a.stop(),jS(null)}),[a]),(0,O.useEffect)(()=>{!a||!t||Object.keys(t).length===0||a.configuration.set(t)},[a,t]),(0,k.jsx)(bS,{manager:a,children:e})},MC=(0,O.createContext)(void 0),NC=()=>{let e=(0,B.c)(4),t=xS(),n=(0,O.useContext)(MC),[r,i]=(0,O.useState)(t?.configuration.value??n),a,o;return e[0]!==t||e[1]!==n?(a=()=>{if(!t){i(n);return}let e=e=>{let t=e.detail;i(t??n)};return t.configuration.addEventListener(`change`,e),()=>t.configuration.removeEventListener(`change`,e)},o=[t,n],e[0]=t,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,O.useEffect)(a,o),r??n},PC=()=>{let e=(0,B.c)(23),t=xS(),n;e[0]===t?.editedContent?n=e[1]:(n=e=>t?.editedContent.set(e),e[0]=t?.editedContent,e[1]=n);let r,i,a,o,s,c,l,u,d;e[2]===t?(r=e[3],i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],d=e[11]):(r=e=>t?.setEditedDictionary(e),i=(e,n)=>t?.setEditedContent(e,n),a=(e,n,r,i)=>t?.addContent(e,n,r,i),o=(e,n,r)=>t?.renameContent(e,n,r),s=(e,n)=>t?.removeContent(e,n),c=e=>t?.restoreContent(e),l=e=>t?.clearContent(e),u=()=>t?.clearAllContent(),d=(e,n)=>t?.getContentValue(e,n),e[2]=t,e[3]=r,e[4]=i,e[5]=a,e[6]=o,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d);let f;return e[12]!==n||e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==c||e[19]!==l||e[20]!==u||e[21]!==d?(f={setEditedContentState:n,setEditedDictionary:r,setEditedContent:i,addEditedContent:a,renameEditedContent:o,removeEditedContent:s,restoreEditedContent:c,clearEditedDictionaryContent:l,clearEditedContent:u,getEditedContentValue:d},e[12]=n,e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=s,e[18]=c,e[19]=l,e[20]=u,e[21]=d,e[22]=f):f=e[22],f},FC=()=>{let e=(0,B.c)(6),t=xS(),[n,r]=(0,O.useState)(t?.editedContent.value),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editedContent.addEventListener(`change`,e),()=>t.editedContent.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,O.useEffect)(i,a);let o=PC(),s;return e[3]!==n||e[4]!==o?(s={editedContent:n,...o},e[3]=n,e[4]=o,e[5]=s):s=e[5],s},IC=()=>{let e=(0,B.c)(5),t=xS(),[n,r]=(0,O.useState)(t?.editorEnabled.value??!1),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editorEnabled.addEventListener(`change`,e),()=>t.editorEnabled.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,O.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},LC=()=>{let e=(0,B.c)(2),t=xS(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},RC=(e,t,n)=>{let r=(0,B.c)(11),i=xS(),a;r[0]!==e||r[1]!==i?.messenger||r[2]!==t?(a=()=>{if(t)return i?.messenger.subscribe(e,t)},r[0]=e,r[1]=i?.messenger,r[2]=t,r[3]=a):a=r[3];let o;r[4]!==e||r[5]!==i||r[6]!==n?(o=[i,e,n],r[4]=e,r[5]=i,r[6]=n,r[7]=o):o=r[7],(0,O.useEffect)(a,o);let s;return r[8]!==e||r[9]!==i?.messenger?(s=t=>{i?.messenger.send(e,t)},r[8]=e,r[9]=i?.messenger,r[10]=s):s=r[10],s},zC=()=>{RC(TS.INTLAYER_IFRAME_CLICKED,ES)},BC=e=>{let t=(0,B.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=rC(i,n,OC());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,l=s??r,u;t[1]!==n||t[2]!==o?(u=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=u):u=t[3];let d;return t[4]!==n||t[5]!==a?(d=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=d):d=t[6],(0,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,k.jsx)(vS,{value:l,onChange:d})})},VC=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[F]).map(r=>{let i={type:F,key:r},a=[...t,i],o=n[F][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(fw,{...e,key:r,keyPath:a,section:o})]})})})},HC=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[N]).map(r=>{let i={type:N,key:r},a=[...t,i],o=n[N][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(fw,{...e,key:r,keyPath:a,section:o})]})})})},UC=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,O.useState)(!1),l=(0,O.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,O.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,O.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,k.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,k.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,k.jsx)(rS,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:vu,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,k.jsx)(rS,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Hu,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,k.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,k.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,k.jsx)(rS,{label:`Edit`,Icon:Pu,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},WC=(...e)=>e.filter(Boolean).join(` `),GC=au([`w-full select-text resize-none text-base shadow-none outline-none`,`transition-all duration-300 md:text-sm`,`ring-0`,`disabled:opacity-50`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`].join(` `),{variants:{variant:{default:[`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-text/20`,`disabled:ring-0`,`hover:ring-3`,`focus-within:ring-4`,`focus-visible:outline-none focus-visible:ring-4`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`].join(` `),invisible:`border-none text-inherit outline-none ring-0`},size:{sm:`px-2 py-2 text-sm md:py-1.5 md:text-xs`,md:`px-2 py-3 md:py-2`,lg:`p-4`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,size:`md`,validationStyleEnabled:`disabled`}}),KC=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,k.jsx)(`input`,{className:WC(GC({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),qC=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,k.jsx)(`textarea`,{className:W(`resize-none`,GC({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),JC=24,YC=12,XC=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,O.useRef)(null);(0,O.useImperativeHandle)(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=JC*r+YC,s=JC+YC;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,O.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,k.jsx)(qC,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...a})},ZC=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,O.useRef)(null);return(0,O.useImperativeHandle)(n,()=>i.current),(0,k.jsx)(UC,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,k.jsx)(XC,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},QC=e=>{let t=(0,B.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=OC(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??rC(i,n,l),t[0]=l,t[1]=i,t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=u;if(d&&typeof d!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let f=n.length,p=String(d??r),m;if(t[6]!==p||t[7]!==n||t[8]!==f||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],m=(0,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,k.jsx)(ZC,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:$C})}),t[6]=p,t[7]=n,t[8]=f,t[9]=o,t[10]=s,t[11]=c,t[12]=m}else m=t[12];return m};function $C(){return null}var ew=e=>{let t=(0,B.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=FC(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=rC(e.editedContent,n),s=r[L],{content:c}=r,l=[...n,{type:L}],u;t[5]!==i||t[6]!==n||t[7]!==e.dictionary||t[8]!==r?(u=t=>{i(e.dictionary.localId,{...r,content:t.newValue},n)},t[5]=i,t[6]=n,t[7]=e.dictionary,t[8]=r,t[9]=u):u=t[9],a=(0,k.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,k.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,k.jsx)(QC,{...e,keyPath:l,section:c,editedContentValue:o?.content,onContentChange:u})]}),t[0]=i,t[1]=n,t[2]=e,t[3]=r,t[4]=a}else a=t[4];return a},tw=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:z}],i=n[z];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(fw,{...e,keyPath:r,section:i})})},nw=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:I}],i=n[I];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(fw,{...e,keyPath:r,section:i})})},rw=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(fw,{...e,keyPath:r,section:i})})},iw=(0,O.memo)(e=>{let t=(0,B.c)(11),{keyPath:n,section:r,focusedKeyPath:i,onFocusKeyPath:a}=e,o;t[0]===i?o=t[1]:(o=i===void 0?[]:i,t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=Object.keys(r??{}).filter(aw),t[2]=r,t[3]=c);let l=c,u;return t[4]!==s||t[5]!==n||t[6]!==a||t[7]!==e||t[8]!==r||t[9]!==l?(u=l.map(t=>{let i={key:t,type:ee},o=[...n,i],c=dt(o,s);return(0,k.jsx)(oS,{level:n.length,title:ht(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,k.jsx)(fw,{...e,keyPath:o,section:r[t]})},t)}),t[4]=s,t[5]=n,t[6]=a,t[7]=e,t[8]=r,t[9]=l,t[10]=u):u=t[10],u});function aw(e){return!dw.includes(e)}var ow=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,O.useRef)(null);return(0,O.useImperativeHandle)(n,()=>i.current),(0,k.jsx)(UC,{value:(0,O.useMemo)(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:(0,k.jsx)(KC,{ref:i,...r})})},sw=e=>{let t=(0,B.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=OC(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=rC(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let l=c;if(l!==void 0&&typeof l!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let u=n.length,d=String(l??r),f;if(t[5]!==d||t[6]!==n||t[7]!==u||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],f=(0,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,k.jsx)(ow,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:cw})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function cw(){return null}var lw=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!dw.includes(e)).map(r=>{let i={type:P,key:r},a=[...t,i],o=n[P][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(fw,{...e,key:r,keyPath:a,section:o})]})})})},uw=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:M,key:r},a=[...t,i],o=n[M][r];return(0,k.jsx)(fw,{...e,keyPath:a,section:o})},dw=[`filePath`,`id`,`nodeType`],fw=(0,O.memo)(e=>{let t=OC(),n=(0,O.useMemo)(()=>rC(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,O.useMemo)(()=>lC(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,k.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,k.jsx)(rw,{...e,section:n}):r===`html`?(0,k.jsx)(tw,{...e,section:n}):r===`translation`?(0,k.jsx)(uw,{...e,section:n}):r===`enumeration`?(0,k.jsx)(HC,{...e,section:n}):r===`plural`?(0,k.jsx)(lw,{...e,section:n}):r===`condition`?(0,k.jsx)(VC,{...e,section:n}):r===`insertion`?(0,k.jsx)(nw,{...e,section:n}):r===`array`?(0,k.jsx)(sS,{...e,section:n}):r===`file`?(0,k.jsx)(ew,{...e,section:n}):(0,k.jsx)(iw,{...e,section:n});if(typeof n==`string`)return(0,k.jsx)(QC,{...e,section:n});if(typeof n==`number`)return(0,k.jsx)(sw,{...e,section:n});if(typeof n==`boolean`)return(0,k.jsx)(BC,{...e,section:n})}),pw=e=>{let t=(0,B.c)(6),{dictionary:n,...r}=e,i=OC(),{editedContent:a,addEditedContent:o}=FC(),{focusedContent:s,setFocusedContentKeyPath:c}=AC(),l;t[0]!==n||t[1]!==a?(l=JSON.stringify((a?.[n.localId]??n).content),t[0]=n,t[1]=a,t[2]=l):l=t[2];let u;return t[3]!==o||t[4]!==n.localId?(u=e=>{o(n.localId,e.newValue,e.keyPath)},t[3]=o,t[4]=n.localId,t[5]=u):u=t[5],(0,k.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,O.createElement)(fw,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},mw={key:`navigation-view`,content:{nodeType:`translation`,translation:{en:{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},"en-GB":{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},fr:{tsxNotEditable:`Node React non éditable`,goToField:{label:`Aller au champ`},addNewElement:{label:`Cliquez pour ajouter un élément`,text:`Ajouter un nouvel élément`},removeElement:{label:`Cliquez pour supprimer un élément`,text:`Supprimer l’élément`},addNewEnumeration:{label:`Cliquez pour ajouter une énumération`,text:`Ajouter une nouvelle énumération`},removeEnumeration:{label:`Cliquez pour supprimer une énumération`,text:`Supprimer l’énumération`}},es:{tsxNotEditable:`Nodo React no editable`,goToField:{label:`Ir al campo`},addNewElement:{label:`Haga clic para agregar un elemento`,text:`Agregar nuevo elemento`},removeElement:{label:`Haga clic para eliminar un elemento`,text:`Eliminar elemento`},addNewEnumeration:{label:`Haga clic para agregar una enumeración`,text:`Agregar nueva enumeración`},removeEnumeration:{label:`Haga clic para eliminar una enumeración`,text:`Eliminar enumeración`}},de:{tsxNotEditable:`React-Knoten ist nicht bearbeitbar`,goToField:{label:`Zum Feld gehen`},addNewElement:{label:`Klicken Sie, um ein Element hinzuzufügen`,text:`Neues Element hinzufügen`},removeElement:{label:`Klicken Sie, um ein Element zu entfernen`,text:`Element entfernen`},addNewEnumeration:{label:`Klicken Sie, um eine Aufzählung hinzuzufügen`,text:`Neue Aufzählung hinzufügen`},removeEnumeration:{label:`Klicken Sie, um eine Aufzählung zu entfernen`,text:`Aufzählung entfernen`}},ja:{tsxNotEditable:`編集できないReactノードです`,goToField:{label:`フィールドに移動`},addNewElement:{label:`要素を追加するにはクリック`,text:`新しい要素を追加`},removeElement:{label:`要素を削除するにはクリック`,text:`要素を削除`},addNewEnumeration:{label:`列挙を追加するにはクリック`,text:`新しい列挙を追加`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},removeEnumeration:{label:`点击删除枚举`,text:`删除枚举`}},it:{tsxNotEditable:`Node React non modificabile`,goToField:{label:`Vai al campo`},addNewElement:{label:`Clicca per aggiungere un elemento`,text:`Aggiungi nuovo elemento`},removeElement:{label:`Clicca per rimuovere un elemento`,text:`Rimuovi elemento`},addNewEnumeration:{label:`Clicca per aggiungere un enumerazione`,text:`Aggiungi nuova enumerazione`},removeEnumeration:{label:`Clicca per rimuovere un'enumerazione`,text:`Rimuovi enumerazione`}},pt:{tsxNotEditable:`Nó React não editável`,goToField:{label:`Ir para o campo`},addNewElement:{label:`Clique para adicionar um elemento`,text:`Adicionar novo elemento`},removeElement:{label:`Clique para remover um elemento`,text:`Remover elemento`},addNewEnumeration:{label:`Clique para adicionar uma enumeração`,text:`Adicionar nova enumeração`},removeEnumeration:{label:`Clique para remover uma enumeração`,text:`Remover enumeração`}},hi:{tsxNotEditable:`सम्पादित न करने योग्य React नोड`,goToField:{label:`फ़ील्ड पर जाएं`},addNewElement:{label:`तत्व जोड़ने के लिए क्लिक करें`,text:`नया तत्व जोड़ें`},removeElement:{label:`तत्व निकालने के लिए क्लिक करें`,text:`तत्व निकालें`},addNewEnumeration:{label:`सूची जोड़ने के लिए क्लिक करें`,text:`नया सूची जोड़ें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},localIds:[`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`]},hw={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},gw=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),_w=e=>e.reduce((e,t)=>{let n=e??{},r=gw(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=_w([hw,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=_w([hw.headers,...t.map(e=>e.headers)]),s=_w(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=_w(t.map(e=>e.body));i=o?.[`Content-Type`]===`application/x-www-form-urlencoded`?new URLSearchParams(e).toString():JSON.stringify(e)}Object.entries(s).length>0&&(r=`?${new URLSearchParams(s).toString()}`);let l={...a,headers:o,body:i,signal:n},u=`${e}${r}`,d=await fetch(u,l);if(!d.ok){let e=await d.json();throw Error(JSON.stringify(e.error)??`An error occurred`)}return await d.json()},vw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
41
41
  `);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},chat:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,onAction:o,...s}=t,c=new AbortController;try{let t=await fetch(`${n}/chat`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...s,...e.body,...r.body}),signal:c.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let l=t.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
42
- `);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.action&&o?.(t.action),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in chat:`,e),e}},autocomplete:async(t,r={})=>await q(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await q(`${n}/discussions`,e,r,{method:`GET`,params:t})}},Ew=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/scan`;return{discoverUrls:async(t,r={})=>await q(`${n}/recursive/discover`,e,r,{method:`GET`,params:t}),scanUrl:async(t,r={})=>{if(!t?.url)return;let{url:i,onMessage:a,onDone:o}=t,s=`${n}?${new URLSearchParams({url:i}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...r.headers},credentials:`include`,signal:r.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
43
- `);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},Dw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},Ow=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},kw=(e={},t=T)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},Aw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}}),getToken:async(t={})=>await q(`${n}/token`,e,t)}},jw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},Mw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},Nw=(e={},t=T)=>{let n=t.editor.backendURL,{clientId:r,clientSecret:i}=t.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${n}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:r,client_secret:i}}),createCliSessionToken:async(t={})=>await q(`${n}/api/cli-session`,e,t,{method:`POST`}),getCliSessionMe:async(t={})=>await q(`${n}/api/cli-session/me`,e,t)}},Pw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),deleteOrganizationByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},Fw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),deleteProjectByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},Iw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},Lw=(e={},t=T)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},Rw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},zw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},Bw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),uploadAvatar:async(t,r={})=>{let i=await t.arrayBuffer(),a={"Content-Type":t.type||`image/jpeg`},o=e.headers??{},s=await fetch(`${n}/avatar`,{method:`POST`,credentials:`include`,headers:{...o,...a},body:i,signal:r.signal});if(!s.ok){let e=await s.json();throw Error(JSON.stringify(e.error)??`Avatar upload failed`)}return await s.json()},getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},Vw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function Hw(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Uw(e,t,n=`.`,r){if(!Hw(t))return Uw(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Hw(a)&&Hw(i[t])?i[t]=Uw(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Ww(e){return(...t)=>t.reduce((t,n)=>Uw(t,n,``,e),{})}var Gw=Ww(),Kw=(e={},t=T)=>{let n=Gw(t??{},T);return{organization:Pw(e,n),project:Fw(e,n),user:Bw(e,n),oAuth:Nw(e,n),dictionary:Ow(e,n),stripe:Lw(e,n),ai:Tw(e,n),audit:Ew(e,n),tag:Rw(e,n),search:Iw(e,n),editor:kw(e,n),newsletter:Mw(e,n),github:Aw(e,n),gitlab:jw(e,n),bitbucket:Dw(e,n),showcaseProject:Vw(e,n),translate:zw(e,n)}},qw=e=>{let t=(0,B.c)(7),n=Gw(e,NC(),T),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=Nw(n),a=!!(n.editor.clientId&&n.editor.clientSecret),o;t[1]!==r||t[2]!==i.getOAuth2AccessToken||t[3]!==a?(o={queryKey:r,queryFn:i.getOAuth2AccessToken,enabled:a,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[1]=r,t[2]=i.getOAuth2AccessToken,t[3]=a,t[4]=o):o=t[4];let{data:s}=Co(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function Jw(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var Yw=Jw({CHALLENGE_NOT_FOUND:`Challenge not found`,YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:`You are not allowed to register this passkey`,FAILED_TO_VERIFY_REGISTRATION:`Failed to verify registration`,PASSKEY_NOT_FOUND:`Passkey not found`,AUTHENTICATION_FAILED:`Authentication failed`,UNABLE_TO_CREATE_SESSION:`Unable to create session`,FAILED_TO_UPDATE_PASSKEY:`Failed to update passkey`,PREVIOUSLY_REGISTERED:`Previously registered`,REGISTRATION_CANCELLED:`Registration cancelled`,AUTH_CANCELLED:`Auth cancelled`,UNKNOWN_ERROR:`Unknown error`,SESSION_REQUIRED:`Passkey registration requires an authenticated session`,RESOLVE_USER_REQUIRED:`Passkey registration requires either an authenticated session or a resolveUser callback when requireSession is false`,RESOLVED_USER_INVALID:`Resolved user is invalid`}),Xw=`1.6.11`;function Zw(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Qw(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function $w(){return eT.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var eT={stubThis:e=>e};function tT(e){let{id:t}=e;return{...e,id:Qw(t),transports:e.transports}}function nT(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var rT=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,`code`,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function iT({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new rT({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new rT({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new rT({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new rT({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new rT({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new rT({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new rT({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new rT({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!nT(t))return new rT({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new rT({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new rT({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new rT({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var aT=new class{constructor(){Object.defineProperty(this,`controller`,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},oT=[`cross-platform`,`platform`];function sT(e){if(e&&!(oT.indexOf(e)<0))return e}async function cT(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!$w())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:Qw(t.challenge),user:{...t.user,id:Qw(t.user.id)},excludeCredentials:t.excludeCredentials?.map(tT)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=aT.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw iT({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){lT(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=Zw(e))}catch(e){lT(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=Zw(c.getAuthenticatorData())}catch(e){lT(`getAuthenticatorData()`,e)}return{id:o,rawId:Zw(s),response:{attestationObject:Zw(c.attestationObject),clientDataJSON:Zw(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:sT(a.authenticatorAttachment)}}function lT(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function uT(){if(!$w())return dT.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?dT.stubThis(new Promise(e=>e(!1))):dT.stubThis(e.isConditionalMediationAvailable())}var dT={stubThis:e=>e};function fT({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new rT({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new rT({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!nT(t))return new rT({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new rT({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new rT({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function pT(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!$w())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(tT));let a={...t,challenge:Qw(t.challenge),allowCredentials:i},o={};if(n){if(!await uT())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=aT.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw fT({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=Zw(u.userHandle)),{id:c,rawId:Zw(l),response:{authenticatorData:Zw(u.authenticatorData),clientDataJSON:Zw(u.clientDataJSON),signature:Zw(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:sT(s.authenticatorAttachment)}}var mT=`1.6.11`,hT=Symbol.for(`better-auth:broadcast-channel`),gT=()=>Math.floor(Date.now()/1e3),_T=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:gT()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function vT(e=`better-auth.message`){return globalThis[hT]||(globalThis[hT]=new _T(e)),globalThis[hT]}var yT=Symbol.for(`better-auth:focus-manager`),bT=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function xT(){return globalThis[yT]||(globalThis[yT]=new bT),globalThis[yT]}var ST=Symbol.for(`better-auth:online-manager`),CT=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function wT(){return globalThis[ST]||(globalThis[ST]=new CT),globalThis[ST]}var TT={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},ET=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,DT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},OT=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function kT(e){return e instanceof Date&&!isNaN(e.getTime())}function AT(e){let t=OT.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return kT(f)?f:null}function jT(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in DT)return DT[s];if(!ET.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(TT).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=AT(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function MT(e,t={strict:!0}){return jT(e,t)}var NT=[],PT=0,FT=4,IT=globalThis.nanostoresGlobal||={epoch:0},LT=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=PT+FT;t<NT.length;)NT[t]===e?NT.splice(t,FT):t+=FT;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){IT.epoch++;let i=!NT.length;for(let i of t)NT.push(i,n.value,e,r);if(i){for(PT=0;PT<NT.length;PT+=FT)NT[PT](NT[PT+1],NT[PT+2],NT[PT+3]);NT.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},RT=5,zT=6,BT=10,VT=(e,t,n,r)=>(e.events=e.events||{},e.events[n+BT]||(e.events[n+BT]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+BT](),delete e.events[n+BT])}),HT=1e3,UT=(e,t)=>VT(e,n=>{let r=t(n);r&&e.events[zT].push(r)},RT,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[zT]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[zT])t();e.events[zT]=[]}},HT)},()=>{e.listen=n,e.off=r}}),WT=()=>typeof window>`u`,GT=(e,t,n,r)=>{let i=LT({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(n&&r<n)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{WT()||(o?await a():UT(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},KT=()=>Math.floor(Date.now()/1e3);function qT(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var JT=5;function YT(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||wT().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=KT(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=KT(),r(`/get-session`).then(async e=>{let{data:a,error:o}=qT(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=qT(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=KT(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(KT()-c.lastSessionRequest<JT)return;c.lastSessionRequest=KT()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=KT(),n.set(!n.get()))},d=e=>{vT().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=vT().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=xT().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=wT().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),vT().setup(),xT().setup(),wT().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}var XT=Object.create(null),ZT=e=>({}),QT=new Proxy(XT,{get(e,t){return ZT()[t]??XT[t]},has(e,t){return t in ZT()||t in XT},set(e,t,n){let r=ZT(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=ZT(!0);return delete n[t],!0},ownKeys(){let e=ZT(!0);return Object.keys(e)}});function $T(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return $T(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return $T(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return $T(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return $T(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return $T(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return $T(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return $T(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function eE(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function tE(e){let t=e.split(`
42
+ `);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.action&&o?.(t.action),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in chat:`,e),e}},autocomplete:async(t,r={})=>await q(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await q(`${n}/discussions`,e,r,{method:`GET`,params:t})}},yw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/scan`;return{discoverUrls:async(t,r={})=>await q(`${n}/recursive/discover`,e,r,{method:`GET`,params:t}),scanUrl:async(t,r={})=>{if(!t?.url)return;let{url:i,onMessage:a,onDone:o}=t,s=`${n}?${new URLSearchParams({url:i}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...r.headers},credentials:`include`,signal:r.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
43
+ `);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},bw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},xw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},Sw=(e={},t=T)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},Cw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}}),getToken:async(t={})=>await q(`${n}/token`,e,t)}},ww=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},Tw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},Ew=(e={},t=T)=>{let n=t.editor.backendURL,{clientId:r,clientSecret:i}=t.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${n}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:r,client_secret:i}}),createCliSessionToken:async(t={})=>await q(`${n}/api/cli-session`,e,t,{method:`POST`}),getCliSessionMe:async(t={})=>await q(`${n}/api/cli-session/me`,e,t)}},Dw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),deleteOrganizationByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},Ow=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),deleteProjectByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},kw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},Aw=(e={},t=T)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},jw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},Mw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},Nw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),uploadAvatar:async(t,r={})=>{let i=await t.arrayBuffer(),a={"Content-Type":t.type||`image/jpeg`},o=e.headers??{},s=await fetch(`${n}/avatar`,{method:`POST`,credentials:`include`,headers:{...o,...a},body:i,signal:r.signal});if(!s.ok){let e=await s.json();throw Error(JSON.stringify(e.error)??`Avatar upload failed`)}return await s.json()},getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},Pw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function Fw(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Iw(e,t,n=`.`,r){if(!Fw(t))return Iw(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Fw(a)&&Fw(i[t])?i[t]=Iw(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Lw(e){return(...t)=>t.reduce((t,n)=>Iw(t,n,``,e),{})}var Rw=Lw(),zw=(e={},t=T)=>{let n=Rw(t??{},T);return{organization:Dw(e,n),project:Ow(e,n),user:Nw(e,n),oAuth:Ew(e,n),dictionary:xw(e,n),stripe:Aw(e,n),ai:vw(e,n),audit:yw(e,n),tag:jw(e,n),search:kw(e,n),editor:Sw(e,n),newsletter:Tw(e,n),github:Cw(e,n),gitlab:ww(e,n),bitbucket:bw(e,n),showcaseProject:Pw(e,n),translate:Mw(e,n)}},Bw=e=>{let t=(0,B.c)(7),n=Rw(e,NC(),T),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=Ew(n),a=!!(n.editor.clientId&&n.editor.clientSecret),o;t[1]!==r||t[2]!==i.getOAuth2AccessToken||t[3]!==a?(o={queryKey:r,queryFn:i.getOAuth2AccessToken,enabled:a,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[1]=r,t[2]=i.getOAuth2AccessToken,t[3]=a,t[4]=o):o=t[4];let{data:s}=Co(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function Vw(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var Hw=Vw({CHALLENGE_NOT_FOUND:`Challenge not found`,YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:`You are not allowed to register this passkey`,FAILED_TO_VERIFY_REGISTRATION:`Failed to verify registration`,PASSKEY_NOT_FOUND:`Passkey not found`,AUTHENTICATION_FAILED:`Authentication failed`,UNABLE_TO_CREATE_SESSION:`Unable to create session`,FAILED_TO_UPDATE_PASSKEY:`Failed to update passkey`,PREVIOUSLY_REGISTERED:`Previously registered`,REGISTRATION_CANCELLED:`Registration cancelled`,AUTH_CANCELLED:`Auth cancelled`,UNKNOWN_ERROR:`Unknown error`,SESSION_REQUIRED:`Passkey registration requires an authenticated session`,RESOLVE_USER_REQUIRED:`Passkey registration requires either an authenticated session or a resolveUser callback when requireSession is false`,RESOLVED_USER_INVALID:`Resolved user is invalid`}),Uw=`1.6.11`;function Ww(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Gw(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function Kw(){return qw.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var qw={stubThis:e=>e};function Jw(e){let{id:t}=e;return{...e,id:Gw(t),transports:e.transports}}function Yw(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var Xw=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,`code`,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function Zw({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Xw({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Xw({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Xw({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Xw({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new Xw({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Xw({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Xw({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Xw({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Yw(t))return new Xw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Xw({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Xw({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new Xw({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var Qw=new class{constructor(){Object.defineProperty(this,`controller`,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},$w=[`cross-platform`,`platform`];function eT(e){if(e&&!($w.indexOf(e)<0))return e}async function tT(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!Kw())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:Gw(t.challenge),user:{...t.user,id:Gw(t.user.id)},excludeCredentials:t.excludeCredentials?.map(Jw)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=Qw.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw Zw({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){nT(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=Ww(e))}catch(e){nT(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=Ww(c.getAuthenticatorData())}catch(e){nT(`getAuthenticatorData()`,e)}return{id:o,rawId:Ww(s),response:{attestationObject:Ww(c.attestationObject),clientDataJSON:Ww(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:eT(a.authenticatorAttachment)}}function nT(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function rT(){if(!Kw())return iT.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?iT.stubThis(new Promise(e=>e(!1))):iT.stubThis(e.isConditionalMediationAvailable())}var iT={stubThis:e=>e};function aT({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Xw({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Xw({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Yw(t))return new Xw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Xw({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Xw({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function oT(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!Kw())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(Jw));let a={...t,challenge:Gw(t.challenge),allowCredentials:i},o={};if(n){if(!await rT())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=Qw.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw aT({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=Ww(u.userHandle)),{id:c,rawId:Ww(l),response:{authenticatorData:Ww(u.authenticatorData),clientDataJSON:Ww(u.clientDataJSON),signature:Ww(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:eT(s.authenticatorAttachment)}}var sT=`1.6.11`,cT=Symbol.for(`better-auth:broadcast-channel`),lT=()=>Math.floor(Date.now()/1e3),uT=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:lT()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function dT(e=`better-auth.message`){return globalThis[cT]||(globalThis[cT]=new uT(e)),globalThis[cT]}var fT=Symbol.for(`better-auth:focus-manager`),pT=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function mT(){return globalThis[fT]||(globalThis[fT]=new pT),globalThis[fT]}var hT=Symbol.for(`better-auth:online-manager`),gT=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function _T(){return globalThis[hT]||(globalThis[hT]=new gT),globalThis[hT]}var vT={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},yT=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,bT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},xT=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function ST(e){return e instanceof Date&&!isNaN(e.getTime())}function CT(e){let t=xT.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return ST(f)?f:null}function wT(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in bT)return bT[s];if(!yT.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(vT).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=CT(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function TT(e,t={strict:!0}){return wT(e,t)}var ET=[],DT=0,OT=4,kT=globalThis.nanostoresGlobal||={epoch:0},AT=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=DT+OT;t<ET.length;)ET[t]===e?ET.splice(t,OT):t+=OT;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){kT.epoch++;let i=!ET.length;for(let i of t)ET.push(i,n.value,e,r);if(i){for(DT=0;DT<ET.length;DT+=OT)ET[DT](ET[DT+1],ET[DT+2],ET[DT+3]);ET.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},jT=5,MT=6,NT=10,PT=(e,t,n,r)=>(e.events=e.events||{},e.events[n+NT]||(e.events[n+NT]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+NT](),delete e.events[n+NT])}),FT=1e3,IT=(e,t)=>PT(e,n=>{let r=t(n);r&&e.events[MT].push(r)},jT,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[MT]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[MT])t();e.events[MT]=[]}},FT)},()=>{e.listen=n,e.off=r}}),LT=()=>typeof window>`u`,RT=(e,t,n,r)=>{let i=AT({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(n&&r<n)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{LT()||(o?await a():IT(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},zT=()=>Math.floor(Date.now()/1e3);function BT(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var VT=5;function HT(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||_T().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=zT(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=zT(),r(`/get-session`).then(async e=>{let{data:a,error:o}=BT(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=BT(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=zT(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(zT()-c.lastSessionRequest<VT)return;c.lastSessionRequest=zT()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=zT(),n.set(!n.get()))},d=e=>{dT().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=dT().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=mT().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=_T().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),dT().setup(),mT().setup(),_T().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}var UT=Object.create(null),WT=e=>({}),GT=new Proxy(UT,{get(e,t){return WT()[t]??UT[t]},has(e,t){return t in WT()||t in UT},set(e,t,n){let r=WT(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=WT(!0);return delete n[t],!0},ownKeys(){let e=WT(!0);return Object.keys(e)}});function KT(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return KT(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return KT(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return KT(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return KT(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return KT(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return KT(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return KT(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function qT(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function JT(e){let t=e.split(`
44
44
  at `);return t.length<=1?e:(t.splice(1,1),t.join(`
45
- at `))}function nE(e,t){class n extends e{#e;constructor(...e){if(eE()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=tE(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,`constructor`,{get(){return t},enumerable:!1,configurable:!0}),n}var rE={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};nE(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:rE[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var iE=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function aE(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new iE(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function oE(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new iE(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof iE?t:new iE(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function sE(e,t=`/api/auth`){if(oE(e),aE(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function cE(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function lE(e,t,n,r,i){if(e)return sE(e,t);if(r!==!1){let e=QT.BETTER_AUTH_URL||QT.NEXT_PUBLIC_BETTER_AUTH_URL||QT.PUBLIC_BETTER_AUTH_URL||QT.NUXT_PUBLIC_BETTER_AUTH_URL||QT.NUXT_PUBLIC_AUTH_URL||(QT.BASE_URL===`/`?void 0:QT.BASE_URL);if(e)return sE(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&cE(o,`proto`)&&cE(a,`host`))try{return sE(`${o}://${a}`,t)}catch{}if(n){let e=uE(n.url);if(!e)throw new iE(`Could not get origin from request. Please provide a valid base URL.`);return sE(e,t)}if(typeof window<`u`&&window.location)return sE(window.location.origin,t)}function uE(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var dE={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function fE(e,t){let n=LT(!1),r=GT(n,`/get-session`,e,{method:`GET`}),i=()=>{};return UT(r,()=>{let a=YT({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}var pE=Object.defineProperty,mE=Object.defineProperties,hE=Object.getOwnPropertyDescriptors,gE=Object.getOwnPropertySymbols,_E=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,yE=(e,t,n)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bE=(e,t)=>{for(var n in t||={})_E.call(t,n)&&yE(e,n,t[n]);if(gE)for(var n of gE(t))vE.call(t,n)&&yE(e,n,t[n]);return e},xE=(e,t)=>mE(e,hE(t)),SE=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},CE=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},wE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},TE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function EE(e){if(typeof e==`number`)return new wE({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new wE(e);case`exponential`:return new TE(e);default:throw Error(`Invalid retry strategy`)}}var DE=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},OE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function kE(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return OE.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function AE(e){try{return JSON.parse(e),!0}catch{return!1}}function jE(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function ME(e){try{return JSON.parse(e)}catch{return e}}function NE(e){return typeof e==`function`}function PE(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&NE(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&NE(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function FE(e){let t=new Headers(e?.headers),n=await DE(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=IE(e?.body);n&&t.set(`content-type`,n)}return t}function IE(e){return jE(e)?`application/json`:null}function LE(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(jE(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&jE(e.body)?new URLSearchParams(e.body).toString():e.body}function RE(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return HE.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function zE(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var BE=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function VE(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new BE(n.issues);return n.value}var HE=[`get`,`post`,`put`,`patch`,`delete`],UE=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=xE(bE({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=xE(bE({},e),{body:i.input?await VE(i.input,n?.body):n?.body,params:i.params?await VE(i.params,n?.params):n?.params,query:i.query?await VE(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),WE=e=>{async function t(t,n){let r=xE(bE(bE({},e),n),{plugins:[...e?.plugins||[],UE(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await KE(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await KE(t,r)}return t};function GE(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];HE.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var KE=async(e,t)=>{let{hooks:n,url:r,options:i}=await CE(e,t),a=PE(i),o=new AbortController,s=i.signal??o.signal,c=GE(r,i),l=LE(i),u=await FE(i),d=RE(r,i),f=xE(bE({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=zE(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(xE(bE({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=kE(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??ME)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await VE(f.output,r.data));for(let e of n.onSuccess)e&&await e(xE(bE({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??ME,_=await m.text(),v=AE(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:xE(bE({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(xE(bE({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=EE(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await KE(e,xE(bE({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new SE(m.status,m.statusText,v?y:_);return{data:null,error:xE(bE({},y),{status:m.status,statusText:m.statusText})}},qE=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},JE=(e,t)=>{let n=`credentials`in Request.prototype,r=lE(e?.baseURL,e?.basePath,void 0,t)??qE(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=WE({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?MT(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[dE],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=fE(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=Gw(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function YE(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function XE(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function ZE(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||YE(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=XE(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function QE(e){return e.charAt(0).toUpperCase()+e.slice(1)}function $E(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=JE(e),s={};for(let[e,t]of Object.entries(r))s[`use${QE(e)}`]=t;return ZE({...n,...s,$fetch:i,$store:o},i,t,r,a)}var eD=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s;try{s=await pT({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof rT?e.code:`AUTH_CANCELLED`,message:Yw.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}try{let{clientExtensionResults:a,...o}=s,c=await e(`/passkey/verify-authentication`,{body:{response:o},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...c,webauthn:{response:s,clientExtensionResults:a}}:c}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:Yw.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(n,r)=>{let i=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...n?.authenticatorAttachment&&{authenticatorAttachment:n.authenticatorAttachment},...n?.name&&{name:n.name},...n?.context&&{context:n.context}},throw:!1});if(!i.data)return i;try{let a=i.data.extensions||n?.extensions?{...i.data.extensions||{},...n?.extensions||{}}:void 0,o=await cT({optionsJSON:{...i.data,extensions:a},useAutoRegister:n?.useAutoRegister}),{clientExtensionResults:s,...c}=o,l=await e(`/passkey/verify-registration`,{...n?.fetchOptions,...r,body:{response:c,name:n?.name},method:`POST`,throw:!1});return l.data?(t.set(Math.random()),n?.returnWebAuthnResponse?{...l,webauthn:{response:o,clientExtensionResults:s}}:l):l}catch(e){return e instanceof rT?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:Yw.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:Yw.REGISTRATION_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:e.code,message:e.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:`UNKNOWN_ERROR`,message:e instanceof Error?e.message:Yw.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),tD=()=>{let e=LT();return{id:`passkey`,version:Xw,$InferServerPlugin:{},getActions:(t,n)=>eD(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:GT(e,`/passkey/list-user-passkeys`,t,{method:`GET`}),$listPasskeys:e}},pathMethods:{"/passkey/register":`POST`,"/passkey/authenticate":`POST`},atomListeners:[{matcher(e){return e===`/passkey/verify-registration`||e===`/passkey/delete-passkey`||e===`/passkey/update-passkey`||e===`/sign-out`},signal:`$listPasskeys`},{matcher:e=>e===`/passkey/verify-authentication`,signal:`$sessionSignal`}],$ERROR_CODES:Yw}},nD=`1.6.11`,rD=e=>({id:`sso-client`,version:nD,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),iD=()=>({id:`magic-link`,version:mT,$InferServerPlugin:{}}),aD=Jw({OTP_NOT_ENABLED:`OTP not enabled`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,TWO_FACTOR_NOT_ENABLED:`Two factor isn't enabled`,BACKUP_CODES_NOT_ENABLED:`Backup codes aren't enabled`,INVALID_BACKUP_CODE:`Invalid backup code`,INVALID_CODE:`Invalid code`,TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:`Too many attempts. Please request a new code.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),oD=e=>({id:`two-factor`,version:mT,$InferServerPlugin:{},atomListeners:[{matcher:e=>e.startsWith(`/two-factor/`),signal:`$sessionSignal`}],pathMethods:{"/two-factor/disable":`POST`,"/two-factor/enable":`POST`,"/two-factor/send-otp":`POST`,"/two-factor/generate-backup-codes":`POST`,"/two-factor/get-totp-uri":`POST`,"/two-factor/verify-totp":`POST`,"/two-factor/verify-otp":`POST`,"/two-factor/verify-backup-code":`POST`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){if(t.data?.twoFactorRedirect){if(e?.onTwoFactorRedirect){await e.onTwoFactorRedirect({twoFactorMethods:t.data.twoFactorMethods});return}e?.twoFactorPage&&typeof window<`u`&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:aD}),sD=e=>$E({baseURL:e,withCredentials:!0,plugins:[oD({onTwoFactorRedirect:()=>{let e=new URLSearchParams(window.location.search).get(`redirect_url`),t=e?`/auth/2fa?redirect_url=${encodeURIComponent(e)}`:`/auth/2fa`;window.location.href=t}}),tD(),iD(),rD()]}),cD=e=>{let t=e?.editor?.backendURL??T?.editor?.backendURL;t||(t=Ye,console.dir({intlayerConfig:e,configuration:T},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=sD(t);return{getAuthClient:()=>n,signInEmail:async(...e)=>n.signIn.email(...e),signUpEmail:async(...e)=>n.signUp.email(...e),signOut:async(...e)=>n.signOut(...e),signInSocial:async(...e)=>n.signIn.social(...e),linkSocial:async(...e)=>n.linkSocial(...e),changePasswordSession:async(...e)=>n.changePassword(...e),requestPasswordResetSession:async(...e)=>n.requestPasswordReset(...e),resetPassword:async(...e)=>n.resetPassword(...e),verifyEmailSession:async(...e)=>n.verifyEmail(...e),getSession:async(...e)=>n.getSession(...e),forgetPassword:async(...e)=>n.requestPasswordReset(...e),sendVerificationEmail:async(...e)=>n.sendVerificationEmail(...e),changeEmail:async(...e)=>n.changeEmail(...e),deleteUser:async(...e)=>n.deleteUser(...e),revokeSession:async(...e)=>n.revokeSession(...e),revokeSessions:async(...e)=>n.revokeSessions(...e),revokeOtherSessions:async(...e)=>n.revokeOtherSessions(...e),listAccounts:async(...e)=>n.listAccounts(...e),unlinkAccount:async(...e)=>n.unlinkAccount(...e),refreshToken:async(...e)=>n.refreshToken(...e),getAccessToken:async(...e)=>n.getAccessToken(...e),accountInfo:async(...e)=>n.accountInfo(...e),updateUser:async(...e)=>n.updateUser(...e),listSessions:async(...e)=>n.listSessions(...e),enableTwoFactor:async(...e)=>n.twoFactor.enable(...e),disableTwoFactor:async(...e)=>n.twoFactor.disable(...e),verifyTotp:async(...e)=>n.twoFactor.verifyTotp(...e),verifyBackupCode:async(...e)=>n.twoFactor.verifyBackupCode(...e),addPasskey:async(...e)=>n.passkey.addPasskey(...e),signInPasskey:async(...e)=>n.signIn.passkey(...e),deletePasskey:async(...e)=>n.passkey.deletePasskey(...e),listPasskeys:async()=>n.$fetch(`/passkey/list-user-passkeys`,{method:`GET`}),signInMagicLink:async(...e)=>n.signIn.magicLink(...e),signInSSO:async(...e)=>n.signIn.sso(...e),registerSSO:async(...e)=>n.sso.register(...e),listSSOProviders:async()=>[],deleteSSOProvider:async e=>({success:!0})}},lD=(e,t)=>{let n=(0,B.c)(14),r=NC(),i=t??r??T,a=so(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[`session`],n[0]=o):o=n[0];let s;n[1]===i?s=n[2]:(s=async()=>(await cD(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=Co(l),p=u??(d?null:void 0),m;n[6]===a?m=n[7]:(m=e=>{a.setQueryData([`session`],e)},n[6]=a,n[7]=m);let h=m,g;n[8]===f?g=n[9]:(g=async()=>(await f()).data,n[8]=f,n[9]=g);let _=g,v;return n[10]!==_||n[11]!==p||n[12]!==h?(v={session:p,fetchSession:_,revalidateSession:_,setSession:h},n[10]=_,n[11]=p,n[12]=h,n[13]=v):v=n[13],v},uD=e=>{let t=(0,B.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{session:r,intlayerConfiguration:i}=n,{session:a,fetchSession:o,revalidateSession:s,setSession:c}=lD(r,i),{oAuth2AccessToken:l}=qw(i),u=!!(a?.user||l),d;return t[2]!==o||t[3]!==l||t[4]!==s||t[5]!==a||t[6]!==c||t[7]!==u?(d={session:a,fetchSession:o,setSession:c,revalidateSession:s,oAuth2AccessToken:l,isAuthenticated:u},t[2]=o,t[3]=l,t[4]=s,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d},dD=e=>{let t=(0,B.c)(5),n=NC(),{oAuth2AccessToken:r}=uD(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=Kw({...r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},...e?.options??{}},e?.intlayerConfiguration??n),t[0]=n,t[1]=r,t[2]=e?.intlayerConfiguration,t[3]=e?.options,t[4]=i):i=t[4],i},fD=e=>{let t=(0,B.c)(2),n=NC(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=cD(r),t[0]=r,t[1]=i),i},pD=e=>{let t=(0,B.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=NC(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=uD(o),l=c?c.user:s?.user,u=c?c.organization:s?.organization,d=c?c.project:s?.project,f=(n?!!l:!0)&&(r?!!d:!0)&&(i?!!u:!0),p;return t[2]===f?p=t[3]:(p={enable:f},t[2]=f,t[3]=p),p},mD=e=>{let t=(0,B.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({requireUser:i,requireProject:r,requireOrganization:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==r||t[7]!==i?(o={requireUser:i,requireProject:r,requireOrganization:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8];let{enable:s}=pD(o),c=a?.enabled===!1?!1:s,l;return t[9]!==a||t[10]!==c?(l={enabled:c,...a},t[9]=a,t[10]=c,t[11]=l):l=t[11],Co(l)},hD=()=>{let e=(0,B.c)(6),t=fD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`logout`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=()=>t.signOut(),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={resetQueries:[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),wo(a)},gD=(e,t)=>{let n=(0,B.c)(9),r=dD(),i;n[0]===e?i=n[1]:(i=[`projects`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.project.getProjects(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],mD(o)},_D=()=>{let e=(0,B.c)(6),t=dD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.pushDictionaries(e.dictionaries),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),wo(a)},vD=()=>{let e=(0,B.c)(6),t=dD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.deleteDictionary(e.dictionaryId),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),wo(a)},yD=(e,t)=>{let n=(0,B.c)(9),r=dD(),i;n[0]===e?i=n[1]:(i=[`tags`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.tag.getTags(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],mD(o)},bD=()=>{let e=(0,B.c)(3),t=dD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationMetadata`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),wo(r)},xD=()=>{let e=(0,B.c)(3),t=dD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationField`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationField(e)},e[1]=t,e[2]=r),wo(r)},SD=()=>{let e=(0,B.c)(3),t=dD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:()=>t.editor.getDictionaries()},e[1]=t,e[2]=r),Co(r)},CD=()=>{let e=(0,B.c)(3),t=dD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.editor.writeDictionary(e)},e[1]=t,e[2]=r),wo(r)},wD=`​`,TD=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(wD).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===wD?``:t.split(wD).join(``)}).join(`
46
- `)},ED=e=>{let t=e.split(`
47
- `);return t.length===0?[``]:t},DD=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),OD=(e,t)=>{if(t<=0)return 0;if(DD){let n=[...DD.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},kD=(e,t)=>{if(t>=e.length)return e.length;if(DD){let n=[...DD.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},AD=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]);)n--;for(;n>0&&/\S/.test(e[n-1]);)n--;return n},jD=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]);)n++;for(;n<e.length&&/\s/.test(e[n]);)n++;return n},MD=(e,t)=>e.slice(0,t).lastIndexOf(`
48
- `)+1,ND=(e,t)=>{let n=e.indexOf(`
49
- `,t);return n===-1?e.length:n},PD=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,O.useState)(()=>ED(i)),s=(0,O.useRef)(null),c=(0,O.useRef)(null),l=e!==void 0,u=(0,O.useRef)(a);u.current=a,(0,O.useEffect)(()=>{l&&e!==void 0&&o(ED(e))},[e,l]);let d=()=>u.current.join(`
45
+ at `))}function YT(e,t){class n extends e{#e;constructor(...e){if(qT()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=JT(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,`constructor`,{get(){return t},enumerable:!1,configurable:!0}),n}var XT={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};YT(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:XT[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var ZT=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function QT(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new ZT(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function $T(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new ZT(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof ZT?t:new ZT(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function eE(e,t=`/api/auth`){if($T(e),QT(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function tE(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function nE(e,t,n,r,i){if(e)return eE(e,t);if(r!==!1){let e=GT.BETTER_AUTH_URL||GT.NEXT_PUBLIC_BETTER_AUTH_URL||GT.PUBLIC_BETTER_AUTH_URL||GT.NUXT_PUBLIC_BETTER_AUTH_URL||GT.NUXT_PUBLIC_AUTH_URL||(GT.BASE_URL===`/`?void 0:GT.BASE_URL);if(e)return eE(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&tE(o,`proto`)&&tE(a,`host`))try{return eE(`${o}://${a}`,t)}catch{}if(n){let e=rE(n.url);if(!e)throw new ZT(`Could not get origin from request. Please provide a valid base URL.`);return eE(e,t)}if(typeof window<`u`&&window.location)return eE(window.location.origin,t)}function rE(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var iE={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function aE(e,t){let n=AT(!1),r=RT(n,`/get-session`,e,{method:`GET`}),i=()=>{};return IT(r,()=>{let a=HT({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}var oE=Object.defineProperty,sE=Object.defineProperties,cE=Object.getOwnPropertyDescriptors,lE=Object.getOwnPropertySymbols,uE=Object.prototype.hasOwnProperty,dE=Object.prototype.propertyIsEnumerable,fE=(e,t,n)=>t in e?oE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pE=(e,t)=>{for(var n in t||={})uE.call(t,n)&&fE(e,n,t[n]);if(lE)for(var n of lE(t))dE.call(t,n)&&fE(e,n,t[n]);return e},mE=(e,t)=>sE(e,cE(t)),hE=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},gE=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},_E=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},vE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function yE(e){if(typeof e==`number`)return new _E({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new _E(e);case`exponential`:return new vE(e);default:throw Error(`Invalid retry strategy`)}}var bE=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},xE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function SE(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return xE.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function CE(e){try{return JSON.parse(e),!0}catch{return!1}}function wE(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function TE(e){try{return JSON.parse(e)}catch{return e}}function EE(e){return typeof e==`function`}function DE(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&EE(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&EE(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function OE(e){let t=new Headers(e?.headers),n=await bE(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=kE(e?.body);n&&t.set(`content-type`,n)}return t}function kE(e){return wE(e)?`application/json`:null}function AE(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(wE(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&wE(e.body)?new URLSearchParams(e.body).toString():e.body}function jE(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return FE.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function ME(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var NE=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function PE(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new NE(n.issues);return n.value}var FE=[`get`,`post`,`put`,`patch`,`delete`],IE=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=mE(pE({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=mE(pE({},e),{body:i.input?await PE(i.input,n?.body):n?.body,params:i.params?await PE(i.params,n?.params):n?.params,query:i.query?await PE(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),LE=e=>{async function t(t,n){let r=mE(pE(pE({},e),n),{plugins:[...e?.plugins||[],IE(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await zE(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await zE(t,r)}return t};function RE(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];FE.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var zE=async(e,t)=>{let{hooks:n,url:r,options:i}=await gE(e,t),a=DE(i),o=new AbortController,s=i.signal??o.signal,c=RE(r,i),l=AE(i),u=await OE(i),d=jE(r,i),f=mE(pE({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=ME(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(mE(pE({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=SE(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??TE)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await PE(f.output,r.data));for(let e of n.onSuccess)e&&await e(mE(pE({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??TE,_=await m.text(),v=CE(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:mE(pE({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(mE(pE({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=yE(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await zE(e,mE(pE({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new hE(m.status,m.statusText,v?y:_);return{data:null,error:mE(pE({},y),{status:m.status,statusText:m.statusText})}},BE=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},VE=(e,t)=>{let n=`credentials`in Request.prototype,r=nE(e?.baseURL,e?.basePath,void 0,t)??BE(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=LE({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?TT(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[iE],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=aE(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=Rw(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function HE(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function UE(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function WE(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||HE(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=UE(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function GE(e){return e.charAt(0).toUpperCase()+e.slice(1)}function KE(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=VE(e),s={};for(let[e,t]of Object.entries(r))s[`use${GE(e)}`]=t;return WE({...n,...s,$fetch:i,$store:o},i,t,r,a)}var qE=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s;try{s=await oT({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof Xw?e.code:`AUTH_CANCELLED`,message:Hw.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}try{let{clientExtensionResults:a,...o}=s,c=await e(`/passkey/verify-authentication`,{body:{response:o},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...c,webauthn:{response:s,clientExtensionResults:a}}:c}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:Hw.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(n,r)=>{let i=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...n?.authenticatorAttachment&&{authenticatorAttachment:n.authenticatorAttachment},...n?.name&&{name:n.name},...n?.context&&{context:n.context}},throw:!1});if(!i.data)return i;try{let a=i.data.extensions||n?.extensions?{...i.data.extensions||{},...n?.extensions||{}}:void 0,o=await tT({optionsJSON:{...i.data,extensions:a},useAutoRegister:n?.useAutoRegister}),{clientExtensionResults:s,...c}=o,l=await e(`/passkey/verify-registration`,{...n?.fetchOptions,...r,body:{response:c,name:n?.name},method:`POST`,throw:!1});return l.data?(t.set(Math.random()),n?.returnWebAuthnResponse?{...l,webauthn:{response:o,clientExtensionResults:s}}:l):l}catch(e){return e instanceof Xw?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:Hw.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:Hw.REGISTRATION_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:e.code,message:e.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:`UNKNOWN_ERROR`,message:e instanceof Error?e.message:Hw.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),JE=()=>{let e=AT();return{id:`passkey`,version:Uw,$InferServerPlugin:{},getActions:(t,n)=>qE(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:RT(e,`/passkey/list-user-passkeys`,t,{method:`GET`}),$listPasskeys:e}},pathMethods:{"/passkey/register":`POST`,"/passkey/authenticate":`POST`},atomListeners:[{matcher(e){return e===`/passkey/verify-registration`||e===`/passkey/delete-passkey`||e===`/passkey/update-passkey`||e===`/sign-out`},signal:`$listPasskeys`},{matcher:e=>e===`/passkey/verify-authentication`,signal:`$sessionSignal`}],$ERROR_CODES:Hw}},YE=`1.6.11`,XE=e=>({id:`sso-client`,version:YE,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),ZE=()=>({id:`magic-link`,version:sT,$InferServerPlugin:{}}),QE=Vw({OTP_NOT_ENABLED:`OTP not enabled`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,TWO_FACTOR_NOT_ENABLED:`Two factor isn't enabled`,BACKUP_CODES_NOT_ENABLED:`Backup codes aren't enabled`,INVALID_BACKUP_CODE:`Invalid backup code`,INVALID_CODE:`Invalid code`,TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:`Too many attempts. Please request a new code.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),$E=e=>({id:`two-factor`,version:sT,$InferServerPlugin:{},atomListeners:[{matcher:e=>e.startsWith(`/two-factor/`),signal:`$sessionSignal`}],pathMethods:{"/two-factor/disable":`POST`,"/two-factor/enable":`POST`,"/two-factor/send-otp":`POST`,"/two-factor/generate-backup-codes":`POST`,"/two-factor/get-totp-uri":`POST`,"/two-factor/verify-totp":`POST`,"/two-factor/verify-otp":`POST`,"/two-factor/verify-backup-code":`POST`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){if(t.data?.twoFactorRedirect){if(e?.onTwoFactorRedirect){await e.onTwoFactorRedirect({twoFactorMethods:t.data.twoFactorMethods});return}e?.twoFactorPage&&typeof window<`u`&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:QE}),eD=e=>KE({baseURL:e,withCredentials:!0,plugins:[$E({onTwoFactorRedirect:()=>{let e=new URLSearchParams(window.location.search).get(`redirect_url`),t=e?`/auth/2fa?redirect_url=${encodeURIComponent(e)}`:`/auth/2fa`;window.location.href=t}}),JE(),ZE(),XE()]}),tD=e=>{let t=e?.editor?.backendURL??T?.editor?.backendURL;t||(t=Ye,console.dir({intlayerConfig:e,configuration:T},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=eD(t);return{getAuthClient:()=>n,signInEmail:async(...e)=>n.signIn.email(...e),signUpEmail:async(...e)=>n.signUp.email(...e),signOut:async(...e)=>n.signOut(...e),signInSocial:async(...e)=>n.signIn.social(...e),linkSocial:async(...e)=>n.linkSocial(...e),changePasswordSession:async(...e)=>n.changePassword(...e),requestPasswordResetSession:async(...e)=>n.requestPasswordReset(...e),resetPassword:async(...e)=>n.resetPassword(...e),verifyEmailSession:async(...e)=>n.verifyEmail(...e),getSession:async(...e)=>n.getSession(...e),forgetPassword:async(...e)=>n.requestPasswordReset(...e),sendVerificationEmail:async(...e)=>n.sendVerificationEmail(...e),changeEmail:async(...e)=>n.changeEmail(...e),deleteUser:async(...e)=>n.deleteUser(...e),revokeSession:async(...e)=>n.revokeSession(...e),revokeSessions:async(...e)=>n.revokeSessions(...e),revokeOtherSessions:async(...e)=>n.revokeOtherSessions(...e),listAccounts:async(...e)=>n.listAccounts(...e),unlinkAccount:async(...e)=>n.unlinkAccount(...e),refreshToken:async(...e)=>n.refreshToken(...e),getAccessToken:async(...e)=>n.getAccessToken(...e),accountInfo:async(...e)=>n.accountInfo(...e),updateUser:async(...e)=>n.updateUser(...e),listSessions:async(...e)=>n.listSessions(...e),enableTwoFactor:async(...e)=>n.twoFactor.enable(...e),disableTwoFactor:async(...e)=>n.twoFactor.disable(...e),verifyTotp:async(...e)=>n.twoFactor.verifyTotp(...e),verifyBackupCode:async(...e)=>n.twoFactor.verifyBackupCode(...e),addPasskey:async(...e)=>n.passkey.addPasskey(...e),signInPasskey:async(...e)=>n.signIn.passkey(...e),deletePasskey:async(...e)=>n.passkey.deletePasskey(...e),listPasskeys:async()=>n.$fetch(`/passkey/list-user-passkeys`,{method:`GET`}),signInMagicLink:async(...e)=>n.signIn.magicLink(...e),signInSSO:async(...e)=>n.signIn.sso(...e),registerSSO:async(...e)=>n.sso.register(...e),listSSOProviders:async()=>[],deleteSSOProvider:async e=>({success:!0})}},nD=(e,t)=>{let n=(0,B.c)(14),r=NC(),i=t??r??T,a=so(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[`session`],n[0]=o):o=n[0];let s;n[1]===i?s=n[2]:(s=async()=>(await tD(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=Co(l),p=u??(d?null:void 0),m;n[6]===a?m=n[7]:(m=e=>{a.setQueryData([`session`],e)},n[6]=a,n[7]=m);let h=m,g;n[8]===f?g=n[9]:(g=async()=>(await f()).data,n[8]=f,n[9]=g);let _=g,v;return n[10]!==_||n[11]!==p||n[12]!==h?(v={session:p,fetchSession:_,revalidateSession:_,setSession:h},n[10]=_,n[11]=p,n[12]=h,n[13]=v):v=n[13],v},rD=e=>{let t=(0,B.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{session:r,intlayerConfiguration:i}=n,{session:a,fetchSession:o,revalidateSession:s,setSession:c}=nD(r,i),{oAuth2AccessToken:l}=Bw(i),u=!!(a?.user||l),d;return t[2]!==o||t[3]!==l||t[4]!==s||t[5]!==a||t[6]!==c||t[7]!==u?(d={session:a,fetchSession:o,setSession:c,revalidateSession:s,oAuth2AccessToken:l,isAuthenticated:u},t[2]=o,t[3]=l,t[4]=s,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d},iD=e=>{let t=(0,B.c)(5),n=NC(),{oAuth2AccessToken:r}=rD(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=zw({...r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},...e?.options??{}},e?.intlayerConfiguration??n),t[0]=n,t[1]=r,t[2]=e?.intlayerConfiguration,t[3]=e?.options,t[4]=i):i=t[4],i},aD=e=>{let t=(0,B.c)(2),n=NC(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=tD(r),t[0]=r,t[1]=i),i},oD=e=>{let t=(0,B.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=NC(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=rD(o),l=c?c.user:s?.user,u=c?c.organization:s?.organization,d=c?c.project:s?.project,f=(n?!!l:!0)&&(r?!!d:!0)&&(i?!!u:!0),p;return t[2]===f?p=t[3]:(p={enable:f},t[2]=f,t[3]=p),p},sD=e=>{let t=(0,B.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({requireUser:i,requireProject:r,requireOrganization:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==r||t[7]!==i?(o={requireUser:i,requireProject:r,requireOrganization:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8];let{enable:s}=oD(o),c=a?.enabled===!1?!1:s,l;return t[9]!==a||t[10]!==c?(l={enabled:c,...a},t[9]=a,t[10]=c,t[11]=l):l=t[11],Co(l)},cD=()=>{let e=(0,B.c)(6),t=aD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`logout`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=()=>t.signOut(),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={resetQueries:[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),wo(a)},lD=(e,t)=>{let n=(0,B.c)(9),r=iD(),i;n[0]===e?i=n[1]:(i=[`projects`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.project.getProjects(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],sD(o)},uD=()=>{let e=(0,B.c)(6),t=iD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.pushDictionaries(e.dictionaries),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),wo(a)},dD=()=>{let e=(0,B.c)(6),t=iD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.deleteDictionary(e.dictionaryId),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),wo(a)},fD=(e,t)=>{let n=(0,B.c)(9),r=iD(),i;n[0]===e?i=n[1]:(i=[`tags`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.tag.getTags(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],sD(o)},pD=()=>{let e=(0,B.c)(3),t=iD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationMetadata`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),wo(r)},mD=()=>{let e=(0,B.c)(3),t=iD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationField`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationField(e)},e[1]=t,e[2]=r),wo(r)},hD=()=>{let e=(0,B.c)(3),t=iD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:()=>t.editor.getDictionaries()},e[1]=t,e[2]=r),Co(r)},gD=()=>{let e=(0,B.c)(3),t=iD(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.editor.writeDictionary(e)},e[1]=t,e[2]=r),wo(r)},_D=(e,t)=>{let n=(0,B.c)(21),r;n[0]!==t||n[1]!==e?(r=()=>{if(t!==void 0){let n=typeof t==`function`?t():t;if(typeof window>`u`)return n;let r=localStorage?.getItem(e);if(r)try{return JSON.parse(r)}catch(e){console.error(e)}return n}},n[0]=t,n[1]=e,n[2]=r):r=n[2];let[i,a]=(0,O.useState)(r),o;n[3]!==t||n[4]!==e||n[5]!==i?(o=()=>{let n=localStorage?.getItem(e);if(n&&n!==`undefined`&&i===void 0)try{a(JSON.parse(n))}catch(e){console.error(e)}else t!==void 0&&i===void 0&&a(t)},n[3]=t,n[4]=e,n[5]=i,n[6]=o):o=n[6];let s;n[7]!==e||n[8]!==i?(s=[e,i],n[7]=e,n[8]=i,n[9]=s):s=n[9],(0,O.useEffect)(o,s);let c;n[10]===e?c=n[11]:(c=t=>{a(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},n[10]=e,n[11]=c);let l=c,u;n[12]===e?u=n[13]:(u=()=>{let t=localStorage?.getItem(e);t&&a(JSON.parse(t))},n[12]=e,n[13]=u);let d=u,f;n[14]===e?f=n[15]:(f=()=>{localStorage?.removeItem(e),a(void 0)},n[14]=e,n[15]=f);let p=f,m;return n[16]!==p||n[17]!==d||n[18]!==l||n[19]!==i?(m=[i,l,d,p],n[16]=p,n[17]=d,n[18]=l,n[19]=i,n[20]=m):m=n[20],m},vD=(0,O.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),yD=()=>(0,O.useContext)(vD),bD=e=>{let t=(0,B.c)(16),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=bt(),o;t[0]!==r||t[1]!==a?(o=r??[a],t[0]=r,t[1]=a,t[2]=o):o=t[2];let[s,c]=_D(`locale-content-selector-selected-locales`,o),l;t[3]!==n||t[4]!==r||t[5]!==a||t[6]!==s||t[7]!==c?(l=()=>{if(n.length&&!s?.some(e=>n.includes(e))){let e=r?.filter(e=>n.includes(e));c(e?.length?e:[a])}},t[3]=n,t[4]=r,t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===n?u=t[10]:(u=[n],t[9]=n,t[10]=u),(0,O.useEffect)(l,u);let d;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==c?(d=(0,k.jsx)(vD,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[11]=n,t[12]=i,t[13]=s,t[14]=c,t[15]=d):d=t[15],d},xD=e=>{let t=(0,B.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,O.useState)(n),[u,d]=(0,O.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(SD)},t[0]=n,t[1]=p);let m=p,h;t[2]!==c||t[3]!==r?(h=()=>{r(c)},t[2]=c,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{l(e.currentTarget.value)},t[5]=_):_=t[5];let v=_,y=e=>{e.key===`Enter`&&!i&&S?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),m())},b,x;t[6]===n?(b=t[7],x=t[8]):(b=()=>{l(n),d(CD)},x=[n],t[6]=n,t[7]=b,t[8]=x),(0,O.useEffect)(b,x);let S=a?.(c)??!0;return(0,k.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,k.jsx)(KC,{onChange:v,onKeyDown:y,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!S,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,k.jsxs)(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rS,{Icon:vu,label:`Save changes${S?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!S,onClick:g,"aria-describedby":S?void 0:`validation-error`}),(0,k.jsx)(rS,{Icon:Hu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function SD(e){return e+1}function CD(e){return e+1}var wD=()=>{let e=(0,B.c)(9),{session:t,revalidateSession:n,setSession:r}=rD(),{mutate:i}=cD(),a=t?.user?`authenticated`:`unauthenticated`,o=a===`authenticated`,s=a===`unauthenticated`,c=t?.user,l;e[0]!==i||e[1]!==r?(l=async()=>{r(null),i()},e[0]=i,e[1]=r,e[2]=l):l=e[2];let u=l,d;return e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==n||e[7]!==c?(d={isAuthenticated:o,isUnauthenticated:s,user:c,revalidateSession:n,logout:u},e[3]=o,e[4]=s,e[5]=u,e[6]=n,e[7]=c,e[8]=d):d=e[8],d},TD=`​`,ED=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(TD).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===TD?``:t.split(TD).join(``)}).join(`
46
+ `)},DD=e=>{let t=e.split(`
47
+ `);return t.length===0?[``]:t},OD=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),kD=(e,t)=>{if(t<=0)return 0;if(OD){let n=[...OD.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},AD=(e,t)=>{if(t>=e.length)return e.length;if(OD){let n=[...OD.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},jD=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]);)n--;for(;n>0&&/\S/.test(e[n-1]);)n--;return n},MD=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]);)n++;for(;n<e.length&&/\s/.test(e[n]);)n++;return n},ND=(e,t)=>e.slice(0,t).lastIndexOf(`
48
+ `)+1,PD=(e,t)=>{let n=e.indexOf(`
49
+ `,t);return n===-1?e.length:n},FD=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,O.useState)(()=>DD(i)),s=(0,O.useRef)(null),c=(0,O.useRef)(null),l=e!==void 0,u=(0,O.useRef)(a);u.current=a,(0,O.useEffect)(()=>{l&&e!==void 0&&o(DD(e))},[e,l]);let d=()=>u.current.join(`
50
50
  `),f=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`);for(let e=0;e<n.length;e++)if(n[e].contains(t.startContainer))return{line:e,offset:t.startOffset};return null},p=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`),r=u.current,i=(e,t)=>{for(let i=0;i<n.length;i++)if(n[i].contains(e)){let e=0;for(let t=0;t<i;t++)e+=r[t].length+1;return e+Math.min(t,r[i]?.length??0)}return e===s.current?t===0?0:r.join(`
51
- `).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},m=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};(0,O.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let h=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},g=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){if(n<=t[e].length)return{line:e,offset:n};n-=t[e].length+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},_=()=>{let e=f();return e?h(e):0},v=(e,t)=>{let r=ED(e);c.current=g(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=TD(s.current),i=ED(t);c.current=e,o(i),n?.(t)},handleBeforeInput:e=>{if(r)return;let t=e.nativeEvent;if(t.isComposing)return;let n=t.inputType;if(!(n===`insertParagraph`||n===`insertLineBreak`)){if(n===`deleteContentBackward`||n===`deleteContentForward`){e.preventDefault();let t=p();if(!t)return;let r=u.current.join(`
52
- `);if(t.hasSelection)v(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=OD(r,t.start);v(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=kD(r,t.start);v(r.slice(0,t.start)+r.slice(e),t.start)}return}if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
51
+ `).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},m=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};(0,O.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let h=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},g=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){if(n<=t[e].length)return{line:e,offset:n};n-=t[e].length+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},_=()=>{let e=f();return e?h(e):0},v=(e,t)=>{let r=DD(e);c.current=g(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=ED(s.current),i=DD(t);c.current=e,o(i),n?.(t)},handleBeforeInput:e=>{if(r)return;let t=e.nativeEvent;if(t.isComposing)return;let n=t.inputType;if(!(n===`insertParagraph`||n===`insertLineBreak`)){if(n===`deleteContentBackward`||n===`deleteContentForward`){e.preventDefault();let t=p();if(!t)return;let r=u.current.join(`
52
+ `);if(t.hasSelection)v(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=kD(r,t.start);v(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=AD(r,t.start);v(r.slice(0,t.start)+r.slice(e),t.start)}return}if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
53
53
  `),i=t.data??t.dataTransfer?.getData(`text/plain`)??``;v(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length);return}if(n===`insertText`&&t.data){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
54
54
  `),i=t.data;v(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length)}}},handleKeyDown:e=>{if(r){e.preventDefault();return}if(e.nativeEvent.isComposing)return;if((e.metaKey||e.ctrlKey)&&e.key===`z`){e.preventDefault();return}let t=p();if(!t)return;let n=u.current.join(`
55
55
  `);if(e.key===`Enter`){e.preventDefault(),v(n.slice(0,t.start)+`
56
- `+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)v(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?MD(n,t.start):e.altKey?AD(n,t.start):OD(n,t.start),v(n.slice(0,r)+n.slice(t.start),r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection)v(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start>=n.length)return;let r;r=e.metaKey?ND(n,t.start):e.altKey?jD(n,t.start):kD(n,t.start),v(n.slice(0,t.start)+n.slice(r),t.start)}return}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t?.hasSelection)return;let n=u.current.join(`
56
+ `+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)v(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?ND(n,t.start):e.altKey?jD(n,t.start):kD(n,t.start),v(n.slice(0,r)+n.slice(t.start),r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection)v(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start>=n.length)return;let r;r=e.metaKey?PD(n,t.start):e.altKey?MD(n,t.start):AD(n,t.start),v(n.slice(0,t.start)+n.slice(r),t.start)}return}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t?.hasSelection)return;let n=u.current.join(`
57
57
  `),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i),v(n.slice(0,t.start)+n.slice(t.end),t.start)},handlePaste:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=e.clipboardData.getData(`text/plain`);if(!t)return;let n=p();if(!n)return;let i=u.current.join(`
58
- `);v(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:_,caretFromFlatOffset:g}},FD=({index:e,text:t,isLast:n,ghostText:r})=>(0,k.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,k.jsx)(`span`,{"data-editable":!0,children:t||`​`}),r&&(0,k.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,k.jsx)(`br`,{})]}),ID=24,LD=12,RD=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:l,ghostText:u,ghostLine:d,ghostOffset:f,onClick:p,className:m,dir:h=`auto`,ref:g,..._})=>{let{lines:v,containerRef:y,getText:b,handleInput:x,handleBeforeInput:S,handleKeyDown:C,handleCut:w,handlePaste:T,handleDrop:E,handleDragOver:D,getCursorOffset:A,setCaretPosition:j,caretFromFlatOffset:M}=PD({value:e,defaultValue:t,onChange:n,disabled:i}),N=(0,O.useRef)(null),P=e=>{N.current=e,y.current=e};(0,O.useImperativeHandle)(g,()=>({getContainer:()=>N.current,getText:b,focus:()=>N.current?.focus(),getCursorOffset:A,setCursorAtOffset:e=>{j(M(e,v))}})),(0,O.useEffect)(()=>{if(!s||!N.current)return;let e=N.current,t=ID*o+LD,n=ID*a+LD;e.style.height=`auto`;let r=e.scrollHeight;e.style.height=`${Math.max(Math.min(r,t),n)}px`,e.style.overflowY=r>t?`auto`:`hidden`},[v,s,o,a]);let F=v.length===1&&v[0]===``,I=u&&d!==void 0&&f!==void 0;return(0,k.jsxs)(`div`,{className:`relative w-full`,children:[F&&r&&(0,k.jsx)(`div`,{className:`pointer-events-none absolute inset-0 select-none px-2 py-3 text-base text-neutral-400 leading-[1.5rem] md:py-2 md:text-sm`,"aria-hidden":`true`,children:r}),(0,k.jsx)(`div`,{..._,ref:P,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":I?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:h,onInput:x,onBeforeInput:S,onKeyDown:C,onCut:w,onPaste:T,onDrop:E,onDragOver:D,onClick:p,className:W(`resize-none whitespace-pre-wrap break-words outline-none`,GC({variant:l,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,m),children:v.map((e,t)=>(0,k.jsx)(FD,{index:t,text:e,isLast:t===v.length-1,ghostText:I&&d===t?u:void 0},t))})]})},zD=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,O.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,O.useState)(``),s=(0,O.useRef)(null);(0,O.useEffect)(()=>{n.value!==void 0&&i(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let c=()=>{let e=t??a;if(!e)return;let n=s.current?.getCursorOffset()??r.length;i(r.slice(0,n)+e+r.slice(n)),o(``),setTimeout(()=>{s.current?.focus(),s.current?.setCursorAtOffset(n+e.length)},0)},l=e?t??(a||void 0):void 0,u=r.split(`
59
- `);return(0,k.jsx)(RD,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},BD=()=>{let e=(0,B.c)(9),{session:t,revalidateSession:n,setSession:r}=uD(),{mutate:i}=hD(),a=t?.user?`authenticated`:`unauthenticated`,o=a===`authenticated`,s=a===`unauthenticated`,c=t?.user,l;e[0]!==i||e[1]!==r?(l=async()=>{r(null),i()},e[0]=i,e[1]=r,e[2]=l):l=e[2];let u=l,d;return e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==n||e[7]!==c?(d={isAuthenticated:o,isUnauthenticated:s,user:c,revalidateSession:n,logout:u},e[3]=o,e[4]=s,e[5]=u,e[6]=n,e[7]=c,e[8]=d):d=e[8],d},VD=e=>{let t=(0,B.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=BD(),[l,u]=(0,O.useState)(n),[d,f]=(0,O.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(HD)},t[0]=n,t[1]=m);let h=m,g;t[2]!==l||t[3]!==r?(g=()=>{r(l)},t[2]=l,t[3]=r,t[4]=g):g=t[4];let _=g,v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>u(e.currentTarget.value??``),t[5]=v):v=t[5];let y=v,b=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&C?(e.preventDefault(),_()):e.key===`Escape`&&(e.preventDefault(),h())},x,S;t[6]===n?(x=t[7],S=t[8]):(x=()=>{u(n),f(UD)},S=[n],t[6]=n,t[7]=x,t[8]=S),(0,O.useEffect)(x,S);let C=a?.(l)??!0;return(0,k.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,k.jsx)(zD,{onChange:y,onKeyDown:b,variant:`invisible`,className:`size-full`,value:n,isActive:c,disabled:i,"aria-label":`Editable textarea content`,"aria-describedby":p||o?`content-editor-textarea-actions`:void 0,"aria-invalid":!C,...s},d),(p||o)&&(0,k.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[p&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rS,{Icon:vu,label:`Save changes${C?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!C,onClick:_,"aria-describedby":C?void 0:`textarea-validation-error`}),(0,k.jsx)(rS,{Icon:Hu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:h,disabled:i})]}),o]})]},n)};function HD(e){return e+1}function UD(e){return e+1}var WD=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},GD=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,k.jsxs)(`label`,{className:W(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,k.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]});function KD(e,[t,n]){return Math.min(n,Math.max(t,e))}var qD=O.createContext(void 0);function JD(e){let t=O.useContext(qD);return e||t||`ltr`}var YD=0;function XD(){O.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??ZD()),document.body.insertAdjacentElement(`beforeend`,e[1]??ZD()),YD++,()=>{YD===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),YD--}},[])}function ZD(){let 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 QD=`focusScope.autoFocusOnMount`,$D=`focusScope.autoFocusOnUnmount`,eO={bubbles:!1,cancelable:!0},tO=`FocusScope`,nO=O.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=O.useState(null),l=kc(i),u=kc(a),d=O.useRef(null),f=gc(t,e=>c(e)),p=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:lO(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||lO(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&lO(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),O.useEffect(()=>{if(s){uO.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(QD,eO);s.addEventListener(QD,l),s.dispatchEvent(t),t.defaultPrevented||(rO(pO(aO(s)),{select:!0}),document.activeElement===e&&lO(s))}return()=>{s.removeEventListener(QD,l),setTimeout(()=>{let t=new CustomEvent($D,eO);s.addEventListener($D,u),s.dispatchEvent(t),t.defaultPrevented||lO(e??document.body,{select:!0}),s.removeEventListener($D,u),uO.remove(p)},0)}}},[s,l,u,p]);let m=O.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=iO(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&lO(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&lO(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,k.jsx)(G.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});nO.displayName=tO;function rO(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(lO(r,{select:t}),document.activeElement!==n)return}function iO(e){let t=aO(e);return[oO(t,e),oO(t.reverse(),e)]}function aO(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oO(e,t){for(let n of e)if(!sO(n,{upTo:t}))return n}function sO(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 cO(e){return e instanceof HTMLInputElement&&`select`in e}function lO(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cO(e)&&t&&e.select()}}var uO=dO();function dO(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=fO(e,t),e.unshift(t)},remove(t){e=fO(e,t),e[0]?.resume()}}}function fO(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pO(e){return e.filter(e=>e.tagName!==`A`)}var mO=O.useId||(()=>void 0),hO=0;function gO(e){let[t,n]=O.useState(mO());return Kc(()=>{e||n(e=>e??String(hO++))},[e]),e||(t?`radix-${t}`:``)}var _O=[`top`,`right`,`bottom`,`left`],vO=Math.min,yO=Math.max,bO=Math.round,xO=Math.floor,SO=e=>({x:e,y:e}),CO={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function wO(e,t,n){return yO(e,vO(t,n))}function TO(e,t){return typeof e==`function`?e(t):e}function EO(e){return e.split(`-`)[0]}function DO(e){return e.split(`-`)[1]}function OO(e){return e===`x`?`y`:`x`}function kO(e){return e===`y`?`height`:`width`}function AO(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function jO(e){return OO(AO(e))}function MO(e,t,n){n===void 0&&(n=!1);let r=DO(e),i=jO(e),a=kO(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=VO(o)),[o,VO(o)]}function NO(e){let t=VO(e);return[PO(e),t,PO(t)]}function PO(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var FO=[`left`,`right`],IO=[`right`,`left`],LO=[`top`,`bottom`],RO=[`bottom`,`top`];function zO(e,t,n){switch(e){case`top`:case`bottom`:return n?t?IO:FO:t?FO:IO;case`left`:case`right`:return t?LO:RO;default:return[]}}function BO(e,t,n,r){let i=DO(e),a=zO(EO(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(PO)))),a}function VO(e){let t=EO(e);return CO[t]+e.slice(t.length)}function HO(e){return{top:0,right:0,bottom:0,left:0,...e}}function UO(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:HO(e)}function WO(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function GO(e,t,n){let{reference:r,floating:i}=e,a=AO(t),o=jO(t),s=kO(o),c=EO(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(DO(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function KO(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=TO(t,e),p=UO(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=WO(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=WO(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var qO=50,JO=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:KO},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=GO(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<qO&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=GO(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},YO=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=TO(e,t)||{};if(l==null)return{};let d=UO(u),f={x:n,y:r},p=jO(i),m=kO(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=vO(d[_],T),D=vO(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=wO(O,A,k),M=!c.arrow&&DO(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),XO=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=TO(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=EO(r),_=AO(o),v=EO(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[VO(o)]:NO(o)),x=p!==`none`;!d&&x&&b.push(...BO(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=MO(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==AO(t))||T.every(e=>AO(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=AO(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ZO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QO(e){return _O.some(t=>e[t]>=0)}var $O=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=TO(e,t);switch(i){case`referenceHidden`:{let e=ZO(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:QO(e)}}}case`escaped`:{let e=ZO(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:QO(e)}}}default:return{}}}}},ek=new Set([`left`,`top`]);async function tk(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=EO(n),s=DO(n),c=AO(n)===`y`,l=ek.has(o)?-1:1,u=a&&c?-1:1,d=TO(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var nk=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await tk(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},rk=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=TO(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=AO(EO(i)),p=OO(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=wO(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=wO(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},ik=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=TO(e,t),u={x:n,y:r},d=AO(i),f=OO(d),p=u[f],m=u[d],h=TO(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ek.has(EO(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ak=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=TO(e,t),u=await o.detectOverflow(t,l),d=EO(i),f=DO(i),p=AO(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=vO(h-u[g],v),x=vO(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=yO(u.left,0),t=yO(u.right,0),n=yO(u.top,0),r=yO(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:yO(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:yO(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ok(){return typeof window<`u`}function sk(e){return uk(e)?(e.nodeName||``).toLowerCase():`#document`}function ck(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lk(e){return((uk(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function uk(e){return ok()?e instanceof Node||e instanceof ck(e).Node:!1}function dk(e){return ok()?e instanceof Element||e instanceof ck(e).Element:!1}function fk(e){return ok()?e instanceof HTMLElement||e instanceof ck(e).HTMLElement:!1}function pk(e){return!ok()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ck(e).ShadowRoot}function mk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Tk(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function hk(e){return/^(table|td|th)$/.test(sk(e))}function gk(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var _k=/transform|translate|scale|rotate|perspective|filter/,vk=/paint|layout|strict|content/,yk=e=>!!e&&e!==`none`,bk;function xk(e){let t=dk(e)?Tk(e):e;return yk(t.transform)||yk(t.translate)||yk(t.scale)||yk(t.rotate)||yk(t.perspective)||!Ck()&&(yk(t.backdropFilter)||yk(t.filter))||_k.test(t.willChange||``)||vk.test(t.contain||``)}function Sk(e){let t=Dk(e);for(;fk(t)&&!wk(t);){if(xk(t))return t;if(gk(t))return null;t=Dk(t)}return null}function Ck(){return bk??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),bk}function wk(e){return/^(html|body|#document)$/.test(sk(e))}function Tk(e){return ck(e).getComputedStyle(e)}function Ek(e){return dk(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dk(e){if(sk(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||pk(e)&&e.host||lk(e);return pk(t)?t.host:t}function Ok(e){let t=Dk(e);return wk(t)?e.ownerDocument?e.ownerDocument.body:e.body:fk(t)&&mk(t)?t:Ok(t)}function kk(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ok(e),i=r===e.ownerDocument?.body,a=ck(r);if(i){let e=Ak(a);return t.concat(a,a.visualViewport||[],mk(r)?r:[],e&&n?kk(e):[])}else return t.concat(r,kk(r,[],n))}function Ak(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jk(e){let t=Tk(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=fk(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bO(n)!==a||bO(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Mk(e){return dk(e)?e:e.contextElement}function Nk(e){let t=Mk(e);if(!fk(t))return SO(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=jk(t),o=(a?bO(n.width):n.width)/r,s=(a?bO(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Pk=SO(0);function Fk(e){let t=ck(e);return!Ck()||!t.visualViewport?Pk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ik(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ck(e)?!1:t}function Lk(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Mk(e),o=SO(1);t&&(r?dk(r)&&(o=Nk(r)):o=Nk(e));let s=Ik(a,n,r)?Fk(a):SO(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ck(a),t=r&&dk(r)?ck(r):r,n=e,i=Ak(n);for(;i&&r&&t!==n;){let e=Nk(i),t=i.getBoundingClientRect(),r=Tk(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ck(i),i=Ak(n)}}return WO({width:u,height:d,x:c,y:l})}function Rk(e,t){let n=Ek(e).scrollLeft;return t?t.left+n:Lk(lk(e)).left+n}function zk(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Rk(e,n),y:n.top+t.scrollTop}}function Bk(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=lk(r),s=t?gk(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=SO(1),u=SO(0),d=fk(r);if((d||!d&&!a)&&((sk(r)!==`body`||mk(o))&&(c=Ek(r)),d)){let e=Lk(r);l=Nk(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?zk(o,c):SO(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Vk(e){return Array.from(e.getClientRects())}function Hk(e){let t=lk(e),n=Ek(e),r=e.ownerDocument.body,i=yO(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=yO(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Rk(e),s=-n.scrollTop;return Tk(r).direction===`rtl`&&(o+=yO(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Uk=25;function Wk(e,t){let n=ck(e),r=lk(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ck();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Rk(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Uk&&(a-=o)}else l<=Uk&&(a+=l);return{width:a,height:o,x:s,y:c}}function Gk(e,t){let n=Lk(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fk(e)?Nk(e):SO(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Kk(e,t,n){let r;if(t===`viewport`)r=Wk(e,n);else if(t===`document`)r=Hk(lk(e));else if(dk(t))r=Gk(t,n);else{let n=Fk(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return WO(r)}function qk(e,t){let n=Dk(e);return n===t||!dk(n)||wk(n)?!1:Tk(n).position===`fixed`||qk(n,t)}function Jk(e,t){let n=t.get(e);if(n)return n;let r=kk(e,[],!1).filter(e=>dk(e)&&sk(e)!==`body`),i=null,a=Tk(e).position===`fixed`,o=a?Dk(e):e;for(;dk(o)&&!wk(o);){let t=Tk(o),n=xk(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||mk(o)&&!n&&qk(e,o))?r=r.filter(e=>e!==o):i=t,o=Dk(o)}return t.set(e,r),r}function Yk(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?gk(t)?[]:Jk(t,this._c):[].concat(n),r],o=Kk(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Kk(t,a[e],i);s=yO(n.top,s),c=vO(n.right,c),l=vO(n.bottom,l),u=yO(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Xk(e){let{width:t,height:n}=jk(e);return{width:t,height:n}}function Zk(e,t,n){let r=fk(t),i=lk(t),a=n===`fixed`,o=Lk(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=SO(0);function l(){c.x=Rk(i)}if(r||!r&&!a)if((sk(t)!==`body`||mk(i))&&(s=Ek(t)),r){let e=Lk(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?zk(i,s):SO(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Qk(e){return Tk(e).position===`static`}function $k(e,t){if(!fk(e)||Tk(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return lk(e)===n&&(n=n.ownerDocument.body),n}function eA(e,t){let n=ck(e);if(gk(e))return n;if(!fk(e)){let t=Dk(e);for(;t&&!wk(t);){if(dk(t)&&!Qk(t))return t;t=Dk(t)}return n}let r=$k(e,t);for(;r&&hk(r)&&Qk(r);)r=$k(r,t);return r&&wk(r)&&Qk(r)&&!xk(r)?n:r||Sk(e)||n}var tA=async function(e){let t=this.getOffsetParent||eA,n=this.getDimensions,r=await n(e.floating);return{reference:Zk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nA(e){return Tk(e).direction===`rtl`}var rA={convertOffsetParentRelativeRectToViewportRelativeRect:Bk,getDocumentElement:lk,getClippingRect:Yk,getOffsetParent:eA,getElementRects:tA,getClientRects:Vk,getDimensions:Xk,getScale:Nk,isElement:dk,isRTL:nA};function iA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aA(e,t){let n=null,r,i=lk(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=xO(d),h=xO(i.clientWidth-(u+f)),g=xO(i.clientHeight-(d+p)),_=xO(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:yO(0,vO(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!iA(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function oA(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Mk(e),u=i||a?[...l?kk(l):[],...t?kk(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?aA(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Lk(e):null;c&&g();function g(){let t=Lk(e);h&&!iA(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var sA=nk,cA=rk,lA=XO,uA=ak,dA=$O,fA=YO,pA=ik,mA=(e,t,n)=>{let r=new Map,i={platform:rA,...n},a={...i.platform,_c:r};return JO(e,t,{...i,platform:a})},hA=typeof document<`u`?O.useLayoutEffect:function(){};function gA(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,i;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(!gA(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!gA(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function _A(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vA(e,t){let n=_A(e);return Math.round(t*n)/n}function yA(e){let t=O.useRef(e);return hA(()=>{t.current=e}),t}function bA(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=O.useState(r);gA(f,r)||p(r);let[m,h]=O.useState(null),[g,_]=O.useState(null),v=O.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=O.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=O.useRef(null),C=O.useRef(null),w=O.useRef(u),T=c!=null,E=yA(c),D=yA(i),k=yA(l),A=O.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),mA(S.current,C.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!gA(w.current,t)&&(w.current=t,Dc.flushSync(()=>{d(t)}))})},[f,t,n,D,k]);hA(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=O.useRef(!1);hA(()=>(j.current=!0,()=>{j.current=!1}),[]),hA(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,A);A()}},[b,x,A,E,T]);let M=O.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),N=O.useMemo(()=>({reference:b,floating:x}),[b,x]),P=O.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=vA(N.floating,u.x),r=vA(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,..._A(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var xA=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:fA({element:r.current,padding:i}).fn(n):r?fA({element:r,padding:i}).fn(n):{}}}},SA=(e,t)=>{let n=sA(e);return{name:n.name,fn:n.fn,options:[e,t]}},CA=(e,t)=>{let n=cA(e);return{name:n.name,fn:n.fn,options:[e,t]}},wA=(e,t)=>({fn:pA(e).fn,options:[e,t]}),TA=(e,t)=>{let n=lA(e);return{name:n.name,fn:n.fn,options:[e,t]}},EA=(e,t)=>{let n=uA(e);return{name:n.name,fn:n.fn,options:[e,t]}},DA=(e,t)=>{let n=dA(e);return{name:n.name,fn:n.fn,options:[e,t]}},OA=(e,t)=>{let n=xA(e);return{name:n.name,fn:n.fn,options:[e,t]}},kA=`Arrow`,AA=O.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,k.jsx)(G.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,k.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});AA.displayName=kA;var jA=AA;function MA(e){let[t,n]=O.useState(void 0);return Kc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var NA=`Popper`,[PA,FA]=vc(NA),[IA,LA]=PA(NA),RA=e=>{let{__scopePopper:t,children:n}=e,[r,i]=O.useState(null);return(0,k.jsx)(IA,{scope:t,anchor:r,onAnchorChange:i,children:n})};RA.displayName=NA;var zA=`PopperAnchor`,BA=O.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=LA(zA,n),o=O.useRef(null),s=gc(t,o),c=O.useRef(null);return O.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,k.jsx)(G.div,{...i,ref:s})});BA.displayName=zA;var VA=`PopperContent`,[HA,UA]=PA(VA),WA=O.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=LA(VA,n),[_,v]=O.useState(null),y=gc(t,e=>v(e)),[b,x]=O.useState(null),S=MA(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],A=D.length>0,j={padding:E,boundary:D.filter(JA),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=bA({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>oA(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[SA({mainAxis:i+w,alignmentAxis:o}),c&&CA({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?wA():void 0,...j}),c&&TA({...j}),EA({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&OA({element:b,padding:s}),YA({arrowWidth:C,arrowHeight:w}),f&&DA({strategy:`referenceHidden`,...j})]}),[L,ee]=XA(P),te=kc(m);Kc(()=>{F&&te?.()},[F,te]);let ne=I.arrow?.x,re=I.arrow?.y,R=I.arrow?.centerOffset!==0,[z,ie]=O.useState();return Kc(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),(0,k.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,k.jsx)(HA,{scope:n,placedSide:L,onArrowChange:x,arrowX:ne,arrowY:re,shouldHideArrow:R,children:(0,k.jsx)(G.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:F?void 0:`none`}})})})});WA.displayName=VA;var GA=`PopperArrow`,KA={top:`bottom`,right:`left`,bottom:`top`,left:`right`},qA=O.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=UA(GA,n),a=KA[i.placedSide];return(0,k.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,k.jsx)(jA,{...r,ref:t,style:{...r.style,display:`block`}})})});qA.displayName=GA;function JA(e){return e!==null}var YA=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=XA(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function XA(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var ZA=RA,QA=BA,$A=WA,ej=qA;function tj(e){let t=O.useRef({value:e,previous:e});return O.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nj=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},rj=new WeakMap,ij=new WeakMap,aj={},oj=0,sj=function(e){return e&&(e.host||sj(e.parentNode))},cj=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=sj(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},lj=function(e,t,n,r){var i=cj(t,Array.isArray(e)?e:[e]);aj[n]||(aj[n]=new WeakMap);var a=aj[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(rj.get(e)||0)+1,l=(a.get(e)||0)+1;rj.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ij.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),oj++,function(){o.forEach(function(e){var t=rj.get(e)-1,i=a.get(e)-1;rj.set(e,t),a.set(e,i),t||(ij.has(e)||e.removeAttribute(r),ij.delete(e)),i||e.removeAttribute(n)}),oj--,oj||(rj=new WeakMap,rj=new WeakMap,ij=new WeakMap,aj={})}},uj=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||nj(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),lj(r,i,n,`aria-hidden`)):function(){return null}},dj=function(){return dj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dj.apply(this,arguments)};function fj(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pj(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var mj=`right-scroll-bar-position`,hj=`width-before-scroll-bar`,gj=`with-scroll-bars-hidden`,_j=`--removed-body-scroll-bar-size`;function vj(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function yj(e,t){var n=(0,O.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var bj=typeof window<`u`?O.useLayoutEffect:O.useEffect,xj=new WeakMap;function Sj(e,t){var n=yj(t||null,function(t){return e.forEach(function(e){return vj(e,t)})});return bj(function(){var t=xj.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||vj(e,null)}),i.forEach(function(e){r.has(e)||vj(e,a)})}xj.set(n,e)},[e]),n}function Cj(e){return e}function wj(e,t){t===void 0&&(t=Cj);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Tj(e){e===void 0&&(e={});var t=wj(null);return t.options=dj({async:!0,ssr:!1},e),t}var Ej=function(e){var t=e.sideCar,n=fj(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return O.createElement(r,dj({},n))};Ej.isSideCarExport=!0;function Dj(e,t){return e.useMedium(t),Ej}var Oj=Tj(),kj=function(){},Aj=O.forwardRef(function(e,t){var n=O.useRef(null),r=O.useState({onScrollCapture:kj,onWheelCapture:kj,onTouchMoveCapture:kj}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=fj(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Sj([n,t]),C=dj(dj({},b),i);return O.createElement(O.Fragment,null,u&&O.createElement(x,{sideCar:Oj,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?O.cloneElement(O.Children.only(s),dj(dj({},C),{ref:S})):O.createElement(v,dj({},C,{className:c,ref:S}),s))});Aj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Aj.classNames={fullWidth:hj,zeroRight:mj};var jj,Mj=function(){if(jj)return jj;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Nj(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Mj();return t&&e.setAttribute(`nonce`,t),e}function Pj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fj(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ij=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nj())&&(Pj(t,n),Fj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lj=function(){var e=Ij();return function(t,n){O.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Rj=function(){var e=Lj();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},zj={left:0,top:0,right:0,gap:0},Bj=function(e){return parseInt(e||``,10)||0},Vj=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Bj(n),Bj(r),Bj(i)]},Hj=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return zj;var t=Vj(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])}},Uj=Rj(),Wj=`data-scroll-locked`,Gj=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
58
+ `);v(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:_,caretFromFlatOffset:g}},ID=({index:e,text:t,isLast:n,ghostText:r})=>(0,k.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,k.jsx)(`span`,{"data-editable":!0,children:t||`​`}),r&&(0,k.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,k.jsx)(`br`,{})]}),LD=24,RD=12,zD=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:l,ghostText:u,ghostLine:d,ghostOffset:f,onClick:p,className:m,dir:h=`auto`,ref:g,..._})=>{let{lines:v,containerRef:y,getText:b,handleInput:x,handleBeforeInput:S,handleKeyDown:C,handleCut:w,handlePaste:T,handleDrop:E,handleDragOver:D,getCursorOffset:A,setCaretPosition:j,caretFromFlatOffset:M}=FD({value:e,defaultValue:t,onChange:n,disabled:i}),N=(0,O.useRef)(null),P=e=>{N.current=e,y.current=e};(0,O.useImperativeHandle)(g,()=>({getContainer:()=>N.current,getText:b,focus:()=>N.current?.focus(),getCursorOffset:A,setCursorAtOffset:e=>{j(M(e,v))}})),(0,O.useEffect)(()=>{if(!s||!N.current)return;let e=N.current,t=LD*o+RD,n=LD*a+RD;e.style.height=`auto`;let r=e.scrollHeight;e.style.height=`${Math.max(Math.min(r,t),n)}px`,e.style.overflowY=r>t?`auto`:`hidden`},[v,s,o,a]);let F=v.length===1&&v[0]===``,I=u&&d!==void 0&&f!==void 0;return(0,k.jsxs)(`div`,{className:`relative w-full`,children:[F&&r&&(0,k.jsx)(`div`,{className:`pointer-events-none absolute inset-0 select-none px-2 py-3 text-base text-neutral-400 leading-[1.5rem] md:py-2 md:text-sm`,"aria-hidden":`true`,children:r}),(0,k.jsx)(`div`,{..._,ref:P,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":I?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:h,onInput:x,onBeforeInput:S,onKeyDown:C,onCut:w,onPaste:T,onDrop:E,onDragOver:D,onClick:p,className:W(`resize-none whitespace-pre-wrap break-words outline-none`,GC({variant:l,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,m),children:v.map((e,t)=>(0,k.jsx)(ID,{index:t,text:e,isLast:t===v.length-1,ghostText:I&&d===t?u:void 0},t))})]})},BD=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,O.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,O.useState)(``),s=(0,O.useRef)(null);(0,O.useEffect)(()=>{n.value!==void 0&&i(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let c=()=>{let e=t??a;if(!e)return;let n=s.current?.getCursorOffset()??r.length;i(r.slice(0,n)+e+r.slice(n)),o(``),setTimeout(()=>{s.current?.focus(),s.current?.setCursorAtOffset(n+e.length)},0)},l=e?t??(a||void 0):void 0,u=r.split(`
59
+ `);return(0,k.jsx)(zD,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},VD=e=>{let t=(0,B.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=wD(),[l,u]=(0,O.useState)(n),[d,f]=(0,O.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(HD)},t[0]=n,t[1]=m);let h=m,g;t[2]!==l||t[3]!==r?(g=()=>{r(l)},t[2]=l,t[3]=r,t[4]=g):g=t[4];let _=g,v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>u(e.currentTarget.value??``),t[5]=v):v=t[5];let y=v,b=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&C?(e.preventDefault(),_()):e.key===`Escape`&&(e.preventDefault(),h())},x,S;t[6]===n?(x=t[7],S=t[8]):(x=()=>{u(n),f(UD)},S=[n],t[6]=n,t[7]=x,t[8]=S),(0,O.useEffect)(x,S);let C=a?.(l)??!0;return(0,k.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,k.jsx)(BD,{onChange:y,onKeyDown:b,variant:`invisible`,className:`size-full`,value:n,isActive:c,disabled:i,"aria-label":`Editable textarea content`,"aria-describedby":p||o?`content-editor-textarea-actions`:void 0,"aria-invalid":!C,...s},d),(p||o)&&(0,k.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[p&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rS,{Icon:vu,label:`Save changes${C?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!C,onClick:_,"aria-describedby":C?void 0:`textarea-validation-error`}),(0,k.jsx)(rS,{Icon:Hu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:h,disabled:i})]}),o]})]},n)};function HD(e){return e+1}function UD(e){return e+1}var WD=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},GD=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,k.jsxs)(`label`,{className:W(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,k.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]});function KD(e,[t,n]){return Math.min(n,Math.max(t,e))}var qD=O.createContext(void 0);function JD(e){let t=O.useContext(qD);return e||t||`ltr`}var YD=0;function XD(){O.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??ZD()),document.body.insertAdjacentElement(`beforeend`,e[1]??ZD()),YD++,()=>{YD===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),YD--}},[])}function ZD(){let 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 QD=`focusScope.autoFocusOnMount`,$D=`focusScope.autoFocusOnUnmount`,eO={bubbles:!1,cancelable:!0},tO=`FocusScope`,nO=O.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=O.useState(null),l=kc(i),u=kc(a),d=O.useRef(null),f=gc(t,e=>c(e)),p=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:lO(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||lO(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&lO(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),O.useEffect(()=>{if(s){uO.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(QD,eO);s.addEventListener(QD,l),s.dispatchEvent(t),t.defaultPrevented||(rO(pO(aO(s)),{select:!0}),document.activeElement===e&&lO(s))}return()=>{s.removeEventListener(QD,l),setTimeout(()=>{let t=new CustomEvent($D,eO);s.addEventListener($D,u),s.dispatchEvent(t),t.defaultPrevented||lO(e??document.body,{select:!0}),s.removeEventListener($D,u),uO.remove(p)},0)}}},[s,l,u,p]);let m=O.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=iO(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&lO(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&lO(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,k.jsx)(G.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});nO.displayName=tO;function rO(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(lO(r,{select:t}),document.activeElement!==n)return}function iO(e){let t=aO(e);return[oO(t,e),oO(t.reverse(),e)]}function aO(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oO(e,t){for(let n of e)if(!sO(n,{upTo:t}))return n}function sO(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 cO(e){return e instanceof HTMLInputElement&&`select`in e}function lO(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cO(e)&&t&&e.select()}}var uO=dO();function dO(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=fO(e,t),e.unshift(t)},remove(t){e=fO(e,t),e[0]?.resume()}}}function fO(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pO(e){return e.filter(e=>e.tagName!==`A`)}var mO=O.useId||(()=>void 0),hO=0;function gO(e){let[t,n]=O.useState(mO());return Kc(()=>{e||n(e=>e??String(hO++))},[e]),e||(t?`radix-${t}`:``)}var _O=[`top`,`right`,`bottom`,`left`],vO=Math.min,yO=Math.max,bO=Math.round,xO=Math.floor,SO=e=>({x:e,y:e}),CO={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function wO(e,t,n){return yO(e,vO(t,n))}function TO(e,t){return typeof e==`function`?e(t):e}function EO(e){return e.split(`-`)[0]}function DO(e){return e.split(`-`)[1]}function OO(e){return e===`x`?`y`:`x`}function kO(e){return e===`y`?`height`:`width`}function AO(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function jO(e){return OO(AO(e))}function MO(e,t,n){n===void 0&&(n=!1);let r=DO(e),i=jO(e),a=kO(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=VO(o)),[o,VO(o)]}function NO(e){let t=VO(e);return[PO(e),t,PO(t)]}function PO(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var FO=[`left`,`right`],IO=[`right`,`left`],LO=[`top`,`bottom`],RO=[`bottom`,`top`];function zO(e,t,n){switch(e){case`top`:case`bottom`:return n?t?IO:FO:t?FO:IO;case`left`:case`right`:return t?LO:RO;default:return[]}}function BO(e,t,n,r){let i=DO(e),a=zO(EO(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(PO)))),a}function VO(e){let t=EO(e);return CO[t]+e.slice(t.length)}function HO(e){return{top:0,right:0,bottom:0,left:0,...e}}function UO(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:HO(e)}function WO(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function GO(e,t,n){let{reference:r,floating:i}=e,a=AO(t),o=jO(t),s=kO(o),c=EO(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(DO(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function KO(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=TO(t,e),p=UO(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=WO(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=WO(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var qO=50,JO=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:KO},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=GO(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<qO&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=GO(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},YO=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=TO(e,t)||{};if(l==null)return{};let d=UO(u),f={x:n,y:r},p=jO(i),m=kO(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=vO(d[_],T),D=vO(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=wO(O,A,k),M=!c.arrow&&DO(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),XO=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=TO(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=EO(r),_=AO(o),v=EO(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[VO(o)]:NO(o)),x=p!==`none`;!d&&x&&b.push(...BO(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=MO(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==AO(t))||T.every(e=>AO(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=AO(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ZO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QO(e){return _O.some(t=>e[t]>=0)}var $O=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=TO(e,t);switch(i){case`referenceHidden`:{let e=ZO(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:QO(e)}}}case`escaped`:{let e=ZO(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:QO(e)}}}default:return{}}}}},ek=new Set([`left`,`top`]);async function tk(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=EO(n),s=DO(n),c=AO(n)===`y`,l=ek.has(o)?-1:1,u=a&&c?-1:1,d=TO(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var nk=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await tk(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},rk=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=TO(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=AO(EO(i)),p=OO(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=wO(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=wO(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},ik=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=TO(e,t),u={x:n,y:r},d=AO(i),f=OO(d),p=u[f],m=u[d],h=TO(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ek.has(EO(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ak=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=TO(e,t),u=await o.detectOverflow(t,l),d=EO(i),f=DO(i),p=AO(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=vO(h-u[g],v),x=vO(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=yO(u.left,0),t=yO(u.right,0),n=yO(u.top,0),r=yO(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:yO(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:yO(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ok(){return typeof window<`u`}function sk(e){return uk(e)?(e.nodeName||``).toLowerCase():`#document`}function ck(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lk(e){return((uk(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function uk(e){return ok()?e instanceof Node||e instanceof ck(e).Node:!1}function dk(e){return ok()?e instanceof Element||e instanceof ck(e).Element:!1}function fk(e){return ok()?e instanceof HTMLElement||e instanceof ck(e).HTMLElement:!1}function pk(e){return!ok()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ck(e).ShadowRoot}function mk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Tk(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function hk(e){return/^(table|td|th)$/.test(sk(e))}function gk(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var _k=/transform|translate|scale|rotate|perspective|filter/,vk=/paint|layout|strict|content/,yk=e=>!!e&&e!==`none`,bk;function xk(e){let t=dk(e)?Tk(e):e;return yk(t.transform)||yk(t.translate)||yk(t.scale)||yk(t.rotate)||yk(t.perspective)||!Ck()&&(yk(t.backdropFilter)||yk(t.filter))||_k.test(t.willChange||``)||vk.test(t.contain||``)}function Sk(e){let t=Dk(e);for(;fk(t)&&!wk(t);){if(xk(t))return t;if(gk(t))return null;t=Dk(t)}return null}function Ck(){return bk??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),bk}function wk(e){return/^(html|body|#document)$/.test(sk(e))}function Tk(e){return ck(e).getComputedStyle(e)}function Ek(e){return dk(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dk(e){if(sk(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||pk(e)&&e.host||lk(e);return pk(t)?t.host:t}function Ok(e){let t=Dk(e);return wk(t)?e.ownerDocument?e.ownerDocument.body:e.body:fk(t)&&mk(t)?t:Ok(t)}function kk(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ok(e),i=r===e.ownerDocument?.body,a=ck(r);if(i){let e=Ak(a);return t.concat(a,a.visualViewport||[],mk(r)?r:[],e&&n?kk(e):[])}else return t.concat(r,kk(r,[],n))}function Ak(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jk(e){let t=Tk(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=fk(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bO(n)!==a||bO(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Mk(e){return dk(e)?e:e.contextElement}function Nk(e){let t=Mk(e);if(!fk(t))return SO(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=jk(t),o=(a?bO(n.width):n.width)/r,s=(a?bO(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Pk=SO(0);function Fk(e){let t=ck(e);return!Ck()||!t.visualViewport?Pk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ik(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ck(e)?!1:t}function Lk(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Mk(e),o=SO(1);t&&(r?dk(r)&&(o=Nk(r)):o=Nk(e));let s=Ik(a,n,r)?Fk(a):SO(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ck(a),t=r&&dk(r)?ck(r):r,n=e,i=Ak(n);for(;i&&r&&t!==n;){let e=Nk(i),t=i.getBoundingClientRect(),r=Tk(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ck(i),i=Ak(n)}}return WO({width:u,height:d,x:c,y:l})}function Rk(e,t){let n=Ek(e).scrollLeft;return t?t.left+n:Lk(lk(e)).left+n}function zk(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Rk(e,n),y:n.top+t.scrollTop}}function Bk(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=lk(r),s=t?gk(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=SO(1),u=SO(0),d=fk(r);if((d||!d&&!a)&&((sk(r)!==`body`||mk(o))&&(c=Ek(r)),d)){let e=Lk(r);l=Nk(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?zk(o,c):SO(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Vk(e){return Array.from(e.getClientRects())}function Hk(e){let t=lk(e),n=Ek(e),r=e.ownerDocument.body,i=yO(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=yO(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Rk(e),s=-n.scrollTop;return Tk(r).direction===`rtl`&&(o+=yO(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Uk=25;function Wk(e,t){let n=ck(e),r=lk(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ck();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Rk(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Uk&&(a-=o)}else l<=Uk&&(a+=l);return{width:a,height:o,x:s,y:c}}function Gk(e,t){let n=Lk(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fk(e)?Nk(e):SO(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Kk(e,t,n){let r;if(t===`viewport`)r=Wk(e,n);else if(t===`document`)r=Hk(lk(e));else if(dk(t))r=Gk(t,n);else{let n=Fk(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return WO(r)}function qk(e,t){let n=Dk(e);return n===t||!dk(n)||wk(n)?!1:Tk(n).position===`fixed`||qk(n,t)}function Jk(e,t){let n=t.get(e);if(n)return n;let r=kk(e,[],!1).filter(e=>dk(e)&&sk(e)!==`body`),i=null,a=Tk(e).position===`fixed`,o=a?Dk(e):e;for(;dk(o)&&!wk(o);){let t=Tk(o),n=xk(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||mk(o)&&!n&&qk(e,o))?r=r.filter(e=>e!==o):i=t,o=Dk(o)}return t.set(e,r),r}function Yk(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?gk(t)?[]:Jk(t,this._c):[].concat(n),r],o=Kk(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Kk(t,a[e],i);s=yO(n.top,s),c=vO(n.right,c),l=vO(n.bottom,l),u=yO(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Xk(e){let{width:t,height:n}=jk(e);return{width:t,height:n}}function Zk(e,t,n){let r=fk(t),i=lk(t),a=n===`fixed`,o=Lk(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=SO(0);function l(){c.x=Rk(i)}if(r||!r&&!a)if((sk(t)!==`body`||mk(i))&&(s=Ek(t)),r){let e=Lk(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?zk(i,s):SO(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Qk(e){return Tk(e).position===`static`}function $k(e,t){if(!fk(e)||Tk(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return lk(e)===n&&(n=n.ownerDocument.body),n}function eA(e,t){let n=ck(e);if(gk(e))return n;if(!fk(e)){let t=Dk(e);for(;t&&!wk(t);){if(dk(t)&&!Qk(t))return t;t=Dk(t)}return n}let r=$k(e,t);for(;r&&hk(r)&&Qk(r);)r=$k(r,t);return r&&wk(r)&&Qk(r)&&!xk(r)?n:r||Sk(e)||n}var tA=async function(e){let t=this.getOffsetParent||eA,n=this.getDimensions,r=await n(e.floating);return{reference:Zk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nA(e){return Tk(e).direction===`rtl`}var rA={convertOffsetParentRelativeRectToViewportRelativeRect:Bk,getDocumentElement:lk,getClippingRect:Yk,getOffsetParent:eA,getElementRects:tA,getClientRects:Vk,getDimensions:Xk,getScale:Nk,isElement:dk,isRTL:nA};function iA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aA(e,t){let n=null,r,i=lk(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=xO(d),h=xO(i.clientWidth-(u+f)),g=xO(i.clientHeight-(d+p)),_=xO(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:yO(0,vO(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!iA(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function oA(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Mk(e),u=i||a?[...l?kk(l):[],...t?kk(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?aA(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Lk(e):null;c&&g();function g(){let t=Lk(e);h&&!iA(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var sA=nk,cA=rk,lA=XO,uA=ak,dA=$O,fA=YO,pA=ik,mA=(e,t,n)=>{let r=new Map,i={platform:rA,...n},a={...i.platform,_c:r};return JO(e,t,{...i,platform:a})},hA=typeof document<`u`?O.useLayoutEffect:function(){};function gA(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,i;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(!gA(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!gA(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function _A(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vA(e,t){let n=_A(e);return Math.round(t*n)/n}function yA(e){let t=O.useRef(e);return hA(()=>{t.current=e}),t}function bA(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=O.useState(r);gA(f,r)||p(r);let[m,h]=O.useState(null),[g,_]=O.useState(null),v=O.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=O.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=O.useRef(null),C=O.useRef(null),w=O.useRef(u),T=c!=null,E=yA(c),D=yA(i),k=yA(l),A=O.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),mA(S.current,C.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!gA(w.current,t)&&(w.current=t,Dc.flushSync(()=>{d(t)}))})},[f,t,n,D,k]);hA(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=O.useRef(!1);hA(()=>(j.current=!0,()=>{j.current=!1}),[]),hA(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,A);A()}},[b,x,A,E,T]);let M=O.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),N=O.useMemo(()=>({reference:b,floating:x}),[b,x]),P=O.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=vA(N.floating,u.x),r=vA(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,..._A(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var xA=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:fA({element:r.current,padding:i}).fn(n):r?fA({element:r,padding:i}).fn(n):{}}}},SA=(e,t)=>{let n=sA(e);return{name:n.name,fn:n.fn,options:[e,t]}},CA=(e,t)=>{let n=cA(e);return{name:n.name,fn:n.fn,options:[e,t]}},wA=(e,t)=>({fn:pA(e).fn,options:[e,t]}),TA=(e,t)=>{let n=lA(e);return{name:n.name,fn:n.fn,options:[e,t]}},EA=(e,t)=>{let n=uA(e);return{name:n.name,fn:n.fn,options:[e,t]}},DA=(e,t)=>{let n=dA(e);return{name:n.name,fn:n.fn,options:[e,t]}},OA=(e,t)=>{let n=xA(e);return{name:n.name,fn:n.fn,options:[e,t]}},kA=`Arrow`,AA=O.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,k.jsx)(G.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,k.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});AA.displayName=kA;var jA=AA;function MA(e){let[t,n]=O.useState(void 0);return Kc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var NA=`Popper`,[PA,FA]=vc(NA),[IA,LA]=PA(NA),RA=e=>{let{__scopePopper:t,children:n}=e,[r,i]=O.useState(null);return(0,k.jsx)(IA,{scope:t,anchor:r,onAnchorChange:i,children:n})};RA.displayName=NA;var zA=`PopperAnchor`,BA=O.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=LA(zA,n),o=O.useRef(null),s=gc(t,o),c=O.useRef(null);return O.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,k.jsx)(G.div,{...i,ref:s})});BA.displayName=zA;var VA=`PopperContent`,[HA,UA]=PA(VA),WA=O.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=LA(VA,n),[_,v]=O.useState(null),y=gc(t,e=>v(e)),[b,x]=O.useState(null),S=MA(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],A=D.length>0,j={padding:E,boundary:D.filter(JA),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=bA({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>oA(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[SA({mainAxis:i+w,alignmentAxis:o}),c&&CA({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?wA():void 0,...j}),c&&TA({...j}),EA({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&OA({element:b,padding:s}),YA({arrowWidth:C,arrowHeight:w}),f&&DA({strategy:`referenceHidden`,...j})]}),[L,ee]=XA(P),te=kc(m);Kc(()=>{F&&te?.()},[F,te]);let ne=I.arrow?.x,re=I.arrow?.y,R=I.arrow?.centerOffset!==0,[z,ie]=O.useState();return Kc(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),(0,k.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,k.jsx)(HA,{scope:n,placedSide:L,onArrowChange:x,arrowX:ne,arrowY:re,shouldHideArrow:R,children:(0,k.jsx)(G.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:F?void 0:`none`}})})})});WA.displayName=VA;var GA=`PopperArrow`,KA={top:`bottom`,right:`left`,bottom:`top`,left:`right`},qA=O.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=UA(GA,n),a=KA[i.placedSide];return(0,k.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,k.jsx)(jA,{...r,ref:t,style:{...r.style,display:`block`}})})});qA.displayName=GA;function JA(e){return e!==null}var YA=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=XA(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function XA(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var ZA=RA,QA=BA,$A=WA,ej=qA;function tj(e){let t=O.useRef({value:e,previous:e});return O.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nj=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},rj=new WeakMap,ij=new WeakMap,aj={},oj=0,sj=function(e){return e&&(e.host||sj(e.parentNode))},cj=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=sj(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},lj=function(e,t,n,r){var i=cj(t,Array.isArray(e)?e:[e]);aj[n]||(aj[n]=new WeakMap);var a=aj[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(rj.get(e)||0)+1,l=(a.get(e)||0)+1;rj.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ij.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),oj++,function(){o.forEach(function(e){var t=rj.get(e)-1,i=a.get(e)-1;rj.set(e,t),a.set(e,i),t||(ij.has(e)||e.removeAttribute(r),ij.delete(e)),i||e.removeAttribute(n)}),oj--,oj||(rj=new WeakMap,rj=new WeakMap,ij=new WeakMap,aj={})}},uj=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||nj(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),lj(r,i,n,`aria-hidden`)):function(){return null}},dj=function(){return dj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dj.apply(this,arguments)};function fj(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pj(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var mj=`right-scroll-bar-position`,hj=`width-before-scroll-bar`,gj=`with-scroll-bars-hidden`,_j=`--removed-body-scroll-bar-size`;function vj(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function yj(e,t){var n=(0,O.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var bj=typeof window<`u`?O.useLayoutEffect:O.useEffect,xj=new WeakMap;function Sj(e,t){var n=yj(t||null,function(t){return e.forEach(function(e){return vj(e,t)})});return bj(function(){var t=xj.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||vj(e,null)}),i.forEach(function(e){r.has(e)||vj(e,a)})}xj.set(n,e)},[e]),n}function Cj(e){return e}function wj(e,t){t===void 0&&(t=Cj);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Tj(e){e===void 0&&(e={});var t=wj(null);return t.options=dj({async:!0,ssr:!1},e),t}var Ej=function(e){var t=e.sideCar,n=fj(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return O.createElement(r,dj({},n))};Ej.isSideCarExport=!0;function Dj(e,t){return e.useMedium(t),Ej}var Oj=Tj(),kj=function(){},Aj=O.forwardRef(function(e,t){var n=O.useRef(null),r=O.useState({onScrollCapture:kj,onWheelCapture:kj,onTouchMoveCapture:kj}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=fj(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Sj([n,t]),C=dj(dj({},b),i);return O.createElement(O.Fragment,null,u&&O.createElement(x,{sideCar:Oj,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?O.cloneElement(O.Children.only(s),dj(dj({},C),{ref:S})):O.createElement(v,dj({},C,{className:c,ref:S}),s))});Aj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Aj.classNames={fullWidth:hj,zeroRight:mj};var jj,Mj=function(){if(jj)return jj;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Nj(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Mj();return t&&e.setAttribute(`nonce`,t),e}function Pj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fj(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ij=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nj())&&(Pj(t,n),Fj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lj=function(){var e=Ij();return function(t,n){O.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Rj=function(){var e=Lj();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},zj={left:0,top:0,right:0,gap:0},Bj=function(e){return parseInt(e||``,10)||0},Vj=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Bj(n),Bj(r),Bj(i)]},Hj=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return zj;var t=Vj(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])}},Uj=Rj(),Wj=`data-scroll-locked`,Gj=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
60
60
  .${gj} {
61
61
  overflow: hidden ${r};
62
62
  padding-right: ${s}px ${r};
@@ -96,7 +96,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
96
96
  `},Kj=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},qj=function(){O.useEffect(function(){return document.body.setAttribute(Wj,(Kj()+1).toString()),function(){var e=Kj()-1;e<=0?document.body.removeAttribute(Wj):document.body.setAttribute(Wj,e.toString())}},[])},Jj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;qj();var a=O.useMemo(function(){return Hj(i)},[i]);return O.createElement(Uj,{styles:Gj(a,!t,i,n?``:`!important`)})},Yj=!1;if(typeof window<`u`)try{var Xj=Object.defineProperty({},`passive`,{get:function(){return Yj=!0,!0}});window.addEventListener(`test`,Xj,Xj),window.removeEventListener(`test`,Xj,Xj)}catch{Yj=!1}var Zj=Yj?{passive:!1}:!1,Qj=function(e){return e.tagName===`TEXTAREA`},$j=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Qj(e)&&n[t]===`visible`)},eM=function(e){return $j(e,`overflowY`)},tM=function(e){return $j(e,`overflowX`)},nM=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),aM(e,r)){var i=oM(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rM=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},iM=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},aM=function(e,t){return e===`v`?eM(t):tM(t)},oM=function(e,t){return e===`v`?rM(t):iM(t)},sM=function(e,t){return e===`h`&&t===`rtl`?-1:1},cM=function(e,t,n,r,i){var a=sM(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=oM(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&aM(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},lM=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uM=function(e){return[e.deltaX,e.deltaY]},dM=function(e){return e&&`current`in e?e.current:e},fM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pM=function(e){return`
97
97
  .block-interactivity-${e} {pointer-events: none;}
98
98
  .allow-interactivity-${e} {pointer-events: all;}
99
- `},mM=0,hM=[];function gM(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState(mM++)[0],a=O.useState(Rj)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=pj([e.lockRef.current],(e.shards||[]).map(dM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=O.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=lM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=nM(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=nM(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return cM(h,t,e,h===`h`?s:c,!0)},[]),c=O.useCallback(function(e){var n=e;if(!(!hM.length||hM[hM.length-1]!==a)){var r=`deltaY`in n?uM(n):lM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&fM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(dM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=O.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:_M(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=O.useCallback(function(e){n.current=lM(e),r.current=void 0},[]),d=O.useCallback(function(t){l(t.type,uM(t),t.target,s(t,e.lockRef.current))},[]),f=O.useCallback(function(t){l(t.type,lM(t),t.target,s(t,e.lockRef.current))},[]);O.useEffect(function(){return hM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Zj),document.addEventListener(`touchmove`,c,Zj),document.addEventListener(`touchstart`,u,Zj),function(){hM=hM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Zj),document.removeEventListener(`touchmove`,c,Zj),document.removeEventListener(`touchstart`,u,Zj)}},[]);var p=e.removeScrollBar,m=e.inert;return O.createElement(O.Fragment,null,m?O.createElement(a,{styles:pM(i)}):null,p?O.createElement(Jj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _M(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var vM=Dj(Oj,gM),yM=O.forwardRef(function(e,t){return O.createElement(Aj,dj({},e,{ref:t,sideCar:vM}))});yM.classNames=Aj.classNames;var bM=[` `,`Enter`,`ArrowUp`,`ArrowDown`],xM=[` `,`Enter`],SM=`Select`,[CM,wM,TM]=Ec(SM),[EM,DM]=vc(SM,[TM,FA]),OM=FA(),[kM,AM]=EM(SM),[jM,MM]=EM(SM),NM=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=OM(t),[g,_]=O.useState(null),[v,y]=O.useState(null),[b,x]=O.useState(!1),S=JD(l),[C,w]=tl({prop:r,defaultProp:i??!1,onChange:a,caller:SM}),[T,E]=tl({prop:o,defaultProp:s,onChange:c,caller:SM}),D=O.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=O.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,k.jsx)(ZA,{...h,children:(0,k.jsxs)(kM,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:gO(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,k.jsx)(CM.Provider,{scope:t,children:(0,k.jsx)(jM,{scope:e.__scopeSelect,onNativeOptionAdd:O.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:O.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,k.jsxs)(ON,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,k.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};NM.displayName=SM;var PM=`SelectTrigger`,FM=O.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=OM(n),o=AM(PM,n),s=o.disabled||r,c=gc(t,o.onTriggerChange),l=wM(n),u=O.useRef(`touch`),[d,f,p]=AN(e=>{let t=l().filter(e=>!e.disabled),n=jN(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,k.jsx)(QA,{asChild:!0,...a,children:(0,k.jsx)(G.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":kN(o.value)?``:void 0,...i,ref:c,onClick:pc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:pc(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:pc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&bM.includes(e.key)&&(m(),e.preventDefault())})})})});FM.displayName=PM;var IM=`SelectValue`,LM=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=AM(IM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=gc(t,c.onValueNodeChange);return Kc(()=>{l(u)},[l,u]),(0,k.jsx)(G.span,{...s,ref:d,style:{pointerEvents:`none`},children:kN(c.value)?(0,k.jsx)(k.Fragment,{children:o}):a})});LM.displayName=IM;var RM=`SelectIcon`,zM=O.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,k.jsx)(G.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});zM.displayName=RM;var BM=`SelectPortal`,VM=e=>(0,k.jsx)(Jc,{asChild:!0,...e});VM.displayName=BM;var HM=`SelectContent`,UM=O.forwardRef((e,t)=>{let n=AM(HM,e.__scopeSelect),[r,i]=O.useState();if(Kc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Dc.createPortal((0,k.jsx)(GM,{scope:e.__scopeSelect,children:(0,k.jsx)(CM.Slot,{scope:e.__scopeSelect,children:(0,k.jsx)(`div`,{children:e.children})})}),t):null}return(0,k.jsx)(YM,{...e,ref:t})});UM.displayName=HM;var WM=10,[GM,KM]=EM(HM),qM=`SelectContentImpl`,JM=bc(`SelectContent.RemoveScroll`),YM=O.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=AM(HM,n),[y,b]=O.useState(null),[x,S]=O.useState(null),C=gc(t,e=>b(e)),[w,T]=O.useState(null),[E,D]=O.useState(null),A=wM(n),[j,M]=O.useState(!1),N=O.useRef(!1);O.useEffect(()=>{if(y)return uj(y)},[y]),XD();let P=O.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,x]),F=O.useCallback(()=>P([w,y]),[P,w,y]);O.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=v;O.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null};return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,I,L]),O.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[ee,te]=AN(e=>{let t=A().filter(e=>!e.disabled),n=jN(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=O.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(N.current=!0))},[v.value]),re=O.useCallback(()=>y?.focus(),[y]),R=O.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),z=r===`popper`?$M:ZM,ie=z===$M?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,k.jsx)(GM,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:re,itemTextRefCallback:R,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:j,searchRef:ee,children:(0,k.jsx)(yM,{as:JM,allowPinchZoom:!0,children:(0,k.jsx)(nO,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:pc(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,k.jsx)(Lc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,k.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ie,onPlaced:()=>M(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:pc(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})});YM.displayName=qM;var XM=`SelectItemAlignedPosition`,ZM=O.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=AM(HM,n),o=KM(HM,n),[s,c]=O.useState(null),[l,u]=O.useState(null),d=gc(t,e=>u(e)),f=wM(n),p=O.useRef(!1),m=O.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=O.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-WM,d=KD(a,[WM,Math.max(WM,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-WM,d=KD(a,[WM,Math.max(WM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-WM*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-WM,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${WM}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Kc(()=>y(),[y]);let[b,x]=O.useState();return Kc(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,k.jsx)(eN,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:O.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,k.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,k.jsx)(G.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});ZM.displayName=XM;var QM=`SelectPopperPosition`,$M=O.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=WM,...a}=e,o=OM(n);return(0,k.jsx)($A,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})});$M.displayName=QM;var[eN,tN]=EM(HM,{}),nN=`SelectViewport`,rN=O.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=KM(nN,n),o=tN(nN,n),s=gc(t,a.onViewportChange),c=O.useRef(0);return(0,k.jsxs)(k.Fragment,{children:[(0,k.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}),(0,k.jsx)(CM.Slot,{scope:n,children:(0,k.jsx)(G.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:pc(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-WM*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});rN.displayName=nN;var iN=`SelectGroup`,[aN,oN]=EM(iN),sN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=gO();return(0,k.jsx)(aN,{scope:n,id:i,children:(0,k.jsx)(G.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});sN.displayName=iN;var cN=`SelectLabel`,lN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=oN(cN,n);return(0,k.jsx)(G.div,{id:i.id,...r,ref:t})});lN.displayName=cN;var uN=`SelectItem`,[dN,fN]=EM(uN),pN=O.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=AM(uN,n),c=KM(uN,n),l=s.value===r,[u,d]=O.useState(a??``),[f,p]=O.useState(!1),m=gc(t,e=>c.itemRefCallback?.(e,r,i)),h=gO(),g=O.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw 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(0,k.jsx)(dN,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:O.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,k.jsx)(CM.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,k.jsx)(G.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:pc(o.onFocus,()=>p(!0)),onBlur:pc(o.onBlur,()=>p(!1)),onClick:pc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:pc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:pc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:pc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:pc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(xM.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});pN.displayName=uN;var mN=`SelectItemText`,hN=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=AM(mN,n),s=KM(mN,n),c=fN(mN,n),l=MM(mN,n),[u,d]=O.useState(null),f=gc(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=O.useMemo(()=>(0,k.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Kc(()=>(h(m),()=>g(m)),[h,g,m]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(G.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Dc.createPortal(a.children,o.valueNode):null]})});hN.displayName=mN;var gN=`SelectItemIndicator`,_N=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return fN(gN,n).isSelected?(0,k.jsx)(G.span,{"aria-hidden":!0,...r,ref:t}):null});_N.displayName=gN;var vN=`SelectScrollUpButton`,yN=O.forwardRef((e,t)=>{let n=KM(vN,e.__scopeSelect),r=tN(vN,e.__scopeSelect),[i,a]=O.useState(!1),o=gc(t,r.onScrollButtonChange);return Kc(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,k.jsx)(SN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});yN.displayName=vN;var bN=`SelectScrollDownButton`,xN=O.forwardRef((e,t)=>{let n=KM(bN,e.__scopeSelect),r=tN(bN,e.__scopeSelect),[i,a]=O.useState(!1),o=gc(t,r.onScrollButtonChange);return Kc(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,k.jsx)(SN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});xN.displayName=bN;var SN=O.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=KM(`SelectScrollButton`,n),o=O.useRef(null),s=wM(n),c=O.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return O.useEffect(()=>()=>c(),[c]),Kc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,k.jsx)(G.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:pc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:pc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:pc(i.onPointerLeave,()=>{c()})})}),CN=`SelectSeparator`,wN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,k.jsx)(G.div,{"aria-hidden":!0,...r,ref:t})});wN.displayName=CN;var TN=`SelectArrow`,EN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=OM(n),a=AM(TN,n),o=KM(TN,n);return a.open&&o.position===`popper`?(0,k.jsx)(ej,{...i,...r,ref:t}):null});EN.displayName=TN;var DN=`SelectBubbleInput`,ON=O.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=O.useRef(null),a=gc(r,i),o=tj(t);return O.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,k.jsx)(G.select,{...n,style:{...il,...n.style},ref:a,defaultValue:t})});ON.displayName=DN;function kN(e){return e===``||e===void 0}function AN(e){let t=kc(e),n=O.useRef(``),r=O.useRef(0),i=O.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=O.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return O.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function jN(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=MN(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function MN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NN=NM,PN=FM,FN=LM,IN=zM,LN=VM,RN=UM,zN=rN,BN=sN,VN=lN,HN=pN,UN=hN,WN=_N,GN=yN,KN=xN,qN=wN,JN=NN,YN=BN,XN=FN,ZN=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,k.jsxs)(PN,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,k.jsx)(IN,{asChild:!0,children:(0,k.jsx)(Cu,{className:`size-4 opacity-50`})})]}),QN=({className:e,...t})=>(0,k.jsx)(GN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(Su,{})}),$N=({className:e,...t})=>(0,k.jsx)(KN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(yu,{})}),eP=({className:e,children:t,position:n=`popper`,...r})=>(0,k.jsx)(LN,{children:(0,k.jsxs)(RN,{className:W(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`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`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,k.jsx)(QN,{}),(0,k.jsx)(zN,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,k.jsx)($N,{})]})}),tP=({className:e,...t})=>(0,k.jsx)(VN,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),nP=({className:e,children:t,...n})=>(0,k.jsxs)(HN,{className:W(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,k.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,k.jsx)(WN,{children:(0,k.jsx)(vu,{className:`size-4`})})}),(0,k.jsx)(UN,{children:t})]}),rP=({className:e,...t})=>(0,k.jsx)(qN,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=JN;J.Group=YN,J.Value=XN,J.Trigger=ZN,J.ScrollUpButton=QN,J.ScrollDownButton=$N,J.Content=eP,J.Label=tP,J.Item=nP,J.Separator=rP;var iP=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},aP=e=>{let t=(0,B.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=iP(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,O.useState)(a??null),[l,u]=(0,O.useState)(o??null),d,f;t[2]!==s||t[3]!==a||t[4]!==o||t[5]!==l||t[6]!==r?(d=()=>{s&&l&&(s!==a||l!==o)&&r(`${s}${l}`)},f=[s,a,o,l,r],t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=r,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,O.useEffect)(d,f);let p;if(t[9]!==a||t[10]!==l){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>u(e.target.value),t[12]=e):e=t[12],p=(0,k.jsxs)(`div`,{className:`flex gap-1`,children:[(0,k.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,k.jsx)(J.Trigger,{className:`w-20`,children:(0,k.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`<`,children:`<`}),(0,k.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,k.jsx)(J.Item,{value:`=`,children:`=`}),(0,k.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,k.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,k.jsx)(KC,{type:`number`,"aria-label":`Quantity`,defaultValue:l??void 0,onChange:e,className:`min-w-4`})]}),t[9]=a,t[10]=l,t[11]=p}else p=t[11];return p},oP=({rawContent:e})=>{let[t,n]=(0,O.useState)(``);return(0,O.useEffect)(()=>{Le(async()=>{let{default:e}=await import(`./purify.es-DF7xWCvs.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?(0,k.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t}}):(0,k.jsx)(`div`,{})},sP=(0,O.lazy)(()=>Le(()=>import(`./MarkDownRender-QZTdMbU7.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1]))),cP=(0,O.memo)(function(e){let t=(0,B.c)(2),{label:n,...r}=e,[i,a]=(0,O.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,k.jsx)(aS,{header:n,label:n,onToggle:o,children:i?(0,k.jsx)(EP,{...r}):null})}),lP=e=>{let t=(0,B.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=FC(),s=NC(),{mutate:c,isPending:l}=xD(),u;t[0]!==o||t[1]!==r||t[2]!==n?(u=e=>o(r.localId,e,n),t[0]=o,t[1]=r,t[2]=n,t[3]=u):u=t[3];let d;return t[4]!==o||t[5]!==c||t[6]!==s?.ai?.apiKey||t[7]!==s?.ai?.model||t[8]!==s?.ai?.temperature||t[9]!==s?.internationalization||t[10]!==r||t[11]!==a||t[12]!==n?(d=()=>{c({fileContent:JSON.stringify({...r,...a?.[r.localId]??{}}),keyPath:n,locales:s?.internationalization.locales??[],aiOptions:{apiKey:s?.ai?.apiKey,model:s?.ai?.model,temperature:s?.ai?.temperature}},{onSuccess:e=>{if(e?.data)try{let t=e.data.fileContent;o(r.localId,t,n)}catch(e){console.error(e)}}})},t[4]=o,t[5]=c,t[6]=s?.ai?.apiKey,t[7]=s?.ai?.model,t[8]=s?.ai?.temperature,t[9]=s?.internationalization,t[10]=r,t[11]=a,t[12]=n,t[13]=d):d=t[13],(0,k.jsx)(VD,{variant:`default`,onContentChange:u,additionalButtons:(0,k.jsx)(rS,{Icon:Vu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},uP=e=>{let t=(0,B.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=FC(),o;return t[0]!==a||t[1]!==r||t[2]!==n?(o=e=>a(r.localId,e,n),t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3],(0,k.jsx)(yw,{variant:`default`,onContentChange:o,...i})},dP=[{content:`False`,value:!1},{content:`True`,value:!0}],fP=e=>{let t=(0,B.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=FC(),o;return t[0]!==a||t[1]!==n||t[2]!==r?(o=e=>a(n.localId,e,r),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3],(0,k.jsx)(vS,{choices:dP,value:!0,onChange:o,color:`text`,size:`sm`,...i})},pP=e=>{let t=(0,B.c)(15),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=bt(),{selectedLocales:c}=_w(),l=n[M],u;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==c){let e;t[8]!==l||t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o||t[13]!==a?(e=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:lt(e,o)})}),(0,k.jsx)(`tr`,{className:`flex`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:l[e]??aC(l[s]),keyPath:[...r,{type:M,key:e}],dictionary:i,renderSection:a})})})]},t)},t[8]=l,t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=a,t[14]=e):e=t[14],u=(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:c.map(e)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=c,t[7]=u}else u=t[7];return u},mP=e=>{let t=(0,B.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=FC(),{addNewEnumeration:s,removeEnumeration:c}=yt(mw),l=n[N],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,aC(l[d])??``,[...r,{type:N,key:`unknown`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[N]).map(e=>{let t=[...r,{type:N,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(`div`,{className:`flex flex-1`,children:(0,k.jsx)(rS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Bu,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,k.jsx)(`tr`,{className:`w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(aP,{value:e,onChange:t=>{let a=n[N],s=WD(a,e,t),c={...n,[N]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(EP,{section:l[e]??aC(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,k.jsx)(rS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Iu,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},hP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[F];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:i[e]??aC(i.true),keyPath:[...t,{type:F,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},gP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[se];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:i[e]??aC(i.male),keyPath:[...t,{type:se,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},_P=[`zero`,`one`,`two`,`few`,`many`,`other`],vP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[P];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:_P.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:e})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:i[e]??aC(i.other),keyPath:[...t,{type:P,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},yP=e=>{let t=(0,B.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=FC(),{addNewElement:s,removeElement:c}=yt(mw),l;if(t[0]!==o||t[1]!==s.label.value||t[2]!==s.text||t[3]!==i||t[4]!==r||t[5]!==c||t[6]!==a||t[7]!==n){let e;t[9]!==o||t[10]!==i||t[11]!==r||t[12]!==c||t[13]!==a||t[14]!==n[0]?(e=(e,t)=>{let s=`${JSON.stringify(r)}-array-${t}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,k.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,k.jsx)(rS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:te,key:t}];o(i.localId,void 0,e)},Icon:Bu,children:c.text})]})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:e??aC(n[0]),keyPath:[...r,{type:te,key:t}],dictionary:i,renderSection:a})})})]},s)},t[9]=o,t[10]=i,t[11]=r,t[12]=c,t[13]=a,t[14]=n[0],t[15]=e):e=t[15];let u;t[16]!==o||t[17]!==i||t[18]!==r||t[19]!==n[0]||t[20]!==n.length?(u=()=>{let e=[...r,{type:te,key:n.length}];o(i.localId,aC(n[0])??``,e,!1)},t[16]=o,t[17]=i,t[18]=r,t[19]=n[0],t[20]=n.length,t[21]=u):u=t[21],l=(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,k.jsx)(rS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Iu,children:s.text})]}),t[0]=o,t[1]=s.label.value,t[2]=s.text,t[3]=i,t[4]=r,t[5]=c,t[6]=a,t[7]=n,t[8]=l}else l=t[8];return l},bP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:ee,key:e}],s=i[e]??aC(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(EP,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,k.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(cP,{label:ht(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},xP=e=>{let t=(0,B.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,O.useState)(0),s;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],c=[...r,{type:z}],l=n[z];s=(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(vS,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(DP,{section:l,keyPath:c,dictionary:i,renderSection:a===1?OP:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},SP=e=>{let t=(0,B.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,O.useState)(0),c;if(t[0]!==i||t[1]!==a||t[2]!==r||t[3]!==o||t[4]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],l=[...r,{type:R}],u=n.markdown??``,d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(eS,{}),children:(0,k.jsx)(sP,{isDarkMode:a,children:e})}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(vS,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(DP,{section:u,keyPath:l,dictionary:i,renderSection:d})]}),t[0]=i,t[1]=a,t[2]=r,t[3]=o,t[4]=n,t[5]=c}else c=t[5];return c},CP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:I}],i=e[I];return(0,k.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,k.jsx)(DP,{section:i,keyPath:r,...n})})},wP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:L}],i=e[L],{content:a}=e;return(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,k.jsx)(DP,{section:a,keyPath:r,...n})]})},TP=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=FC(),s=i[ne],c=[...t,{type:ne}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,k.jsx)(GD,{children:`Dictionary key`}),(0,k.jsx)(yw,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,k.jsx)(GD,{children:`Path (optional)`}),(0,k.jsx)(yw,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},EP=(0,O.memo)(function(e){let t=(0,B.c)(82),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=yt(mw),c,l;if(t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==a||t[4]!==n||t[5]!==s){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=lC(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,k.jsx)(`span`,{children:`(React Node)`}),(0,k.jsx)(`span`,{className:`flex text-neutral text-xs`,children:s})]}),t[8]=s,t[9]=e),l=e;break bb0}if(e===`nested`){let e;t[10]!==i||t[11]!==r||t[12]!==a||t[13]!==n?(e=(0,k.jsx)(TP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[10]=i,t[11]=r,t[12]=a,t[13]=n,t[14]=e):e=t[14],l=e;break bb0}if(e===`translation`){let e;t[15]!==i||t[16]!==r||t[17]!==a||t[18]!==n?(e=(0,k.jsx)(pP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[15]=i,t[16]=r,t[17]=a,t[18]=n,t[19]=e):e=t[19],l=e;break bb0}if(e===`enumeration`){let e;t[20]!==i||t[21]!==r||t[22]!==a||t[23]!==n?(e=(0,k.jsx)(mP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[20]=i,t[21]=r,t[22]=a,t[23]=n,t[24]=e):e=t[24],l=e;break bb0}if(e===`condition`){let e;t[25]!==i||t[26]!==r||t[27]!==a||t[28]!==n?(e=(0,k.jsx)(hP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[25]=i,t[26]=r,t[27]=a,t[28]=n,t[29]=e):e=t[29],l=e;break bb0}if(e===`gender`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,k.jsx)(gP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[30]=i,t[31]=r,t[32]=a,t[33]=n,t[34]=e):e=t[34],l=e;break bb0}if(e===`plural`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,k.jsx)(vP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[35]=i,t[36]=r,t[37]=a,t[38]=n,t[39]=e):e=t[39],l=e;break bb0}if(e===`insertion`){let e;t[40]!==i||t[41]!==r||t[42]!==a||t[43]!==n?(e=(0,k.jsx)(CP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[40]=i,t[41]=r,t[42]=a,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`markdown`){let e;t[45]!==i||t[46]!==o||t[47]!==r||t[48]!==n?(e=(0,k.jsx)(SP,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[45]=i,t[46]=o,t[47]=r,t[48]=n,t[49]=e):e=t[49],l=e;break bb0}if(e===`html`){let e;t[50]!==i||t[51]!==r||t[52]!==n?(e=(0,k.jsx)(xP,{dictionary:i,keyPath:r,section:n}),t[50]=i,t[51]=r,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`file`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,k.jsx)(wP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[54]=i,t[55]=r,t[56]=a,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`array`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,k.jsx)(yP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[59]=i,t[60]=r,t[61]=a,t[62]=n,t[63]=e):e=t[63],l=e;break bb0}if(e===`object`){let e;t[64]!==i||t[65]!==r||t[66]!==a||t[67]!==n?(e=(0,k.jsx)(bP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[64]=i,t[65]=r,t[66]=a,t[67]=n,t[68]=e):e=t[68],l=e;break bb0}if(e===`number`){let e;t[69]!==i||t[70]!==r||t[71]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(uP,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[69]=i,t[70]=r,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`text`){let e;t[73]!==i||t[74]!==r||t[75]!==a||t[76]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,k.jsx)(lP,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[73]=i,t[74]=r,t[75]=a,t[76]=n,t[77]=e):e=t[77],l=e;break bb0}if(e===`boolean`){let e;t[78]!==i||t[79]!==r||t[80]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(fP,{dictionary:i,keyPath:r,value:n})}),t[78]=i,t[79]=r,t[80]=n,t[81]=e):e=t[81],l=e;break bb0}c=(0,k.jsxs)(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(n,null,2),JSON.stringify(r,null,2),`NodeType : `,e]})}t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l}else c=t[6],l=t[7];return l===Symbol.for(`react.early_return_sentinel`)?c:l}),DP=(0,O.memo)(function(e){return(0,k.jsx)(Qx,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:(0,k.jsx)(EP,{...e})})});function OP(e){return(0,k.jsx)(oP,{rawContent:e})}var kP={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},localIds:[`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`]},AP=au(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-5 hover:bg-current/0 aria-[current]:bg-current/5`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},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:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`destructive`,class:`ring-destructive/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`md`}}),jP=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},MP=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(MP):(0,O.isValidElement)(e)?MP(e.props.children):!1,NP=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,...m}=e,h=d??jP(e),g=f??p?.startsWith(`#`)??!1,_=MP(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`,x=l&&p&&!h&&!g?tt(p,l):p;return(0,k.jsxs)(`a`,{href:x===``?void 0:x,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(AP({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,k.jsx)(`span`,{children:i}):i,h&&_&&(0,k.jsx)(Du,{className:`ml-2 inline-block size-4`}),g&&(0,k.jsx)(Mu,{className:`ml-2 inline-block size-4`})]})},PP=e=>e&&{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:``}[e]||``,FP=au(`flex flex-row flex-wrap items-center text-sm`,{variants:{size:{small:`gap-1 text-xs`,medium:`gap-2 text-sm`,large:`gap-3 text-base`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`medium`,spacing:`normal`}}),IP=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Ae(kP).linkLabel;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(NP,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l} ${n}`,itemID:e,size:`sm`,children:(0,k.jsx)(`span`,{itemProp:`name`,children:n})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},LP=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=yt(kP);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rS,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,k.jsx)(`span`,{itemProp:`name`,children:t})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},RP=({children:e,position:t,className:n,...r})=>(0,k.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,k.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,k.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),zP=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,k.jsx)(xu,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,k.jsx)(`nav`,{"aria-label":o,children:(0,k.jsx)(`ol`,{className:W(FP({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,h=PP(n);if(p)return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,k.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},`truncated-${m}`);let g=(0,k.jsx)(RP,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,k.jsx)(IP,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,k.jsx)(LP,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,O.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,k.jsxs)(O.Fragment,{children:[_,(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},m)})})})},BP=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,k.jsx)(zP,{links:[...a?[{text:ht(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:ht(t.key?.toString()??``)}))],locale:r,elementType:`location`,color:i}),VP={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},localIds:[`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`]},HP=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});HP.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,k.jsx)(rS,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),HP.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>(0,k.jsx)(`div`,{className:W(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,k.jsx)(iS,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`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]`,c),...l,children:e})});function UP(e){return Array.isArray?Array.isArray(e):$P(e)===`[object Array]`}function WP(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function GP(e){return e==null?``:WP(e)}function KP(e){return typeof e==`string`}function qP(e){return typeof e==`number`}function JP(e){return e===!0||e===!1||XP(e)&&$P(e)==`[object Boolean]`}function YP(e){return typeof e==`object`}function XP(e){return YP(e)&&e!==null}function ZP(e){return e!=null}function QP(e){return!e.trim().length}function $P(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var eF=`Incorrect 'index' type`,tF=e=>`Invalid value for key ${e}`,nF=e=>`Pattern length exceeds max of ${e}.`,rF=e=>`Missing ${e} property in key`,iF=e=>`Property 'weight' in key '${e}' must be a positive integer`,aF=Object.prototype.hasOwnProperty,oF=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=sF(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function sF(e){let t=null,n=null,r=null,i=1,a=null;if(KP(e)||UP(e))r=e,t=cF(e),n=lF(e);else{if(!aF.call(e,`name`))throw Error(rF(`name`));let o=e.name;if(r=o,aF.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(iF(o));t=cF(o),n=lF(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function cF(e){return UP(e)?e:e.split(`.`)}function lF(e){return UP(e)?e.join(`.`):e}function uF(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(ZP(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!ZP(s))return;if(a===t.length-1&&(KP(s)||qP(s)||JP(s)||typeof s==`bigint`))n.push(o===void 0?GP(s):{v:GP(s),i:o});else if(UP(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,KP(t)?t.split(`.`):t,0),r?n:n[0]}var dF={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},fF={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},pF={location:0,threshold:.6,distance:100},mF={useExtendedSearch:!1,useTokenSearch:!1,getFn:uF,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...fF,...dF,...pF,...mF}),hF=/[^ ]+/g;function gF(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(hF).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var _F=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=gF(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,KP(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();KP(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!ZP(e)||QP(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(ZP(i)){if(UP(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(ZP(n)){if(KP(n)){if(!QP(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(ZP(n.v)){let t=KP(n.v)?n.v:GP(n.v);if(!QP(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(KP(i)&&!QP(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function vF(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new _F({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(sF)),i.setSources(t),i.create(),i}function yF(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new _F({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function bF(e=[],t=Y.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var xF=32;function SF(e,t,n,{location:r=Y.location,distance:i=Y.distance,threshold:a=Y.threshold,findAllMatches:o=Y.findAllMatches,minMatchCharLength:s=Y.minMatchCharLength,includeMatches:c=Y.includeMatches,ignoreLocation:l=Y.ignoreLocation}={}){if(t.length>xF)throw Error(nF(xF));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=bF(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function CF(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function wF(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var TF={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},EF=RegExp(`[`+Object.keys(TF).join(``)+`]`,`g`),DF=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,``).replace(EF,e=>TF[e]):e=>e,OF=class{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?DF(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:CF(e),startIndex:t})},d=this.pattern.length;if(d>xF){let e=0,t=d%xF,n=d-t;for(;e<n;)u(this.pattern.substr(e,xF),e),e+=xF;if(t){let e=d-xF;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?DF(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=SF(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=wF(u)),p}},kF=class{constructor(e){this.pattern=e}static isMultiMatch(e){return AF(e,this.multiRegex)}static isSingleMatch(e){return AF(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function AF(e,t){let n=e.match(t);return n?n[1]:null}var jF=class extends kF{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},MF=class extends kF{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},NF=class extends kF{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},PF=class extends kF{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},FF=class extends kF{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},IF=class extends kF{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},LF=class extends kF{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){super(e),this._bitapSearch=new OF(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},RF=class extends kF{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},zF=[jF,RF,NF,PF,IF,FF,MF,LF],BF=zF.length,VF=`\0`,HF=`|`;function UF(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function WF(e,t={}){return e.replace(/\\\|/g,VF).split(HF).map(e=>{let n=UF(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<BF;){let e=zF[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<BF;){let e=zF[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var GF=new Set([LF.type,RF.type]),KF=class{constructor(e,{isCaseSensitive:t=Y.isCaseSensitive,ignoreDiacritics:n=Y.ignoreDiacritics,includeMatches:r=Y.includeMatches,minMatchCharLength:i=Y.minMatchCharLength,ignoreLocation:a=Y.ignoreLocation,findAllMatches:o=Y.findAllMatches,location:s=Y.location,threshold:c=Y.threshold,distance:l=Y.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?DF(e):e,this.pattern=e,this.query=WF(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?DF(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l){a+=1,s+=d;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(GF.has(e)?o.push(...u):o.push(u))}else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=wF(o)),e}}return{isMatch:!1,score:1}}},qF=[];function JF(...e){qF.push(...e)}function YF(e,t){for(let n=0,r=qF.length;n<r;n+=1){let r=qF[n];if(r.condition(e,t))return new r(e,t)}return new OF(e,t)}var XF={AND:`$and`,OR:`$or`},ZF={PATH:`$path`,PATTERN:`$val`},QF=e=>!!(e[XF.AND]||e[XF.OR]),$F=e=>!!e[ZF.PATH],eI=e=>!UP(e)&&YP(e)&&!QF(e),tI=e=>({[XF.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function nI(e,t,{auto:n=!0}={}){let r=e=>{if(KP(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=YF(e,t)),r}let i=Object.keys(e),a=$F(e);if(!a&&i.length>1&&!QF(e))return r(tI(e));if(eI(e)){let r=a?e[ZF.PATH]:i[0],o=a?e[ZF.PATTERN]:e[r];if(!KP(o))throw Error(tF(r));let s={keyId:lF(r),pattern:o};return n&&(s.searcher=YF(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];UP(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return QF(e)||(e=tI(e)),r(e)}function rI(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function iI(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=rI(e.matches,{ignoreFieldNorm:t})})}var aI=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function oI(e,t){let n=e.matches;t.matches=[],ZP(n)&&n.forEach(e=>{if(!ZP(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function sI(e,t){t.score=e.score}function cI(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(oI),r&&i.push(sI),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var lI=/\b\w+\b/g;function uI({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=DF(n)),n.match(lI)||[]}}}function dI(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function fI(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function pI(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var mI=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new oF(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=YF(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof _F))throw Error(eF);if(this._myIndex=t||vF(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=uI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=dI(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(ZP(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=uI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});fI(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){if(this._invertedIndex)for(let e of n)pI(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&pI(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(KP(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return qP(n)&&n>-1&&(e=e.slice(0,n)),e}let c=qP(n)&&n>0&&KP(e),l;if(c){let t=new aI(n);KP(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=KP(e)?KP(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),iI(l,{ignoreFieldNorm:s}),a&&l.sort(o),qP(n)&&n>-1&&(l=l.slice(0,n));return cI(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!ZP(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=rI(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=nI(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===XF.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(ZP(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!ZP(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=rI(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!ZP(t))return[];let r=[];if(UP(t))t.forEach(({v:t,i,n:a})=>{if(!ZP(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},hI=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=uI({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new OF(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=wF(t)),o}};mI.version=`7.3.0`,mI.createIndex=vF,mI.parseIndex=yF,mI.config=Y,mI.match=function(e,t,n){return YF(e,{...Y,...n}).searchIn(t)},mI.parseQuery=nI,JF(KF),JF(hI),mI.use=function(...e){e.forEach(e=>JF(e))};var gI=`locale-switcher-content`,_I=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=yt(VP),s=(0,O.useRef)(null),{locale:c}=bt(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=_w(),f=(0,O.useMemo)(()=>l.map(e=>({locale:e,englishName:lt(e,`en`),currentLocaleName:lt(e,c),ownLocaleName:lt(e)})),[l,c]),[p,m]=(0,O.useState)(``),[h,g]=hw(`locale-content-selector-see-all-locales`,!1),_=(0,O.useMemo)(()=>new mI(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),v=(0,O.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),y=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},b=e=>{g(e),d(e?l:[c])};return(0,k.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,k.jsxs)(HP,{identifier:gI,children:[(0,k.jsx)(HP.Trigger,{identifier:gI,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,k.jsx)(`div`,{className:`px-2 py-1`,children:(0,k.jsx)(Au,{size:16})}),(0,k.jsx)(Nu,{className:`self-center`,size:16})]})}),(0,k.jsx)(HP.Panel,{identifier:gI,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,k.jsxs)(Qx,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":a.value,children:[t&&(0,k.jsx)(`div`,{className:`m-auto p-2`,children:(0,k.jsx)(vS,{defaultValue:h,onChange:b,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`p-3`,children:(0,k.jsx)(KC,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,k.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:v.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,k.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,k.jsx)(rS,{onClick:()=>y(e),label:`${n} ${r}`,disabled:!(l??l).includes(e),isActive:u.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:(0,k.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,k.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,k.jsx)(vu,{className:`size-full`})}),(0,k.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,k.jsx)(`span`,{dir:ct(e),lang:e,children:i}),(0,k.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,k.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},vI=e=>{let t=oC(e),n=lC(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?vI(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},yI=e=>{let t=(0,B.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,O.useState)(!1),s;return t[0]!==a||t[1]!==r?(s=e=>{e&&!a&&o(!0),r?.(e)},t[0]=a,t[1]=r,t[2]=s):s=t[2],(0,k.jsx)(aS,{...i,onToggle:s,children:a?n:null})},bI=e=>{let t=(0,B.c)(16),{section:n,keyPath:r,dictionary:i}=e,{selectedLocales:a}=_w(),o=rC(n,r,OC()),{addEditedContent:s}=PC(),{setFocusedContentKeyPath:c,focusedContent:l}=AC(),{addNewElement:u,goToField:d}=yt(mw),f=lC(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&dt(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=vI(o);if(!o)return(0,k.jsx)(k.Fragment,{});if(h){let e;return t[2]!==r||t[3]!==c?(e=()=>c(r),t[2]=r,t[3]=c,t[4]=e):e=t[4],(0,k.jsx)(rS,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:xu,children:ht(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,k.jsx)(k.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,k.jsx)(bI,{keyPath:[...r,{type:M,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,k.jsx)(bI,{keyPath:[...r,{type:f,key:e}],section:n,dictionary:i},e))});if(f===`array`){let e;return t[9]!==i||t[10]!==m||t[11]!==d||t[12]!==r||t[13]!==n||t[14]!==c?(e=(e,t)=>{let a=[...r,{type:te,key:t}];return vI(e)?(0,k.jsxs)(rS,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:xu,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,k.jsx)(yI,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(bI,{keyPath:a,section:n,dictionary:i})})})},JSON.stringify(a))},t[9]=i,t[10]=m,t[11]=d,t[12]=r,t[13]=n,t[14]=c,t[15]=e):e=t[15],(0,k.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,k.jsx)(rS,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:te,key:o.length}],t=o,n=aC(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Iu,children:u.text})]})}return typeof o.nodeType==`string`?(0,k.jsx)(bI,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,k.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(o).map(e=>{let t=[...r,{type:ee,key:e}];return vI(rC(n,t))?(0,k.jsx)(rS,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:xu,children:ht(e)},e):(0,k.jsx)(yI,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:ht(e),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(bI,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,k.jsxs)(k.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},xI=e=>{let t=(0,B.c)(16),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=FC(),{focusedContent:c,setFocusedContentKeyPath:l}=AC(),[,u]=(0,O.useTransition)(),d;t[0]!==l||t[1]!==u?(d=e=>u(()=>l(e)),t[0]=l,t[1]=u,t[2]=d):d=t[2];let f=d,p=c?.keyPath,m=s?.[o]?.content===void 0?i:s?.[o]?.content,h=OC(),g;t[3]===p?g=t[4]:(g=p??[],t[3]=p,t[4]=g);let _;t[5]!==h||t[6]!==m||t[7]!==g?(_=rC(m,g,h),t[5]=h,t[6]=m,t[7]=g,t[8]=_):_=t[8];let v=_,y=(0,O.useDeferredValue)(p),b=(0,O.useDeferredValue)(v),x=b!==v,S;t[9]===m?S=t[10]:(S=vI(m),t[9]=m,t[10]=S);let C=S,w=vI(b),T;t[11]!==c?.keyPath||t[12]!==v||t[13]!==f?(T=()=>{v===void 0&&f(c?.keyPath?.slice(0,-1)??[])},t[11]=c?.keyPath,t[12]=v,t[13]=f,t[14]=T):T=t[14];let E;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[15]=E):E=t[15],(0,O.useEffect)(T,E),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,k.jsx)(BP,{dictionaryKey:a,keyPath:p??[],onClickKeyPath:f}),(0,k.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,k.jsx)(_I,{})})]}),(0,k.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof m==`object`&&m&&!C&&Object.keys(m).length>0&&(0,k.jsx)(Qx,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:(0,k.jsx)(bI,{keyPath:[],section:m,dictionary:n})}),(w||(y??[]).length>0)&&(0,k.jsx)(`div`,{className:x?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,k.jsx)(DP,{keyPath:y??[],section:b,dictionary:n,isDarkMode:r})})]})]})},SI=au(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring 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`,success:`border-success bg-success text-success hover:bg-success-500`,error:`border-error bg-error text-error hover:bg-error-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.3px] bg-opacity-0 hover:bg-opacity-30`,hoverable:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-0.5 text-xs`,lg:`px-3 py-1 text-sm`}},defaultVariants:{variant:`default`,color:`primary`,size:`md`}}),CI=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,k.jsxs)(p,{className:W(SI({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,k.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,k.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,k.jsx)(`title`,{children:`Remove badge`}),(0,k.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})},wI=`Dialog`,[TI,EI]=vc(wI),[DI,OI]=TI(wI),kI=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=O.useRef(null),c=O.useRef(null),[l,u]=tl({prop:r,defaultProp:i??!1,onChange:a,caller:wI});return(0,k.jsx)(DI,{scope:t,triggerRef:s,contentRef:c,contentId:gO(),titleId:gO(),descriptionId:gO(),open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};kI.displayName=wI;var AI=`DialogTrigger`,jI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(AI,n),a=gc(t,i.triggerRef);return(0,k.jsx)(G.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ZI(i.open),...r,ref:a,onClick:pc(e.onClick,i.onOpenToggle)})});jI.displayName=AI;var MI=`DialogPortal`,[NI,PI]=TI(MI,{forceMount:void 0}),FI=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=OI(MI,t);return(0,k.jsx)(NI,{scope:t,forceMount:n,children:O.Children.map(r,e=>(0,k.jsx)(Xc,{present:n||a.open,children:(0,k.jsx)(Jc,{asChild:!0,container:i,children:e})}))})};FI.displayName=MI;var II=`DialogOverlay`,LI=O.forwardRef((e,t)=>{let n=PI(II,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=OI(II,e.__scopeDialog);return a.modal?(0,k.jsx)(Xc,{present:r||a.open,children:(0,k.jsx)(zI,{...i,ref:t})}):null});LI.displayName=II;var RI=bc(`DialogOverlay.RemoveScroll`),zI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(II,n);return(0,k.jsx)(yM,{as:RI,allowPinchZoom:!0,shards:[i.contentRef],children:(0,k.jsx)(G.div,{"data-state":ZI(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),BI=`DialogContent`,VI=O.forwardRef((e,t)=>{let n=PI(BI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=OI(BI,e.__scopeDialog);return(0,k.jsx)(Xc,{present:r||a.open,children:a.modal?(0,k.jsx)(HI,{...i,ref:t}):(0,k.jsx)(UI,{...i,ref:t})})});VI.displayName=BI;var HI=O.forwardRef((e,t)=>{let n=OI(BI,e.__scopeDialog),r=O.useRef(null),i=gc(t,n.contentRef,r);return O.useEffect(()=>{let e=r.current;if(e)return uj(e)},[]),(0,k.jsx)(WI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:pc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:pc(e.onFocusOutside,e=>e.preventDefault())})}),UI=O.forwardRef((e,t)=>{let n=OI(BI,e.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return(0,k.jsx)(WI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),WI=O.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=OI(BI,n),c=O.useRef(null),l=gc(t,c);return XD(),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(nO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,k.jsx)(Lc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ZI(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(tL,{titleId:s.titleId}),(0,k.jsx)(rL,{contentRef:c,descriptionId:s.descriptionId})]})]})}),GI=`DialogTitle`,KI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(GI,n);return(0,k.jsx)(G.h2,{id:i.titleId,...r,ref:t})});KI.displayName=GI;var qI=`DialogDescription`,JI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(qI,n);return(0,k.jsx)(G.p,{id:i.descriptionId,...r,ref:t})});JI.displayName=qI;var YI=`DialogClose`,XI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(YI,n);return(0,k.jsx)(G.button,{type:`button`,...r,ref:t,onClick:pc(e.onClick,()=>i.onOpenChange(!1))})});XI.displayName=YI;function ZI(e){return e?`open`:`closed`}var QI=`DialogTitleWarning`,[$I,eL]=_c(QI,{contentName:BI,titleName:GI,docsSlug:`dialog`}),tL=({titleId:e})=>{let t=eL(QI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
99
+ `},mM=0,hM=[];function gM(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState(mM++)[0],a=O.useState(Rj)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=pj([e.lockRef.current],(e.shards||[]).map(dM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=O.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=lM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=nM(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=nM(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return cM(h,t,e,h===`h`?s:c,!0)},[]),c=O.useCallback(function(e){var n=e;if(!(!hM.length||hM[hM.length-1]!==a)){var r=`deltaY`in n?uM(n):lM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&fM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(dM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=O.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:_M(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=O.useCallback(function(e){n.current=lM(e),r.current=void 0},[]),d=O.useCallback(function(t){l(t.type,uM(t),t.target,s(t,e.lockRef.current))},[]),f=O.useCallback(function(t){l(t.type,lM(t),t.target,s(t,e.lockRef.current))},[]);O.useEffect(function(){return hM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Zj),document.addEventListener(`touchmove`,c,Zj),document.addEventListener(`touchstart`,u,Zj),function(){hM=hM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Zj),document.removeEventListener(`touchmove`,c,Zj),document.removeEventListener(`touchstart`,u,Zj)}},[]);var p=e.removeScrollBar,m=e.inert;return O.createElement(O.Fragment,null,m?O.createElement(a,{styles:pM(i)}):null,p?O.createElement(Jj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _M(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var vM=Dj(Oj,gM),yM=O.forwardRef(function(e,t){return O.createElement(Aj,dj({},e,{ref:t,sideCar:vM}))});yM.classNames=Aj.classNames;var bM=[` `,`Enter`,`ArrowUp`,`ArrowDown`],xM=[` `,`Enter`],SM=`Select`,[CM,wM,TM]=Ec(SM),[EM,DM]=vc(SM,[TM,FA]),OM=FA(),[kM,AM]=EM(SM),[jM,MM]=EM(SM),NM=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=OM(t),[g,_]=O.useState(null),[v,y]=O.useState(null),[b,x]=O.useState(!1),S=JD(l),[C,w]=tl({prop:r,defaultProp:i??!1,onChange:a,caller:SM}),[T,E]=tl({prop:o,defaultProp:s,onChange:c,caller:SM}),D=O.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=O.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,k.jsx)(ZA,{...h,children:(0,k.jsxs)(kM,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:gO(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,k.jsx)(CM.Provider,{scope:t,children:(0,k.jsx)(jM,{scope:e.__scopeSelect,onNativeOptionAdd:O.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:O.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,k.jsxs)(ON,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,k.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};NM.displayName=SM;var PM=`SelectTrigger`,FM=O.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=OM(n),o=AM(PM,n),s=o.disabled||r,c=gc(t,o.onTriggerChange),l=wM(n),u=O.useRef(`touch`),[d,f,p]=AN(e=>{let t=l().filter(e=>!e.disabled),n=jN(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,k.jsx)(QA,{asChild:!0,...a,children:(0,k.jsx)(G.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":kN(o.value)?``:void 0,...i,ref:c,onClick:pc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:pc(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:pc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&bM.includes(e.key)&&(m(),e.preventDefault())})})})});FM.displayName=PM;var IM=`SelectValue`,LM=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=AM(IM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=gc(t,c.onValueNodeChange);return Kc(()=>{l(u)},[l,u]),(0,k.jsx)(G.span,{...s,ref:d,style:{pointerEvents:`none`},children:kN(c.value)?(0,k.jsx)(k.Fragment,{children:o}):a})});LM.displayName=IM;var RM=`SelectIcon`,zM=O.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,k.jsx)(G.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});zM.displayName=RM;var BM=`SelectPortal`,VM=e=>(0,k.jsx)(Jc,{asChild:!0,...e});VM.displayName=BM;var HM=`SelectContent`,UM=O.forwardRef((e,t)=>{let n=AM(HM,e.__scopeSelect),[r,i]=O.useState();if(Kc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Dc.createPortal((0,k.jsx)(GM,{scope:e.__scopeSelect,children:(0,k.jsx)(CM.Slot,{scope:e.__scopeSelect,children:(0,k.jsx)(`div`,{children:e.children})})}),t):null}return(0,k.jsx)(YM,{...e,ref:t})});UM.displayName=HM;var WM=10,[GM,KM]=EM(HM),qM=`SelectContentImpl`,JM=bc(`SelectContent.RemoveScroll`),YM=O.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=AM(HM,n),[y,b]=O.useState(null),[x,S]=O.useState(null),C=gc(t,e=>b(e)),[w,T]=O.useState(null),[E,D]=O.useState(null),A=wM(n),[j,M]=O.useState(!1),N=O.useRef(!1);O.useEffect(()=>{if(y)return uj(y)},[y]),XD();let P=O.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,x]),F=O.useCallback(()=>P([w,y]),[P,w,y]);O.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=v;O.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null};return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,I,L]),O.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[ee,te]=AN(e=>{let t=A().filter(e=>!e.disabled),n=jN(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=O.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(N.current=!0))},[v.value]),re=O.useCallback(()=>y?.focus(),[y]),R=O.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),z=r===`popper`?$M:ZM,ie=z===$M?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,k.jsx)(GM,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:re,itemTextRefCallback:R,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:j,searchRef:ee,children:(0,k.jsx)(yM,{as:JM,allowPinchZoom:!0,children:(0,k.jsx)(nO,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:pc(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,k.jsx)(Lc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,k.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ie,onPlaced:()=>M(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:pc(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})});YM.displayName=qM;var XM=`SelectItemAlignedPosition`,ZM=O.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=AM(HM,n),o=KM(HM,n),[s,c]=O.useState(null),[l,u]=O.useState(null),d=gc(t,e=>u(e)),f=wM(n),p=O.useRef(!1),m=O.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=O.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-WM,d=KD(a,[WM,Math.max(WM,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-WM,d=KD(a,[WM,Math.max(WM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-WM*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-WM,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${WM}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Kc(()=>y(),[y]);let[b,x]=O.useState();return Kc(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,k.jsx)(eN,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:O.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,k.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,k.jsx)(G.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});ZM.displayName=XM;var QM=`SelectPopperPosition`,$M=O.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=WM,...a}=e,o=OM(n);return(0,k.jsx)($A,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})});$M.displayName=QM;var[eN,tN]=EM(HM,{}),nN=`SelectViewport`,rN=O.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=KM(nN,n),o=tN(nN,n),s=gc(t,a.onViewportChange),c=O.useRef(0);return(0,k.jsxs)(k.Fragment,{children:[(0,k.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}),(0,k.jsx)(CM.Slot,{scope:n,children:(0,k.jsx)(G.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:pc(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-WM*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});rN.displayName=nN;var iN=`SelectGroup`,[aN,oN]=EM(iN),sN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=gO();return(0,k.jsx)(aN,{scope:n,id:i,children:(0,k.jsx)(G.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});sN.displayName=iN;var cN=`SelectLabel`,lN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=oN(cN,n);return(0,k.jsx)(G.div,{id:i.id,...r,ref:t})});lN.displayName=cN;var uN=`SelectItem`,[dN,fN]=EM(uN),pN=O.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=AM(uN,n),c=KM(uN,n),l=s.value===r,[u,d]=O.useState(a??``),[f,p]=O.useState(!1),m=gc(t,e=>c.itemRefCallback?.(e,r,i)),h=gO(),g=O.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw 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(0,k.jsx)(dN,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:O.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,k.jsx)(CM.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,k.jsx)(G.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:pc(o.onFocus,()=>p(!0)),onBlur:pc(o.onBlur,()=>p(!1)),onClick:pc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:pc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:pc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:pc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:pc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(xM.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});pN.displayName=uN;var mN=`SelectItemText`,hN=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=AM(mN,n),s=KM(mN,n),c=fN(mN,n),l=MM(mN,n),[u,d]=O.useState(null),f=gc(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=O.useMemo(()=>(0,k.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Kc(()=>(h(m),()=>g(m)),[h,g,m]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(G.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Dc.createPortal(a.children,o.valueNode):null]})});hN.displayName=mN;var gN=`SelectItemIndicator`,_N=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return fN(gN,n).isSelected?(0,k.jsx)(G.span,{"aria-hidden":!0,...r,ref:t}):null});_N.displayName=gN;var vN=`SelectScrollUpButton`,yN=O.forwardRef((e,t)=>{let n=KM(vN,e.__scopeSelect),r=tN(vN,e.__scopeSelect),[i,a]=O.useState(!1),o=gc(t,r.onScrollButtonChange);return Kc(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,k.jsx)(SN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});yN.displayName=vN;var bN=`SelectScrollDownButton`,xN=O.forwardRef((e,t)=>{let n=KM(bN,e.__scopeSelect),r=tN(bN,e.__scopeSelect),[i,a]=O.useState(!1),o=gc(t,r.onScrollButtonChange);return Kc(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,k.jsx)(SN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});xN.displayName=bN;var SN=O.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=KM(`SelectScrollButton`,n),o=O.useRef(null),s=wM(n),c=O.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return O.useEffect(()=>()=>c(),[c]),Kc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,k.jsx)(G.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:pc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:pc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:pc(i.onPointerLeave,()=>{c()})})}),CN=`SelectSeparator`,wN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,k.jsx)(G.div,{"aria-hidden":!0,...r,ref:t})});wN.displayName=CN;var TN=`SelectArrow`,EN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=OM(n),a=AM(TN,n),o=KM(TN,n);return a.open&&o.position===`popper`?(0,k.jsx)(ej,{...i,...r,ref:t}):null});EN.displayName=TN;var DN=`SelectBubbleInput`,ON=O.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=O.useRef(null),a=gc(r,i),o=tj(t);return O.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,k.jsx)(G.select,{...n,style:{...il,...n.style},ref:a,defaultValue:t})});ON.displayName=DN;function kN(e){return e===``||e===void 0}function AN(e){let t=kc(e),n=O.useRef(``),r=O.useRef(0),i=O.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=O.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return O.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function jN(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=MN(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function MN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NN=NM,PN=FM,FN=LM,IN=zM,LN=VM,RN=UM,zN=rN,BN=sN,VN=lN,HN=pN,UN=hN,WN=_N,GN=yN,KN=xN,qN=wN,JN=NN,YN=BN,XN=FN,ZN=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,k.jsxs)(PN,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,k.jsx)(IN,{asChild:!0,children:(0,k.jsx)(Cu,{className:`size-4 opacity-50`})})]}),QN=({className:e,...t})=>(0,k.jsx)(GN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(Su,{})}),$N=({className:e,...t})=>(0,k.jsx)(KN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(yu,{})}),eP=({className:e,children:t,position:n=`popper`,...r})=>(0,k.jsx)(LN,{children:(0,k.jsxs)(RN,{className:W(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`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`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,k.jsx)(QN,{}),(0,k.jsx)(zN,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,k.jsx)($N,{})]})}),tP=({className:e,...t})=>(0,k.jsx)(VN,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),nP=({className:e,children:t,...n})=>(0,k.jsxs)(HN,{className:W(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,k.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,k.jsx)(WN,{children:(0,k.jsx)(vu,{className:`size-4`})})}),(0,k.jsx)(UN,{children:t})]}),rP=({className:e,...t})=>(0,k.jsx)(qN,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=JN;J.Group=YN,J.Value=XN,J.Trigger=ZN,J.ScrollUpButton=QN,J.ScrollDownButton=$N,J.Content=eP,J.Label=tP,J.Item=nP,J.Separator=rP;var iP=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},aP=e=>{let t=(0,B.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=iP(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,O.useState)(a??null),[l,u]=(0,O.useState)(o??null),d,f;t[2]!==s||t[3]!==a||t[4]!==o||t[5]!==l||t[6]!==r?(d=()=>{s&&l&&(s!==a||l!==o)&&r(`${s}${l}`)},f=[s,a,o,l,r],t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=r,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,O.useEffect)(d,f);let p;if(t[9]!==a||t[10]!==l){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>u(e.target.value),t[12]=e):e=t[12],p=(0,k.jsxs)(`div`,{className:`flex gap-1`,children:[(0,k.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,k.jsx)(J.Trigger,{className:`w-20`,children:(0,k.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`<`,children:`<`}),(0,k.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,k.jsx)(J.Item,{value:`=`,children:`=`}),(0,k.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,k.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,k.jsx)(KC,{type:`number`,"aria-label":`Quantity`,defaultValue:l??void 0,onChange:e,className:`min-w-4`})]}),t[9]=a,t[10]=l,t[11]=p}else p=t[11];return p},oP=({rawContent:e})=>{let[t,n]=(0,O.useState)(``);return(0,O.useEffect)(()=>{Le(async()=>{let{default:e}=await import(`./purify.es-DF7xWCvs.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?(0,k.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t}}):(0,k.jsx)(`div`,{})},sP=(0,O.lazy)(()=>Le(()=>import(`./MarkDownRender-C8K2RDjG.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1]))),cP=(0,O.memo)(function(e){let t=(0,B.c)(2),{label:n,...r}=e,[i,a]=(0,O.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,k.jsx)(aS,{header:n,label:n,onToggle:o,children:i?(0,k.jsx)(EP,{...r}):null})}),lP=e=>{let t=(0,B.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=FC(),s=NC(),{mutate:c,isPending:l}=mD(),u;t[0]!==o||t[1]!==r||t[2]!==n?(u=e=>o(r.localId,e,n),t[0]=o,t[1]=r,t[2]=n,t[3]=u):u=t[3];let d;return t[4]!==o||t[5]!==c||t[6]!==s?.ai?.apiKey||t[7]!==s?.ai?.model||t[8]!==s?.ai?.temperature||t[9]!==s?.internationalization||t[10]!==r||t[11]!==a||t[12]!==n?(d=()=>{c({fileContent:JSON.stringify({...r,...a?.[r.localId]??{}}),keyPath:n,locales:s?.internationalization.locales??[],aiOptions:{apiKey:s?.ai?.apiKey,model:s?.ai?.model,temperature:s?.ai?.temperature}},{onSuccess:e=>{if(e?.data)try{let t=e.data.fileContent;o(r.localId,t,n)}catch(e){console.error(e)}}})},t[4]=o,t[5]=c,t[6]=s?.ai?.apiKey,t[7]=s?.ai?.model,t[8]=s?.ai?.temperature,t[9]=s?.internationalization,t[10]=r,t[11]=a,t[12]=n,t[13]=d):d=t[13],(0,k.jsx)(VD,{variant:`default`,onContentChange:u,additionalButtons:(0,k.jsx)(rS,{Icon:Vu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},uP=e=>{let t=(0,B.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=FC(),o;return t[0]!==a||t[1]!==r||t[2]!==n?(o=e=>a(r.localId,e,n),t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3],(0,k.jsx)(xD,{variant:`default`,onContentChange:o,...i})},dP=[{content:`False`,value:!1},{content:`True`,value:!0}],fP=e=>{let t=(0,B.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=FC(),o;return t[0]!==a||t[1]!==n||t[2]!==r?(o=e=>a(n.localId,e,r),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3],(0,k.jsx)(vS,{choices:dP,value:!0,onChange:o,color:`text`,size:`sm`,...i})},pP=e=>{let t=(0,B.c)(15),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=bt(),{selectedLocales:c}=yD(),l=n[M],u;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==c){let e;t[8]!==l||t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o||t[13]!==a?(e=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:lt(e,o)})}),(0,k.jsx)(`tr`,{className:`flex`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:l[e]??aC(l[s]),keyPath:[...r,{type:M,key:e}],dictionary:i,renderSection:a})})})]},t)},t[8]=l,t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=a,t[14]=e):e=t[14],u=(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:c.map(e)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=c,t[7]=u}else u=t[7];return u},mP=e=>{let t=(0,B.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=FC(),{addNewEnumeration:s,removeEnumeration:c}=yt(mw),l=n[N],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,aC(l[d])??``,[...r,{type:N,key:`unknown`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[N]).map(e=>{let t=[...r,{type:N,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(`div`,{className:`flex flex-1`,children:(0,k.jsx)(rS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Bu,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,k.jsx)(`tr`,{className:`w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(aP,{value:e,onChange:t=>{let a=n[N],s=WD(a,e,t),c={...n,[N]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(EP,{section:l[e]??aC(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,k.jsx)(rS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Iu,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},hP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[F];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:i[e]??aC(i.true),keyPath:[...t,{type:F,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},gP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[se];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:i[e]??aC(i.male),keyPath:[...t,{type:se,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},_P=[`zero`,`one`,`two`,`few`,`many`,`other`],vP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[P];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:_P.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:e})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:i[e]??aC(i.other),keyPath:[...t,{type:P,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},yP=e=>{let t=(0,B.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=FC(),{addNewElement:s,removeElement:c}=yt(mw),l;if(t[0]!==o||t[1]!==s.label.value||t[2]!==s.text||t[3]!==i||t[4]!==r||t[5]!==c||t[6]!==a||t[7]!==n){let e;t[9]!==o||t[10]!==i||t[11]!==r||t[12]!==c||t[13]!==a||t[14]!==n[0]?(e=(e,t)=>{let s=`${JSON.stringify(r)}-array-${t}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,k.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,k.jsx)(rS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:te,key:t}];o(i.localId,void 0,e)},Icon:Bu,children:c.text})]})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(DP,{section:e??aC(n[0]),keyPath:[...r,{type:te,key:t}],dictionary:i,renderSection:a})})})]},s)},t[9]=o,t[10]=i,t[11]=r,t[12]=c,t[13]=a,t[14]=n[0],t[15]=e):e=t[15];let u;t[16]!==o||t[17]!==i||t[18]!==r||t[19]!==n[0]||t[20]!==n.length?(u=()=>{let e=[...r,{type:te,key:n.length}];o(i.localId,aC(n[0])??``,e,!1)},t[16]=o,t[17]=i,t[18]=r,t[19]=n[0],t[20]=n.length,t[21]=u):u=t[21],l=(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,k.jsx)(rS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Iu,children:s.text})]}),t[0]=o,t[1]=s.label.value,t[2]=s.text,t[3]=i,t[4]=r,t[5]=c,t[6]=a,t[7]=n,t[8]=l}else l=t[8];return l},bP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:ee,key:e}],s=i[e]??aC(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(EP,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,k.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(cP,{label:ht(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},xP=e=>{let t=(0,B.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,O.useState)(0),s;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],c=[...r,{type:z}],l=n[z];s=(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(vS,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(DP,{section:l,keyPath:c,dictionary:i,renderSection:a===1?OP:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},SP=e=>{let t=(0,B.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,O.useState)(0),c;if(t[0]!==i||t[1]!==a||t[2]!==r||t[3]!==o||t[4]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],l=[...r,{type:R}],u=n.markdown??``,d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(eS,{}),children:(0,k.jsx)(sP,{isDarkMode:a,children:e})}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(vS,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(DP,{section:u,keyPath:l,dictionary:i,renderSection:d})]}),t[0]=i,t[1]=a,t[2]=r,t[3]=o,t[4]=n,t[5]=c}else c=t[5];return c},CP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:I}],i=e[I];return(0,k.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,k.jsx)(DP,{section:i,keyPath:r,...n})})},wP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:L}],i=e[L],{content:a}=e;return(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,k.jsx)(DP,{section:a,keyPath:r,...n})]})},TP=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=FC(),s=i[ne],c=[...t,{type:ne}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,k.jsx)(GD,{children:`Dictionary key`}),(0,k.jsx)(xD,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,k.jsx)(GD,{children:`Path (optional)`}),(0,k.jsx)(xD,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},EP=(0,O.memo)(function(e){let t=(0,B.c)(82),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=yt(mw),c,l;if(t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==a||t[4]!==n||t[5]!==s){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=lC(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,k.jsx)(`span`,{children:`(React Node)`}),(0,k.jsx)(`span`,{className:`flex text-neutral text-xs`,children:s})]}),t[8]=s,t[9]=e),l=e;break bb0}if(e===`nested`){let e;t[10]!==i||t[11]!==r||t[12]!==a||t[13]!==n?(e=(0,k.jsx)(TP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[10]=i,t[11]=r,t[12]=a,t[13]=n,t[14]=e):e=t[14],l=e;break bb0}if(e===`translation`){let e;t[15]!==i||t[16]!==r||t[17]!==a||t[18]!==n?(e=(0,k.jsx)(pP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[15]=i,t[16]=r,t[17]=a,t[18]=n,t[19]=e):e=t[19],l=e;break bb0}if(e===`enumeration`){let e;t[20]!==i||t[21]!==r||t[22]!==a||t[23]!==n?(e=(0,k.jsx)(mP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[20]=i,t[21]=r,t[22]=a,t[23]=n,t[24]=e):e=t[24],l=e;break bb0}if(e===`condition`){let e;t[25]!==i||t[26]!==r||t[27]!==a||t[28]!==n?(e=(0,k.jsx)(hP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[25]=i,t[26]=r,t[27]=a,t[28]=n,t[29]=e):e=t[29],l=e;break bb0}if(e===`gender`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,k.jsx)(gP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[30]=i,t[31]=r,t[32]=a,t[33]=n,t[34]=e):e=t[34],l=e;break bb0}if(e===`plural`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,k.jsx)(vP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[35]=i,t[36]=r,t[37]=a,t[38]=n,t[39]=e):e=t[39],l=e;break bb0}if(e===`insertion`){let e;t[40]!==i||t[41]!==r||t[42]!==a||t[43]!==n?(e=(0,k.jsx)(CP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[40]=i,t[41]=r,t[42]=a,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`markdown`){let e;t[45]!==i||t[46]!==o||t[47]!==r||t[48]!==n?(e=(0,k.jsx)(SP,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[45]=i,t[46]=o,t[47]=r,t[48]=n,t[49]=e):e=t[49],l=e;break bb0}if(e===`html`){let e;t[50]!==i||t[51]!==r||t[52]!==n?(e=(0,k.jsx)(xP,{dictionary:i,keyPath:r,section:n}),t[50]=i,t[51]=r,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`file`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,k.jsx)(wP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[54]=i,t[55]=r,t[56]=a,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`array`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,k.jsx)(yP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[59]=i,t[60]=r,t[61]=a,t[62]=n,t[63]=e):e=t[63],l=e;break bb0}if(e===`object`){let e;t[64]!==i||t[65]!==r||t[66]!==a||t[67]!==n?(e=(0,k.jsx)(bP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[64]=i,t[65]=r,t[66]=a,t[67]=n,t[68]=e):e=t[68],l=e;break bb0}if(e===`number`){let e;t[69]!==i||t[70]!==r||t[71]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(uP,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[69]=i,t[70]=r,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`text`){let e;t[73]!==i||t[74]!==r||t[75]!==a||t[76]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,k.jsx)(lP,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[73]=i,t[74]=r,t[75]=a,t[76]=n,t[77]=e):e=t[77],l=e;break bb0}if(e===`boolean`){let e;t[78]!==i||t[79]!==r||t[80]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(fP,{dictionary:i,keyPath:r,value:n})}),t[78]=i,t[79]=r,t[80]=n,t[81]=e):e=t[81],l=e;break bb0}c=(0,k.jsxs)(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(n,null,2),JSON.stringify(r,null,2),`NodeType : `,e]})}t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l}else c=t[6],l=t[7];return l===Symbol.for(`react.early_return_sentinel`)?c:l}),DP=(0,O.memo)(function(e){return(0,k.jsx)(Qx,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:(0,k.jsx)(EP,{...e})})});function OP(e){return(0,k.jsx)(oP,{rawContent:e})}var kP={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},localIds:[`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`]},AP=au(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-5 hover:bg-current/0 aria-[current]:bg-current/5`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},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:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`destructive`,class:`ring-destructive/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`md`}}),jP=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},MP=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(MP):(0,O.isValidElement)(e)?MP(e.props.children):!1,NP=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,...m}=e,h=d??jP(e),g=f??p?.startsWith(`#`)??!1,_=MP(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`,x=l&&p&&!h&&!g?tt(p,l):p;return(0,k.jsxs)(`a`,{href:x===``?void 0:x,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(AP({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,k.jsx)(`span`,{children:i}):i,h&&_&&(0,k.jsx)(Du,{className:`ml-2 inline-block size-4`}),g&&(0,k.jsx)(Mu,{className:`ml-2 inline-block size-4`})]})},PP=e=>e&&{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:``}[e]||``,FP=au(`flex flex-row flex-wrap items-center text-sm`,{variants:{size:{small:`gap-1 text-xs`,medium:`gap-2 text-sm`,large:`gap-3 text-base`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`medium`,spacing:`normal`}}),IP=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Ae(kP).linkLabel;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(NP,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l} ${n}`,itemID:e,size:`sm`,children:(0,k.jsx)(`span`,{itemProp:`name`,children:n})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},LP=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=yt(kP);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rS,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,k.jsx)(`span`,{itemProp:`name`,children:t})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},RP=({children:e,position:t,className:n,...r})=>(0,k.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,k.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,k.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),zP=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,k.jsx)(xu,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,k.jsx)(`nav`,{"aria-label":o,children:(0,k.jsx)(`ol`,{className:W(FP({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,h=PP(n);if(p)return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,k.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},`truncated-${m}`);let g=(0,k.jsx)(RP,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,k.jsx)(IP,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,k.jsx)(LP,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,O.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,k.jsxs)(O.Fragment,{children:[_,(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},m)})})})},BP=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,k.jsx)(zP,{links:[...a?[{text:ht(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:ht(t.key?.toString()??``)}))],locale:r,elementType:`location`,color:i}),VP={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},localIds:[`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`]},HP=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});HP.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,k.jsx)(rS,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),HP.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>(0,k.jsx)(`div`,{className:W(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,k.jsx)(iS,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`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]`,c),...l,children:e})});function UP(e){return Array.isArray?Array.isArray(e):$P(e)===`[object Array]`}function WP(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function GP(e){return e==null?``:WP(e)}function KP(e){return typeof e==`string`}function qP(e){return typeof e==`number`}function JP(e){return e===!0||e===!1||XP(e)&&$P(e)==`[object Boolean]`}function YP(e){return typeof e==`object`}function XP(e){return YP(e)&&e!==null}function ZP(e){return e!=null}function QP(e){return!e.trim().length}function $P(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var eF=`Incorrect 'index' type`,tF=e=>`Invalid value for key ${e}`,nF=e=>`Pattern length exceeds max of ${e}.`,rF=e=>`Missing ${e} property in key`,iF=e=>`Property 'weight' in key '${e}' must be a positive integer`,aF=Object.prototype.hasOwnProperty,oF=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=sF(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function sF(e){let t=null,n=null,r=null,i=1,a=null;if(KP(e)||UP(e))r=e,t=cF(e),n=lF(e);else{if(!aF.call(e,`name`))throw Error(rF(`name`));let o=e.name;if(r=o,aF.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(iF(o));t=cF(o),n=lF(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function cF(e){return UP(e)?e:e.split(`.`)}function lF(e){return UP(e)?e.join(`.`):e}function uF(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(ZP(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!ZP(s))return;if(a===t.length-1&&(KP(s)||qP(s)||JP(s)||typeof s==`bigint`))n.push(o===void 0?GP(s):{v:GP(s),i:o});else if(UP(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,KP(t)?t.split(`.`):t,0),r?n:n[0]}var dF={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},fF={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},pF={location:0,threshold:.6,distance:100},mF={useExtendedSearch:!1,useTokenSearch:!1,getFn:uF,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...fF,...dF,...pF,...mF}),hF=/[^ ]+/g;function gF(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(hF).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var _F=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=gF(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,KP(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();KP(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!ZP(e)||QP(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(ZP(i)){if(UP(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(ZP(n)){if(KP(n)){if(!QP(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(ZP(n.v)){let t=KP(n.v)?n.v:GP(n.v);if(!QP(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(KP(i)&&!QP(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function vF(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new _F({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(sF)),i.setSources(t),i.create(),i}function yF(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new _F({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function bF(e=[],t=Y.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var xF=32;function SF(e,t,n,{location:r=Y.location,distance:i=Y.distance,threshold:a=Y.threshold,findAllMatches:o=Y.findAllMatches,minMatchCharLength:s=Y.minMatchCharLength,includeMatches:c=Y.includeMatches,ignoreLocation:l=Y.ignoreLocation}={}){if(t.length>xF)throw Error(nF(xF));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=bF(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function CF(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function wF(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var TF={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},EF=RegExp(`[`+Object.keys(TF).join(``)+`]`,`g`),DF=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,``).replace(EF,e=>TF[e]):e=>e,OF=class{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?DF(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:CF(e),startIndex:t})},d=this.pattern.length;if(d>xF){let e=0,t=d%xF,n=d-t;for(;e<n;)u(this.pattern.substr(e,xF),e),e+=xF;if(t){let e=d-xF;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?DF(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=SF(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=wF(u)),p}},kF=class{constructor(e){this.pattern=e}static isMultiMatch(e){return AF(e,this.multiRegex)}static isSingleMatch(e){return AF(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function AF(e,t){let n=e.match(t);return n?n[1]:null}var jF=class extends kF{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},MF=class extends kF{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},NF=class extends kF{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},PF=class extends kF{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},FF=class extends kF{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},IF=class extends kF{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},LF=class extends kF{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){super(e),this._bitapSearch=new OF(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},RF=class extends kF{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},zF=[jF,RF,NF,PF,IF,FF,MF,LF],BF=zF.length,VF=`\0`,HF=`|`;function UF(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function WF(e,t={}){return e.replace(/\\\|/g,VF).split(HF).map(e=>{let n=UF(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<BF;){let e=zF[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<BF;){let e=zF[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var GF=new Set([LF.type,RF.type]),KF=class{constructor(e,{isCaseSensitive:t=Y.isCaseSensitive,ignoreDiacritics:n=Y.ignoreDiacritics,includeMatches:r=Y.includeMatches,minMatchCharLength:i=Y.minMatchCharLength,ignoreLocation:a=Y.ignoreLocation,findAllMatches:o=Y.findAllMatches,location:s=Y.location,threshold:c=Y.threshold,distance:l=Y.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?DF(e):e,this.pattern=e,this.query=WF(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?DF(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l){a+=1,s+=d;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(GF.has(e)?o.push(...u):o.push(u))}else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=wF(o)),e}}return{isMatch:!1,score:1}}},qF=[];function JF(...e){qF.push(...e)}function YF(e,t){for(let n=0,r=qF.length;n<r;n+=1){let r=qF[n];if(r.condition(e,t))return new r(e,t)}return new OF(e,t)}var XF={AND:`$and`,OR:`$or`},ZF={PATH:`$path`,PATTERN:`$val`},QF=e=>!!(e[XF.AND]||e[XF.OR]),$F=e=>!!e[ZF.PATH],eI=e=>!UP(e)&&YP(e)&&!QF(e),tI=e=>({[XF.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function nI(e,t,{auto:n=!0}={}){let r=e=>{if(KP(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=YF(e,t)),r}let i=Object.keys(e),a=$F(e);if(!a&&i.length>1&&!QF(e))return r(tI(e));if(eI(e)){let r=a?e[ZF.PATH]:i[0],o=a?e[ZF.PATTERN]:e[r];if(!KP(o))throw Error(tF(r));let s={keyId:lF(r),pattern:o};return n&&(s.searcher=YF(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];UP(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return QF(e)||(e=tI(e)),r(e)}function rI(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function iI(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=rI(e.matches,{ignoreFieldNorm:t})})}var aI=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function oI(e,t){let n=e.matches;t.matches=[],ZP(n)&&n.forEach(e=>{if(!ZP(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function sI(e,t){t.score=e.score}function cI(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(oI),r&&i.push(sI),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var lI=/\b\w+\b/g;function uI({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=DF(n)),n.match(lI)||[]}}}function dI(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function fI(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function pI(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var mI=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new oF(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=YF(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof _F))throw Error(eF);if(this._myIndex=t||vF(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=uI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=dI(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(ZP(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=uI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});fI(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){if(this._invertedIndex)for(let e of n)pI(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&pI(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(KP(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return qP(n)&&n>-1&&(e=e.slice(0,n)),e}let c=qP(n)&&n>0&&KP(e),l;if(c){let t=new aI(n);KP(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=KP(e)?KP(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),iI(l,{ignoreFieldNorm:s}),a&&l.sort(o),qP(n)&&n>-1&&(l=l.slice(0,n));return cI(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!ZP(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=rI(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=nI(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===XF.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(ZP(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!ZP(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=rI(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!ZP(t))return[];let r=[];if(UP(t))t.forEach(({v:t,i,n:a})=>{if(!ZP(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},hI=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=uI({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new OF(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=wF(t)),o}};mI.version=`7.3.0`,mI.createIndex=vF,mI.parseIndex=yF,mI.config=Y,mI.match=function(e,t,n){return YF(e,{...Y,...n}).searchIn(t)},mI.parseQuery=nI,JF(KF),JF(hI),mI.use=function(...e){e.forEach(e=>JF(e))};var gI=`locale-switcher-content`,_I=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=yt(VP),s=(0,O.useRef)(null),{locale:c}=bt(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=yD(),f=(0,O.useMemo)(()=>l.map(e=>({locale:e,englishName:lt(e,`en`),currentLocaleName:lt(e,c),ownLocaleName:lt(e)})),[l,c]),[p,m]=(0,O.useState)(``),[h,g]=_D(`locale-content-selector-see-all-locales`,!1),_=(0,O.useMemo)(()=>new mI(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),v=(0,O.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),y=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},b=e=>{g(e),d(e?l:[c])};return(0,k.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,k.jsxs)(HP,{identifier:gI,children:[(0,k.jsx)(HP.Trigger,{identifier:gI,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,k.jsx)(`div`,{className:`px-2 py-1`,children:(0,k.jsx)(Au,{size:16})}),(0,k.jsx)(Nu,{className:`self-center`,size:16})]})}),(0,k.jsx)(HP.Panel,{identifier:gI,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,k.jsxs)(Qx,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":a.value,children:[t&&(0,k.jsx)(`div`,{className:`m-auto p-2`,children:(0,k.jsx)(vS,{defaultValue:h,onChange:b,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`p-3`,children:(0,k.jsx)(KC,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,k.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:v.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,k.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,k.jsx)(rS,{onClick:()=>y(e),label:`${n} ${r}`,disabled:!(l??l).includes(e),isActive:u.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:(0,k.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,k.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,k.jsx)(vu,{className:`size-full`})}),(0,k.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,k.jsx)(`span`,{dir:ct(e),lang:e,children:i}),(0,k.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,k.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},vI=e=>{let t=oC(e),n=lC(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?vI(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},yI=e=>{let t=(0,B.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,O.useState)(!1),s;return t[0]!==a||t[1]!==r?(s=e=>{e&&!a&&o(!0),r?.(e)},t[0]=a,t[1]=r,t[2]=s):s=t[2],(0,k.jsx)(aS,{...i,onToggle:s,children:a?n:null})},bI=e=>{let t=(0,B.c)(16),{section:n,keyPath:r,dictionary:i}=e,{selectedLocales:a}=yD(),o=rC(n,r,OC()),{addEditedContent:s}=PC(),{setFocusedContentKeyPath:c,focusedContent:l}=AC(),{addNewElement:u,goToField:d}=yt(mw),f=lC(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&dt(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=vI(o);if(!o)return(0,k.jsx)(k.Fragment,{});if(h){let e;return t[2]!==r||t[3]!==c?(e=()=>c(r),t[2]=r,t[3]=c,t[4]=e):e=t[4],(0,k.jsx)(rS,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:xu,children:ht(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,k.jsx)(k.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,k.jsx)(bI,{keyPath:[...r,{type:M,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,k.jsx)(bI,{keyPath:[...r,{type:f,key:e}],section:n,dictionary:i},e))});if(f===`array`){let e;return t[9]!==i||t[10]!==m||t[11]!==d||t[12]!==r||t[13]!==n||t[14]!==c?(e=(e,t)=>{let a=[...r,{type:te,key:t}];return vI(e)?(0,k.jsxs)(rS,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:xu,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,k.jsx)(yI,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(bI,{keyPath:a,section:n,dictionary:i})})})},JSON.stringify(a))},t[9]=i,t[10]=m,t[11]=d,t[12]=r,t[13]=n,t[14]=c,t[15]=e):e=t[15],(0,k.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,k.jsx)(rS,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:te,key:o.length}],t=o,n=aC(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Iu,children:u.text})]})}return typeof o.nodeType==`string`?(0,k.jsx)(bI,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,k.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(o).map(e=>{let t=[...r,{type:ee,key:e}];return vI(rC(n,t))?(0,k.jsx)(rS,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:xu,children:ht(e)},e):(0,k.jsx)(yI,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:ht(e),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(bI,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,k.jsxs)(k.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},xI=e=>{let t=(0,B.c)(16),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=FC(),{focusedContent:c,setFocusedContentKeyPath:l}=AC(),[,u]=(0,O.useTransition)(),d;t[0]!==l||t[1]!==u?(d=e=>u(()=>l(e)),t[0]=l,t[1]=u,t[2]=d):d=t[2];let f=d,p=c?.keyPath,m=s?.[o]?.content===void 0?i:s?.[o]?.content,h=OC(),g;t[3]===p?g=t[4]:(g=p??[],t[3]=p,t[4]=g);let _;t[5]!==h||t[6]!==m||t[7]!==g?(_=rC(m,g,h),t[5]=h,t[6]=m,t[7]=g,t[8]=_):_=t[8];let v=_,y=(0,O.useDeferredValue)(p),b=(0,O.useDeferredValue)(v),x=b!==v,S;t[9]===m?S=t[10]:(S=vI(m),t[9]=m,t[10]=S);let C=S,w=vI(b),T;t[11]!==c?.keyPath||t[12]!==v||t[13]!==f?(T=()=>{v===void 0&&f(c?.keyPath?.slice(0,-1)??[])},t[11]=c?.keyPath,t[12]=v,t[13]=f,t[14]=T):T=t[14];let E;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[15]=E):E=t[15],(0,O.useEffect)(T,E),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,k.jsx)(BP,{dictionaryKey:a,keyPath:p??[],onClickKeyPath:f}),(0,k.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,k.jsx)(_I,{})})]}),(0,k.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof m==`object`&&m&&!C&&Object.keys(m).length>0&&(0,k.jsx)(Qx,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:(0,k.jsx)(bI,{keyPath:[],section:m,dictionary:n})}),(w||(y??[]).length>0)&&(0,k.jsx)(`div`,{className:x?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,k.jsx)(DP,{keyPath:y??[],section:b,dictionary:n,isDarkMode:r})})]})]})},SI=au(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring 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`,success:`border-success bg-success text-success hover:bg-success-500`,error:`border-error bg-error text-error hover:bg-error-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.3px] bg-opacity-0 hover:bg-opacity-30`,hoverable:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-0.5 text-xs`,lg:`px-3 py-1 text-sm`}},defaultVariants:{variant:`default`,color:`primary`,size:`md`}}),CI=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,k.jsxs)(p,{className:W(SI({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,k.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,k.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,k.jsx)(`title`,{children:`Remove badge`}),(0,k.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})},wI=`Dialog`,[TI,EI]=vc(wI),[DI,OI]=TI(wI),kI=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=O.useRef(null),c=O.useRef(null),[l,u]=tl({prop:r,defaultProp:i??!1,onChange:a,caller:wI});return(0,k.jsx)(DI,{scope:t,triggerRef:s,contentRef:c,contentId:gO(),titleId:gO(),descriptionId:gO(),open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};kI.displayName=wI;var AI=`DialogTrigger`,jI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(AI,n),a=gc(t,i.triggerRef);return(0,k.jsx)(G.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ZI(i.open),...r,ref:a,onClick:pc(e.onClick,i.onOpenToggle)})});jI.displayName=AI;var MI=`DialogPortal`,[NI,PI]=TI(MI,{forceMount:void 0}),FI=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=OI(MI,t);return(0,k.jsx)(NI,{scope:t,forceMount:n,children:O.Children.map(r,e=>(0,k.jsx)(Xc,{present:n||a.open,children:(0,k.jsx)(Jc,{asChild:!0,container:i,children:e})}))})};FI.displayName=MI;var II=`DialogOverlay`,LI=O.forwardRef((e,t)=>{let n=PI(II,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=OI(II,e.__scopeDialog);return a.modal?(0,k.jsx)(Xc,{present:r||a.open,children:(0,k.jsx)(zI,{...i,ref:t})}):null});LI.displayName=II;var RI=bc(`DialogOverlay.RemoveScroll`),zI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(II,n);return(0,k.jsx)(yM,{as:RI,allowPinchZoom:!0,shards:[i.contentRef],children:(0,k.jsx)(G.div,{"data-state":ZI(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),BI=`DialogContent`,VI=O.forwardRef((e,t)=>{let n=PI(BI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=OI(BI,e.__scopeDialog);return(0,k.jsx)(Xc,{present:r||a.open,children:a.modal?(0,k.jsx)(HI,{...i,ref:t}):(0,k.jsx)(UI,{...i,ref:t})})});VI.displayName=BI;var HI=O.forwardRef((e,t)=>{let n=OI(BI,e.__scopeDialog),r=O.useRef(null),i=gc(t,n.contentRef,r);return O.useEffect(()=>{let e=r.current;if(e)return uj(e)},[]),(0,k.jsx)(WI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:pc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:pc(e.onFocusOutside,e=>e.preventDefault())})}),UI=O.forwardRef((e,t)=>{let n=OI(BI,e.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return(0,k.jsx)(WI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),WI=O.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=OI(BI,n),c=O.useRef(null),l=gc(t,c);return XD(),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(nO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,k.jsx)(Lc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ZI(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(tL,{titleId:s.titleId}),(0,k.jsx)(rL,{contentRef:c,descriptionId:s.descriptionId})]})]})}),GI=`DialogTitle`,KI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(GI,n);return(0,k.jsx)(G.h2,{id:i.titleId,...r,ref:t})});KI.displayName=GI;var qI=`DialogDescription`,JI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(qI,n);return(0,k.jsx)(G.p,{id:i.descriptionId,...r,ref:t})});JI.displayName=qI;var YI=`DialogClose`,XI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=OI(YI,n);return(0,k.jsx)(G.button,{type:`button`,...r,ref:t,onClick:pc(e.onClick,()=>i.onOpenChange(!1))})});XI.displayName=YI;function ZI(e){return e?`open`:`closed`}var QI=`DialogTitleWarning`,[$I,eL]=_c(QI,{contentName:BI,titleName:GI,docsSlug:`dialog`}),tL=({titleId:e})=>{let t=eL(QI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
100
100
 
101
101
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
102
102
 
@@ -163,7 +163,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
163
163
 
164
164
  `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=SB,s=!cB.jitless,c=s&&CB.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?PH([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function LH(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!LB(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>VB(e,r,lB())))}),t)}var RH=Z(`$ZodUnion`,(e,t)=>{$V.init(e,t),gB(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),gB(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),gB(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),gB(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>mB(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>LH(t,r,e,i)):LH(o,r,e,i)}}),zH=Z(`$ZodIntersection`,(e,t)=>{$V.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>VH(e,t,n)):VH(e,i,a)}});function BH(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(wB(e)&&wB(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=BH(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=BH(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function VH(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),LB(e))return e;let o=BH(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var HH=Z(`$ZodEnum`,(e,t)=>{$V.init(e,t);let n=uB(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>EB.has(typeof e)).map(e=>typeof e==`string`?DB(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),UH=Z(`$ZodTransform`,(e,t)=>{$V.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sB(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new oB;return n.value=i,n.fallback=!0,n}});function WH(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var GH=Z(`$ZodOptional`,(e,t)=>{$V.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,gB(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),gB(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${mB(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>WH(e,r)):WH(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),KH=Z(`$ZodExactOptional`,(e,t)=>{GH.init(e,t),gB(e._zod,`values`,()=>t.innerType._zod.values),gB(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),qH=Z(`$ZodNullable`,(e,t)=>{$V.init(e,t),gB(e._zod,`optin`,()=>t.innerType._zod.optin),gB(e._zod,`optout`,()=>t.innerType._zod.optout),gB(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${mB(e.source)}|null)$`):void 0}),gB(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),JH=Z(`$ZodDefault`,(e,t)=>{$V.init(e,t),e._zod.optin=`optional`,gB(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>YH(e,t)):YH(r,t)}});function YH(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var XH=Z(`$ZodPrefault`,(e,t)=>{$V.init(e,t),e._zod.optin=`optional`,gB(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ZH=Z(`$ZodNonOptional`,(e,t)=>{$V.init(e,t),gB(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>QH(t,e)):QH(i,e)}});function QH(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var $H=Z(`$ZodCatch`,(e,t)=>{$V.init(e,t),e._zod.optin=`optional`,gB(e._zod,`optout`,()=>t.innerType._zod.optout),gB(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>VB(e,n,lB()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>VB(e,n,lB()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),eU=Z(`$ZodPipe`,(e,t)=>{$V.init(e,t),gB(e._zod,`values`,()=>t.in._zod.values),gB(e._zod,`optin`,()=>t.in._zod.optin),gB(e._zod,`optout`,()=>t.out._zod.optout),gB(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>tU(e,t.in,n)):tU(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tU(e,t.out,n)):tU(r,t.out,n)}});function tU(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var nU=Z(`$ZodReadonly`,(e,t)=>{$V.init(e,t),gB(e._zod,`propValues`,()=>t.innerType._zod.propValues),gB(e._zod,`values`,()=>t.innerType._zod.values),gB(e._zod,`optin`,()=>t.innerType?._zod?.optin),gB(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(rU):rU(r)}});function rU(e){return e.value=Object.freeze(e.value),e}var iU=Z(`$ZodCustom`,(e,t)=>{zV.init(e,t),$V.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>aU(t,n,r,e));aU(i,n,r,e)}});function aU(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(UB(e))}}var oU,sU=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function cU(){return new sU}(oU=globalThis).__zod_globalRegistry??(oU.__zod_globalRegistry=cU());var lU=globalThis.__zod_globalRegistry;function uU(e,t){return new e({type:`string`,...Q(t)})}function dU(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Q(t)})}function fU(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Q(t)})}function pU(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Q(t)})}function mU(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Q(t)})}function hU(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Q(t)})}function gU(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Q(t)})}function _U(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Q(t)})}function vU(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Q(t)})}function yU(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Q(t)})}function bU(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Q(t)})}function xU(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Q(t)})}function SU(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Q(t)})}function CU(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Q(t)})}function wU(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Q(t)})}function TU(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Q(t)})}function EU(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Q(t)})}function DU(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Q(t)})}function OU(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Q(t)})}function kU(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Q(t)})}function AU(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Q(t)})}function jU(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Q(t)})}function MU(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Q(t)})}function NU(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Q(t)})}function PU(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Q(t)})}function FU(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Q(t)})}function IU(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Q(t)})}function LU(e){return new e({type:`unknown`})}function RU(e,t){return new e({type:`never`,...Q(t)})}function zU(e,t){return new BV({check:`max_length`,...Q(t),maximum:e})}function BU(e,t){return new VV({check:`min_length`,...Q(t),minimum:e})}function VU(e,t){return new HV({check:`length_equals`,...Q(t),length:e})}function HU(e,t){return new WV({check:`string_format`,format:`regex`,...Q(t),pattern:e})}function UU(e){return new GV({check:`string_format`,format:`lowercase`,...Q(e)})}function WU(e){return new KV({check:`string_format`,format:`uppercase`,...Q(e)})}function GU(e,t){return new qV({check:`string_format`,format:`includes`,...Q(t),includes:e})}function KU(e,t){return new JV({check:`string_format`,format:`starts_with`,...Q(t),prefix:e})}function qU(e,t){return new YV({check:`string_format`,format:`ends_with`,...Q(t),suffix:e})}function JU(e){return new XV({check:`overwrite`,tx:e})}function YU(e){return JU(t=>t.normalize(e))}function XU(){return JU(e=>e.trim())}function ZU(){return JU(e=>e.toLowerCase())}function QU(){return JU(e=>e.toUpperCase())}function $U(){return JU(e=>bB(e))}function eW(e,t,n){return new e({type:`array`,element:t,...Q(n)})}function tW(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Q(n)})}function nW(e,t){let n=rW(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(UB(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(UB(r))}},e(t.value,t)),t);return n}function rW(e,t){let n=new zV({check:`custom`,...Q(t)});return n._zod.check=e,n}function iW(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??lU,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function aW(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,aW(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&cW(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function oW(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
165
165
 
166
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function sW(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:uW(t,`input`,e.processors),output:uW(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function cW(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return cW(r.element,n);if(r.type===`set`)return cW(r.valueType,n);if(r.type===`lazy`)return cW(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return cW(r.innerType,n);if(r.type===`intersection`)return cW(r.left,n)||cW(r.right,n);if(r.type===`record`||r.type===`map`)return cW(r.keyType,n)||cW(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:cW(r.in,n)||cW(r.out,n);if(r.type===`object`){for(let e in r.shape)if(cW(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(cW(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(cW(e,n))return!0;return!!(r.rest&&cW(r.rest,n))}return!1}var lW=(e,t={})=>n=>{let r=iW({...n,processors:t});return aW(e,r),oW(r,e),sW(r,e)},uW=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=iW({...i??{},target:a,io:t,processors:n});return aW(e,o),oW(o,e),sW(o,e)},dW={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fW=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=dW[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},pW=(e,t,n,r)=>{n.not={}},mW=(e,t,n,r)=>{let i=e._zod.def,a=uB(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},hW=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},gW=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},_W=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=aW(a.element,t,{...r,path:[...r.path,`items`]})},vW=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=aW(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=aW(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},yW=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>aW(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},bW=(e,t,n,r)=>{let i=e._zod.def,a=aW(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=aW(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},xW=(e,t,n,r)=>{let i=e._zod.def,a=aW(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},SW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},CW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},wW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},TW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},EW=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;aW(o,t,r);let s=t.seen.get(e);s.ref=o},DW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},OW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType};function kW(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function AW(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(`unionErrors`in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=oz(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function jW(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(r.code===`invalid_union`&&r.errors.length>0){var s=r.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(r.code===`invalid_union`&&r.errors.forEach(function(t){return t.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=oz(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function MW(e,t,n){if(n===void 0&&(n={}),function(e){return`_def`in e&&typeof e._def==`object`&&`typeName`in e._def}(e))return function(r,i,a){try{return Promise.resolve(kW(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&tB({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:nB(AW(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};if(function(e){return`_zod`in e&&typeof e._zod==`object`}(e))return function(r,i,a){try{return Promise.resolve(kW(function(){return Promise.resolve((n.mode===`sync`?XB:QB)(e,r,t)).then(function(e){return a.shouldUseNativeValidation&&tB({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return e instanceof GB}(e))return{values:{},errors:nB(jW(e.issues,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};throw Error(`Invalid input: not a Zod schema`)}var NW=async e=>e&&typeof e.then==`function`?await e:e,PW=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:i,children:a,autoComplete:o,...s})=>{let c=async i=>{let a=e?.safeParse(i)??{success:!0,data:void 0};await NW(t?.(i)),a.success?await NW(n?.(a.data)):await NW(r?.(Error(a.error.issues.map(e=>e.message).join(`, `))))};return(0,k.jsx)(az,{...s,children:(0,k.jsx)(`form`,{className:W(`flex flex-col gap-y-6`,i),onSubmit:s.handleSubmit(c),autoComplete:o?`on`:`off`,noValidate:!0,children:a})})},FW=(e,t)=>{let n=(0,B.c)(13),r;n[0]===e?r=n[1]:(r=MW(e),n[0]=e,n[1]=r);let i;n[2]!==t||n[3]!==r?(i={resolver:r,...t},n[2]=t,n[3]=r,n[4]=i):i=n[4];let a=$z(i),o;n[5]===a.control?o=n[6]:(o={control:a.control},n[5]=a.control,n[6]=o);let{isSubmitting:s,isSubmitted:c,isLoading:l,isValid:u}=YR(o),d;return n[7]!==a||n[8]!==l||n[9]!==c||n[10]!==s||n[11]!==u?(d={form:a,isSubmitting:s,isSubmitted:c,isLoading:l,isValid:u},n[7]=a,n[8]=l,n[9]=c,n[10]=s,n[11]=u,n[12]=d):d=n[12],d},IW=e=>{let{id:t,...n}=e,r=(0,O.useId)(),i=t??r;return(0,k.jsx)(LW,{value:{id:i},children:(0,k.jsx)(`div`,{className:`flex flex-col gap-2 p-2`,id:i,suppressHydrationWarning:!0,...n})})},LW=(0,O.createContext)({}),RW=(0,O.createContext)({}),zW=e=>{let t=(0,B.c)(7),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;t[2]===n.name?r=t[3]:(r={name:n.name},t[2]=n.name,t[3]=r);let i=r,a;return t[4]!==n||t[5]!==i?(a=(0,k.jsx)(RW,{value:i,children:(0,k.jsx)(nz,{...n})}),t[4]=n,t[5]=i,t[6]=a):a=t[6],a},BW=()=>{let e=(0,B.c)(11),t=(0,O.useContext)(RW),n=(0,O.useContext)(LW),{getFieldState:r,formState:i}=iz(),a;e[0]!==t.name||e[1]!==i||e[2]!==r?(a=r(t.name,i),e[0]=t.name,e[1]=i,e[2]=r,e[3]=a):a=e[3];let o=a;if(!t)throw Error(`useFormField should be used within <FormField>`);let{id:s}=n,c=`${s}-form-item`,l=`${s}-form-item-description`,u=`${s}-form-item-message`,d;return e[4]!==t.name||e[5]!==o||e[6]!==s||e[7]!==c||e[8]!==l||e[9]!==u?(d={id:s,name:t.name,formItemId:c,formDescriptionId:l,formMessageId:u,...o},e[4]=t.name,e[5]=o,e[6]=s,e[7]=c,e[8]=l,e[9]=u,e[10]=d):d=e[10],d},VW=({className:e,children:t,...n})=>(0,k.jsxs)(`i`,{className:W(`text-neutral-400 text-xs`,e),...n,children:[`ⓘ `,t]}),HW=e=>{let{className:t,...n}=e,{error:r,formItemId:i}=BW();return(0,k.jsx)(GD,{className:W(`mb-2`,r&&`text-error`,t),htmlFor:i,...n})},UW=({isRequired:e})=>e?(0,k.jsx)(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):(0,k.jsx)(k.Fragment,{}),WW=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>(0,k.jsxs)(`div`,{className:`ml-1 flex gap-1 align-middle text-base leading-none`,children:[e&&(0,k.jsxs)(HW,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:W(`font-bold`,i),children:[e,(0,k.jsx)(UW,{isRequired:t})]}),n&&(0,k.jsx)(VW,{content:n})]}),GW=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o,className:s})=>(0,k.jsxs)($.Item,{className:W(`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,s),children:[(t||e)&&(0,k.jsxs)(`div`,{className:`flex flex-col gap-1 p-1 leading-none`,children:[e&&(0,k.jsx)(WW,{isRequired:n,info:r,htmlFor:o,children:e}),t&&(0,k.jsx)($.Description,{children:t})]}),(0,k.jsx)($.Control,{children:i}),a&&(0,k.jsx)($.Message,{"data-testid":`error-message`})]}),KW=e=>{let{field:t,name:n,label:r,Element:i,isRequired:a,info:o,description:s,showErrorMessage:c,layoutClassName:l,...u}=e,d=a===void 0?!1:a,f=c===void 0?!0:c,{error:p}=BW(),{value:m,onChange:h,...g}=t??{},_=u,v=_.value===void 0?m??``:_.value,y=(...e)=>{let t=e;typeof h==`function`&&h(...t),typeof _.onChange==`function`&&_.onChange(...t)};return(0,k.jsx)(GW,{htmlFor:n,label:r,description:s,isRequired:d,info:o,showErrorMessage:f,"aria-invalid":!!p,className:l,children:(0,k.jsx)(i,{"data-testid":`element`,id:n,...g,...u,value:v,onChange:y,children:u.children})})},qW=e=>{let t=(0,B.c)(6),{control:n}=iz(),r;t[0]===e?r=t[1]:(r=t=>{let{field:n}=t;return(0,k.jsx)(KW,{...e,field:n})},t[0]=e,t[1]=r);let i;return t[2]!==n||t[3]!==e.name||t[4]!==r?(i=(0,k.jsx)($.Field,{control:n,name:e.name,render:r}),t[2]=n,t[3]=e.name,t[4]=r,t[5]=i):i=t[5],i},JW=e=>(0,k.jsx)(qW,{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:ow,...e}),YW=e=>(0,k.jsx)(qW,{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:ZC,...e}),XW=e=>(0,k.jsx)(qW,{id:e.name,"data-testid":e.name,Element:KC,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),ZW=e=>{let t=(0,B.c)(5),[n,r]=(0,O.useState)(!1),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>{e.preventDefault(),e.stopPropagation(),r(QW)},t[0]=i):i=t[0];let a=i,o=n?ku:Ou,s;return t[1]!==o||t[2]!==n||t[3]!==e?(s=(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(KC,{...e,"aria-label":`password`,type:n?`text`:`password`}),(0,k.jsx)(`button`,{"data-testid":`eye-icon`,type:`button`,className:`absolute right-2 h-full flex-row items-center`,onClick:a,"aria-label":n?`Hide password`:`Show password`,children:(0,k.jsx)(o,{className:`mr-2 inline-block cursor-pointer text-neutral`,size:20})})]}),t[1]=o,t[2]=n,t[3]=e,t[4]=s):s=t[4],s};function QW(e){return!e}var $W=({autoComplete:e,...t})=>(0,k.jsx)(qW,{Element:ZW,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}),eG=e=>[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)],tG=(e,t)=>{try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}},nG=`
166
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function sW(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:uW(t,`input`,e.processors),output:uW(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function cW(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return cW(r.element,n);if(r.type===`set`)return cW(r.valueType,n);if(r.type===`lazy`)return cW(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return cW(r.innerType,n);if(r.type===`intersection`)return cW(r.left,n)||cW(r.right,n);if(r.type===`record`||r.type===`map`)return cW(r.keyType,n)||cW(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:cW(r.in,n)||cW(r.out,n);if(r.type===`object`){for(let e in r.shape)if(cW(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(cW(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(cW(e,n))return!0;return!!(r.rest&&cW(r.rest,n))}return!1}var lW=(e,t={})=>n=>{let r=iW({...n,processors:t});return aW(e,r),oW(r,e),sW(r,e)},uW=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=iW({...i??{},target:a,io:t,processors:n});return aW(e,o),oW(o,e),sW(o,e)},dW={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fW=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=dW[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},pW=(e,t,n,r)=>{n.not={}},mW=(e,t,n,r)=>{let i=e._zod.def,a=uB(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},hW=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},gW=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},_W=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=aW(a.element,t,{...r,path:[...r.path,`items`]})},vW=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=aW(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=aW(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},yW=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>aW(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},bW=(e,t,n,r)=>{let i=e._zod.def,a=aW(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=aW(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},xW=(e,t,n,r)=>{let i=e._zod.def,a=aW(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},SW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},CW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},wW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},TW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},EW=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;aW(o,t,r);let s=t.seen.get(e);s.ref=o},DW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},OW=(e,t,n,r)=>{let i=e._zod.def;aW(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType};function kW(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function AW(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(`unionErrors`in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=oz(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function jW(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(r.code===`invalid_union`&&r.errors.length>0){var s=r.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(r.code===`invalid_union`&&r.errors.forEach(function(t){return t.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=oz(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function MW(e,t,n){if(n===void 0&&(n={}),function(e){return`_def`in e&&typeof e._def==`object`&&`typeName`in e._def}(e))return function(r,i,a){try{return Promise.resolve(kW(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&tB({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:nB(AW(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};if(function(e){return`_zod`in e&&typeof e._zod==`object`}(e))return function(r,i,a){try{return Promise.resolve(kW(function(){return Promise.resolve((n.mode===`sync`?XB:QB)(e,r,t)).then(function(e){return a.shouldUseNativeValidation&&tB({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return e instanceof GB}(e))return{values:{},errors:nB(jW(e.issues,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};throw Error(`Invalid input: not a Zod schema`)}var NW=async e=>e&&typeof e.then==`function`?await e:e,PW=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:i,children:a,autoComplete:o,...s})=>{let c=async i=>{let a=e?.safeParse(i)??{success:!0,data:void 0};await NW(t?.(i)),a.success?await NW(n?.(a.data)):await NW(r?.(Error(a.error.issues.map(e=>e.message).join(`, `))))};return(0,k.jsx)(az,{...s,children:(0,k.jsx)(`form`,{className:W(`flex flex-col gap-y-6`,i),onSubmit:s.handleSubmit(c),autoComplete:o?`on`:`off`,noValidate:!0,children:a})})},FW=(e,t)=>{let n=(0,B.c)(13),r;n[0]===e?r=n[1]:(r=MW(e),n[0]=e,n[1]=r);let i;n[2]!==t||n[3]!==r?(i={resolver:r,...t},n[2]=t,n[3]=r,n[4]=i):i=n[4];let a=$z(i),o;n[5]===a.control?o=n[6]:(o={control:a.control},n[5]=a.control,n[6]=o);let{isSubmitting:s,isSubmitted:c,isLoading:l,isValid:u}=YR(o),d;return n[7]!==a||n[8]!==l||n[9]!==c||n[10]!==s||n[11]!==u?(d={form:a,isSubmitting:s,isSubmitted:c,isLoading:l,isValid:u},n[7]=a,n[8]=l,n[9]=c,n[10]=s,n[11]=u,n[12]=d):d=n[12],d},IW=e=>{let{id:t,...n}=e,r=(0,O.useId)(),i=t??r;return(0,k.jsx)(LW,{value:{id:i},children:(0,k.jsx)(`div`,{className:`flex flex-col gap-2 p-2`,id:i,suppressHydrationWarning:!0,...n})})},LW=(0,O.createContext)({}),RW=(0,O.createContext)({}),zW=e=>{let t=(0,B.c)(7),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;t[2]===n.name?r=t[3]:(r={name:n.name},t[2]=n.name,t[3]=r);let i=r,a;return t[4]!==n||t[5]!==i?(a=(0,k.jsx)(RW,{value:i,children:(0,k.jsx)(nz,{...n})}),t[4]=n,t[5]=i,t[6]=a):a=t[6],a},BW=()=>{let e=(0,B.c)(11),t=(0,O.useContext)(RW),n=(0,O.useContext)(LW),{getFieldState:r,formState:i}=iz(),a;e[0]!==t.name||e[1]!==i||e[2]!==r?(a=r(t.name,i),e[0]=t.name,e[1]=i,e[2]=r,e[3]=a):a=e[3];let o=a;if(!t)throw Error(`useFormField should be used within <FormField>`);let{id:s}=n,c=`${s}-form-item`,l=`${s}-form-item-description`,u=`${s}-form-item-message`,d;return e[4]!==t.name||e[5]!==o||e[6]!==s||e[7]!==c||e[8]!==l||e[9]!==u?(d={id:s,name:t.name,formItemId:c,formDescriptionId:l,formMessageId:u,...o},e[4]=t.name,e[5]=o,e[6]=s,e[7]=c,e[8]=l,e[9]=u,e[10]=d):d=e[10],d},VW=({className:e,children:t,...n})=>(0,k.jsxs)(`i`,{className:W(`text-neutral-400 text-xs`,e),...n,children:[`ⓘ `,t]}),HW=e=>{let{className:t,...n}=e,{error:r,formItemId:i}=BW();return(0,k.jsx)(GD,{className:W(`mb-2`,r&&`text-error`,t),htmlFor:i,...n})},UW=({isRequired:e})=>e?(0,k.jsx)(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):(0,k.jsx)(k.Fragment,{}),WW=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>(0,k.jsxs)(`div`,{className:`ml-1 flex gap-1 align-middle text-base leading-none`,children:[e&&(0,k.jsxs)(HW,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:W(`font-bold`,i),children:[e,(0,k.jsx)(UW,{isRequired:t})]}),n&&(0,k.jsx)(VW,{content:n})]}),GW=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o,className:s})=>(0,k.jsxs)($.Item,{className:W(`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,s),children:[(t||e)&&(0,k.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1 p-1 leading-none`,children:[e&&(0,k.jsx)(WW,{isRequired:n,info:r,htmlFor:o,children:e}),t&&(0,k.jsx)($.Description,{children:t})]}),(0,k.jsx)($.Control,{children:i}),a&&(0,k.jsx)($.Message,{"data-testid":`error-message`})]}),KW=e=>{let{field:t,name:n,label:r,Element:i,isRequired:a,info:o,description:s,showErrorMessage:c,layoutClassName:l,...u}=e,d=a===void 0?!1:a,f=c===void 0?!0:c,{error:p}=BW(),{value:m,onChange:h,...g}=t??{},_=u,v=_.value===void 0?m??``:_.value,y=(...e)=>{let t=e;typeof h==`function`&&h(...t),typeof _.onChange==`function`&&_.onChange(...t)};return(0,k.jsx)(GW,{htmlFor:n,label:r,description:s,isRequired:d,info:o,showErrorMessage:f,"aria-invalid":!!p,className:l,children:(0,k.jsx)(i,{"data-testid":`element`,id:n,...g,...u,value:v,onChange:y,children:u.children})})},qW=e=>{let t=(0,B.c)(6),{control:n}=iz(),r;t[0]===e?r=t[1]:(r=t=>{let{field:n}=t;return(0,k.jsx)(KW,{...e,field:n})},t[0]=e,t[1]=r);let i;return t[2]!==n||t[3]!==e.name||t[4]!==r?(i=(0,k.jsx)($.Field,{control:n,name:e.name,render:r}),t[2]=n,t[3]=e.name,t[4]=r,t[5]=i):i=t[5],i},JW=e=>(0,k.jsx)(qW,{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:ow,...e}),YW=e=>(0,k.jsx)(qW,{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:ZC,...e}),XW=e=>(0,k.jsx)(qW,{id:e.name,"data-testid":e.name,Element:KC,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),ZW=e=>{let t=(0,B.c)(5),[n,r]=(0,O.useState)(!1),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>{e.preventDefault(),e.stopPropagation(),r(QW)},t[0]=i):i=t[0];let a=i,o=n?ku:Ou,s;return t[1]!==o||t[2]!==n||t[3]!==e?(s=(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(KC,{...e,"aria-label":`password`,type:n?`text`:`password`}),(0,k.jsx)(`button`,{"data-testid":`eye-icon`,type:`button`,className:`absolute right-2 h-full flex-row items-center`,onClick:a,"aria-label":n?`Hide password`:`Show password`,children:(0,k.jsx)(o,{className:`mr-2 inline-block cursor-pointer text-neutral`,size:20})})]}),t[1]=o,t[2]=n,t[3]=e,t[4]=s):s=t[4],s};function QW(e){return!e}var $W=({autoComplete:e,...t})=>(0,k.jsx)(qW,{Element:ZW,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}),eG=e=>[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)],tG=(e,t)=>{try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}},nG=`
167
167
  [data-input-otp] {
168
168
  --nojs-bg: white !important;
169
169
  --nojs-fg: black !important;
@@ -182,5 +182,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
182
182
  --nojs-bg: black !important;
183
183
  --nojs-fg: white !important;
184
184
  }
185
- }`,rG=18,iG=40,aG=`${iG}px`,oG=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),sG=e=>{let t=(0,B.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,O.useState)(!1),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(!1),f=i===`none`?!1:(i===`increase-width`||i===`experimental-no-flickering`)&&o&&c,p;t[0]!==n||t[1]!==u||t[2]!==r||t[3]!==i?(p=()=>{let e=n.current,t=r.current;if(!e||!t||u||i===`none`)return;let a=e,o=a.getBoundingClientRect().left+a.offsetWidth,c=a.getBoundingClientRect().top+a.offsetHeight/2,l=o-rG,f=c;document.querySelectorAll(oG).length===0&&document.elementFromPoint(l,f)===e||(s(!0),d(!0))},t[0]=n,t[1]=u,t[2]=r,t[3]=i,t[4]=p):p=t[4];let m=p,h,g;t[5]!==n||t[6]!==i?(h=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=iG)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},g=[n,i],t[5]=n,t[6]=i,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,O.useEffect)(h,g);let _;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(_=()=>{let e=a||document.activeElement===r.current;if(i===`none`||!e)return;let t=setTimeout(m,0),n=setTimeout(m,2e3),o=setTimeout(m,5e3),s=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(n),clearTimeout(o),clearTimeout(s)}},t[9]=r,t[10]=a,t[11]=i,t[12]=m,t[13]=_):_=t[13];let v;t[14]!==r||t[15]!==a||t[16]!==i?(v=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=v):v=t[17],(0,O.useEffect)(_,v);let y;return t[18]!==o||t[19]!==f?(y={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:aG},t[18]=o,t[19]=f,t[20]=y):y=t[20],y},cG=e=>{let t=(0,O.useRef)(void 0);return(0,O.useEffect)(()=>{t.current=e}),t.current},lG=(0,O.createContext)({}),uG=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:l,containerClassName:u,noScriptCSSFallback:d=nG,render:f,children:p,...m})=>{let[h,g]=(0,O.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),_=e??h,v=cG(_),y=e=>{t?.(e),g(e)},b=r===void 0?null:typeof r==`string`?new RegExp(r):r,x=(0,O.useRef)(null),S=(0,O.useRef)(null),C=(0,O.useRef)({value:_,onChange:y,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),w=(0,O.useRef)({prev:[x.current?.selectionStart??null,x.current?.selectionEnd??null,x.current?.selectionDirection??`none`]});(0,O.useEffect)(()=>{let e=x.current,t=S.current;if(!e||!t)return;C.current.value!==e.value&&C.current.onChange(e.value),w.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){M(null),P(null),I(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=w.current.prev,s=-1,c=-1,l=r??`none`;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&x.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;I(t!==null&&n!==null?t===n?t:u:null),M(u),P(d),w.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&A(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;tG(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),tG(e.sheet,`[data-input-otp]:autofill { ${t} }`),tG(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),tG(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),tG(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[T,E]=(0,O.useState)(!1),[D,A]=(0,O.useState)(!1),[j,M]=(0,O.useState)(null),[N,P]=(0,O.useState)(null),[F,I]=(0,O.useState)(null);(0,O.useEffect)(()=>{eG(()=>{x.current?.dispatchEvent(new Event(`input`));let e=x.current?.selectionStart??null,t=x.current?.selectionEnd??null,n=x.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),I(e),w.current.prev=[e,t,n])})},[_,D]),(0,O.useEffect)(()=>{v!==void 0&&_!==v&&v.length<n&&_.length===n&&o?.(_)},[n,o,v,_]);let L=(0,O.useRef)(null);(0,O.useEffect)(()=>{let e=D&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[D,F,s]);let ee=sG({containerRef:S,inputRef:x,pushPasswordManagerStrategy:c,isFocused:D}),te=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&b&&!b.test(t)){e.preventDefault();return}typeof v==`string`&&t.length<v.length&&document.dispatchEvent(new Event(`selectionchange`)),y(t)},ne=()=>{if(x.current){let e=Math.min(x.current.value.length,n-1),t=x.current.value.length;x.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},re=e=>{let t=x.current;if(!l&&(!C.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=x.current?.selectionStart,o=x.current?.selectionEnd,s=(a===o?_.slice(0,a??0)+i+_.slice(a??0):_.slice(0,a??0)+i+_.slice(o??0)).slice(0,n);if(!(s.length>0&&b&&!b.test(s))&&t){t.value=s,y(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},R={width:ee.willPushPWMBadge?`calc(100% + ${ee.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:ee.willPushPWMBadge?`inset(0 ${ee.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},z=(0,k.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:b?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:R,maxLength:n,value:_,ref:x,onPaste:e=>{re(e),m.onPaste?.(e)},onChange:te,onMouseOver:e=>{E(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{E(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=x.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&I(t)}}),m.onKeyDown?.(e)},onFocus:e=>{ne(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=D&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=_[t]===void 0?null:_[t];return{char:r,placeholderChar:_[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:D,isHovering:!m.disabled&&T,setSelection:e=>{let t=x.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=_[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},ae=f===void 0?(0,k.jsx)(lG.Provider,{value:ie,children:p}):f(ie);return(0,k.jsxs)(k.Fragment,{children:[d!==null&&(0,k.jsx)(`noscript`,{children:(0,k.jsx)(`style`,{children:d})}),(0,k.jsxs)(`div`,{ref:S,className:W(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ae,(0,k.jsx)(`div`,{className:`absolute inset-0`,children:z})]})]})},dG=({className:e,render:t,...n})=>(0,k.jsx)(uG,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:W(`disabled:cursor-not-allowed`,e),render:t,...n}),fG=({className:e,...t})=>(0,k.jsx)(`div`,{className:W(`z-10 flex items-center gap-3`,e),...t}),pG=e=>{let t=(0,B.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,O.useContext)(lG),{char:c,isActive:l}=s?.slots[n]??{},u;t[0]===s?u=t[1]:(u=s??{},t[0]=s,t[1]=u);let{setSelection:d}=u,f;t[2]!==n||t[3]!==i||t[4]!==d?(f=e=>{d?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=d,t[5]=f):f=t[5];let p=f,m;t[6]!==n||t[7]!==a||t[8]!==d?(m=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=d,t[9]=m):m=t[9];let h=m;return(0,k.jsx)(rS,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:W(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:h,label:null,...o,children:(0,k.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},mG=e=>(0,k.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full text-text/50`,...e,children:(0,k.jsx)(ju,{})}),hG=e=>(0,k.jsx)(`div`,{"data-indicator":!0,className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),gG=e=>e?.getAttribute(`aria-selected`)===`true`,_G=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c=6,maxLength:l=6,...u})=>{let{error:d}=BW(),f=(0,O.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=lS(f,{selector:gG,isHoverable:!0});return(0,O.useEffect)(()=>{m()},[]),(0,k.jsx)(GW,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,k.jsx)(dG,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(fG,{children:[(0,k.jsx)(pG,{index:0,ref:e=>{f.current[0]=e}}),(0,k.jsx)(pG,{index:1,ref:e=>{f.current[1]=e}}),(0,k.jsx)(pG,{index:2,ref:e=>{f.current[2]=e}})]}),(0,k.jsx)(mG,{}),(0,k.jsxs)(fG,{children:[(0,k.jsx)(pG,{index:3,ref:e=>{f.current[3]=e}}),(0,k.jsx)(pG,{index:4,ref:e=>{f.current[4]=e}}),(0,k.jsx)(pG,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,k.jsx)(hG,{style:p})]})})})},vG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c,maxLength:l,...u}=e,d=c===void 0?6:c,f=l===void 0?6:l,{control:p}=iz();return(0,k.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,k.jsx)(_G,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},yG=({className:e,...t})=>(0,k.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,k.jsx)(zu,{className:`absolute left-2 size-4`}),(0,k.jsx)(KC,{...t,type:`search`,className:W(`pl-8`,e)})]}),bG=e=>(0,k.jsx)(qW,{id:e.name,"data-testid":e.name,Element:yG,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),xG=e=>(0,k.jsx)(qW,{Element:qC,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}),SG=e=>(0,k.jsx)(qW,{Element:XC,id:e.name,"data-testid":e.name,...e}),CG=au([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:hover:opacity-80`,`ring-offset-background`,`hover:bg-neutral-500/10`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`border-primary/30 text-primary ring-primary/20 checked:border-primary checked:bg-primary`,secondary:`border-secondary/30 text-secondary ring-secondary/20 checked:border-secondary checked:bg-secondary`,destructive:`border-destructive/30 text-destructive ring-destructive/20 checked:border-destructive checked:bg-destructive`,neutral:`border-neutral/30 text-neutral ring-neutral/20 checked:border-neutral checked:bg-neutral`,light:`border-white/30 text-white ring-white/20 checked:border-white checked:bg-white`,text:`border-text/30 text-text ring-text/20 checked:border-text checked:bg-text`,"text-inverse":`border-text-inverse/30 text-text-inverse ring-text-inverse/20 checked:border-text-inverse checked:bg-text-inverse`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),wG=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,k.jsx)(`input`,{type:`checkbox`,className:W(CG({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),TG=e=>{let{label:t,name:n,id:r}=e;return t?(0,k.jsxs)(`label`,{htmlFor:r??n,className:W(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,k.jsx)(wG,{id:r??n,...e}),t]}):(0,k.jsx)(wG,{id:r??n,...e})},EG=({inputLabel:e,value:t,onChange:n,...r})=>(0,k.jsx)(TG,{...r,label:e,checked:!!t,onChange:n}),DG=({autoComplete:e,...t})=>(0,k.jsx)(qW,{Element:EG,id:t.name,"data-testid":t.name,autoComplete:e,...t}),OG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=BW();return(0,k.jsx)(GW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(xR,{onValueChange:t.onChange,values:t.value,...l,children:c})})},kG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=iz();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(OG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},AG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=BW();return(0,k.jsx)(GW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},jG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=iz();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(AG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},MG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=BW();return(0,k.jsx)(GW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(vS,{...t,...l,children:c})})},NG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=iz();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(MG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},PG=Symbol.for(`react.lazy`),FG=O.use;function IG(e){return typeof e==`object`&&!!e&&`then`in e}function LG(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===PG&&`_payload`in e&&IG(e._payload)}function RG(e){let t=BG(e),n=O.forwardRef((e,n)=>{let{children:r,...i}=e;LG(r)&&typeof FG==`function`&&(r=FG(r._payload));let a=O.Children.toArray(r),o=a.find(HG);if(o){let e=o.props.children,r=a.map(t=>t===o?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t);return(0,k.jsx)(t,{...i,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return(0,k.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var zG=RG(`Slot`);function BG(e){let t=O.forwardRef((e,t)=>{let{children:n,...r}=e;if(LG(n)&&typeof FG==`function`&&(n=FG(n._payload)),O.isValidElement(n)){let e=WG(n),i=UG(r,n.props);return n.type!==O.Fragment&&(i.ref=t?hc(t,e):e),O.cloneElement(n,i)}return O.Children.count(n)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var VG=Symbol(`radix.slottable`);function HG(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===VG}function UG(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function WG(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var GG=e=>{let t=(0,B.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=BW(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,k.jsx)(zG,{id:r,"aria-describedby":o,"aria-invalid":s,...e}),t[0]=r,t[1]=e,t[2]=o,t[3]=s,t[4]=c):c=t[4],c},KG=e=>{let t=(0,B.c)(3),{formDescriptionId:n}=BW(),r;return t[0]!==n||t[1]!==e?(r=(0,k.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},qG=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=BW(),a=r?String(r?.message??``):t;return a?(0,k.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=PW;$.Description=KG,$.Control=GG,$.Field=zW,$.Item=IW,$.Label=WW,$.Message=qG,$.Element=qW,$.Input=XW,$.InputPassword=$W,$.Checkbox=DG,$.TextArea=xG,$.AutoSizedTextArea=SG,$.Button=rS,$.Select=jG,$.MultiSelect=kG,$.EditableFieldInput=JW,$.EditableFieldTextArea=YW,$.SwitchSelector=NG,$.OTP=vG,$.SearchInput=bG;var JG=Z(`ZodISODateTime`,(e,t)=>{pH.init(e,t),xK.init(e,t)});function YG(e){return NU(JG,e)}var XG=Z(`ZodISODate`,(e,t)=>{mH.init(e,t),xK.init(e,t)});function ZG(e){return PU(XG,e)}var QG=Z(`ZodISOTime`,(e,t)=>{hH.init(e,t),xK.init(e,t)});function $G(e){return FU(QG,e)}var eK=Z(`ZodISODuration`,(e,t)=>{gH.init(e,t),xK.init(e,t)});function tK(e){return IU(eK,e)}var nK=Z(`ZodError`,(e,t)=>{GB.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>JB(e,t)},flatten:{value:t=>qB(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,dB,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,dB,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),rK=YB(nK),iK=ZB(nK),aK=$B(nK),oK=tV(nK),sK=rV(nK),cK=iV(nK),lK=aV(nK),uK=oV(nK),dK=sV(nK),fK=cV(nK),pK=lV(nK),mK=uV(nK),hK=new WeakMap;function gK(e,t,n){let r=Object.getPrototypeOf(e),i=hK.get(r);if(i||(i=new Set,hK.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var _K=Z(`ZodType`,(e,t)=>($V.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:uW(e,`input`),output:uW(e,`output`)}}),e.toJSONSchema=lW(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>rK(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>aK(e,t,n),e.parseAsync=async(t,n)=>iK(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>oK(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>sK(e,t,n),e.decode=(t,n)=>cK(e,t,n),e.encodeAsync=async(t,n)=>lK(e,t,n),e.decodeAsync=async(t,n)=>uK(e,t,n),e.safeEncode=(t,n)=>dK(e,t,n),e.safeDecode=(t,n)=>fK(e,t,n),e.safeEncodeAsync=async(t,n)=>pK(e,t,n),e.safeDecodeAsync=async(t,n)=>mK(e,t,n),gK(e,`ZodType`,{check(...e){let t=this.def;return this.clone(vB(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return OB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Sq(e,t))},superRefine(e,t){return this.check(Cq(e,t))},overwrite(e){return this.check(JU(e))},optional(){return iq(this)},exactOptional(){return oq(this)},nullable(){return cq(this)},nullish(){return iq(cq(this))},nonoptional(e){return mq(this,e)},array(){return KK(this)},or(e){return XK([this,e])},and(e){return QK(this,e)},transform(e){return vq(this,nq(e))},default(e){return uq(this,e)},prefault(e){return fq(this,e)},catch(e){return gq(this,e)},pipe(e){return vq(this,e)},readonly(){return bq(this)},describe(e){let t=this.clone();return lU.add(t,{description:e}),t},meta(...e){if(e.length===0)return lU.get(this);let t=this.clone();return lU.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return lU.get(e)?.description},configurable:!0}),e)),vK=Z(`_ZodString`,(e,t)=>{eH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fW(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,gK(e,`_ZodString`,{regex(...e){return this.check(HU(...e))},includes(...e){return this.check(GU(...e))},startsWith(...e){return this.check(KU(...e))},endsWith(...e){return this.check(qU(...e))},min(...e){return this.check(BU(...e))},max(...e){return this.check(zU(...e))},length(...e){return this.check(VU(...e))},nonempty(...e){return this.check(BU(1,...e))},lowercase(e){return this.check(UU(e))},uppercase(e){return this.check(WU(e))},trim(){return this.check(XU())},normalize(...e){return this.check(YU(...e))},toLowerCase(){return this.check(ZU())},toUpperCase(){return this.check(QU())},slugify(){return this.check($U())}})}),yK=Z(`ZodString`,(e,t)=>{eH.init(e,t),vK.init(e,t),e.email=t=>e.check(dU(SK,t)),e.url=t=>e.check(_U(TK,t)),e.jwt=t=>e.check(MU(BK,t)),e.emoji=t=>e.check(vU(EK,t)),e.guid=t=>e.check(fU(CK,t)),e.uuid=t=>e.check(pU(wK,t)),e.uuidv4=t=>e.check(mU(wK,t)),e.uuidv6=t=>e.check(hU(wK,t)),e.uuidv7=t=>e.check(gU(wK,t)),e.nanoid=t=>e.check(yU(DK,t)),e.guid=t=>e.check(fU(CK,t)),e.cuid=t=>e.check(bU(OK,t)),e.cuid2=t=>e.check(xU(kK,t)),e.ulid=t=>e.check(SU(AK,t)),e.base64=t=>e.check(kU(LK,t)),e.base64url=t=>e.check(AU(RK,t)),e.xid=t=>e.check(CU(jK,t)),e.ksuid=t=>e.check(wU(MK,t)),e.ipv4=t=>e.check(TU(NK,t)),e.ipv6=t=>e.check(EU(PK,t)),e.cidrv4=t=>e.check(DU(FK,t)),e.cidrv6=t=>e.check(OU(IK,t)),e.e164=t=>e.check(jU(zK,t)),e.datetime=t=>e.check(YG(t)),e.date=t=>e.check(ZG(t)),e.time=t=>e.check($G(t)),e.duration=t=>e.check(tK(t))});function bK(e){return uU(yK,e)}var xK=Z(`ZodStringFormat`,(e,t)=>{tH.init(e,t),vK.init(e,t)}),SK=Z(`ZodEmail`,(e,t)=>{iH.init(e,t),xK.init(e,t)}),CK=Z(`ZodGUID`,(e,t)=>{nH.init(e,t),xK.init(e,t)}),wK=Z(`ZodUUID`,(e,t)=>{rH.init(e,t),xK.init(e,t)}),TK=Z(`ZodURL`,(e,t)=>{aH.init(e,t),xK.init(e,t)}),EK=Z(`ZodEmoji`,(e,t)=>{oH.init(e,t),xK.init(e,t)}),DK=Z(`ZodNanoID`,(e,t)=>{sH.init(e,t),xK.init(e,t)}),OK=Z(`ZodCUID`,(e,t)=>{cH.init(e,t),xK.init(e,t)}),kK=Z(`ZodCUID2`,(e,t)=>{lH.init(e,t),xK.init(e,t)}),AK=Z(`ZodULID`,(e,t)=>{uH.init(e,t),xK.init(e,t)}),jK=Z(`ZodXID`,(e,t)=>{dH.init(e,t),xK.init(e,t)}),MK=Z(`ZodKSUID`,(e,t)=>{fH.init(e,t),xK.init(e,t)}),NK=Z(`ZodIPv4`,(e,t)=>{_H.init(e,t),xK.init(e,t)}),PK=Z(`ZodIPv6`,(e,t)=>{vH.init(e,t),xK.init(e,t)}),FK=Z(`ZodCIDRv4`,(e,t)=>{yH.init(e,t),xK.init(e,t)}),IK=Z(`ZodCIDRv6`,(e,t)=>{bH.init(e,t),xK.init(e,t)}),LK=Z(`ZodBase64`,(e,t)=>{SH.init(e,t),xK.init(e,t)}),RK=Z(`ZodBase64URL`,(e,t)=>{wH.init(e,t),xK.init(e,t)}),zK=Z(`ZodE164`,(e,t)=>{TH.init(e,t),xK.init(e,t)}),BK=Z(`ZodJWT`,(e,t)=>{DH.init(e,t),xK.init(e,t)}),VK=Z(`ZodUnknown`,(e,t)=>{OH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function HK(){return LU(VK)}var UK=Z(`ZodNever`,(e,t)=>{kH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pW(e,t,n,r)});function WK(e){return RU(UK,e)}var GK=Z(`ZodArray`,(e,t)=>{jH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_W(e,t,n,r),e.element=t.element,gK(e,`ZodArray`,{min(e,t){return this.check(BU(e,t))},nonempty(e){return this.check(BU(1,e))},max(e,t){return this.check(zU(e,t))},length(e,t){return this.check(VU(e,t))},unwrap(){return this.element}})});function KK(e,t){return eW(GK,e,t)}var qK=Z(`ZodObject`,(e,t)=>{IH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vW(e,t,n,r),gB(e,`shape`,()=>t.shape),gK(e,`ZodObject`,{keyof(){return eq(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:HK()})},loose(){return this.clone({...this._zod.def,catchall:HK()})},strict(){return this.clone({...this._zod.def,catchall:WK()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return MB(this,e)},safeExtend(e){return NB(this,e)},merge(e){return PB(this,e)},pick(e){return AB(this,e)},omit(e){return jB(this,e)},partial(...e){return FB(rq,this,e[0])},required(...e){return IB(pq,this,e[0])}})});function JK(e,t){return new qK({type:`object`,shape:e??{},...Q(t)})}var YK=Z(`ZodUnion`,(e,t)=>{RH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yW(e,t,n,r),e.options=t.options});function XK(e,t){return new YK({type:`union`,options:e,...Q(t)})}var ZK=Z(`ZodIntersection`,(e,t)=>{zH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bW(e,t,n,r)});function QK(e,t){return new ZK({type:`intersection`,left:e,right:t})}var $K=Z(`ZodEnum`,(e,t)=>{HH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mW(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new $K({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new $K({...t,checks:[],...Q(r),entries:i})}});function eq(e,t){return new $K({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var tq=Z(`ZodTransform`,(e,t)=>{UH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gW(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sB(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(UB(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(UB(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function nq(e){return new tq({type:`transform`,transform:e})}var rq=Z(`ZodOptional`,(e,t)=>{GH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iq(e){return new rq({type:`optional`,innerType:e})}var aq=Z(`ZodExactOptional`,(e,t)=>{KH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oq(e){return new aq({type:`optional`,innerType:e})}var sq=Z(`ZodNullable`,(e,t)=>{qH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cq(e){return new sq({type:`nullable`,innerType:e})}var lq=Z(`ZodDefault`,(e,t)=>{JH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uq(e,t){return new lq({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():TB(t)}})}var dq=Z(`ZodPrefault`,(e,t)=>{XH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fq(e,t){return new dq({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():TB(t)}})}var pq=Z(`ZodNonOptional`,(e,t)=>{ZH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mq(e,t){return new pq({type:`nonoptional`,innerType:e,...Q(t)})}var hq=Z(`ZodCatch`,(e,t)=>{$H.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function gq(e,t){return new hq({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var _q=Z(`ZodPipe`,(e,t)=>{eU.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EW(e,t,n,r),e.in=t.in,e.out=t.out});function vq(e,t){return new _q({type:`pipe`,in:e,out:t})}var yq=Z(`ZodReadonly`,(e,t)=>{nU.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bq(e){return new yq({type:`readonly`,innerType:e})}var xq=Z(`ZodCustom`,(e,t)=>{iU.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hW(e,t,n,r)});function Sq(e,t={}){return tW(xq,e,t)}function Cq(e,t){return nW(e,t)}var wq={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),localIds:[`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`]},Tq=e=>{let t=(0,B.c)(3),[n,r]=(0,O.useState)(e),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{r(e??window.document.body)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,O.useEffect)(i,a),n},Eq=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},Dq=[],Oq=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(Eq.subscribe,Eq.getSnapshot,kq),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:Eq.addBlockage,removeBlockage:Eq.removeBlockage,isElementScrollBlocked:Eq.isElementScrollBlocked},e[0]=t,e[1]=n),n};function kq(){return Dq}var Aq=e=>{let t=(0,B.c)(14),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{disableScroll:r,element:i,key:a}=n,o=r===void 0?!1:r,s=a===void 0?`unnamed_blocker`:a,{isElementScrollBlocked:c,addBlockage:l,removeBlockage:u}=Oq(),d=Tq(i),f,p;t[2]!==l||t[3]!==o||t[4]!==i||t[5]!==s||t[6]!==u?(f=()=>{let e=i??window.document.body;return o?l(s,e):u(s,e),()=>{u(s,e)}},p=[l,o,i,s,u],t[2]=l,t[3]=o,t[4]=i,t[5]=s,t[6]=u,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,O.useEffect)(f,p);let m;t[9]!==d||t[10]!==c?(m=d?c(d):!1,t[9]=d,t[10]=c,t[11]=m):m=t[11];let h;return t[12]===m?h=t[13]:(h={isScrollBlocked:m},t[12]=m,t[13]=h),h},jq=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,Mq=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,Nq=({className:e,...t})=>(0,k.jsx)(`h1`,{className:W(`font-bold text-2xl`,e),...t}),Pq=({className:e,...t})=>(0,k.jsx)(`h2`,{className:W(`mb-2 font-bold text-2xl`,jq,e),...t}),Fq=({className:e,...t})=>(0,k.jsx)(`h3`,{className:W(`mb-2 font-bold text-xl`,jq,e),...t}),Iq=({className:e,...t})=>(0,k.jsx)(`h4`,{className:W(`font-bold text-lg`,jq,e),...t}),Lq=({className:e,...t})=>(0,k.jsx)(`h5`,{className:W(`font-bold text-base`,jq,e),...t}),Rq=({className:e,...t})=>(0,k.jsx)(`h6`,{className:W(`ml-3 font-bold text-base`,jq,e),...t}),zq=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Bq=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Vq=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},Hq=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?zq(t):void 0;return(0,k.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Vq(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Bq(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&Mq,n),...i,children:t})},Uq=({isClickable:e,...t})=>(0,k.jsx)(Nq,{...t}),Wq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Pq,isClickable:e,...t}),Gq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Fq,isClickable:e,...t}),Kq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Iq,isClickable:e,...t}),qq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Lq,isClickable:e,...t}),Jq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Rq,isClickable:e,...t}),Yq=au(`flex cursor-default flex-col overflow-hidden shadow-sm`,{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-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),Xq={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},Zq=Gx.create(Qx),Qq=e=>{let t=(0,B.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:l,isScrollable:u,disableScroll:d,padding:f,...p}=e,m=o===void 0?!1:o,h=c===void 0?`md`:c,g=u===void 0?!1:u,_=d===void 0?!0:d,v=f===void 0?`none`:f,y=Tq(i),b=r&&_,x;t[0]===b?x=t[1]:(x={key:`modal`,disableScroll:b},t[0]=b,t[1]=x),Aq(x);let S,C;if(t[2]!==r||t[3]!==a?(S=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},C=[r,a],t[2]=r,t[3]=a,t[4]=S,t[5]=C):(S=t[4],C=t[5]),(0,O.useEffect)(S,C),!y){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[6]=e):e=t[6],e}let w=!!s,T=Xq[v||`none`],E;return t[7]===a?E=t[8]:(E=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=E),(0,Dc.createPortal)((0,k.jsx)(Gx.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:r?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:E,"aria-hidden":!r,children:(0,k.jsxs)(Zq,{onClick:$q,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:Yq({size:h,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,k.jsxs)(`div`,{className:W(`relative flex-none px-4 pt-4`,m&&w?`flex items-start`:m?`flex justify-end`:w?`items-center`:`hidden`),children:[w&&(0,k.jsx)(Gq,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Hu,size:`icon-md`})]}),(0,k.jsx)(`div`,{className:W(`flex min-h-0 w-full flex-1 flex-col`,g===!0&&`overflow-auto`,g===`y`&&`overflow-y-auto overflow-x-hidden`,g===`x`&&`overflow-x-auto overflow-y-hidden`,!g&&`overflow-visible`),children:(0,k.jsx)(`div`,{className:W(`flex h-full w-full flex-1 flex-col`,T),children:n})})]})}),y)};function $q(e){return e.stopPropagation()}var eJ=e=>{let t=(0,B.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,O.useState)(!1),{setLocaleDictionary:u}=DC(),{mutate:d,isPending:f}=vD(),{mutate:p,isPending:m}=CD(),{mutate:h,isPending:g}=_D(),_=m||g,{editedContent:v,restoreEditedContent:y}=FC(),{deleteButton:b,resetButton:x,saveButton:S,publishButton:C,downloadButton:w,confirmation:T}=yt(wq),{isAuthenticated:E}=uD(),D=v?.[n.localId],A;t[0]!==n||t[1]!==D?(A=D&&JSON.stringify(D)!==JSON.stringify(n),t[0]=n,t[1]=D,t[2]=A):A=t[2];let j=A,M=n?.id!==void 0,N;t[3]!==n||t[4]!==v||t[5]!==o||t[6]!==y||t[7]!==u||t[8]!==p?(N=async()=>{v?.[n.localId]&&p({dictionary:{...n,...v?.[n.localId]}},{onSuccess:()=>{u(v?.[n.localId]),y(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=v,t[5]=o,t[6]=y,t[7]=u,t[8]=p,t[9]=N):N=t[9];let P=N,F;t[10]!==n||t[11]!==v||t[12]!==o||t[13]!==h||t[14]!==y||t[15]!==u?(F=()=>{let e={...n,...v?.[n.localId]};h({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),y(n.localId),o?.())}})},t[10]=n,t[11]=v,t[12]=o,t[13]=h,t[14]=y,t[15]=u,t[16]=F):F=t[16];let I=F,L;t[17]!==d||t[18]!==n||t[19]!==a?(L=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=L):L=t[20];let ee=L,te;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>l(!1),t[21]=te):te=t[21];let ne;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ne=()=>l(!1),t[22]=ne):ne=t[22],(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Qq,{isOpen:c,title:T.title.value,size:`md`,onClose:te,padding:`md`,children:(0,k.jsxs)(`form`,{className:`size-full`,children:[(0,k.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:T.message}),(0,k.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,k.jsx)($.Button,{label:T.cancelButton.label.value,disabled:!j||_,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:ne,children:T.cancelButton.text}),(0,k.jsx)($.Button,{label:T.confirmButton.label.value,disabled:!j||_,Icon:Ru,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:P,children:T.confirmButton.text})]})]})}),(0,k.jsxs)(`form`,{className:W(`flex justify-end gap-2`,i),...s,children:[r.includes(`remote`)&&M&&a&&E&&(0,k.jsx)($.Button,{label:b.label.value,Icon:Bu,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:b.text}),j&&(0,k.jsx)($.Button,{label:x.label.value,disabled:!j,Icon:Lu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>y(n.localId),children:x.text}),r.includes(`local`)&&(0,k.jsx)($.Button,{label:w.label.value,disabled:!j||_,Icon:Eu,color:`text`,variant:E?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:w.text}),r.includes(`remote`)&&E&&!M&&(0,k.jsx)($.Button,{label:C.label.value,disabled:_,Icon:_u,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:C.text}),r.includes(`remote`)&&E&&M&&j&&(0,k.jsx)($.Button,{label:S.label.value,disabled:!j||_,Icon:Ru,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:S.text})]})]})},tJ={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},localIds:[`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`]},nJ=(e,t=2e3,n,r)=>{let[i,a]=(0,O.useState)(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},rJ=e=>{let t=(0,B.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:l,disable:u,preventDefault:d,stopPropagation:f,size:p}=e,m=a===void 0?`Copy to clipboard`:a,h=o===void 0?`Copied to clipboard`:o,g=s===void 0?2e3:s,_=d===void 0?!0:d,v=f===void 0?!0:f,y=p===void 0?14:p,{isCopied:b,copy:x}=nJ(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,k.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let S;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==x||t[8]!==b||t[9]!==_||t[10]!==y||t[11]!==v||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{_&&e.preventDefault(),v&&e.stopPropagation(),x()},o=b?h:m,s=b?wu:Tu;S=(0,k.jsxs)(`span`,{className:W(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":b,"data-testid":`copy-to-clipboard`,children:[(0,k.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,k.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:y,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=x,t[8]=b,t[9]=_,t[10]=y,t[11]=v,t[12]=n,t[13]=S}else S=t[13];return S},iJ=au(`relative z-0 flex size-full flex-row items-center gap-2`,{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`}}),aJ=au(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,destructive:`bg-destructive/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),oJ=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,O.useRef)([]),c=(0,O.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=lS(s,{isHoverable:i,orientation:a});return(0,O.useEffect)(()=>{u()},[t]),(0,k.jsxs)(`div`,{className:W(iJ({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,O.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&(0,k.jsx)(`div`,{className:W(aJ({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},sJ={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"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."},"projectInput":{"label":"Projects","description":"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.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"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."},"projectInput":{"label":"Projects","description":"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.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"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.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"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."},"projectInput":{"label":"Projekte","description":"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.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"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."},"projectInput":{"label":"Progetti","description":"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.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"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.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"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."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"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":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"auditButton":{"label":"Отслеживание"}}}}`),localIds:[`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`]},cJ={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),localIds:[`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`]},lJ=e=>{let t=(0,B.c)(38),{titleRequiredError:n,titleInvalidTypeError:r,titleMinLengthError:i,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:s,keyMinLengthError:c,descriptionRequiredError:l,descriptionInvalidTypeError:u,requiredErrorProjectId:d,invalidTypeErrorProjectId:f,invalidTypeErrorTags:p,locationRequiredError:m,locationInvalidTypeError:h,filePathRequiredError:g,filePathInvalidTypeError:_}=yt(cJ),v;if(t[0]!==u||t[1]!==l||t[2]!==_||t[3]!==g||t[4]!==f||t[5]!==p||t[6]!==o||t[7]!==c.value||t[8]!==a||t[9]!==s.value||t[10]!==h||t[11]!==m||t[12]!==e||t[13]!==d||t[14]!==r||t[15]!==i.value||t[16]!==n){let y;t[18]!==r||t[19]!==n?(y=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==a?(b=e=>e.input===void 0?a.value:o.value,t[21]=o,t[22]=a,t[23]=b):b=t[23];let x;t[24]!==u||t[25]!==l?(x=e=>e.input===void 0?l.value:u.value,t[24]=u,t[25]=l,t[26]=x):x=t[26];let S;t[27]!==f||t[28]!==d?(S=e=>e.input===void 0?d.value:f.value,t[27]=f,t[28]=d,t[29]=S):S=t[29];let C;t[30]===p?C=t[31]:(C=()=>p.value,t[30]=p,t[31]=C);let w;t[32]!==h||t[33]!==m?(w=e=>e.input===void 0?m.value:h.value,t[32]=h,t[33]=m,t[34]=w):w=t[34];let T;t[35]!==_||t[36]!==g?(T=e=>e.input===void 0?g.value:_.value,t[35]=_,t[36]=g,t[37]=T):T=t[37],v=JK({title:bK({error:y}).refine(uJ,{error:i.value}).optional(),key:bK({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:bK({error:x}).optional(),projectIds:KK(bK({error:S})).default([e]),tags:KK(bK({error:C})).default([]),location:eq([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:eq([`static`,`dynamic`,`fetch`]).optional(),filePath:bK({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=_,t[3]=g,t[4]=f,t[5]=p,t[6]=o,t[7]=c.value,t[8]=a,t[9]=s.value,t[10]=h,t[11]=m,t[12]=e,t[13]=d,t[14]=r,t[15]=i.value,t[16]=n,t[17]=v}else v=t[17];return v};function uJ(e){return e.length===0||e.length>=4}var dJ=e=>{let t=(0,B.c)(62),{dictionary:n,mode:r}=e,{session:i}=lD(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=gD(),{data:l}=yD(),u=s?.data??[],d=l?.data??[],f=lJ(String(o?.id)),p=n.location??`remote`,m;t[2]!==n||t[3]!==p?(m={defaultValues:{...n,location:p}},t[2]=n,t[3]=p,t[4]=m):m=t[4];let{form:h,isSubmitting:g}=FW(f,m),{editedContent:_,setEditedDictionary:v}=FC(),{titleInput:y,keyInput:b,descriptionInput:x,projectInput:S,tagsSelect:C,locationSelect:w,importModeSelect:T,filePathInput:E,auditButton:D}=yt(sJ),{mutate:A,isPending:j}=bD(),M=_?.[n.localId],N;t[5]!==n||t[6]!==h?(N=()=>{h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[5]=n,t[6]=h,t[7]=N):N=t[7];let P=h?.reset,F;t[8]!==n||t[9]!==P?(F=[n,P],t[8]=n,t[9]=P,t[10]=F):F=t[10],(0,O.useEffect)(N,F);let I;t[11]!==n||t[12]!==h||t[13]!==M?(I=()=>{M===void 0&&h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[11]=n,t[12]=h,t[13]=M,t[14]=I):I=t[14];let L;t[15]===M?L=t[16]:(L=[M],t[15]=M,t[16]=L),(0,O.useEffect)(I,L);let ee;t[17]!==A||t[18]!==n||t[19]!==h||t[20]!==v||t[21]!==M?(ee=()=>{let e={...n,...M};A({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(!t?.data)return;let n=t.data.fileContent,r={...e,...n,tags:n.tags??e.tags??[]};v(r),h.reset(r)}})},t[17]=A,t[18]=n,t[19]=h,t[20]=v,t[21]=M,t[22]=ee):ee=t[22];let te=ee,ne;t[23]===h.control?ne=t[24]:(ne={control:h.control,name:`location`},t[23]=h.control,t[24]=ne);let re=ez(ne),R=re===`local`||re===`hybrid`,z;t[25]!==n||t[26]!==h||t[27]!==v||t[28]!==M?(z=e=>{h.setValue(`key`,e,{shouldDirty:!0}),v({...n,...M??{},key:e})},t[25]=n,t[26]=h,t[27]=v,t[28]=M,t[29]=z):z=t[29];let ie;t[30]!==n||t[31]!==h||t[32]!==v||t[33]!==M?(ie=e=>{h.setValue(`title`,e,{shouldDirty:!0}),v({...n,...M??{},title:e})},t[30]=n,t[31]=h,t[32]=v,t[33]=M,t[34]=ie):ie=t[34];let ae;t[35]!==n||t[36]!==h||t[37]!==v||t[38]!==M?(ae=e=>{h.setValue(`description`,e,{shouldDirty:!0}),v({...n,...M??{},description:e})},t[35]=n,t[36]=h,t[37]=v,t[38]=M,t[39]=ae):ae=t[39];let oe;t[40]!==n||t[41]!==h||t[42]!==w||t[43]!==r||t[44]!==v||t[45]!==M?(oe=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?h.getValues(`filePath`)??n.filePath:void 0;e||h.setValue(`filePath`,void 0),v({...n,...M??{},location:r,filePath:i})},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),v({...n,...M??{},location:r})};return(0,k.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,k.jsx)($.Label,{className:`ml-1`,children:w.label}),(0,k.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,k.jsx)(TG,{id:`location-local`,name:`location-local`,label:w.local.value,color:`text`,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,k.jsx)(TG,{id:`location-remote`,name:`location-remote`,label:w.remote.value,color:`text`,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,k.jsx)($.Description,{children:w.testDescription}),(0,k.jsx)($.Message,{})]})},t[40]=n,t[41]=h,t[42]=w,t[43]=r,t[44]=v,t[45]=M,t[46]=oe):oe=t[46];let se;t[47]!==n||t[48]!==h||t[49]!==v||t[50]!==M?(se=e=>{h.setValue(`importMode`,e,{shouldDirty:!0}),v({...n,...M??{},importMode:e})},t[47]=n,t[48]=h,t[49]=v,t[50]=M,t[51]=se):se=t[51];let ce;t[52]!==n||t[53]!==h||t[54]!==v||t[55]!==M?(ce=e=>{let t=[e].flat();h.setValue(`projectIds`,t,{shouldDirty:!0}),v({...n,...M??{},projectIds:t})},t[52]=n,t[53]=h,t[54]=v,t[55]=M,t[56]=ce):ce=t[56];let le;return t[57]!==n||t[58]!==h||t[59]!==v||t[60]!==M?(le=e=>{let t=[e].flat();h.setValue(`tags`,t,{shouldDirty:!0}),v({...n,...M??{},tags:t})},t[57]=n,t[58]=h,t[59]=v,t[60]=M,t[61]=le):le=t[61],(0,k.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsx)($.EditableFieldInput,{name:`key`,label:b.label,placeholder:b.label.value,description:b.description,disabled:g,isRequired:!0,onSave:z}),(0,k.jsx)($.EditableFieldInput,{name:`title`,label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:g,onSave:ie})]}),(0,k.jsx)($.EditableFieldTextArea,{name:`description`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ae}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,k.jsx)($.Field,{control:h.control,name:`location`,render:oe}),(0,k.jsx)(qy,{mode:`wait`,children:R&&(0,k.jsx)(Gx.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,k.jsx)($.Input,{name:`filePath`,label:E.label.value,placeholder:E.placeholder.value,description:E.description.value,disabled:g||!R,onChange:e=>{let t=e.target.value;v({...n,...M??{},filePath:t})}})},`filePath-input`)})]}),(0,k.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,k.jsxs)($.Select,{name:`importMode`,label:T.label.value,description:T.description.value,onValueChange:se,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:T.label.value})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`static`,children:T.static.value}),(0,k.jsx)(J.Item,{value:`dynamic`,children:T.dynamic.value}),(0,k.jsx)(J.Item,{value:`live`,children:T.live.value})]})]})}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsxs)($.MultiSelect,{name:`projectIds`,label:S.label.value,description:S.description,onValueChange:ce,children:[(0,k.jsx)(xR.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,k.jsx)(xR.Input,{placeholder:S.placeholder.value})}),(0,k.jsx)(xR.Content,{children:(0,k.jsx)(eS,{isLoading:c,children:(0,k.jsx)(xR.List,{children:u?.map(fJ)})})})]}),(0,k.jsxs)($.MultiSelect,{name:`tags`,label:C.label.value,description:C.description,onValueChange:le,children:[(0,k.jsx)(xR.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,k.jsx)(xR.Input,{placeholder:C.placeholder.value})}),(0,k.jsx)(xR.Content,{children:(0,k.jsx)(eS,{isLoading:c,children:(0,k.jsx)(xR.List,{children:d?.map(pJ)})})})]})]}),(0,k.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,k.jsx)($.Button,{type:`button`,size:`icon-md`,label:D.label.value,Icon:Vu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||j,isLoading:j})})]})};function fJ(e){return(0,k.jsx)(xR.Item,{value:String(e.id),children:e.name},String(e.id))}function pJ(e){return(0,k.jsx)(xR.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var mJ={key:`copy-button`,content:{nodeType:`translation`,translation:{en:{label:`Copy content`},"en-GB":{label:`Copy content`},fr:{label:`Copier le contenu`},es:{label:`Copiar contenido`},de:{label:`Inhalt kopieren`},ja:{label:`コンテンツをコピー`},ko:{label:`콘텐츠 복사`},zh:{label:`复制内容`},it:{label:`Copia contenuto`},pt:{label:`Copiar conteúdo`},hi:{label:`सामग्री कॉपी करें`},ar:{label:`نسخ المحتوى`},ru:{label:`Копировать содержимое`}}},localIds:[`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`]},hJ=e=>{let t=(0,B.c)(6),{content:n,...r}=e,[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!1),{label:c}=yt(mJ),l;t[0]===n?l=t[1]:(l=async()=>{try{s(!1),await navigator.clipboard.writeText(n),a(!0)}catch(e){console.error(`Failed to copy text: `,e),s(!0)}},t[0]=n,t[1]=l);let u=l,d,f;t[2]!==i||t[3]!==o?(d=()=>{if(i||o){let e=setTimeout(()=>{a(!1),s(!1)},1e3);return()=>clearTimeout(e)}},f=[i,o],t[2]=i,t[3]=o,t[4]=d,t[5]=f):(d=t[4],f=t[5]),(0,O.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,k.jsx)(rS,{Icon:i?wu:Tu,onClick:u,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:p(),...r,label:p(),"aria-describedby":i?`copy-success`:o?`copy-error`:void 0})},gJ=(0,O.lazy)(()=>Le(()=>import(`./dist-C0cpm0sk.js`).then(e=>({default:e.Editor})),[])),_J=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,O.useRef)(null),c=(0,O.useRef)(null),[l,u]=(0,O.useState)({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`?e.split(`
186
- `).length>1:!1);return(0,k.jsxs)(`div`,{className:W(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,k.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,k.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,k.jsx)(hJ,{content:e})})}),(0,k.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(eS,{}),children:(0,k.jsx)(gJ,{...l,defaultLanguage:`typescript`,language:t,loading:(0,k.jsx)(eS,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{contextmenu:!1,readOnly:a,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:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},vJ=e=>{let t=(0,B.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=FC(),o=yJ,s=a?.[n.localId]?.content??n?.content,c;t[0]!==n||t[1]!==i?(c=e=>{o(e??`{}`)&&i(n.localId,JSON.parse(e??`{}`))},t[0]=n,t[1]=i,t[2]=c):c=t[2];let l;return t[3]!==s||t[4]!==r||t[5]!==c?(l=(0,k.jsx)(_J,{language:`json`,onChange:c,isDarkMode:r,children:JSON.stringify(s,null,2)}),t[3]=s,t[4]=r,t[5]=c,t[6]=l):l=t[6],l};function yJ(e){try{return JSON.parse(e),!0}catch{return!1}}var bJ={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},localIds:[`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`]},xJ={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,plural:`Pluriel`,gender:`Genre`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,plural:`Plural`,gender:`Género`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Geschlecht`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,plural:`複数形`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,plural:`복수`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,plural:`复数`,gender:`性别`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,plural:`Plurale`,gender:`Genere`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,plural:`Plural`,gender:`Gênero`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,plural:`बहुवचन`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,plural:`جمع`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,plural:`Множественное число`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},SJ=e=>{let t=(0,B.c)(23),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,plural:d,triggerPlaceHolder:f,nest:p,gender:m,condition:h,markdown:g,insertion:_,reactNode:v,file:y}=yt(xJ),b;t[0]===n?b=t[1]:(b=lC(n),t[0]=n,t[1]=b);let[x,S]=(0,O.useState)(b),C;t[2]===r?C=t[3]:(C=e=>{S(e),r(e)},t[2]=r,t[3]=C);let w=C,T;return t[4]!==l||t[5]!==s||t[6]!==h||t[7]!==u||t[8]!==y||t[9]!==m||t[10]!==_||t[11]!==x||t[12]!==g||t[13]!==i||t[14]!==p||t[15]!==c||t[16]!==o||t[17]!==w||t[18]!==d||t[19]!==v||t[20]!==a||t[21]!==f?(T=(0,k.jsxs)(J,{value:x,onValueChange:w,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:f})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:M,children:i}),(0,k.jsx)(J.Item,{value:ie,children:a}),(0,k.jsx)(J.Item,{value:ae,children:o}),(0,k.jsx)(J.Item,{value:oe,children:s}),(0,k.jsx)(J.Item,{value:ee,children:c}),(0,k.jsx)(J.Item,{value:te,children:l}),(0,k.jsx)(J.Item,{value:N,children:u}),(0,k.jsx)(J.Item,{value:P,children:d}),(0,k.jsx)(J.Item,{value:se,children:m}),(0,k.jsx)(J.Item,{value:I,children:_}),(0,k.jsx)(J.Item,{value:R,children:g}),(0,k.jsx)(J.Item,{value:ne,children:p}),(0,k.jsx)(J.Item,{value:F,children:h}),(0,k.jsx)(J.Item,{value:re,disabled:!0,children:v}),(0,k.jsx)(J.Item,{value:L,children:y})]})]}),t[4]=l,t[5]=s,t[6]=h,t[7]=u,t[8]=y,t[9]=m,t[10]=_,t[11]=x,t[12]=g,t[13]=i,t[14]=p,t[15]=c,t[16]=o,t[17]=w,t[18]=d,t[19]=v,t[20]=a,t[21]=f,t[22]=T):T=t[22],T},CJ=e=>{let t=(0,B.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=NC()?.internationalization?.locales??[],s=lC(n),c=oC(n),l=e=>{a(iC(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`||s===`plural`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(SJ,{section:n,onValueChange:e=>a(iC(e,o))}),(0,k.jsx)(CJ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(SJ,{section:n,onValueChange:e=>a(iC(e,o))}),(0,k.jsx)(CJ,{section:c,keyPath:e,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`object`){let e;if(t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==a||t[4]!==n){let s;t[6]!==o||t[7]!==a?(s=e=>a(iC(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(SJ,{section:n,onValueChange:s}),(0,k.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,k.jsx)(EJ,{keyPath:i,section:n,dictionaryLocalId:r})})]}),t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=n,t[5]=e}else e=t[5];return e}let u;t[9]!==o||t[10]!==a?(u=e=>a(iC(e,o)),t[9]=o,t[10]=a,t[11]=u):u=t[11];let d;return t[12]!==n||t[13]!==u?(d=(0,k.jsx)(SJ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},wJ=e=>{let t=(0,B.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=AC(),{renameEditedContent:c,addEditedContent:l}=PC(),{titleInput:u,deleteButton:d}=yt(bJ),f;t[0]!==a||t[1]!==i||t[2]!==c||t[3]!==s?(f=e=>{c(a,e,i);let t=i.slice(0,-1),n=i[i.length-1];s([...t,{...n,key:e}])},t[0]=a,t[1]=i,t[2]=c,t[3]=s,t[4]=f):f=t[4];let p=f,m;if(t[5]!==l||t[6]!==d||t[7]!==a||t[8]!==o?.keyPath||t[9]!==p||t[10]!==i||t[11]!==r||t[12]!==n||t[13]!==s||t[14]!==u){let e;t[16]!==i||t[17]!==s?(e=()=>s(i),t[16]=i,t[17]=s,t[18]=e):e=t[18];let c;t[19]!==l||t[20]!==a||t[21]!==i?(c=e=>{l(a,e,i)},t[19]=l,t[20]=a,t[21]=i,t[22]=c):c=t[22],m=(0,k.jsx)(Qx,{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":dt(i,o?.keyPath??[]),onClick:e,children:(0,k.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,k.jsxs)(`div`,{className:`w-full`,children:[(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,k.jsx)(ow,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,k.jsx)(rS,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Bu,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,k.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,ht(n),` )`]})]}),(0,k.jsx)(CJ,{keyPath:i,dictionaryLocalId:a,section:r,onNodeTypeChange:c})]})}),t[5]=l,t[6]=d,t[7]=a,t[8]=o?.keyPath,t[9]=p,t[10]=i,t[11]=r,t[12]=n,t[13]=s,t[14]=u,t[15]=m}else m=t[15];return m},TJ=e=>{let t=(0,B.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=yt(bJ),{setFocusedContentKeyPath:o}=AC(),{addEditedContent:s}=PC();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(`div`,{children:`Not an object`}),t[0]=e):e=t[0],e}let c;if(t[1]!==s||t[2]!==a.label.value||t[3]!==a.text||t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==o){let e;t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o?(e=()=>{let e=[...r,{type:ee,key:`newKey`}];s(i,``,e),o(e)},t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=e):e=t[13],c=(0,k.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,k.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,k.jsx)(`li`,{className:`flex w-full`,children:(0,k.jsx)(wJ,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:ee,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,k.jsx)(rS,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Iu,className:`flex-1`,onClick:e,children:a.text})]}),t[1]=s,t[2]=a.label.value,t[3]=a.text,t[4]=i,t[5]=r,t[6]=n,t[7]=o,t[8]=c}else c=t[8];return c},EJ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,k.jsx)(wJ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,k.jsx)(TJ,{section:e,keyPath:t,dictionaryLocalId:n}),DJ=e=>{let t=(0,B.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=FC(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,k.jsx)(wJ,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},OJ=e=>{let t=(0,B.c)(24),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=NC(),{returnToDictionaryList:d}=yt(tJ),{focusedContent:f,setFocusedContent:p}=AC(),{setLocaleDictionary:m}=DC(),[h,g]=(0,O.useState)(`content`),_;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(_=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=_):_=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,O.useEffect)(_,v);let y;if(t[6]!==h||t[7]!==u?.internationalization?.locales||t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==r||t[12]!==o||t[13]!==s||t[14]!==d||t[15]!==p||t[16]!==l){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>g(`structure`),t[18]=e):e=t[18];let c;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>g(`content`),t[19]=c):c=t[19];let f;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>g(`json`),t[20]=f):f=t[20];let m;t[21]!==o||t[22]!==p?(m=()=>{p(null),o?.()},t[21]=o,t[22]=p,t[23]=m):m=t[23],y=(0,k.jsx)(vw,{availableLocales:u?.internationalization?.locales??[],children:(0,k.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,k.jsx)(rS,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:gu,label:d.label.value,children:d.text}),(0,k.jsxs)(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,k.jsx)(`div`,{className:`sticky top-0 z-10 flex shrink-0 gap-3 rounded-xl bg-background/20 p-3 pb-4`,children:(0,k.jsx)(oJ,{selectedChoice:h,tabs:[...a.includes(`remote`)?[(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`details`,onClick:()=>g(`details`),type:`button`,children:`Details`},`details`)]:[],(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`structure`,onClick:e,type:`button`,children:`Structure`},`structure`),(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`content`,onClick:c,type:`button`,children:`Content`},`content`),(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`json`,onClick:f,type:`button`,children:`JSON`},`json`)],hoverable:!0,color:`text`})}),(0,k.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,k.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-stretch gap-6`,children:[a.includes(`remote`)&&h===`details`&&(0,k.jsx)(dJ,{dictionary:n,mode:a}),h===`structure`&&(0,k.jsx)(DJ,{dictionary:n}),h===`content`&&(0,k.jsx)(xI,{dictionary:n,isDarkMode:i}),h===`json`&&(0,k.jsx)(vJ,{dictionary:n,isDarkMode:i})]})})]}),(0,k.jsx)(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:(0,k.jsxs)(Qx,{color:`card`,roundedSize:`2xl`,padding:`sm`,className:`w-full shrink-0 flex-row flex-wrap items-center justify-end gap-10 bg-background/20 md:bottom-0`,children:[(0,k.jsx)(rJ,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,k.jsx)(eJ,{dictionary:n,mode:a,onDelete:m,onSave:s})]})})]})}),t[6]=h,t[7]=u?.internationalization?.locales,t[8]=n,t[9]=i,t[10]=a,t[11]=r,t[12]=o,t[13]=s,t[14]=d,t[15]=p,t[16]=l,t[17]=y}else y=t[17];return y},kJ=e=>{switch(e){case`xs`:return 480;case`sm`:return 640;case`md`:return 768;case`lg`:return 1024;case`xl`:return 1280;case`2xl`:return 1536;default:return e}},AJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)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)},jJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},MJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},NJ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},PJ=(e=`md`)=>{let t=kJ(e),n=AJ(),r=NJ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:jJ(),isMac:MJ()}},FJ=e=>{let t=(0,B.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=PJ(n),t[0]=n,t[1]=r);let[i,a]=(0,O.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(PJ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,O.useEffect)(o,s),i},IJ=e=>{let t=(0,B.c)(15),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{minChars:r,debounceMs:i,trim:a,defaultValue:o,onSearch:s,onClear:c}=n,l=r===void 0?3:r,u=i===void 0?300:i,d=a===void 0?!0:a,f=(0,O.useRef)(``),p=(0,O.useRef)(null),[m,h]=(0,O.useState)(o??``),g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=g):g=t[2];let _=g,v;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(v=e=>{f.current=e;let t=d?e.trim():e;if(_(),t.length<l){h(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(h(e),s?.(e)):(h(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=v):v=t[8];let y=v,b,x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>()=>{_()},x=[],t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,O.useEffect)(b,x);let S=m.length>=l,C;return t[11]!==m||t[12]!==y||t[13]!==S?(C={setSearch:y,search:m,hasMinChars:S},t[11]=m,t[12]=y,t[13]=S,t[14]=C):C=t[14],C},LJ=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),RJ=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`bellow`,identifier:o,className:s,displayArrow:c=!0,...l})=>(0,k.jsx)(Qx,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:W(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,a===`bellow`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:left-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:right-2`,c&&a===`bellow`&&`before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,c&&a===`above`&&`before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...l,children:e});LJ.Detail=RJ;var zJ=e=>(0,k.jsx)(LJ,{...e}),BJ=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,O.useRef)(null),[i,a]=(0,O.useState)(e),[o,s]=(0,O.useState)(t),[c,l]=(0,O.useState)(void 0);return(0,O.useEffect)(()=>{let i=()=>{if(!r.current)return;let i=r.current,o=document.getElementById(`unrollable-panel-button-${n.identifier}`);if(!o)return;let c=o.getBoundingClientRect(),u=window.innerWidth,d=window.innerHeight,f=u-c.left-16,p=c.right-16;l(Math.max(f,p));let m=i.classList.contains(`invisible`);m&&(i.style.visibility=`hidden`,i.classList.remove(`invisible`)),requestAnimationFrame(()=>{let n=i.getBoundingClientRect();m&&(i.style.visibility=``,i.classList.add(`invisible`));let r=t,o=d-c.bottom-16,l=c.top-16;t===`bellow`&&o<n.height?l>=n.height&&(r=`above`):t===`above`&&l<n.height&&o>=n.height&&(r=`bellow`);let f=e,p=u-c.left-16,h=c.right-16;e===`start`&&p<n.width?h>=n.width&&(f=`end`):e===`end`&&h<n.width&&p>=n.width&&(f=`start`),s(r),a(f)})},o=setTimeout(i,0),c=document.getElementById(`unrollable-panel-button-${n.identifier}`);c&&(c.addEventListener(`mouseenter`,i),c.addEventListener(`focusin`,i));let u=new ResizeObserver(()=>{i()});return r.current&&u.observe(r.current),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0),()=>{clearTimeout(o),c&&(c.removeEventListener(`mouseenter`,i),c.removeEventListener(`focusin`,i)),u.disconnect(),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}},[n.identifier,e,t]),(0,k.jsx)(RJ,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},VJ=zJ;VJ.Detail=BJ;var HJ=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},UJ=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(HJ.subscribe,HJ.getSnapshot,WJ),n;return e[0]===t?n=e[1]:(n={open:HJ.open,close:HJ.close,set:HJ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function WJ(){return{}}var GJ={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},localIds:[`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`]},KJ=e=>e.split(` + `).map(e=>e.trim()),qJ=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,JJ=(e,t)=>{let n=t.map(qJ),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(qJ(e)));if(!i)return!1;let a=qJ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},YJ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,XJ=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},ZJ=e=>{let t=(0,B.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,l=a===void 0?!1:a,u=s===void 0?`md`:s,{isMac:d}=FJ(),f;t[0]!==d||t[1]!==n?(f=KJ(XJ(n,d??!1)),t[0]=d,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[3]=m):m=t[3];let[h,g]=(0,O.useState)(m),_,v;if(t[4]!==l||t[5]!==d||t[6]!==p||t[7]!==r?(_=()=>{let e=e=>{let t=e.target,n=t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable,i=e.key,a=new Set;if(e.metaKey&&a.add(`⌘`),e.ctrlKey&&a.add(`Ctrl`),e.altKey&&a.add(d?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(YJ(i))):a.add(i.toUpperCase()),g(a),!l&&r&&JJ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{g(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,t)}},v=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=_,t[9]=v):(_=t[8],v=t[9]),(0,O.useEffect)(_,v),!c)return null;let y;t[10]===h?y=t[11]:(y=e=>{let t=e.toUpperCase(),n=qJ(e);return h.has(e)||h.has(t)||h.has(n)||e===`⌘`&&h.has(`Meta`)||e===`Ctrl`&&h.has(`Control`)||e===`⌥`&&h.has(`Alt`)||e===`Alt`&&h.has(`Alt`)||e===`←`&&h.has(`ArrowLeft`)||e===`→`&&h.has(`ArrowRight`)||e===`↑`&&h.has(`ArrowUp`)||e===`↓`&&h.has(`ArrowDown`)},t[10]=h,t[11]=y);let b=y,x;if(t[12]!==o||t[13]!==b||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==b||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=YJ(e);return(0,k.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,k.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,k.jsx)(`span`,{className:W(`min-w-4 px-0.5 text-center`,b(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=b,t[19]=n,t[20]=e):e=t[20],x=(0,k.jsx)(`kbd`,{className:W(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=b,t[14]=p,t[15]=n,t[16]=u,t[17]=x}else x=t[17];return x},QJ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,k.jsx)(`div`,{className:W(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,k.jsx)(`div`,{style:{minWidth:`${n}px`},className:W(r===`right`&&`ml-auto`),children:e})}),$J=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1},eY=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=yt(GJ),{isMobile:d}=FJ(`md`),f=(0,O.useRef)(null),p=(0,O.useRef)(null),m=Tq(l),{open:h,close:g,isOpen:_}=UJ(),v=_(t),y=v;Aq({disableScroll:y,key:t?`right_drawer_${t}`:`right_drawer`}),(0,O.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=y&&a,r=e.target&&!f.current.contains(e.target),i=$J(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[y,g,c,a,t]);let b=(0,O.useRef)(c);return(0,O.useEffect)(()=>{b.current=c},[c]),(0,O.useEffect)(()=>{s!==void 0&&s!==v&&(s?h(t):(g(t),b.current?.()))},[s,v,t,h,g]),m?(0,Dc.createPortal)((0,k.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,k.jsx)(QJ,{isHidden:!y,align:`right`,children:(0,k.jsxs)(Qx,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,k.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,k.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,k.jsx)(`div`,{children:o&&(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:bu,children:o?.text})}),(0,k.jsx)(`div`,{children:(0,k.jsxs)(VJ,{identifier:`close-drawer`,children:[(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Hu,size:`icon-md`}),(0,k.jsx)(VJ.Detail,{identifier:`close-drawer`,children:(0,k.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,k.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,k.jsx)(ZJ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,k.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,k.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(g(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(g(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,k.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,k.jsx)(k.Fragment,{})},tY=au(`w-fit 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`},color:{primary:`border-primary bg-primary/10 text-primary`,success:`border-success bg-success/10 text-success`,error:`border-error bg-error/10 text-error`,warning:`border-warning bg-warning/10 text-warning`,neutral:`/10 border-neutral bg-neutral/10 text-neutral`,text:`border-text bg-text/10 text-text`,blue:`border-blue-500 bg-blue-500/10 text-blue-500 dark:text-blue-300`,yellow:`border-yellow-500 bg-yellow-500/10 text-yellow-500 dark:text-yellow-300`,green:`border-green-500 bg-green-500/10 text-green-500 dark:text-green-300`,red:`border-red-500 bg-red-500/10 text-red-500 dark:text-red-300`,orange:`border-orange-500 bg-orange-500/10 text-orange-500 dark:text-orange-300`,purple:`border-purple-500 bg-purple-500/10 text-purple-500 dark:text-purple-300`,pink:`border-pink-500 bg-pink-500/10 text-pink-500 dark:text-pink-300`,brown:`border-brown-500 bg-brown-500/10 text-brown-500 dark:text-brown-300`,gray:`border-gray-500 bg-gray-500/10 text-gray-500 dark:text-gray-300`,black:`border-black bg-black/10 text-black`,white:`border-white bg-white/10 text-white`},size:{xs:`border-[1.2px] px-2 py-0.5 text-xs`,sm:`border-[1.3px] px-2 py-0.5 text-sm`,md:`border-2 px-2 py-1 text-base`,lg:`border-2 px-3 py-2 text-lg`,xl:`border-2 px-3 py-2 text-xl`},border:{none:`border-none`,with:`border-[1.3px] border-text`},background:{none:`bg-none`,with:``}},defaultVariants:{roundedSize:`full`,border:`none`,color:`text`,size:`md`}}),nY=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,k.jsx)(`div`,{className:tY({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),rY=`dictionaryList`,iY=e=>`dictionary_edition_${e}`,aY=e=>{let t=(0,B.c)(23),n;t[0]===e?n=t[1]:(n=iY(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=UJ(),{getEditedContentValue:s}=PC(),{focusedContent:c,setFocusedContent:l}=AC(),u;t[2]!==c?.dictionaryKey||t[3]!==r||t[4]!==a?(u=()=>{c?.dictionaryKey&&a(r)},t[2]=c?.dictionaryKey,t[3]=r,t[4]=a,t[5]=u):u=t[5];let d=c?.dictionaryKey,f;t[6]!==r||t[7]!==a||t[8]!==d?(f=[d,a,r],t[6]=r,t[7]=a,t[8]=d,t[9]=f):f=t[9],(0,O.useEffect)(u,f);let p;t[10]!==i||t[11]!==r?(p=i(r),t[10]=i,t[11]=r,t[12]=p):p=t[12];let m;t[13]!==o||t[14]!==c||t[15]!==r||t[16]!==l?(m=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[13]=o,t[14]=c,t[15]=r,t[16]=l,t[17]=m):m=t[17];let h;return t[18]!==c||t[19]!==s||t[20]!==p||t[21]!==m?(h={isOpen:p,focusedContent:c,getEditedContentValue:s,close:m},t[18]=c,t[19]=s,t[20]=p,t[21]=m,t[22]=h):h=t[22],h},oY=e=>{let t=(0,B.c)(77),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=yt(Xx),l;t[0]===n?l=t[1]:(l=iY(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=aY(n),{setFocusedContent:p}=AC(),{open:m}=UJ(),h;t[2]===m?h=t[3]:(h=()=>m(rY),t[2]=m,t[3]=h);let g=h,{data:_}=SD(),v;t[4]!==f||t[5]!==g||t[6]!==p?(v=()=>{f(),p(null),g()},t[4]=f,t[5]=g,t[6]=p,t[7]=v):v=t[7];let y=v,[b,x]=(0,O.useState)(!1),S;t[8]===y?S=t[9]:(S=()=>{x(!1),y()},t[8]=y,t[9]=S);let C=S;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let w,T,E,D,A,j,M,N,P,F;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==y||t[17]!==u||t[18]!==a||t[19]!==p||t[20]!==_){A=Symbol.for(`react.early_return_sentinel`);bb0:{if(T=_?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!T){let e;t[31]===c?e=t[32]:(e=(0,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[31]=c,t[32]=e),A=e;break bb0}w=eY,F=u,t[33]!==i.value||t[34]!==y?(E={onBack:y,text:i.value},t[33]=i.value,t[34]=y,t[35]=E):E=t[35],t[36]!==f||t[37]!==p?(D=()=>{f(),p(null)},t[36]=f,t[37]=p,t[38]=D):D=t[38];let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>x(!0),t[39]=e):e=t[39];let n;t[40]===a.label.value?n=t[41]:(n=(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Fu,label:a.label.value,onClick:e}),t[40]=a.label.value,t[41]=n);let r;t[42]===a.popoverContent?r=t[43]:(r=(0,k.jsx)(VJ.Detail,{identifier:`open-dictionary-editor`,children:(0,k.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[42]=a.popoverContent,t[43]=r);let o;t[44]!==n||t[45]!==r?(o=(0,k.jsxs)(VJ,{identifier:`open-dictionary-editor`,children:[n,r]}),t[44]=n,t[45]=r,t[46]=o):o=t[46],P=(0,k.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,k.jsx)(`h3`,{className:`w-full text-center text-lg`,children:T.title?T.title:T.key}),o]}),j=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dotted pb-3`,M=(0,k.jsx)(nY,{color:`text`,roundedSize:`full`,size:`xs`,children:T.key}),N=T.filePath&&(0,k.jsx)(nY,{color:`blue`,roundedSize:`full`,size:`xs`,children:T.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=y,t[17]=u,t[18]=a,t[19]=p,t[20]=_,t[21]=w,t[22]=T,t[23]=E,t[24]=D,t[25]=A,t[26]=j,t[27]=M,t[28]=N,t[29]=P,t[30]=F}else w=t[21],T=t[22],E=t[23],D=t[24],A=t[25],j=t[26],M=t[27],N=t[28],P=t[29],F=t[30];if(A!==Symbol.for(`react.early_return_sentinel`))return A;let I;t[47]===T.id?I=t[48]:(I=T.id&&(0,k.jsx)(nY,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[47]=T.id,t[48]=I);let L;t[49]!==I||t[50]!==j||t[51]!==M||t[52]!==N?(L=(0,k.jsxs)(`div`,{className:j,children:[M,N,I]}),t[49]=I,t[50]=j,t[51]=M,t[52]=N,t[53]=L):L=t[53];let ee;t[54]!==L||t[55]!==P?(ee=(0,k.jsxs)(k.Fragment,{children:[P,L]}),t[54]=L,t[55]=P,t[56]=ee):ee=t[56];let te;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[57]=te):te=t[57];let ne;t[58]!==T||t[59]!==y?(ne=(0,k.jsx)(eJ,{dictionary:T,mode:te,className:`mb-4 flex-col px-3`,onDelete:y}),t[58]=T,t[59]=y,t[60]=ne):ne=t[60];let re;t[61]!==T||t[62]!==b||t[63]!==d||t[64]!==y||t[65]!==r||t[66]!==o||t[67]!==C?(re=d&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Qq,{isOpen:b,onClose:()=>x(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,k.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,k.jsx)(OJ,{dictionary:T,onClickDictionaryList:C,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{x(!1),y()},onSave:()=>{x(!1)}})})}),(0,k.jsx)(pw,{dictionary:T})]}),t[61]=T,t[62]=b,t[63]=d,t[64]=y,t[65]=r,t[66]=o,t[67]=C,t[68]=re):re=t[68];let R;return t[69]!==w||t[70]!==E||t[71]!==D||t[72]!==ee||t[73]!==ne||t[74]!==re||t[75]!==F?(R=(0,k.jsx)(w,{identifier:F,backButton:E,onClose:D,header:ee,footer:ne,children:re}),t[69]=w,t[70]=E,t[71]=D,t[72]=ee,t[73]=ne,t[74]=re,t[75]=F,t[76]=R):R=t[76],R},sY=e=>{let t=(0,B.c)(4),{isDarkMode:n}=e,{focusedContent:r}=AC(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,k.jsx)(oY,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},cY={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},localIds:[`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`]},lY=()=>{let{drawerTitle:e,buttonLabel:t}=yt(cY),{set:n}=UJ(),{localeDictionaries:r}=EC(),{editedContent:i}=FC(),{setFocusedContent:a}=AC(),{setSearch:o,search:s}=IJ(),c=(0,O.useMemo)(()=>new mI(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,O.useMemo)(()=>!s||s.trim()===``?Object.values(r):c.search(s).map(e=>e.item),[s,c,r]),u=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[rY]:!1,[iY(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,k.jsxs)(eY,{title:e.label.value,identifier:rY,children:[(0,k.jsx)(`div`,{className:`p-3 pb-4`,children:(0,k.jsx)(yG,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,k.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,k.jsx)(`li`,{className:`w-full`,children:(0,k.jsx)(rS,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:xu,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Pu:void 0,children:(0,k.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,k.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,k.jsx)(nY,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,k.jsx)(nY,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,k.jsx)(nY,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,k.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},uY={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},"en-GB":{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},fr:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press pour éditer le dictionnaire "{{dictionaryKey}}"`}},es:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Presiona largo para editar el diccionario "{{dictionaryKey}}"`}},de:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"`}},ja:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`長押しして編集 "{{dictionaryKey}}" 辞書`}},ko:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`길게 눌러 편집 "{{dictionaryKey}}" 사전`}},zh:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`长按编辑 "{{dictionaryKey}}" 字典`}},it:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Premi a lungo per modificare il dizionario "{{dictionaryKey}}"`}},pt:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Pressione longa para editar o dicionário "{{dictionaryKey}}"`}},hi:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`लंग प्रेस करें टू एडिट "{{dictionaryKey}}"`}},ar:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`اضغط طويلاً للتعديل "{{dictionaryKey}}"`}},ru:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Длительное нажатие для редактирования словаря "{{dictionaryKey}}"`}}}},localIds:[`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`]},dY=()=>{let e=(0,B.c)(8),{message:t}=yt(uY),[n]=wC(TS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=W(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,k.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},fY=e=>{let t=(0,B.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,k.jsx)(dY,{})}),i=(0,k.jsx)(sY,{}),a=(0,k.jsx)(lY,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,k.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},pY=()=>{let e=(0,B.c)(2),[t,n]=(0,O.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(mY).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,O.useEffect)(r,i),t};function mY(e){return e.json()}var hY=e=>{let t=(0,B.c)(11),{children:n,iframeRef:r}=e,i=pY(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(eS,{}),t[0]=e):e=t[0],e}let o;t[1]!==a||t[2]!==r?(o=e=>{r.current?.contentWindow?.postMessage(e,a)},t[1]=a,t[2]=r,t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=[a],t[4]=a,t[5]=s);let c;return t[6]!==n||t[7]!==i||t[8]!==o||t[9]!==s?(c=(0,k.jsx)(jC,{postMessage:o,allowedOrigins:s,configuration:i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=s,t[10]=c):c=t[10],c},gY={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},localIds:[`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`]},_Y=()=>{let e=(0,B.c)(9),{editedContent:t,setEditedContentState:n}=FC(),r;e[0]===n?r=e[1]:(r=()=>{let e=localStorage?.getItem(`INTLAYER_EDITED_CONTENT_CHANGED`);if(e)try{n(JSON.parse(e))}catch(e){console.error(e)}},e[0]=n,e[1]=r);let i=r,a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{t!==void 0&&localStorage?.setItem(`INTLAYER_EDITED_CONTENT_CHANGED`,JSON.stringify(t))},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,O.useEffect)(a,o);let s;e[5]!==t||e[6]!==i?(s=()=>{t===void 0&&i()},e[5]=t,e[6]=i,e[7]=s):s=e[7];let c;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=[],e[8]=c):c=e[8],(0,O.useEffect)(s,c),i},vY={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},localIds:[`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`]},yY=()=>{let e=(0,B.c)(11),{title:t,description:n,documentationLink:r}=yt(vY),i;e[0]===t?i=e[1]:(i=(0,k.jsx)(Gq,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,k.jsx)(`strong`,{className:`block text-neutral`,children:n}),e[2]=n,e[3]=a);let o;e[4]!==r.label.value||e[5]!==r.text?(o=(0,k.jsx)(NP,{label:r.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ml-auto`,isExternalLink:!0,children:r.text}),e[4]=r.label.value,e[5]=r.text,e[6]=o):o=e[6];let s;return e[7]!==i||e[8]!==a||e[9]!==o?(s=(0,k.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[i,a,o]}),e[7]=i,e[8]=a,e[9]=o,e[10]=s):s=e[10],s},bY=e=>{let t=(0,B.c)(23),{iframeRef:n,applicationPath:r}=e,i=yt(gY),{editor:a}=NC()??{},{enabled:o}=IC(),s=LC();_Y(),zC();let[c,l]=(0,O.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=TC(void 0,u),f,p;if(t[1]===d?(f=t[2],p=t[3]):(f=()=>{typeof d==`string`&&window.history.replaceState({},``,d)},p=[d],t[1]=d,t[2]=f,t[3]=p),(0,O.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(Qx,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,k.jsx)(yY,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,k.jsx)(eS,{isLoading:c}),t[5]=c,t[6]=m);let h=`${a.applicationURL}${r}`,g=i.intlayerApplication.value,_=c&&`hidden`,v;t[7]===_?v=t[8]:(v=W(`size-full`,_),t[7]=_,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{l(!1)},t[9]=y):y=t[9];let b;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==h||t[13]!==v?(b=(0,k.jsx)(`iframe`,{src:h,title:g,sandbox:`allow-scripts allow-same-origin`,className:v,ref:n,onLoad:y}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=h,t[13]=v,t[14]=b):b=t[14];let x;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(x=!o&&(0,k.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,k.jsx)(rS,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=x):x=t[18];let S;return t[19]!==b||t[20]!==x||t[21]!==m?(S=(0,k.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,b,x]}),t[19]=b,t[20]=x,t[21]=m,t[22]=S):S=t[22],S},xY=()=>{let e=(0,B.c)(2),t=(0,O.useRef)(null),n=zn(),r;return e[0]===n.pathname?r=e[1]:(r=(0,k.jsx)(hY,{iframeRef:t,children:(0,k.jsx)(_t,{disableEditor:!0,children:(0,k.jsx)(fY,{children:(0,k.jsx)(bY,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,Ro.createRoot)(document.getElementById(`root`)).render((0,k.jsx)(O.StrictMode,{children:(0,k.jsx)(()=>{let e=(0,B.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,k.jsx)(Yx,{children:(0,k.jsx)(Jx,{children:(0,k.jsx)(xY,{})})}),e[0]=t):t=e[0],t},{})}));export{x as C,u as E,D as S,c as T,hu as _,Uq as a,yt as b,Kq as c,NP as d,J as f,Qx as g,rS as h,Qq as i,qq as l,iS as m,hJ as n,Wq as o,hw as p,oJ as r,Gq as s,VJ as t,Jq as u,au as v,p as w,Le as x,W as y};
185
+ }`,rG=18,iG=40,aG=`${iG}px`,oG=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),sG=e=>{let t=(0,B.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,O.useState)(!1),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(!1),f=i===`none`?!1:(i===`increase-width`||i===`experimental-no-flickering`)&&o&&c,p;t[0]!==n||t[1]!==u||t[2]!==r||t[3]!==i?(p=()=>{let e=n.current,t=r.current;if(!e||!t||u||i===`none`)return;let a=e,o=a.getBoundingClientRect().left+a.offsetWidth,c=a.getBoundingClientRect().top+a.offsetHeight/2,l=o-rG,f=c;document.querySelectorAll(oG).length===0&&document.elementFromPoint(l,f)===e||(s(!0),d(!0))},t[0]=n,t[1]=u,t[2]=r,t[3]=i,t[4]=p):p=t[4];let m=p,h,g;t[5]!==n||t[6]!==i?(h=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=iG)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},g=[n,i],t[5]=n,t[6]=i,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,O.useEffect)(h,g);let _;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(_=()=>{let e=a||document.activeElement===r.current;if(i===`none`||!e)return;let t=setTimeout(m,0),n=setTimeout(m,2e3),o=setTimeout(m,5e3),s=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(n),clearTimeout(o),clearTimeout(s)}},t[9]=r,t[10]=a,t[11]=i,t[12]=m,t[13]=_):_=t[13];let v;t[14]!==r||t[15]!==a||t[16]!==i?(v=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=v):v=t[17],(0,O.useEffect)(_,v);let y;return t[18]!==o||t[19]!==f?(y={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:aG},t[18]=o,t[19]=f,t[20]=y):y=t[20],y},cG=e=>{let t=(0,O.useRef)(void 0);return(0,O.useEffect)(()=>{t.current=e}),t.current},lG=(0,O.createContext)({}),uG=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:l,containerClassName:u,noScriptCSSFallback:d=nG,render:f,children:p,...m})=>{let[h,g]=(0,O.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),_=e??h,v=cG(_),y=e=>{t?.(e),g(e)},b=r===void 0?null:typeof r==`string`?new RegExp(r):r,x=(0,O.useRef)(null),S=(0,O.useRef)(null),C=(0,O.useRef)({value:_,onChange:y,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),w=(0,O.useRef)({prev:[x.current?.selectionStart??null,x.current?.selectionEnd??null,x.current?.selectionDirection??`none`]});(0,O.useEffect)(()=>{let e=x.current,t=S.current;if(!e||!t)return;C.current.value!==e.value&&C.current.onChange(e.value),w.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){M(null),P(null),I(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=w.current.prev,s=-1,c=-1,l=r??`none`;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&x.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;I(t!==null&&n!==null?t===n?t:u:null),M(u),P(d),w.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&A(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;tG(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),tG(e.sheet,`[data-input-otp]:autofill { ${t} }`),tG(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),tG(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),tG(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[T,E]=(0,O.useState)(!1),[D,A]=(0,O.useState)(!1),[j,M]=(0,O.useState)(null),[N,P]=(0,O.useState)(null),[F,I]=(0,O.useState)(null);(0,O.useEffect)(()=>{eG(()=>{x.current?.dispatchEvent(new Event(`input`));let e=x.current?.selectionStart??null,t=x.current?.selectionEnd??null,n=x.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),I(e),w.current.prev=[e,t,n])})},[_,D]),(0,O.useEffect)(()=>{v!==void 0&&_!==v&&v.length<n&&_.length===n&&o?.(_)},[n,o,v,_]);let L=(0,O.useRef)(null);(0,O.useEffect)(()=>{let e=D&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[D,F,s]);let ee=sG({containerRef:S,inputRef:x,pushPasswordManagerStrategy:c,isFocused:D}),te=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&b&&!b.test(t)){e.preventDefault();return}typeof v==`string`&&t.length<v.length&&document.dispatchEvent(new Event(`selectionchange`)),y(t)},ne=()=>{if(x.current){let e=Math.min(x.current.value.length,n-1),t=x.current.value.length;x.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},re=e=>{let t=x.current;if(!l&&(!C.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=x.current?.selectionStart,o=x.current?.selectionEnd,s=(a===o?_.slice(0,a??0)+i+_.slice(a??0):_.slice(0,a??0)+i+_.slice(o??0)).slice(0,n);if(!(s.length>0&&b&&!b.test(s))&&t){t.value=s,y(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},R={width:ee.willPushPWMBadge?`calc(100% + ${ee.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:ee.willPushPWMBadge?`inset(0 ${ee.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},z=(0,k.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:b?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:R,maxLength:n,value:_,ref:x,onPaste:e=>{re(e),m.onPaste?.(e)},onChange:te,onMouseOver:e=>{E(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{E(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=x.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&I(t)}}),m.onKeyDown?.(e)},onFocus:e=>{ne(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=D&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=_[t]===void 0?null:_[t];return{char:r,placeholderChar:_[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:D,isHovering:!m.disabled&&T,setSelection:e=>{let t=x.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=_[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},ae=f===void 0?(0,k.jsx)(lG.Provider,{value:ie,children:p}):f(ie);return(0,k.jsxs)(k.Fragment,{children:[d!==null&&(0,k.jsx)(`noscript`,{children:(0,k.jsx)(`style`,{children:d})}),(0,k.jsxs)(`div`,{ref:S,className:W(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ae,(0,k.jsx)(`div`,{className:`absolute inset-0`,children:z})]})]})},dG=({className:e,render:t,...n})=>(0,k.jsx)(uG,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:W(`disabled:cursor-not-allowed`,e),render:t,...n}),fG=({className:e,...t})=>(0,k.jsx)(`div`,{className:W(`z-10 flex items-center gap-3`,e),...t}),pG=e=>{let t=(0,B.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,O.useContext)(lG),{char:c,isActive:l}=s?.slots[n]??{},u;t[0]===s?u=t[1]:(u=s??{},t[0]=s,t[1]=u);let{setSelection:d}=u,f;t[2]!==n||t[3]!==i||t[4]!==d?(f=e=>{d?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=d,t[5]=f):f=t[5];let p=f,m;t[6]!==n||t[7]!==a||t[8]!==d?(m=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=d,t[9]=m):m=t[9];let h=m;return(0,k.jsx)(rS,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:W(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:h,label:null,...o,children:(0,k.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},mG=e=>(0,k.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full text-text/50`,...e,children:(0,k.jsx)(ju,{})}),hG=e=>(0,k.jsx)(`div`,{"data-indicator":!0,className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),gG=e=>e?.getAttribute(`aria-selected`)===`true`,_G=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c=6,maxLength:l=6,...u})=>{let{error:d}=BW(),f=(0,O.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=lS(f,{selector:gG,isHoverable:!0});return(0,O.useEffect)(()=>{m()},[]),(0,k.jsx)(GW,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,k.jsx)(dG,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(fG,{children:[(0,k.jsx)(pG,{index:0,ref:e=>{f.current[0]=e}}),(0,k.jsx)(pG,{index:1,ref:e=>{f.current[1]=e}}),(0,k.jsx)(pG,{index:2,ref:e=>{f.current[2]=e}})]}),(0,k.jsx)(mG,{}),(0,k.jsxs)(fG,{children:[(0,k.jsx)(pG,{index:3,ref:e=>{f.current[3]=e}}),(0,k.jsx)(pG,{index:4,ref:e=>{f.current[4]=e}}),(0,k.jsx)(pG,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,k.jsx)(hG,{style:p})]})})})},vG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c,maxLength:l,...u}=e,d=c===void 0?6:c,f=l===void 0?6:l,{control:p}=iz();return(0,k.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,k.jsx)(_G,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},yG=({className:e,...t})=>(0,k.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,k.jsx)(zu,{className:`absolute left-2 size-4`}),(0,k.jsx)(KC,{...t,type:`search`,className:W(`pl-8`,e)})]}),bG=e=>(0,k.jsx)(qW,{id:e.name,"data-testid":e.name,Element:yG,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),xG=e=>(0,k.jsx)(qW,{Element:qC,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}),SG=e=>(0,k.jsx)(qW,{Element:XC,id:e.name,"data-testid":e.name,...e}),CG=au([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:hover:opacity-80`,`ring-offset-background`,`hover:bg-neutral-500/10`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`border-primary/30 text-primary ring-primary/20 checked:border-primary checked:bg-primary`,secondary:`border-secondary/30 text-secondary ring-secondary/20 checked:border-secondary checked:bg-secondary`,destructive:`border-destructive/30 text-destructive ring-destructive/20 checked:border-destructive checked:bg-destructive`,neutral:`border-neutral/30 text-neutral ring-neutral/20 checked:border-neutral checked:bg-neutral`,light:`border-white/30 text-white ring-white/20 checked:border-white checked:bg-white`,text:`border-text/30 text-text ring-text/20 checked:border-text checked:bg-text`,"text-inverse":`border-text-inverse/30 text-text-inverse ring-text-inverse/20 checked:border-text-inverse checked:bg-text-inverse`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),wG=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,k.jsx)(`input`,{type:`checkbox`,className:W(CG({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),TG=e=>{let{label:t,name:n,id:r}=e;return t?(0,k.jsxs)(`label`,{htmlFor:r??n,className:W(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,k.jsx)(wG,{id:r??n,...e}),t]}):(0,k.jsx)(wG,{id:r??n,...e})},EG=({inputLabel:e,value:t,onChange:n,...r})=>(0,k.jsx)(TG,{...r,label:e,checked:!!t,onChange:n}),DG=({autoComplete:e,...t})=>(0,k.jsx)(qW,{Element:EG,id:t.name,"data-testid":t.name,autoComplete:e,...t}),OG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=BW();return(0,k.jsx)(GW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(xR,{onValueChange:t.onChange,values:t.value,...l,children:c})})},kG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=iz();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(OG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},AG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=BW();return(0,k.jsx)(GW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},jG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=iz();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(AG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},MG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=BW();return(0,k.jsx)(GW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(vS,{...t,...l,children:c})})},NG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=iz();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(MG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},PG=Symbol.for(`react.lazy`),FG=O.use;function IG(e){return typeof e==`object`&&!!e&&`then`in e}function LG(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===PG&&`_payload`in e&&IG(e._payload)}function RG(e){let t=BG(e),n=O.forwardRef((e,n)=>{let{children:r,...i}=e;LG(r)&&typeof FG==`function`&&(r=FG(r._payload));let a=O.Children.toArray(r),o=a.find(HG);if(o){let e=o.props.children,r=a.map(t=>t===o?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t);return(0,k.jsx)(t,{...i,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return(0,k.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var zG=RG(`Slot`);function BG(e){let t=O.forwardRef((e,t)=>{let{children:n,...r}=e;if(LG(n)&&typeof FG==`function`&&(n=FG(n._payload)),O.isValidElement(n)){let e=WG(n),i=UG(r,n.props);return n.type!==O.Fragment&&(i.ref=t?hc(t,e):e),O.cloneElement(n,i)}return O.Children.count(n)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var VG=Symbol(`radix.slottable`);function HG(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===VG}function UG(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function WG(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var GG=e=>{let t=(0,B.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=BW(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,k.jsx)(zG,{id:r,"aria-describedby":o,"aria-invalid":s,...e}),t[0]=r,t[1]=e,t[2]=o,t[3]=s,t[4]=c):c=t[4],c},KG=e=>{let t=(0,B.c)(3),{formDescriptionId:n}=BW(),r;return t[0]!==n||t[1]!==e?(r=(0,k.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},qG=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=BW(),a=r?String(r?.message??``):t;return a?(0,k.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=PW;$.Description=KG,$.Control=GG,$.Field=zW,$.Item=IW,$.Label=WW,$.Message=qG,$.Element=qW,$.Input=XW,$.InputPassword=$W,$.Checkbox=DG,$.TextArea=xG,$.AutoSizedTextArea=SG,$.Button=rS,$.Select=jG,$.MultiSelect=kG,$.EditableFieldInput=JW,$.EditableFieldTextArea=YW,$.SwitchSelector=NG,$.OTP=vG,$.SearchInput=bG;var JG=Z(`ZodISODateTime`,(e,t)=>{pH.init(e,t),xK.init(e,t)});function YG(e){return NU(JG,e)}var XG=Z(`ZodISODate`,(e,t)=>{mH.init(e,t),xK.init(e,t)});function ZG(e){return PU(XG,e)}var QG=Z(`ZodISOTime`,(e,t)=>{hH.init(e,t),xK.init(e,t)});function $G(e){return FU(QG,e)}var eK=Z(`ZodISODuration`,(e,t)=>{gH.init(e,t),xK.init(e,t)});function tK(e){return IU(eK,e)}var nK=Z(`ZodError`,(e,t)=>{GB.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>JB(e,t)},flatten:{value:t=>qB(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,dB,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,dB,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),rK=YB(nK),iK=ZB(nK),aK=$B(nK),oK=tV(nK),sK=rV(nK),cK=iV(nK),lK=aV(nK),uK=oV(nK),dK=sV(nK),fK=cV(nK),pK=lV(nK),mK=uV(nK),hK=new WeakMap;function gK(e,t,n){let r=Object.getPrototypeOf(e),i=hK.get(r);if(i||(i=new Set,hK.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var _K=Z(`ZodType`,(e,t)=>($V.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:uW(e,`input`),output:uW(e,`output`)}}),e.toJSONSchema=lW(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>rK(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>aK(e,t,n),e.parseAsync=async(t,n)=>iK(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>oK(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>sK(e,t,n),e.decode=(t,n)=>cK(e,t,n),e.encodeAsync=async(t,n)=>lK(e,t,n),e.decodeAsync=async(t,n)=>uK(e,t,n),e.safeEncode=(t,n)=>dK(e,t,n),e.safeDecode=(t,n)=>fK(e,t,n),e.safeEncodeAsync=async(t,n)=>pK(e,t,n),e.safeDecodeAsync=async(t,n)=>mK(e,t,n),gK(e,`ZodType`,{check(...e){let t=this.def;return this.clone(vB(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return OB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Sq(e,t))},superRefine(e,t){return this.check(Cq(e,t))},overwrite(e){return this.check(JU(e))},optional(){return iq(this)},exactOptional(){return oq(this)},nullable(){return cq(this)},nullish(){return iq(cq(this))},nonoptional(e){return mq(this,e)},array(){return KK(this)},or(e){return XK([this,e])},and(e){return QK(this,e)},transform(e){return vq(this,nq(e))},default(e){return uq(this,e)},prefault(e){return fq(this,e)},catch(e){return gq(this,e)},pipe(e){return vq(this,e)},readonly(){return bq(this)},describe(e){let t=this.clone();return lU.add(t,{description:e}),t},meta(...e){if(e.length===0)return lU.get(this);let t=this.clone();return lU.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return lU.get(e)?.description},configurable:!0}),e)),vK=Z(`_ZodString`,(e,t)=>{eH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fW(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,gK(e,`_ZodString`,{regex(...e){return this.check(HU(...e))},includes(...e){return this.check(GU(...e))},startsWith(...e){return this.check(KU(...e))},endsWith(...e){return this.check(qU(...e))},min(...e){return this.check(BU(...e))},max(...e){return this.check(zU(...e))},length(...e){return this.check(VU(...e))},nonempty(...e){return this.check(BU(1,...e))},lowercase(e){return this.check(UU(e))},uppercase(e){return this.check(WU(e))},trim(){return this.check(XU())},normalize(...e){return this.check(YU(...e))},toLowerCase(){return this.check(ZU())},toUpperCase(){return this.check(QU())},slugify(){return this.check($U())}})}),yK=Z(`ZodString`,(e,t)=>{eH.init(e,t),vK.init(e,t),e.email=t=>e.check(dU(SK,t)),e.url=t=>e.check(_U(TK,t)),e.jwt=t=>e.check(MU(BK,t)),e.emoji=t=>e.check(vU(EK,t)),e.guid=t=>e.check(fU(CK,t)),e.uuid=t=>e.check(pU(wK,t)),e.uuidv4=t=>e.check(mU(wK,t)),e.uuidv6=t=>e.check(hU(wK,t)),e.uuidv7=t=>e.check(gU(wK,t)),e.nanoid=t=>e.check(yU(DK,t)),e.guid=t=>e.check(fU(CK,t)),e.cuid=t=>e.check(bU(OK,t)),e.cuid2=t=>e.check(xU(kK,t)),e.ulid=t=>e.check(SU(AK,t)),e.base64=t=>e.check(kU(LK,t)),e.base64url=t=>e.check(AU(RK,t)),e.xid=t=>e.check(CU(jK,t)),e.ksuid=t=>e.check(wU(MK,t)),e.ipv4=t=>e.check(TU(NK,t)),e.ipv6=t=>e.check(EU(PK,t)),e.cidrv4=t=>e.check(DU(FK,t)),e.cidrv6=t=>e.check(OU(IK,t)),e.e164=t=>e.check(jU(zK,t)),e.datetime=t=>e.check(YG(t)),e.date=t=>e.check(ZG(t)),e.time=t=>e.check($G(t)),e.duration=t=>e.check(tK(t))});function bK(e){return uU(yK,e)}var xK=Z(`ZodStringFormat`,(e,t)=>{tH.init(e,t),vK.init(e,t)}),SK=Z(`ZodEmail`,(e,t)=>{iH.init(e,t),xK.init(e,t)}),CK=Z(`ZodGUID`,(e,t)=>{nH.init(e,t),xK.init(e,t)}),wK=Z(`ZodUUID`,(e,t)=>{rH.init(e,t),xK.init(e,t)}),TK=Z(`ZodURL`,(e,t)=>{aH.init(e,t),xK.init(e,t)}),EK=Z(`ZodEmoji`,(e,t)=>{oH.init(e,t),xK.init(e,t)}),DK=Z(`ZodNanoID`,(e,t)=>{sH.init(e,t),xK.init(e,t)}),OK=Z(`ZodCUID`,(e,t)=>{cH.init(e,t),xK.init(e,t)}),kK=Z(`ZodCUID2`,(e,t)=>{lH.init(e,t),xK.init(e,t)}),AK=Z(`ZodULID`,(e,t)=>{uH.init(e,t),xK.init(e,t)}),jK=Z(`ZodXID`,(e,t)=>{dH.init(e,t),xK.init(e,t)}),MK=Z(`ZodKSUID`,(e,t)=>{fH.init(e,t),xK.init(e,t)}),NK=Z(`ZodIPv4`,(e,t)=>{_H.init(e,t),xK.init(e,t)}),PK=Z(`ZodIPv6`,(e,t)=>{vH.init(e,t),xK.init(e,t)}),FK=Z(`ZodCIDRv4`,(e,t)=>{yH.init(e,t),xK.init(e,t)}),IK=Z(`ZodCIDRv6`,(e,t)=>{bH.init(e,t),xK.init(e,t)}),LK=Z(`ZodBase64`,(e,t)=>{SH.init(e,t),xK.init(e,t)}),RK=Z(`ZodBase64URL`,(e,t)=>{wH.init(e,t),xK.init(e,t)}),zK=Z(`ZodE164`,(e,t)=>{TH.init(e,t),xK.init(e,t)}),BK=Z(`ZodJWT`,(e,t)=>{DH.init(e,t),xK.init(e,t)}),VK=Z(`ZodUnknown`,(e,t)=>{OH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function HK(){return LU(VK)}var UK=Z(`ZodNever`,(e,t)=>{kH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pW(e,t,n,r)});function WK(e){return RU(UK,e)}var GK=Z(`ZodArray`,(e,t)=>{jH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_W(e,t,n,r),e.element=t.element,gK(e,`ZodArray`,{min(e,t){return this.check(BU(e,t))},nonempty(e){return this.check(BU(1,e))},max(e,t){return this.check(zU(e,t))},length(e,t){return this.check(VU(e,t))},unwrap(){return this.element}})});function KK(e,t){return eW(GK,e,t)}var qK=Z(`ZodObject`,(e,t)=>{IH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vW(e,t,n,r),gB(e,`shape`,()=>t.shape),gK(e,`ZodObject`,{keyof(){return eq(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:HK()})},loose(){return this.clone({...this._zod.def,catchall:HK()})},strict(){return this.clone({...this._zod.def,catchall:WK()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return MB(this,e)},safeExtend(e){return NB(this,e)},merge(e){return PB(this,e)},pick(e){return AB(this,e)},omit(e){return jB(this,e)},partial(...e){return FB(rq,this,e[0])},required(...e){return IB(pq,this,e[0])}})});function JK(e,t){return new qK({type:`object`,shape:e??{},...Q(t)})}var YK=Z(`ZodUnion`,(e,t)=>{RH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yW(e,t,n,r),e.options=t.options});function XK(e,t){return new YK({type:`union`,options:e,...Q(t)})}var ZK=Z(`ZodIntersection`,(e,t)=>{zH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bW(e,t,n,r)});function QK(e,t){return new ZK({type:`intersection`,left:e,right:t})}var $K=Z(`ZodEnum`,(e,t)=>{HH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mW(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new $K({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new $K({...t,checks:[],...Q(r),entries:i})}});function eq(e,t){return new $K({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var tq=Z(`ZodTransform`,(e,t)=>{UH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gW(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sB(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(UB(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(UB(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function nq(e){return new tq({type:`transform`,transform:e})}var rq=Z(`ZodOptional`,(e,t)=>{GH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iq(e){return new rq({type:`optional`,innerType:e})}var aq=Z(`ZodExactOptional`,(e,t)=>{KH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oq(e){return new aq({type:`optional`,innerType:e})}var sq=Z(`ZodNullable`,(e,t)=>{qH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cq(e){return new sq({type:`nullable`,innerType:e})}var lq=Z(`ZodDefault`,(e,t)=>{JH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uq(e,t){return new lq({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():TB(t)}})}var dq=Z(`ZodPrefault`,(e,t)=>{XH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fq(e,t){return new dq({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():TB(t)}})}var pq=Z(`ZodNonOptional`,(e,t)=>{ZH.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mq(e,t){return new pq({type:`nonoptional`,innerType:e,...Q(t)})}var hq=Z(`ZodCatch`,(e,t)=>{$H.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function gq(e,t){return new hq({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var _q=Z(`ZodPipe`,(e,t)=>{eU.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EW(e,t,n,r),e.in=t.in,e.out=t.out});function vq(e,t){return new _q({type:`pipe`,in:e,out:t})}var yq=Z(`ZodReadonly`,(e,t)=>{nU.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bq(e){return new yq({type:`readonly`,innerType:e})}var xq=Z(`ZodCustom`,(e,t)=>{iU.init(e,t),_K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hW(e,t,n,r)});function Sq(e,t={}){return tW(xq,e,t)}function Cq(e,t){return nW(e,t)}var wq={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),localIds:[`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`]},Tq=e=>{let t=(0,B.c)(3),[n,r]=(0,O.useState)(e),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{r(e??window.document.body)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,O.useEffect)(i,a),n},Eq=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},Dq=[],Oq=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(Eq.subscribe,Eq.getSnapshot,kq),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:Eq.addBlockage,removeBlockage:Eq.removeBlockage,isElementScrollBlocked:Eq.isElementScrollBlocked},e[0]=t,e[1]=n),n};function kq(){return Dq}var Aq=e=>{let t=(0,B.c)(14),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{disableScroll:r,element:i,key:a}=n,o=r===void 0?!1:r,s=a===void 0?`unnamed_blocker`:a,{isElementScrollBlocked:c,addBlockage:l,removeBlockage:u}=Oq(),d=Tq(i),f,p;t[2]!==l||t[3]!==o||t[4]!==i||t[5]!==s||t[6]!==u?(f=()=>{let e=i??window.document.body;return o?l(s,e):u(s,e),()=>{u(s,e)}},p=[l,o,i,s,u],t[2]=l,t[3]=o,t[4]=i,t[5]=s,t[6]=u,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,O.useEffect)(f,p);let m;t[9]!==d||t[10]!==c?(m=d?c(d):!1,t[9]=d,t[10]=c,t[11]=m):m=t[11];let h;return t[12]===m?h=t[13]:(h={isScrollBlocked:m},t[12]=m,t[13]=h),h},jq=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,Mq=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,Nq=({className:e,...t})=>(0,k.jsx)(`h1`,{className:W(`font-bold text-2xl`,e),...t}),Pq=({className:e,...t})=>(0,k.jsx)(`h2`,{className:W(`mb-2 font-bold text-2xl`,jq,e),...t}),Fq=({className:e,...t})=>(0,k.jsx)(`h3`,{className:W(`mb-2 font-bold text-xl`,jq,e),...t}),Iq=({className:e,...t})=>(0,k.jsx)(`h4`,{className:W(`font-bold text-lg`,jq,e),...t}),Lq=({className:e,...t})=>(0,k.jsx)(`h5`,{className:W(`font-bold text-base`,jq,e),...t}),Rq=({className:e,...t})=>(0,k.jsx)(`h6`,{className:W(`ml-3 font-bold text-base`,jq,e),...t}),zq=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Bq=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Vq=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},Hq=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?zq(t):void 0;return(0,k.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Vq(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Bq(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&Mq,n),...i,children:t})},Uq=({isClickable:e,...t})=>(0,k.jsx)(Nq,{...t}),Wq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Pq,isClickable:e,...t}),Gq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Fq,isClickable:e,...t}),Kq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Iq,isClickable:e,...t}),qq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Lq,isClickable:e,...t}),Jq=({isClickable:e=!1,...t})=>(0,k.jsx)(Hq,{H:Rq,isClickable:e,...t}),Yq=au(`flex cursor-default flex-col overflow-hidden shadow-sm`,{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-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),Xq={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},Zq=Gx.create(Qx),Qq=e=>{let t=(0,B.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:l,isScrollable:u,disableScroll:d,padding:f,...p}=e,m=o===void 0?!1:o,h=c===void 0?`md`:c,g=u===void 0?!1:u,_=d===void 0?!0:d,v=f===void 0?`none`:f,y=Tq(i),b=r&&_,x;t[0]===b?x=t[1]:(x={key:`modal`,disableScroll:b},t[0]=b,t[1]=x),Aq(x);let S,C;if(t[2]!==r||t[3]!==a?(S=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},C=[r,a],t[2]=r,t[3]=a,t[4]=S,t[5]=C):(S=t[4],C=t[5]),(0,O.useEffect)(S,C),!y){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[6]=e):e=t[6],e}let w=!!s,T=Xq[v||`none`],E;return t[7]===a?E=t[8]:(E=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=E),(0,Dc.createPortal)((0,k.jsx)(Gx.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:r?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:E,"aria-hidden":!r,children:(0,k.jsxs)(Zq,{onClick:$q,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:Yq({size:h,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,k.jsxs)(`div`,{className:W(`relative flex-none px-4 pt-4`,m&&w?`flex items-start`:m?`flex justify-end`:w?`items-center`:`hidden`),children:[w&&(0,k.jsx)(Gq,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Hu,size:`icon-md`})]}),(0,k.jsx)(`div`,{className:W(`flex min-h-0 w-full flex-1 flex-col`,g===!0&&`overflow-auto`,g===`y`&&`overflow-y-auto overflow-x-hidden`,g===`x`&&`overflow-x-auto overflow-y-hidden`,!g&&`overflow-visible`),children:(0,k.jsx)(`div`,{className:W(`flex h-full w-full flex-1 flex-col`,T),children:n})})]})}),y)};function $q(e){return e.stopPropagation()}var eJ=e=>{let t=(0,B.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,O.useState)(!1),{setLocaleDictionary:u}=DC(),{mutate:d,isPending:f}=dD(),{mutate:p,isPending:m}=gD(),{mutate:h,isPending:g}=uD(),_=m||g,{editedContent:v,restoreEditedContent:y}=FC(),{deleteButton:b,resetButton:x,saveButton:S,publishButton:C,downloadButton:w,confirmation:T}=yt(wq),{isAuthenticated:E}=rD(),D=v?.[n.localId],A;t[0]!==n||t[1]!==D?(A=D&&JSON.stringify(D)!==JSON.stringify(n),t[0]=n,t[1]=D,t[2]=A):A=t[2];let j=A,M=n?.id!==void 0,N;t[3]!==n||t[4]!==v||t[5]!==o||t[6]!==y||t[7]!==u||t[8]!==p?(N=async()=>{v?.[n.localId]&&p({dictionary:{...n,...v?.[n.localId]}},{onSuccess:()=>{u(v?.[n.localId]),y(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=v,t[5]=o,t[6]=y,t[7]=u,t[8]=p,t[9]=N):N=t[9];let P=N,F;t[10]!==n||t[11]!==v||t[12]!==o||t[13]!==h||t[14]!==y||t[15]!==u?(F=()=>{let e={...n,...v?.[n.localId]};h({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),y(n.localId),o?.())}})},t[10]=n,t[11]=v,t[12]=o,t[13]=h,t[14]=y,t[15]=u,t[16]=F):F=t[16];let I=F,L;t[17]!==d||t[18]!==n||t[19]!==a?(L=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=L):L=t[20];let ee=L,te;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>l(!1),t[21]=te):te=t[21];let ne;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ne=()=>l(!1),t[22]=ne):ne=t[22],(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Qq,{isOpen:c,title:T.title.value,size:`md`,onClose:te,padding:`md`,children:(0,k.jsxs)(`form`,{className:`size-full`,children:[(0,k.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:T.message}),(0,k.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,k.jsx)($.Button,{label:T.cancelButton.label.value,disabled:!j||_,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:ne,children:T.cancelButton.text}),(0,k.jsx)($.Button,{label:T.confirmButton.label.value,disabled:!j||_,Icon:Ru,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:P,children:T.confirmButton.text})]})]})}),(0,k.jsxs)(`form`,{className:W(`flex justify-end gap-2`,i),...s,children:[r.includes(`remote`)&&M&&a&&E&&(0,k.jsx)($.Button,{label:b.label.value,Icon:Bu,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:b.text}),j&&(0,k.jsx)($.Button,{label:x.label.value,disabled:!j,Icon:Lu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>y(n.localId),children:x.text}),r.includes(`local`)&&(0,k.jsx)($.Button,{label:w.label.value,disabled:!j||_,Icon:Eu,color:`text`,variant:E?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:w.text}),r.includes(`remote`)&&E&&!M&&(0,k.jsx)($.Button,{label:C.label.value,disabled:_,Icon:_u,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:C.text}),r.includes(`remote`)&&E&&M&&j&&(0,k.jsx)($.Button,{label:S.label.value,disabled:!j||_,Icon:Ru,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:S.text})]})]})},tJ={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},localIds:[`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`]},nJ=(e,t=2e3,n,r)=>{let[i,a]=(0,O.useState)(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},rJ=e=>{let t=(0,B.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:l,disable:u,preventDefault:d,stopPropagation:f,size:p}=e,m=a===void 0?`Copy to clipboard`:a,h=o===void 0?`Copied to clipboard`:o,g=s===void 0?2e3:s,_=d===void 0?!0:d,v=f===void 0?!0:f,y=p===void 0?14:p,{isCopied:b,copy:x}=nJ(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,k.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let S;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==x||t[8]!==b||t[9]!==_||t[10]!==y||t[11]!==v||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{_&&e.preventDefault(),v&&e.stopPropagation(),x()},o=b?h:m,s=b?wu:Tu;S=(0,k.jsxs)(`span`,{className:W(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":b,"data-testid":`copy-to-clipboard`,children:[(0,k.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,k.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:y,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=x,t[8]=b,t[9]=_,t[10]=y,t[11]=v,t[12]=n,t[13]=S}else S=t[13];return S},iJ=au(`relative z-0 flex size-full flex-row items-center gap-2`,{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`}}),aJ=au(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,destructive:`bg-destructive/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),oJ=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,O.useRef)([]),c=(0,O.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=lS(s,{isHoverable:i,orientation:a});return(0,O.useEffect)(()=>{u()},[t]),(0,k.jsxs)(`div`,{className:W(iJ({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,O.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&(0,k.jsx)(`div`,{className:W(aJ({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},sJ={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"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."},"projectInput":{"label":"Projects","description":"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.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"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."},"projectInput":{"label":"Projects","description":"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.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"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.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"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."},"projectInput":{"label":"Projekte","description":"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.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"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.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"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."},"projectInput":{"label":"Progetti","description":"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.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"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.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"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."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"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":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"auditButton":{"label":"Отслеживание"}}}}`),localIds:[`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`]},cJ={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),localIds:[`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`]},lJ=e=>{let t=(0,B.c)(38),{titleRequiredError:n,titleInvalidTypeError:r,titleMinLengthError:i,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:s,keyMinLengthError:c,descriptionRequiredError:l,descriptionInvalidTypeError:u,requiredErrorProjectId:d,invalidTypeErrorProjectId:f,invalidTypeErrorTags:p,locationRequiredError:m,locationInvalidTypeError:h,filePathRequiredError:g,filePathInvalidTypeError:_}=yt(cJ),v;if(t[0]!==u||t[1]!==l||t[2]!==_||t[3]!==g||t[4]!==f||t[5]!==p||t[6]!==o||t[7]!==c.value||t[8]!==a||t[9]!==s.value||t[10]!==h||t[11]!==m||t[12]!==e||t[13]!==d||t[14]!==r||t[15]!==i.value||t[16]!==n){let y;t[18]!==r||t[19]!==n?(y=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==a?(b=e=>e.input===void 0?a.value:o.value,t[21]=o,t[22]=a,t[23]=b):b=t[23];let x;t[24]!==u||t[25]!==l?(x=e=>e.input===void 0?l.value:u.value,t[24]=u,t[25]=l,t[26]=x):x=t[26];let S;t[27]!==f||t[28]!==d?(S=e=>e.input===void 0?d.value:f.value,t[27]=f,t[28]=d,t[29]=S):S=t[29];let C;t[30]===p?C=t[31]:(C=()=>p.value,t[30]=p,t[31]=C);let w;t[32]!==h||t[33]!==m?(w=e=>e.input===void 0?m.value:h.value,t[32]=h,t[33]=m,t[34]=w):w=t[34];let T;t[35]!==_||t[36]!==g?(T=e=>e.input===void 0?g.value:_.value,t[35]=_,t[36]=g,t[37]=T):T=t[37],v=JK({title:bK({error:y}).refine(uJ,{error:i.value}).optional(),key:bK({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:bK({error:x}).optional(),projectIds:KK(bK({error:S})).default([e]),tags:KK(bK({error:C})).default([]),location:eq([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:eq([`static`,`dynamic`,`fetch`]).optional(),filePath:bK({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=_,t[3]=g,t[4]=f,t[5]=p,t[6]=o,t[7]=c.value,t[8]=a,t[9]=s.value,t[10]=h,t[11]=m,t[12]=e,t[13]=d,t[14]=r,t[15]=i.value,t[16]=n,t[17]=v}else v=t[17];return v};function uJ(e){return e.length===0||e.length>=4}var dJ=e=>{let t=(0,B.c)(62),{dictionary:n,mode:r}=e,{session:i}=nD(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=lD(),{data:l}=fD(),u=s?.data??[],d=l?.data??[],f=lJ(String(o?.id)),p=n.location??`remote`,m;t[2]!==n||t[3]!==p?(m={defaultValues:{...n,location:p}},t[2]=n,t[3]=p,t[4]=m):m=t[4];let{form:h,isSubmitting:g}=FW(f,m),{editedContent:_,setEditedDictionary:v}=FC(),{titleInput:y,keyInput:b,descriptionInput:x,projectInput:S,tagsSelect:C,locationSelect:w,importModeSelect:T,filePathInput:E,auditButton:D}=yt(sJ),{mutate:A,isPending:j}=pD(),M=_?.[n.localId],N;t[5]!==n||t[6]!==h?(N=()=>{h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[5]=n,t[6]=h,t[7]=N):N=t[7];let P=h?.reset,F;t[8]!==n||t[9]!==P?(F=[n,P],t[8]=n,t[9]=P,t[10]=F):F=t[10],(0,O.useEffect)(N,F);let I;t[11]!==n||t[12]!==h||t[13]!==M?(I=()=>{M===void 0&&h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[11]=n,t[12]=h,t[13]=M,t[14]=I):I=t[14];let L;t[15]===M?L=t[16]:(L=[M],t[15]=M,t[16]=L),(0,O.useEffect)(I,L);let ee;t[17]!==A||t[18]!==n||t[19]!==h||t[20]!==v||t[21]!==M?(ee=()=>{let e={...n,...M};A({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(!t?.data)return;let n=t.data.fileContent,r={...e,...n,tags:n.tags??e.tags??[]};v(r),h.reset(r)}})},t[17]=A,t[18]=n,t[19]=h,t[20]=v,t[21]=M,t[22]=ee):ee=t[22];let te=ee,ne;t[23]===h.control?ne=t[24]:(ne={control:h.control,name:`location`},t[23]=h.control,t[24]=ne);let re=ez(ne),R=re===`local`||re===`hybrid`,z;t[25]!==n||t[26]!==h||t[27]!==v||t[28]!==M?(z=e=>{h.setValue(`key`,e,{shouldDirty:!0}),v({...n,...M??{},key:e})},t[25]=n,t[26]=h,t[27]=v,t[28]=M,t[29]=z):z=t[29];let ie;t[30]!==n||t[31]!==h||t[32]!==v||t[33]!==M?(ie=e=>{h.setValue(`title`,e,{shouldDirty:!0}),v({...n,...M??{},title:e})},t[30]=n,t[31]=h,t[32]=v,t[33]=M,t[34]=ie):ie=t[34];let ae;t[35]!==n||t[36]!==h||t[37]!==v||t[38]!==M?(ae=e=>{h.setValue(`description`,e,{shouldDirty:!0}),v({...n,...M??{},description:e})},t[35]=n,t[36]=h,t[37]=v,t[38]=M,t[39]=ae):ae=t[39];let oe;t[40]!==n||t[41]!==h||t[42]!==w||t[43]!==r||t[44]!==v||t[45]!==M?(oe=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?h.getValues(`filePath`)??n.filePath:void 0;e||h.setValue(`filePath`,void 0),v({...n,...M??{},location:r,filePath:i})},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),v({...n,...M??{},location:r})};return(0,k.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,k.jsx)($.Label,{className:`ml-1`,children:w.label}),(0,k.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,k.jsx)(TG,{id:`location-local`,name:`location-local`,label:w.local.value,color:`text`,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,k.jsx)(TG,{id:`location-remote`,name:`location-remote`,label:w.remote.value,color:`text`,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,k.jsx)($.Description,{children:w.testDescription}),(0,k.jsx)($.Message,{})]})},t[40]=n,t[41]=h,t[42]=w,t[43]=r,t[44]=v,t[45]=M,t[46]=oe):oe=t[46];let se;t[47]!==n||t[48]!==h||t[49]!==v||t[50]!==M?(se=e=>{h.setValue(`importMode`,e,{shouldDirty:!0}),v({...n,...M??{},importMode:e})},t[47]=n,t[48]=h,t[49]=v,t[50]=M,t[51]=se):se=t[51];let ce;t[52]!==n||t[53]!==h||t[54]!==v||t[55]!==M?(ce=e=>{let t=[e].flat();h.setValue(`projectIds`,t,{shouldDirty:!0}),v({...n,...M??{},projectIds:t})},t[52]=n,t[53]=h,t[54]=v,t[55]=M,t[56]=ce):ce=t[56];let le;return t[57]!==n||t[58]!==h||t[59]!==v||t[60]!==M?(le=e=>{let t=[e].flat();h.setValue(`tags`,t,{shouldDirty:!0}),v({...n,...M??{},tags:t})},t[57]=n,t[58]=h,t[59]=v,t[60]=M,t[61]=le):le=t[61],(0,k.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsx)($.EditableFieldInput,{name:`key`,label:b.label,placeholder:b.label.value,description:b.description,disabled:g,isRequired:!0,onSave:z}),(0,k.jsx)($.EditableFieldInput,{name:`title`,label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:g,onSave:ie})]}),(0,k.jsx)($.EditableFieldTextArea,{name:`description`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ae}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,k.jsx)($.Field,{control:h.control,name:`location`,render:oe}),(0,k.jsx)(qy,{mode:`wait`,children:R&&(0,k.jsx)(Gx.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,k.jsx)($.Input,{name:`filePath`,label:E.label.value,placeholder:E.placeholder.value,description:E.description.value,disabled:g||!R,onChange:e=>{let t=e.target.value;v({...n,...M??{},filePath:t})}})},`filePath-input`)})]}),(0,k.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,k.jsxs)($.Select,{name:`importMode`,label:T.label.value,description:T.description.value,onValueChange:se,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:T.label.value})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`static`,children:T.static.value}),(0,k.jsx)(J.Item,{value:`dynamic`,children:T.dynamic.value}),(0,k.jsx)(J.Item,{value:`live`,children:T.live.value})]})]})}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsxs)($.MultiSelect,{name:`projectIds`,label:S.label.value,description:S.description,onValueChange:ce,children:[(0,k.jsx)(xR.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,k.jsx)(xR.Input,{placeholder:S.placeholder.value})}),(0,k.jsx)(xR.Content,{children:(0,k.jsx)(eS,{isLoading:c,children:(0,k.jsx)(xR.List,{children:u?.map(fJ)})})})]}),(0,k.jsxs)($.MultiSelect,{name:`tags`,label:C.label.value,description:C.description,onValueChange:le,children:[(0,k.jsx)(xR.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,k.jsx)(xR.Input,{placeholder:C.placeholder.value})}),(0,k.jsx)(xR.Content,{children:(0,k.jsx)(eS,{isLoading:c,children:(0,k.jsx)(xR.List,{children:d?.map(pJ)})})})]})]}),(0,k.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,k.jsx)($.Button,{type:`button`,size:`icon-md`,label:D.label.value,Icon:Vu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||j,isLoading:j})})]})};function fJ(e){return(0,k.jsx)(xR.Item,{value:String(e.id),children:e.name},String(e.id))}function pJ(e){return(0,k.jsx)(xR.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var mJ={key:`copy-button`,content:{nodeType:`translation`,translation:{en:{label:`Copy content`},"en-GB":{label:`Copy content`},fr:{label:`Copier le contenu`},es:{label:`Copiar contenido`},de:{label:`Inhalt kopieren`},ja:{label:`コンテンツをコピー`},ko:{label:`콘텐츠 복사`},zh:{label:`复制内容`},it:{label:`Copia contenuto`},pt:{label:`Copiar conteúdo`},hi:{label:`सामग्री कॉपी करें`},ar:{label:`نسخ المحتوى`},ru:{label:`Копировать содержимое`}}},localIds:[`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`]},hJ=e=>{let t=(0,B.c)(6),{content:n,...r}=e,[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!1),{label:c}=yt(mJ),l;t[0]===n?l=t[1]:(l=async()=>{try{s(!1),await navigator.clipboard.writeText(n),a(!0)}catch(e){console.error(`Failed to copy text: `,e),s(!0)}},t[0]=n,t[1]=l);let u=l,d,f;t[2]!==i||t[3]!==o?(d=()=>{if(i||o){let e=setTimeout(()=>{a(!1),s(!1)},1e3);return()=>clearTimeout(e)}},f=[i,o],t[2]=i,t[3]=o,t[4]=d,t[5]=f):(d=t[4],f=t[5]),(0,O.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,k.jsx)(rS,{Icon:i?wu:Tu,onClick:u,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:p(),...r,label:p(),"aria-describedby":i?`copy-success`:o?`copy-error`:void 0})},gJ=(0,O.lazy)(()=>Le(()=>import(`./dist-B54x4iXk.js`).then(e=>({default:e.Editor})),[])),_J=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,O.useRef)(null),c=(0,O.useRef)(null),[l,u]=(0,O.useState)({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`?e.split(`
186
+ `).length>1:!1);return(0,k.jsxs)(`div`,{className:W(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,k.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,k.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,k.jsx)(hJ,{content:e})})}),(0,k.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(eS,{}),children:(0,k.jsx)(gJ,{...l,defaultLanguage:`typescript`,language:t,loading:(0,k.jsx)(eS,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{contextmenu:!1,readOnly:a,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:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},vJ=e=>{let t=(0,B.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=FC(),o=yJ,s=a?.[n.localId]?.content??n?.content,c;t[0]!==n||t[1]!==i?(c=e=>{o(e??`{}`)&&i(n.localId,JSON.parse(e??`{}`))},t[0]=n,t[1]=i,t[2]=c):c=t[2];let l;return t[3]!==s||t[4]!==r||t[5]!==c?(l=(0,k.jsx)(_J,{language:`json`,onChange:c,isDarkMode:r,children:JSON.stringify(s,null,2)}),t[3]=s,t[4]=r,t[5]=c,t[6]=l):l=t[6],l};function yJ(e){try{return JSON.parse(e),!0}catch{return!1}}var bJ={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},localIds:[`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`]},xJ={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,plural:`Pluriel`,gender:`Genre`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,plural:`Plural`,gender:`Género`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Geschlecht`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,plural:`複数形`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,plural:`복수`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,plural:`复数`,gender:`性别`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,plural:`Plurale`,gender:`Genere`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,plural:`Plural`,gender:`Gênero`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,plural:`बहुवचन`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,plural:`جمع`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,plural:`Множественное число`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},SJ=e=>{let t=(0,B.c)(23),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,plural:d,triggerPlaceHolder:f,nest:p,gender:m,condition:h,markdown:g,insertion:_,reactNode:v,file:y}=yt(xJ),b;t[0]===n?b=t[1]:(b=lC(n),t[0]=n,t[1]=b);let[x,S]=(0,O.useState)(b),C;t[2]===r?C=t[3]:(C=e=>{S(e),r(e)},t[2]=r,t[3]=C);let w=C,T;return t[4]!==l||t[5]!==s||t[6]!==h||t[7]!==u||t[8]!==y||t[9]!==m||t[10]!==_||t[11]!==x||t[12]!==g||t[13]!==i||t[14]!==p||t[15]!==c||t[16]!==o||t[17]!==w||t[18]!==d||t[19]!==v||t[20]!==a||t[21]!==f?(T=(0,k.jsxs)(J,{value:x,onValueChange:w,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:f})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:M,children:i}),(0,k.jsx)(J.Item,{value:ie,children:a}),(0,k.jsx)(J.Item,{value:ae,children:o}),(0,k.jsx)(J.Item,{value:oe,children:s}),(0,k.jsx)(J.Item,{value:ee,children:c}),(0,k.jsx)(J.Item,{value:te,children:l}),(0,k.jsx)(J.Item,{value:N,children:u}),(0,k.jsx)(J.Item,{value:P,children:d}),(0,k.jsx)(J.Item,{value:se,children:m}),(0,k.jsx)(J.Item,{value:I,children:_}),(0,k.jsx)(J.Item,{value:R,children:g}),(0,k.jsx)(J.Item,{value:ne,children:p}),(0,k.jsx)(J.Item,{value:F,children:h}),(0,k.jsx)(J.Item,{value:re,disabled:!0,children:v}),(0,k.jsx)(J.Item,{value:L,children:y})]})]}),t[4]=l,t[5]=s,t[6]=h,t[7]=u,t[8]=y,t[9]=m,t[10]=_,t[11]=x,t[12]=g,t[13]=i,t[14]=p,t[15]=c,t[16]=o,t[17]=w,t[18]=d,t[19]=v,t[20]=a,t[21]=f,t[22]=T):T=t[22],T},CJ=e=>{let t=(0,B.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=NC()?.internationalization?.locales??[],s=lC(n),c=oC(n),l=e=>{a(iC(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`||s===`plural`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(SJ,{section:n,onValueChange:e=>a(iC(e,o))}),(0,k.jsx)(CJ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(SJ,{section:n,onValueChange:e=>a(iC(e,o))}),(0,k.jsx)(CJ,{section:c,keyPath:e,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`object`){let e;if(t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==a||t[4]!==n){let s;t[6]!==o||t[7]!==a?(s=e=>a(iC(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(SJ,{section:n,onValueChange:s}),(0,k.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,k.jsx)(EJ,{keyPath:i,section:n,dictionaryLocalId:r})})]}),t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=n,t[5]=e}else e=t[5];return e}let u;t[9]!==o||t[10]!==a?(u=e=>a(iC(e,o)),t[9]=o,t[10]=a,t[11]=u):u=t[11];let d;return t[12]!==n||t[13]!==u?(d=(0,k.jsx)(SJ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},wJ=e=>{let t=(0,B.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=AC(),{renameEditedContent:c,addEditedContent:l}=PC(),{titleInput:u,deleteButton:d}=yt(bJ),f;t[0]!==a||t[1]!==i||t[2]!==c||t[3]!==s?(f=e=>{c(a,e,i);let t=i.slice(0,-1),n=i[i.length-1];s([...t,{...n,key:e}])},t[0]=a,t[1]=i,t[2]=c,t[3]=s,t[4]=f):f=t[4];let p=f,m;if(t[5]!==l||t[6]!==d||t[7]!==a||t[8]!==o?.keyPath||t[9]!==p||t[10]!==i||t[11]!==r||t[12]!==n||t[13]!==s||t[14]!==u){let e;t[16]!==i||t[17]!==s?(e=()=>s(i),t[16]=i,t[17]=s,t[18]=e):e=t[18];let c;t[19]!==l||t[20]!==a||t[21]!==i?(c=e=>{l(a,e,i)},t[19]=l,t[20]=a,t[21]=i,t[22]=c):c=t[22],m=(0,k.jsx)(Qx,{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":dt(i,o?.keyPath??[]),onClick:e,children:(0,k.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,k.jsxs)(`div`,{className:`w-full`,children:[(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,k.jsx)(ow,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,k.jsx)(rS,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Bu,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,k.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,ht(n),` )`]})]}),(0,k.jsx)(CJ,{keyPath:i,dictionaryLocalId:a,section:r,onNodeTypeChange:c})]})}),t[5]=l,t[6]=d,t[7]=a,t[8]=o?.keyPath,t[9]=p,t[10]=i,t[11]=r,t[12]=n,t[13]=s,t[14]=u,t[15]=m}else m=t[15];return m},TJ=e=>{let t=(0,B.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=yt(bJ),{setFocusedContentKeyPath:o}=AC(),{addEditedContent:s}=PC();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(`div`,{children:`Not an object`}),t[0]=e):e=t[0],e}let c;if(t[1]!==s||t[2]!==a.label.value||t[3]!==a.text||t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==o){let e;t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o?(e=()=>{let e=[...r,{type:ee,key:`newKey`}];s(i,``,e),o(e)},t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=e):e=t[13],c=(0,k.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,k.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,k.jsx)(`li`,{className:`flex w-full`,children:(0,k.jsx)(wJ,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:ee,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,k.jsx)(rS,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Iu,className:`flex-1`,onClick:e,children:a.text})]}),t[1]=s,t[2]=a.label.value,t[3]=a.text,t[4]=i,t[5]=r,t[6]=n,t[7]=o,t[8]=c}else c=t[8];return c},EJ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,k.jsx)(wJ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,k.jsx)(TJ,{section:e,keyPath:t,dictionaryLocalId:n}),DJ=e=>{let t=(0,B.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=FC(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,k.jsx)(wJ,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},OJ=e=>{let t=(0,B.c)(24),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=NC(),{returnToDictionaryList:d}=yt(tJ),{focusedContent:f,setFocusedContent:p}=AC(),{setLocaleDictionary:m}=DC(),[h,g]=(0,O.useState)(`content`),_;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(_=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=_):_=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,O.useEffect)(_,v);let y;if(t[6]!==h||t[7]!==u?.internationalization?.locales||t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==r||t[12]!==o||t[13]!==s||t[14]!==d||t[15]!==p||t[16]!==l){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>g(`structure`),t[18]=e):e=t[18];let c;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>g(`content`),t[19]=c):c=t[19];let f;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>g(`json`),t[20]=f):f=t[20];let m;t[21]!==o||t[22]!==p?(m=()=>{p(null),o?.()},t[21]=o,t[22]=p,t[23]=m):m=t[23],y=(0,k.jsx)(bD,{availableLocales:u?.internationalization?.locales??[],children:(0,k.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,k.jsx)(rS,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:gu,label:d.label.value,children:d.text}),(0,k.jsxs)(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,k.jsx)(`div`,{className:`sticky top-0 z-10 flex shrink-0 gap-3 rounded-xl bg-background/20 p-3 pb-4`,children:(0,k.jsx)(oJ,{selectedChoice:h,tabs:[...a.includes(`remote`)?[(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`details`,onClick:()=>g(`details`),type:`button`,children:`Details`},`details`)]:[],(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`structure`,onClick:e,type:`button`,children:`Structure`},`structure`),(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`content`,onClick:c,type:`button`,children:`Content`},`content`),(0,k.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`json`,onClick:f,type:`button`,children:`JSON`},`json`)],hoverable:!0,color:`text`})}),(0,k.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,k.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-stretch gap-6`,children:[a.includes(`remote`)&&h===`details`&&(0,k.jsx)(dJ,{dictionary:n,mode:a}),h===`structure`&&(0,k.jsx)(DJ,{dictionary:n}),h===`content`&&(0,k.jsx)(xI,{dictionary:n,isDarkMode:i}),h===`json`&&(0,k.jsx)(vJ,{dictionary:n,isDarkMode:i})]})})]}),(0,k.jsx)(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:(0,k.jsxs)(Qx,{color:`card`,roundedSize:`2xl`,padding:`sm`,className:`w-full shrink-0 flex-row flex-wrap items-center justify-end gap-10 bg-background/20 md:bottom-0`,children:[(0,k.jsx)(rJ,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,k.jsx)(eJ,{dictionary:n,mode:a,onDelete:m,onSave:s})]})})]})}),t[6]=h,t[7]=u?.internationalization?.locales,t[8]=n,t[9]=i,t[10]=a,t[11]=r,t[12]=o,t[13]=s,t[14]=d,t[15]=p,t[16]=l,t[17]=y}else y=t[17];return y},kJ=e=>{switch(e){case`xs`:return 480;case`sm`:return 640;case`md`:return 768;case`lg`:return 1024;case`xl`:return 1280;case`2xl`:return 1536;default:return e}},AJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)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)},jJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},MJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},NJ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},PJ=(e=`md`)=>{let t=kJ(e),n=AJ(),r=NJ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:jJ(),isMac:MJ()}},FJ=e=>{let t=(0,B.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=PJ(n),t[0]=n,t[1]=r);let[i,a]=(0,O.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(PJ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,O.useEffect)(o,s),i},IJ=e=>{let t=(0,B.c)(15),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{minChars:r,debounceMs:i,trim:a,defaultValue:o,onSearch:s,onClear:c}=n,l=r===void 0?3:r,u=i===void 0?300:i,d=a===void 0?!0:a,f=(0,O.useRef)(``),p=(0,O.useRef)(null),[m,h]=(0,O.useState)(o??``),g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=g):g=t[2];let _=g,v;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(v=e=>{f.current=e;let t=d?e.trim():e;if(_(),t.length<l){h(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(h(e),s?.(e)):(h(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=v):v=t[8];let y=v,b,x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>()=>{_()},x=[],t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,O.useEffect)(b,x);let S=m.length>=l,C;return t[11]!==m||t[12]!==y||t[13]!==S?(C={setSearch:y,search:m,hasMinChars:S},t[11]=m,t[12]=y,t[13]=S,t[14]=C):C=t[14],C},LJ=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),RJ=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`bellow`,identifier:o,className:s,displayArrow:c=!0,...l})=>(0,k.jsx)(Qx,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:W(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,a===`bellow`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:left-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:right-2`,c&&a===`bellow`&&`before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,c&&a===`above`&&`before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...l,children:e});LJ.Detail=RJ;var zJ=e=>(0,k.jsx)(LJ,{...e}),BJ=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,O.useRef)(null),[i,a]=(0,O.useState)(e),[o,s]=(0,O.useState)(t),[c,l]=(0,O.useState)(void 0);return(0,O.useEffect)(()=>{let i=()=>{if(!r.current)return;let i=r.current,o=document.getElementById(`unrollable-panel-button-${n.identifier}`);if(!o)return;let c=o.getBoundingClientRect(),u=window.innerWidth,d=window.innerHeight,f=u-c.left-16,p=c.right-16;l(Math.max(f,p));let m=i.classList.contains(`invisible`);m&&(i.style.visibility=`hidden`,i.classList.remove(`invisible`)),requestAnimationFrame(()=>{let n=i.getBoundingClientRect();m&&(i.style.visibility=``,i.classList.add(`invisible`));let r=t,o=d-c.bottom-16,l=c.top-16;t===`bellow`&&o<n.height?l>=n.height&&(r=`above`):t===`above`&&l<n.height&&o>=n.height&&(r=`bellow`);let f=e,p=u-c.left-16,h=c.right-16;e===`start`&&p<n.width?h>=n.width&&(f=`end`):e===`end`&&h<n.width&&p>=n.width&&(f=`start`),s(r),a(f)})},o=setTimeout(i,0),c=document.getElementById(`unrollable-panel-button-${n.identifier}`);c&&(c.addEventListener(`mouseenter`,i),c.addEventListener(`focusin`,i));let u=new ResizeObserver(()=>{i()});return r.current&&u.observe(r.current),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0),()=>{clearTimeout(o),c&&(c.removeEventListener(`mouseenter`,i),c.removeEventListener(`focusin`,i)),u.disconnect(),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}},[n.identifier,e,t]),(0,k.jsx)(RJ,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},VJ=zJ;VJ.Detail=BJ;var HJ=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},UJ=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(HJ.subscribe,HJ.getSnapshot,WJ),n;return e[0]===t?n=e[1]:(n={open:HJ.open,close:HJ.close,set:HJ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function WJ(){return{}}var GJ={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},localIds:[`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`]},KJ=e=>e.split(` + `).map(e=>e.trim()),qJ=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,JJ=(e,t)=>{let n=t.map(qJ),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(qJ(e)));if(!i)return!1;let a=qJ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},YJ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,XJ=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},ZJ=e=>{let t=(0,B.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,l=a===void 0?!1:a,u=s===void 0?`md`:s,{isMac:d}=FJ(),f;t[0]!==d||t[1]!==n?(f=KJ(XJ(n,d??!1)),t[0]=d,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[3]=m):m=t[3];let[h,g]=(0,O.useState)(m),_,v;if(t[4]!==l||t[5]!==d||t[6]!==p||t[7]!==r?(_=()=>{let e=e=>{let t=e.target,n=t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable,i=e.key,a=new Set;if(e.metaKey&&a.add(`⌘`),e.ctrlKey&&a.add(`Ctrl`),e.altKey&&a.add(d?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(YJ(i))):a.add(i.toUpperCase()),g(a),!l&&r&&JJ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{g(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,t)}},v=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=_,t[9]=v):(_=t[8],v=t[9]),(0,O.useEffect)(_,v),!c)return null;let y;t[10]===h?y=t[11]:(y=e=>{let t=e.toUpperCase(),n=qJ(e);return h.has(e)||h.has(t)||h.has(n)||e===`⌘`&&h.has(`Meta`)||e===`Ctrl`&&h.has(`Control`)||e===`⌥`&&h.has(`Alt`)||e===`Alt`&&h.has(`Alt`)||e===`←`&&h.has(`ArrowLeft`)||e===`→`&&h.has(`ArrowRight`)||e===`↑`&&h.has(`ArrowUp`)||e===`↓`&&h.has(`ArrowDown`)},t[10]=h,t[11]=y);let b=y,x;if(t[12]!==o||t[13]!==b||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==b||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=YJ(e);return(0,k.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,k.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,k.jsx)(`span`,{className:W(`min-w-4 px-0.5 text-center`,b(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=b,t[19]=n,t[20]=e):e=t[20],x=(0,k.jsx)(`kbd`,{className:W(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=b,t[14]=p,t[15]=n,t[16]=u,t[17]=x}else x=t[17];return x},QJ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,k.jsx)(`div`,{className:W(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,k.jsx)(`div`,{style:{minWidth:`${n}px`},className:W(r===`right`&&`ml-auto`),children:e})}),$J=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1},eY=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=yt(GJ),{isMobile:d}=FJ(`md`),f=(0,O.useRef)(null),p=(0,O.useRef)(null),m=Tq(l),{open:h,close:g,isOpen:_}=UJ(),v=_(t),y=v;Aq({disableScroll:y,key:t?`right_drawer_${t}`:`right_drawer`}),(0,O.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=y&&a,r=e.target&&!f.current.contains(e.target),i=$J(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[y,g,c,a,t]);let b=(0,O.useRef)(c);return(0,O.useEffect)(()=>{b.current=c},[c]),(0,O.useEffect)(()=>{s!==void 0&&s!==v&&(s?h(t):(g(t),b.current?.()))},[s,v,t,h,g]),m?(0,Dc.createPortal)((0,k.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,k.jsx)(QJ,{isHidden:!y,align:`right`,children:(0,k.jsxs)(Qx,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,k.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,k.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,k.jsx)(`div`,{children:o&&(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:bu,children:o?.text})}),(0,k.jsx)(`div`,{children:(0,k.jsxs)(VJ,{identifier:`close-drawer`,children:[(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Hu,size:`icon-md`}),(0,k.jsx)(VJ.Detail,{identifier:`close-drawer`,children:(0,k.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,k.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,k.jsx)(ZJ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,k.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,k.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(g(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(g(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,k.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,k.jsx)(k.Fragment,{})},tY=au(`w-fit 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`},color:{primary:`border-primary bg-primary/10 text-primary`,success:`border-success bg-success/10 text-success`,error:`border-error bg-error/10 text-error`,warning:`border-warning bg-warning/10 text-warning`,neutral:`/10 border-neutral bg-neutral/10 text-neutral`,text:`border-text bg-text/10 text-text`,blue:`border-blue-500 bg-blue-500/10 text-blue-500 dark:text-blue-300`,yellow:`border-yellow-500 bg-yellow-500/10 text-yellow-500 dark:text-yellow-300`,green:`border-green-500 bg-green-500/10 text-green-500 dark:text-green-300`,red:`border-red-500 bg-red-500/10 text-red-500 dark:text-red-300`,orange:`border-orange-500 bg-orange-500/10 text-orange-500 dark:text-orange-300`,purple:`border-purple-500 bg-purple-500/10 text-purple-500 dark:text-purple-300`,pink:`border-pink-500 bg-pink-500/10 text-pink-500 dark:text-pink-300`,brown:`border-brown-500 bg-brown-500/10 text-brown-500 dark:text-brown-300`,gray:`border-gray-500 bg-gray-500/10 text-gray-500 dark:text-gray-300`,black:`border-black bg-black/10 text-black`,white:`border-white bg-white/10 text-white`},size:{xs:`border-[1.2px] px-2 py-0.5 text-xs`,sm:`border-[1.3px] px-2 py-0.5 text-sm`,md:`border-2 px-2 py-1 text-base`,lg:`border-2 px-3 py-2 text-lg`,xl:`border-2 px-3 py-2 text-xl`},border:{none:`border-none`,with:`border-[1.3px] border-text`},background:{none:`bg-none`,with:``}},defaultVariants:{roundedSize:`full`,border:`none`,color:`text`,size:`md`}}),nY=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,k.jsx)(`div`,{className:tY({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),rY=`dictionaryList`,iY=e=>`dictionary_edition_${e}`,aY=e=>{let t=(0,B.c)(23),n;t[0]===e?n=t[1]:(n=iY(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=UJ(),{getEditedContentValue:s}=PC(),{focusedContent:c,setFocusedContent:l}=AC(),u;t[2]!==c?.dictionaryKey||t[3]!==r||t[4]!==a?(u=()=>{c?.dictionaryKey&&a(r)},t[2]=c?.dictionaryKey,t[3]=r,t[4]=a,t[5]=u):u=t[5];let d=c?.dictionaryKey,f;t[6]!==r||t[7]!==a||t[8]!==d?(f=[d,a,r],t[6]=r,t[7]=a,t[8]=d,t[9]=f):f=t[9],(0,O.useEffect)(u,f);let p;t[10]!==i||t[11]!==r?(p=i(r),t[10]=i,t[11]=r,t[12]=p):p=t[12];let m;t[13]!==o||t[14]!==c||t[15]!==r||t[16]!==l?(m=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[13]=o,t[14]=c,t[15]=r,t[16]=l,t[17]=m):m=t[17];let h;return t[18]!==c||t[19]!==s||t[20]!==p||t[21]!==m?(h={isOpen:p,focusedContent:c,getEditedContentValue:s,close:m},t[18]=c,t[19]=s,t[20]=p,t[21]=m,t[22]=h):h=t[22],h},oY=e=>{let t=(0,B.c)(77),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=yt(Xx),l;t[0]===n?l=t[1]:(l=iY(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=aY(n),{setFocusedContent:p}=AC(),{open:m}=UJ(),h;t[2]===m?h=t[3]:(h=()=>m(rY),t[2]=m,t[3]=h);let g=h,{data:_}=hD(),v;t[4]!==f||t[5]!==g||t[6]!==p?(v=()=>{f(),p(null),g()},t[4]=f,t[5]=g,t[6]=p,t[7]=v):v=t[7];let y=v,[b,x]=(0,O.useState)(!1),S;t[8]===y?S=t[9]:(S=()=>{x(!1),y()},t[8]=y,t[9]=S);let C=S;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let w,T,E,D,A,j,M,N,P,F;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==y||t[17]!==u||t[18]!==a||t[19]!==p||t[20]!==_){A=Symbol.for(`react.early_return_sentinel`);bb0:{if(T=_?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!T){let e;t[31]===c?e=t[32]:(e=(0,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[31]=c,t[32]=e),A=e;break bb0}w=eY,F=u,t[33]!==i.value||t[34]!==y?(E={onBack:y,text:i.value},t[33]=i.value,t[34]=y,t[35]=E):E=t[35],t[36]!==f||t[37]!==p?(D=()=>{f(),p(null)},t[36]=f,t[37]=p,t[38]=D):D=t[38];let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>x(!0),t[39]=e):e=t[39];let n;t[40]===a.label.value?n=t[41]:(n=(0,k.jsx)(rS,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Fu,label:a.label.value,onClick:e}),t[40]=a.label.value,t[41]=n);let r;t[42]===a.popoverContent?r=t[43]:(r=(0,k.jsx)(VJ.Detail,{identifier:`open-dictionary-editor`,children:(0,k.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[42]=a.popoverContent,t[43]=r);let o;t[44]!==n||t[45]!==r?(o=(0,k.jsxs)(VJ,{identifier:`open-dictionary-editor`,children:[n,r]}),t[44]=n,t[45]=r,t[46]=o):o=t[46],P=(0,k.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,k.jsx)(`h3`,{className:`w-full text-center text-lg`,children:T.title?T.title:T.key}),o]}),j=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dotted pb-3`,M=(0,k.jsx)(nY,{color:`text`,roundedSize:`full`,size:`xs`,children:T.key}),N=T.filePath&&(0,k.jsx)(nY,{color:`blue`,roundedSize:`full`,size:`xs`,children:T.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=y,t[17]=u,t[18]=a,t[19]=p,t[20]=_,t[21]=w,t[22]=T,t[23]=E,t[24]=D,t[25]=A,t[26]=j,t[27]=M,t[28]=N,t[29]=P,t[30]=F}else w=t[21],T=t[22],E=t[23],D=t[24],A=t[25],j=t[26],M=t[27],N=t[28],P=t[29],F=t[30];if(A!==Symbol.for(`react.early_return_sentinel`))return A;let I;t[47]===T.id?I=t[48]:(I=T.id&&(0,k.jsx)(nY,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[47]=T.id,t[48]=I);let L;t[49]!==I||t[50]!==j||t[51]!==M||t[52]!==N?(L=(0,k.jsxs)(`div`,{className:j,children:[M,N,I]}),t[49]=I,t[50]=j,t[51]=M,t[52]=N,t[53]=L):L=t[53];let ee;t[54]!==L||t[55]!==P?(ee=(0,k.jsxs)(k.Fragment,{children:[P,L]}),t[54]=L,t[55]=P,t[56]=ee):ee=t[56];let te;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[57]=te):te=t[57];let ne;t[58]!==T||t[59]!==y?(ne=(0,k.jsx)(eJ,{dictionary:T,mode:te,className:`mb-4 flex-col px-3`,onDelete:y}),t[58]=T,t[59]=y,t[60]=ne):ne=t[60];let re;t[61]!==T||t[62]!==b||t[63]!==d||t[64]!==y||t[65]!==r||t[66]!==o||t[67]!==C?(re=d&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Qq,{isOpen:b,onClose:()=>x(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,k.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,k.jsx)(OJ,{dictionary:T,onClickDictionaryList:C,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{x(!1),y()},onSave:()=>{x(!1)}})})}),(0,k.jsx)(pw,{dictionary:T})]}),t[61]=T,t[62]=b,t[63]=d,t[64]=y,t[65]=r,t[66]=o,t[67]=C,t[68]=re):re=t[68];let R;return t[69]!==w||t[70]!==E||t[71]!==D||t[72]!==ee||t[73]!==ne||t[74]!==re||t[75]!==F?(R=(0,k.jsx)(w,{identifier:F,backButton:E,onClose:D,header:ee,footer:ne,children:re}),t[69]=w,t[70]=E,t[71]=D,t[72]=ee,t[73]=ne,t[74]=re,t[75]=F,t[76]=R):R=t[76],R},sY=e=>{let t=(0,B.c)(4),{isDarkMode:n}=e,{focusedContent:r}=AC(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,k.jsx)(oY,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},cY={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},localIds:[`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`]},lY=()=>{let{drawerTitle:e,buttonLabel:t}=yt(cY),{set:n}=UJ(),{localeDictionaries:r}=EC(),{editedContent:i}=FC(),{setFocusedContent:a}=AC(),{setSearch:o,search:s}=IJ(),c=(0,O.useMemo)(()=>new mI(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,O.useMemo)(()=>!s||s.trim()===``?Object.values(r):c.search(s).map(e=>e.item),[s,c,r]),u=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[rY]:!1,[iY(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,k.jsxs)(eY,{title:e.label.value,identifier:rY,children:[(0,k.jsx)(`div`,{className:`p-3 pb-4`,children:(0,k.jsx)(yG,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,k.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,k.jsx)(`li`,{className:`w-full`,children:(0,k.jsx)(rS,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:xu,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Pu:void 0,children:(0,k.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,k.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,k.jsx)(nY,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,k.jsx)(nY,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,k.jsx)(nY,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,k.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},uY={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},"en-GB":{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},fr:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press pour éditer le dictionnaire "{{dictionaryKey}}"`}},es:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Presiona largo para editar el diccionario "{{dictionaryKey}}"`}},de:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"`}},ja:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`長押しして編集 "{{dictionaryKey}}" 辞書`}},ko:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`길게 눌러 편집 "{{dictionaryKey}}" 사전`}},zh:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`长按编辑 "{{dictionaryKey}}" 字典`}},it:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Premi a lungo per modificare il dizionario "{{dictionaryKey}}"`}},pt:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Pressione longa para editar o dicionário "{{dictionaryKey}}"`}},hi:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`लंग प्रेस करें टू एडिट "{{dictionaryKey}}"`}},ar:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`اضغط طويلاً للتعديل "{{dictionaryKey}}"`}},ru:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Длительное нажатие для редактирования словаря "{{dictionaryKey}}"`}}}},localIds:[`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`]},dY=()=>{let e=(0,B.c)(8),{message:t}=yt(uY),[n]=wC(TS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=W(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,k.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},fY=e=>{let t=(0,B.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,k.jsx)(dY,{})}),i=(0,k.jsx)(sY,{}),a=(0,k.jsx)(lY,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,k.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},pY=()=>{let e=(0,B.c)(2),[t,n]=(0,O.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(mY).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,O.useEffect)(r,i),t};function mY(e){return e.json()}var hY=e=>{let t=(0,B.c)(11),{children:n,iframeRef:r}=e,i=pY(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(eS,{}),t[0]=e):e=t[0],e}let o;t[1]!==a||t[2]!==r?(o=e=>{r.current?.contentWindow?.postMessage(e,a)},t[1]=a,t[2]=r,t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=[a],t[4]=a,t[5]=s);let c;return t[6]!==n||t[7]!==i||t[8]!==o||t[9]!==s?(c=(0,k.jsx)(jC,{postMessage:o,allowedOrigins:s,configuration:i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=s,t[10]=c):c=t[10],c},gY={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},localIds:[`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`]},_Y=()=>{let e=(0,B.c)(9),{editedContent:t,setEditedContentState:n}=FC(),r;e[0]===n?r=e[1]:(r=()=>{let e=localStorage?.getItem(`INTLAYER_EDITED_CONTENT_CHANGED`);if(e)try{n(JSON.parse(e))}catch(e){console.error(e)}},e[0]=n,e[1]=r);let i=r,a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{t!==void 0&&localStorage?.setItem(`INTLAYER_EDITED_CONTENT_CHANGED`,JSON.stringify(t))},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,O.useEffect)(a,o);let s;e[5]!==t||e[6]!==i?(s=()=>{t===void 0&&i()},e[5]=t,e[6]=i,e[7]=s):s=e[7];let c;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=[],e[8]=c):c=e[8],(0,O.useEffect)(s,c),i},vY={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},localIds:[`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`]},yY=()=>{let e=(0,B.c)(11),{title:t,description:n,documentationLink:r}=yt(vY),i;e[0]===t?i=e[1]:(i=(0,k.jsx)(Gq,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,k.jsx)(`strong`,{className:`block text-neutral`,children:n}),e[2]=n,e[3]=a);let o;e[4]!==r.label.value||e[5]!==r.text?(o=(0,k.jsx)(NP,{label:r.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ml-auto`,isExternalLink:!0,children:r.text}),e[4]=r.label.value,e[5]=r.text,e[6]=o):o=e[6];let s;return e[7]!==i||e[8]!==a||e[9]!==o?(s=(0,k.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[i,a,o]}),e[7]=i,e[8]=a,e[9]=o,e[10]=s):s=e[10],s},bY=e=>{let t=(0,B.c)(23),{iframeRef:n,applicationPath:r}=e,i=yt(gY),{editor:a}=NC()??{},{enabled:o}=IC(),s=LC();_Y(),zC();let[c,l]=(0,O.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=TC(void 0,u),f,p;if(t[1]===d?(f=t[2],p=t[3]):(f=()=>{typeof d==`string`&&window.history.replaceState({},``,d)},p=[d],t[1]=d,t[2]=f,t[3]=p),(0,O.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(Qx,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,k.jsx)(yY,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,k.jsx)(eS,{isLoading:c}),t[5]=c,t[6]=m);let h=`${a.applicationURL}${r}`,g=i.intlayerApplication.value,_=c&&`hidden`,v;t[7]===_?v=t[8]:(v=W(`size-full`,_),t[7]=_,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{l(!1)},t[9]=y):y=t[9];let b;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==h||t[13]!==v?(b=(0,k.jsx)(`iframe`,{src:h,title:g,sandbox:`allow-scripts allow-same-origin`,className:v,ref:n,onLoad:y}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=h,t[13]=v,t[14]=b):b=t[14];let x;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(x=!o&&(0,k.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,k.jsx)(rS,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=x):x=t[18];let S;return t[19]!==b||t[20]!==x||t[21]!==m?(S=(0,k.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,b,x]}),t[19]=b,t[20]=x,t[21]=m,t[22]=S):S=t[22],S},xY=()=>{let e=(0,B.c)(2),t=(0,O.useRef)(null),n=zn(),r;return e[0]===n.pathname?r=e[1]:(r=(0,k.jsx)(hY,{iframeRef:t,children:(0,k.jsx)(_t,{disableEditor:!0,children:(0,k.jsx)(fY,{children:(0,k.jsx)(bY,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,Ro.createRoot)(document.getElementById(`root`)).render((0,k.jsx)(O.StrictMode,{children:(0,k.jsx)(()=>{let e=(0,B.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,k.jsx)(Yx,{children:(0,k.jsx)(Jx,{children:(0,k.jsx)(xY,{})})}),e[0]=t):t=e[0],t},{})}));export{x as C,u as E,D as S,c as T,hu as _,Uq as a,yt as b,Kq as c,NP as d,J as f,Qx as g,rS as h,Qq as i,qq as l,iS as m,hJ as n,Wq as o,_D as p,oJ as r,Gq as s,VJ as t,Jq as u,au as v,p as w,Le as x,W as y};