intlayer-editor 8.7.3 → 8.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/index-BjOTqeF0.js +221 -0
- package/client/dist/index.html +1 -1
- package/package.json +17 -17
- package/server/dist/utils/responseData.cjs +3 -3
- package/server/dist/utils/responseData.cjs.map +1 -1
- package/server/dist/utils/responseData.mjs +3 -3
- package/server/dist/utils/responseData.mjs.map +1 -1
- package/client/dist/assets/index-jXw0AOzO.js +0 -221
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-JQ-XU7Cq.js","assets/chunk-BEqpzyXh.js","assets/react-Dd6JzN7O.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,i as t,n,r,t as i}from"./chunk-BEqpzyXh.js";import{t as a}from"./react-Dd6JzN7O.js";import{a as o,i as s,o as c,r as l,t as u}from"./CodeBlockClient-D0TS21Ov.js";import{t as d}from"./preload-helper-Bll5m_3I.js";(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=i((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}}}})),p=i(((e,t)=>{t.exports=f()})),m=i((e=>{var t=a();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},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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 s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.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=l(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=l(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=l(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=l(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 c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),h=i(((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=m()})),g=i((e=>{var t=p(),n=a(),r=h();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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(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 c(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 l(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 u(e){if(s(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=s(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 o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return u(a),e;if(o===r)return u(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.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 f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=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,R={pending:!1,data:null,method:null,action:null},ee=[],te=-1;function ne(e){return{current:e}}function z(e){0>te||(e.current=ee[te],ee[te]=null,te--)}function B(e,t){te++,ee[te]=e.current,e.current=t}var re=ne(null),ie=ne(null),ae=ne(null),oe=ne(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,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}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Xd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),ap._currentValue=R)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!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(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,V=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Le,Fe=Math.log,Ie=Math.LN2;function Le(e){return e>>>=0,e===0?32:31-(Fe(e)/Ie|0)|0}var Re=256,ze=262144,Be=4194304;function Ve(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 He(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=Ve(n))):i=Ve(o):i=Ve(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ve(n))):i=Ve(o)):i=Ve(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 Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function We(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 Ge(){var e=Be;return Be<<=1,!(Be&62914560)&&(Be=4194304),e}function Ke(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Je(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-Pe(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&&Ye(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ye(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Xe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ze(e,t){var n=t&-t;return n=n&42?1:Qe(n),(n&(e.suspendedLanes|t))===0?n:0}function Qe(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 $e(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function et(){var e=L.p;return e===0?(e=window.event,e===void 0?32:xp(e.type)):e}function tt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var nt=Math.random().toString(36).slice(2),rt=`__reactFiber$`+nt,it=`__reactProps$`+nt,at=`__reactContainer$`+nt,ot=`__reactEvents$`+nt,st=`__reactListeners$`+nt,ct=`__reactHandles$`+nt,lt=`__reactResources$`+nt,ut=`__reactMarker$`+nt;function dt(e){delete e[rt],delete e[it],delete e[ot],delete e[st],delete e[ct]}function ft(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[at]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yf(e);e!==null;){if(n=e[rt])return n;e=yf(e)}return t}e=n,n=e.parentNode}return null}function pt(e){if(e=e[rt]||e[at]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function mt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ht(e){var t=e[lt];return t||=e[lt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function gt(e){e[ut]=!0}var _t=new Set,vt={};function yt(e,t){bt(e,t),bt(e+`Capture`,t)}function bt(e,t){for(vt[e]=t,e=0;e<t.length;e++)_t.add(t[e])}var xt=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]*$`),St={},Ct={};function wt(e){return ve.call(Ct,e)?!0:ve.call(St,e)?!1:xt.test(e)?Ct[e]=!0:(St[e]=!0,!1)}function Tt(e,t,n){if(wt(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 Et(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 Dt(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 Ot(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(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 jt(e){if(!e._valueTracker){var t=kt(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=kt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Nt(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 Pt=/[\n"\\]/g;function Ft(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function It(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=``+Ot(t)):e.value!==``+Ot(t)&&(e.value=``+Ot(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Rt(e,o,Ot(n)):Rt(e,o,Ot(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=``+Ot(s):e.removeAttribute(`name`)}function Lt(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)){jt(e);return}n=n==null?``:``+Ot(n),t=t==null?n:``+Ot(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),jt(e)}function Rt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function zt(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=``+Ot(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 Bt(e,t,n){if(t!=null&&(t=``+Ot(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ot(n)}function Vt(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=Ot(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=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 Wt(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||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(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&&Wt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(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 qt=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`]]),Jt=/^[\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 Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=pt(e);if(t&&(e=t.stateNode)){var n=e[it]||null;a:switch(e=t.stateNode,t.type){case`input`:if(It(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="`+Ft(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[it]||null;if(!a)throw Error(i(90));It(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&&Mt(r)}break a;case`textarea`:Bt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&zt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(Tu(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[it]||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 on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,`passive`,{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.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 dn=i.slice(e,1<r?1-r:void 0)}function pn(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 mn(){return!0}function hn(){return!1}function gn(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)?mn:hn,this.isPropagationStopped=hn,this}return m(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=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=m({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=m({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,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!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(m({},wn,{dataTransfer:0})),Dn=gn(m({},yn,{relatedTarget:0})),On=gn(m({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(m({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(m({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(m({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(m({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(m({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(m({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(m({},wn,{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})),Vn=gn(m({},_n,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=on&&`CompositionEvent`in window,Wn=null;on&&`documentMode`in document&&(Wn=document.documentMode);var Gn=on&&`TextEvent`in window&&!Wn,Kn=on&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=fn(),dn=un=ln=null,Zn=!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 Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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 tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=Nd(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){Td(e,0)}function or(e){if(Mt(mt(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(on){var lr;if(on){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){rr&&(rr.detachEvent(`onpropertychange`,pr),ir=rr=null)}function pr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,Qt(e)),rn(ar,t)}}function mr(e,t,n){e===`focusin`?(fr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function hr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function gr(e,t){if(e===`click`)return or(t)}function _r(e,t){if(e===`input`||e===`change`)return or(t)}function vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var yr=typeof Object.is==`function`?Object.is:vr;function br(e,t){if(yr(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(!ve.call(t,i)||!yr(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(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=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(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=Nt(e.document)}return t}function Tr(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 Er=on&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==Nt(r)||(r=Dr,`selectionStart`in r&&Tr(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}),kr&&br(kr,r)||(kr=r,r=Nd(Or,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};on&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`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(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),yt(t,[e])}var qr=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)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[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&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(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-Pe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(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 ri={};function ii(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 ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(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 ci(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 li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=Xf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ai(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ui(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ai(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ai(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ai(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=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Pe(r)-1;r&=~(1<<i),n+=1;var a=32-Pe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Pe(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,ji=null,H=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[rt]=e,t[it]=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),Lt(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),Vt(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=Xt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:Ai=Ai.return}}function Ri(e){if(e!==Ai)return!1;if(!H)return Li(e),H=!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&&ji&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=vf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=vf(e)}else t===27?(t=ji,of(e.type)?(e=_f,_f=null,ji=e):ji=t):ji=Ai?gf(e.stateNode.nextSibling):null;return!0}function zi(){ji=Ai=null,H=!1}function Bi(){var e=Mi;return e!==null&&(nu===null?nu=e:nu.push.apply(nu,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=ne(null),Ui=null,Wi=null;function Gi(e,t,n){B(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,z(Hi)}function qi(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 Ji(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),qi(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),qi(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 Yi(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;yr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.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&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=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()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=_d(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(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 ma=I.S;I.S=function(e,t){au=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=ne(null);function ga(){var e=ha.current;return e===null?Vl.pooledCache:e}function _a(e,t){t===null?B(ha,ha.current):B(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);else{if(e=Vl,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,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(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=si(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=di(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&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Ma(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=pi(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=ui(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=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=li(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=pi(t,e.mode,n),t.return=e,t;case O:return t=Ta(t),f(e,t,n)}if(F(t)||M(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(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 _: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=Ta(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,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(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 _: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=Ta(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,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(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),H&&Ti(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 H&&Ti(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)}),H&&Ti(i,h),l}function g(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),H&&Ti(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 H&&Ti(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)}),H&&Ti(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 _: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&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Ma(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=pi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ta(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),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(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=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Ha(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,Xe(e,n)}}function Ua(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 Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!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 f=s.lane&-536870913,p=f!==s.lane;if(p?(Hl&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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 qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=ne(null),Xa=ne(0);function Za(e,t){e=Jl,B(Xa,e),B(Ya,t),Jl=e|t.baseLanes}function Qa(){B(Xa,Jl),B(Ya,Ya.current)}function $a(){Jl=Xa.current,z(Ya),z(Xa)}var eo=ne(null),to=null;function no(e){var t=e.alternate;B(so,so.current&1),B(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){B(so,so.current),B(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(B(so,so.current),B(eo,e),to===null&&(to=e)):ao(e)}function ao(){B(so,so.current),B(eo,eo.current)}function oo(e){z(eo),to===e&&(to=null),z(so)}var so=ne(0);function co(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 lo=0,U=null,uo=null,fo=null,po=!1,mo=!1,ho=!1,go=0,_o=0,vo=null,yo=0;function bo(){throw Error(i(321))}function xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,a){return lo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?zs:Bs,ho=!1,a=n(r,i),ho=!1,mo&&(a=wo(t,n,r,i)),Co(e),a}function Co(e){I.H=Rs;var t=uo!==null&&uo.next!==null;if(lo=0,fo=uo=U=null,po=!1,_o=0,vo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function wo(e,t,n,r){U=e;var a=0;do{if(mo&&(vo=null),_o=0,mo=!1,25<=a)throw Error(i(301));if(a+=1,fo=uo=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=Vs,o=t(n,r)}while(mo);return o}function To(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Mo(t):t,e=e.useState()[0],(uo===null?null:uo.memoizedState)!==e&&(U.flags|=1024),t}function Eo(){var e=go!==0;return go=0,e}function Do(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Oo(e){if(po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}po=!1}lo=0,fo=uo=U=null,mo=!1,_o=go=0,vo=null}function ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fo===null?U.memoizedState=fo=e:fo=fo.next=e,fo}function Ao(){if(uo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=uo.next;var t=fo===null?U.memoizedState:fo.next;if(t!==null)fo=t,uo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));uo=e,e={memoizedState:uo.memoizedState,baseState:uo.baseState,baseQueue:uo.baseQueue,queue:uo.queue,next:null},fo===null?U.memoizedState=fo=e:fo=fo.next=e}return fo}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mo(e){var t=_o;return _o+=1,vo===null&&(vo=[]),e=wa(vo,e,t),t=U,(fo===null?t.memoizedState:fo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?zs:Bs),e}function No(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Mo(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function Po(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.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=jo(),U.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 Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(Ao(),uo,e)}function Lo(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?(lo&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===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(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,U.lanes|=p,Xl|=p;f=u.action,ho&&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,U.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!yr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,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 Ro(e){var t=Ao(),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);yr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=U,a=Ao(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!yr((uo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||fo!==null&&fo.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),Vl===null)throw Error(i(349));o||lo&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=jo(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yr(e,n)}catch{return!0}}function Wo(e){var t=ei(e,2);t!==null&&bu(t,e,2)}function Go(e){var t=ko();if(typeof e==`function`){var n=e;if(e=n(),ho){Ne(!0);try{n()}finally{Ne(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,uo,typeof r==`function`?r:Fo)}function qo(e,t,n,r,a){if(Fs(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,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(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),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(H){var n=Vl.formState;if(n!==null){a:{var r=U;if(H){if(ji){b:{for(var i=ji,a=Ni;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){ji=gf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=Ms.bind(null,U,r),r.dispatch=n,r=Go(!1),a=Ps.bind(null,U,!1,r.queue),r=ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(Ao(),uo,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(Fo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Mo(t)}catch(e){throw e===ya?xa:e}else r=t;t=Ao();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=Ao(),n=uo;if(n!==null)return ns(t,n,e);Ao(),t=t.memoizedState,n=Ao();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=jo(),U.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 os(){return Ao().memoizedState}function ss(e,t,n,r){var i=ko();U.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=Ao();r=r===void 0?null:r;var a=i.memoizedState.inst;uo!==null&&r!==null&&xo(r,uo.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(U.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=jo(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=Ao().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(Bl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(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 gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&xo(t,r[1]))return r[0];if(r=e(),ho){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||lo&1073741824&&!(Hl&261930)?e.memoizedState=t:(e.memoizedState=n,e=yu(),U.lanes|=e,Xl|=e,n)}function xs(e,t,n,r){return yr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Hl&261930)?(rc=!0,e.memoizedState=n):(e=yu(),U.lanes|=e,Xl|=e,t):(e=bs(e,n,r),yr(e,t)||(rc=!0),e)}function Ss(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,Ps(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,pa(c,r),vu(e)):Ns(e,t,r,vu(e))}catch(n){Ns(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 Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,R,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},vu())}function Ds(){return Qi(ap)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vu();e=Ba(n);var r=Va(t,e,n);r!==null&&(bu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=vu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=$r(e,t,n,r),n!==null&&(bu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,vu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(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,yr(s,o))return Qr(e,t,i,0),Vl===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return bu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:_d(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=$r(e,n,r,2),t!==null&&bu(t,e,2)}function Fs(e){var t=e.alternate;return e===U||t!==null&&t===U}function Is(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xe(e,n)}}var Rs={readContext:Qi,use:No,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Rs.useEffectEvent=bo;var zs={readContext:Qi,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){Ne(!0);try{n(t)}finally{Ne(!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=js.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,U,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=ko();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Hl&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=Vl.identifierPrefix;if(H){var n=wi,r=Ci;n=(r&~(1<<32-Pe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:es,useActionState:es,useOptimistic:function(e){var t=ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ko().memoizedState=As.bind(null,U)},useEffectEvent:function(e){var t=ko(),n={impl:e};return t.memoizedState=n,function(){if(Bl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(Ao(),uo.memoizedState,e,t)},useTransition:function(){var e=Io(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(Ao(),uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){var n=Ao();return uo===null?bs(n,e,t):xs(n,uo.memoizedState,e,t)},useTransition:function(){var e=Ro(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=Ao();return uo===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(bu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(bu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(bu(t,e,n),Ha(t,e,n))}};function Ws(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?!br(n,r)||!br(i,a):!0}function Gs(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&&Us.enqueueReplaceState(t,t.state,null)}function Ks(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=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){qr(e)}function Js(e){console.error(e)}function Ys(e){qr(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=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ba(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&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Mu():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?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===Sa?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(H)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=Qs(e.stateNode,r,a),Ua(e,a),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),tu===null?tu=[o]:tu.push(o),Yl!==4&&(Yl=2),t===null)return!0;r=hi(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),Ua(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),Ua(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?Ia(t,null,n,r):Fa(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 Zi(t),r=So(e,t,n,o,a,i),s=Eo(),e!==null&&!rc?(Do(e,t,i),W(e,t,i)):(H&&s&&Di(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`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!kc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?br:n,n(o,r)&&e.ref===t.ref)return W(e,t,i)}return t.flags|=1,e=si(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(br(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,kc(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,W(e,t,i)}return hc(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&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(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=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({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 Fa(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=ji)?(e=ff(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(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||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Vl,r!==null&&(s=Ze(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ei(e,s),bu(r,e,s),nc;Mu(),t=fc(e,t,n)}else e=o.treeContext,ji=gf(s.nextSibling),Ai=t,H=!0,Mi=null,Ni=!1,e!==null&&ki(t,e),t=dc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(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 hc(e,t,n,r,i){return Zi(t),n=So(e,t,n,r,void 0,i),r=Eo(),e!==null&&!rc?(Do(e,t,i),W(e,t,i)):(H&&r&&Di(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=wo(t,r,n,i),Co(e),r=Eo(),e!==null&&!rc?(Do(e,t,a),W(e,t,a)):(H&&r&&Di(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(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&&Us.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),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=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=Qi(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)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(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,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=Qi(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)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(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,mc(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=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=W(e,t,i),e}function vc(e,t,n,r){return zi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:va()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=$l),e}function Sc(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:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(H){if(a?no(t):ao(t),(e=ji)?(e=ff(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Fi(t);return mf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=ui(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(no(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(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,Vi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Vl,s!==null&&(r=Ze(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),bu(s,e,r),nc;pf(c)||Mu(),t=Tc(e,t,n)}else pf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ji=gf(c.nextSibling),Ai=t,H=!0,Mi=null,Ni=!1,e!==null&&ki(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(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=bc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=si(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 Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Fa(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Dc(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 Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(so,o),ic(e,t,r,n),r=H?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(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&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(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&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function W(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(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=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function Ac(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=W(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(so,so.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return W(e,t,n)}function jc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!kc(e,n)&&!(t.flags&128))return rc=!1,Ac(e,t,n);rc=!!(e.flags&131072)}else rc=!1,H&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(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 hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),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=vc(e,t,r,n);break a}else if(r!==a){a=hi(Error(i(424)),t),Vi(a),t=vc(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(ji=gf(e.firstChild),Ai=t,H=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=W(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=If(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(n=t.type,e=t.pendingProps,r=Jd(ae.current).createElement(n),r[rt]=t,r[it]=e,Hd(r,n,e),gt(r),t.stateNode=r):t.memoizedState=If(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&H&&(r=t.stateNode=bf(t.type,t.pendingProps,ae.current),Ai=t,Ni=!0,a=ji,of(t.type)?(_f=a,ji=gf(r.firstChild)):ji=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=ji)&&(r=uf(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,Ai=t,ji=gf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),le(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=So(e,t,To,null,null,n),ap._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=ji)&&(n=df(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,Ai=t,ji=null,e=!0)),e||Fi(t)),null;case 13:return Sc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(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,Gi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(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 Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Vl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Mc(e){e.flags|=4}function Nc(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 Ea=Sa,ba}else e.flags&=-16777217}function Pc(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 Ea=Sa,ba}function Fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ge(),e.lanes|=t,eu|=t)}function Ic(e,t){if(!H)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 Lc(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 Rc(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lc(t),null;case 1:return Lc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Mc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Lc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Mc(t),o===null?(Lc(t),Nc(t,a,null,r,n)):(Lc(t),Pc(t,o))):o?o===e.memoizedState?(Lc(t),t.flags&=-16777217):(Mc(t),Lc(t),Pc(t,o)):(e=e.memoizedProps,e!==r&&Mc(t),Lc(t),Nc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}e=re.current,Ri(t)?Ii(t,e):(e=bf(a,r,n),t.stateNode=e,Mc(t))}return Lc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}if(o=re.current,Ri(t))Ii(t,o);else{var s=Jd(ae.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[rt]=t,o[it]=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&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ai,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[rt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||zd(e.nodeValue,n)),e||Fi(t,!0)}else e=Jd(e).createTextNode(r),e[rt]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(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[rt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(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[rt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(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),Fc(t,t.updateQueue),Lc(t),null);case 4:return ce(),e===null&&kd(t.stateNode.containerInfo),Lc(t),null;case 10:return Ki(t.type),Lc(t),null;case 19:if(z(so),r=t.memoizedState,r===null)return Lc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ic(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return B(so,so.current&1|2),H&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>ou&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return Lc(t),null}else 2*Ce()-r.renderingStartTime>ou&&n!==536870912&&(t.flags|=128,a=!0,Ic(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?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=so.current,B(so,a?n&1|2:n&1),H&&Ti(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(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&&z(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(so),null;case 4:return ce(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&z(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Bc(e,t){switch(Oi(t),t.tag){case 3:Ki(ia),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:z(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&z(ha);break;case 24:Ki(ia)}}function Vc(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 Hc(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 Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Xu(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Xu(e,t,n)}}function Gc(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 Kc(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 qc(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 Jc(e,t,n){try{var r=e.stateNode;Ud(r,e.type,n,t),r[it]=t}catch(t){Xu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&of(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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 Zc(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=Xt));else if(r!==4&&(r===27&&of(e.type)&&(n=e.stateNode,t=null),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,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(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(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[rt]=e,t[it]=n}catch(t){Xu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Kd=mp,e=wr(e),Tr(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,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,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=Ks(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,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Vc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Xu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Xu(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(xl(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{Ja(e,t)}catch(e){Xu(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:xl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(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||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),el=i,tl=a}break;case 30:break;default:xl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&dt(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 cl=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=cl,i=ll;of(n.type)&&(cl=n.stateNode,ll=!1),ul(e,t,n),xf(n.stateNode),cl=r,ll=i;break;case 5:tl||Kc(n,t);case 6:if(r=cl,i=ll,cl=null,ul(e,t,n),cl=r,ll=i,cl!==null)if(ll)try{(cl.nodeType===9?cl.body:cl.nodeName===`HTML`?cl.ownerDocument.body:cl).removeChild(n.stateNode)}catch(e){Xu(n,t,e)}else try{cl.removeChild(n.stateNode)}catch(e){Xu(n,t,e)}break;case 18:cl!==null&&(ll?(e=cl,sf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Bp(e)):sf(cl,n.stateNode));break;case 4:r=cl,i=ll,cl=n.stateNode.containerInfo,ll=!0,ul(e,t,n),cl=r,ll=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ul(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ul(e,t,n),tl=r;break;default:ul(e,t,n)}}function fl(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 pl(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 ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=td.bind(null,e,t);t.then(r,r)}})}function gl(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)){cl=c.stateNode,ll=!1;break a}break;case 5:cl=c.stateNode,ll=!1;break a;case 3:case 4:cl=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(cl===null)throw Error(i(160));dl(o,s,a),cl=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(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=_l;if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(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[ut]||o[rt]||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[rt]=e,gt(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[rt]=e,gt(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&&Jc(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:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{Ht(a,``)}catch(t){Xu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(gl(t,e),yl(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=_l,_l=K(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bp(t.containerInfo)}catch(t){Xu(e,e.return,t)}nl&&(nl=!1,bl(e));break;case 4:r=_l,_l=K(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(iu=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,gl(t,e),tl=d,el=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||Sl(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,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ht(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Xu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),Sl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),Sl(t);break;case 27:xf(t.stateNode);case 26:case 5:Kc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(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:Cl(i,a,n),Vc(4,a);break;case 1:if(Cl(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++)qa(c[i],s)}catch(e){Xu(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Gc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(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&&oa(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Vc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(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&&oa(e)));break;case 12:if(i&2048){El(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 El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(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:Ol(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(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:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Qf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=K(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(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 Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(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:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Rl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,Bl=0,Vl=null,G=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 Bl&2&&Hl!==0?Hl&-Hl:I.T===null?et():_d()}function yu(){if($l===0)if(!(Hl&536870912)||H){var e=ze;ze<<=1,!(ze&3932160)&&(ze=262144),$l=e}else $l=536870912;return e=eo.current,e!==null&&(e.flags|=32),$l}function bu(e,t,n){(e===Vl&&(Ul===2||Ul===9)||e.cancelPendingCommit!==null)&&(Du(e,0),wu(e,Hl,$l,!1)),qe(e,n),(!(Bl&2)||e!==Vl)&&(e===Vl&&(!(Bl&2)&&(Zl|=n),Yl===4&&wu(e,Hl,$l,!1)),ld(e))}function xu(e,t,n){if(Bl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ue(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-Ce(),10<a)){if(wu(r,t,$l,!Gl),He(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:Xt},Ml(t,a,d);var m=(a&62914560)===a?iu-Ce():(a&4194048)===a?au-Ce():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(!yr(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-Pe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ye(e,n,t)}function Tu(){return Bl&6?!0:(ud(0,!1),!1)}function Eu(){if(G!==null){if(Ul===0)var e=G.return;else e=G,Wi=Ui=null,Oo(e),ka=null,Aa=0,e=G;for(;e!==null;)Bc(e.alternate,e),e=e.return;G=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(),Vl=e,G=n=si(e.current,null),Hl=t,Ul=0,Wl=null,Gl=!1,Kl=Ue(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-Pe(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,Zr(),n}function Ou(e,t){U=null,I.H=Rs,t===ya||t===xa?(t=Da(),Ul=3):t===ba?(t=Da(),Ul=4):Ul=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,G===null&&(Yl=1,Xs(e,hi(t,e.current)))}function ku(){var e=eo.current;return e===null?!0:(Hl&4194048)===Hl?to===null:(Hl&62914560)===Hl||Hl&536870912?e===to:!1}function Au(){var e=I.H;return I.H=Rs,e===null?Rs:e}function ju(){var e=I.A;return I.A=Rl,e}function Mu(){Yl=4,Gl||(Hl&4194048)!==Hl&&eo.current!==null||(Kl=!0),!(Xl&134217727)&&!(Zl&134217727)||Vl===null||wu(Vl,Hl,$l,!1)}function Nu(e,t,n){var r=Bl;Bl|=2;var i=Au(),a=ju();(Vl!==e||Hl!==t)&&(su=null,Du(e,t)),t=!1;var o=Yl;a:do try{if(Ul!==0&&G!==null){var s=G,c=Wl;switch(Ul){case 8:Eu(),o=6;break a;case 3:case 2:case 9:case 6:eo.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++,Wi=Ui=null,Bl=r,I.H=i,I.A=a,G===null&&(Vl=null,Hl=0,Zr()),o}function Pu(){for(;G!==null;)Lu(G)}function Fu(e,t){var n=Bl;Bl|=2;var r=Au(),a=ju();Vl!==e||Hl!==t?(su=null,ou=Ce()+500,Du(e,t)):Kl=Ue(e,t);a:do try{if(Ul!==0&&G!==null){t=G;var o=Wl;b:switch(Ul){case 1:Ul=0,Wl=null,zu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Ul=0,Wl=null,Ru(t);break}t=function(){Ul!==2&&Ul!==9||Vl!==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:Ca(o)?(Ul=0,Wl=null,Ru(t)):(Ul=0,Wl=null,zu(e,t,o,7));break;case 5:var s=null;switch(G.tag){case 26:s=G.memoizedState;case 5:case 27:var c=G;if(s?Zf(s):c.stateNode.complete){Ul=0,Wl=null;var l=c.sibling;if(l!==null)G=l;else{var u=c.return;u===null?G=null:(G=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 Wi=Ui=null,I.H=r,I.A=a,Bl=n,G===null?(Vl=null,Hl=0,Zr(),Yl):0}function Iu(){for(;G!==null&&!xe();)Lu(G)}function Lu(e){var t=jc(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?Bu(e):G=t}function Ru(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Hl);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Hl);break;case 5:Oo(t);default:Bc(n,t),t=G=ci(t,Jl),t=jc(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?Bu(e):G=t}function zu(e,t,n,r){Wi=Ui=null,Oo(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,Hl)){Yl=1,Xs(e,hi(n,e.current)),G=null;return}}catch(t){if(i!==null)throw G=i,t;Yl=1,Xs(e,hi(n,e.current)),G=null;return}t.flags&32768?(H||r===1?e=!0:Kl||Hl&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.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=Rc(t.alternate,t,Jl);if(n!==null){G=n;return}if(t=t.sibling,t!==null){G=t;return}G=t=e}while(t!==null);Yl===0&&(Yl=5)}function Vu(e,t){do{var n=zc(e.alternate,e);if(n!==null){n.flags&=32767,G=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){G=e;return}G=e=n}while(e!==null);Yl=6,G=null}function Hu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do qu();while(lu!==0);if(Bl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Xr,Je(e,n,o,s,c,l),e===Vl&&(G=Vl=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(V,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=Bl,Bl|=4;try{al(e,t,n)}finally{Bl=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=Bl;Bl|=4;try{vl(t,e);var a=qd,o=wr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Cr(s.ownerDocument.documentElement,s)){if(c!==null&&Tr(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 _=Sr(s,h),v=Sr(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{Bl=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=Bl;Bl|=4;try{ol(e,t.alternate,t)}finally{Bl=i,L.p=r,I.T=n}}lu=3}}function Gu(){if(lu===4||lu===3){lu=0,Se();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),$e(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,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,oa(t)))}function qu(){return Uu(),Wu(),Gu(),Ju()}function Ju(){if(lu!==5)return!1;var e=uu,t=pu;pu=0;var n=$e(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,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,ud(0,!1),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{L.p=a,I.T=r,Ku(e,t)}}function Yu(e,t,n){t=hi(n,t),t=Qs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(qe(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=hi(n,e),n=$s(2),r=Va(t,n,2),r!==null&&(ec(n,r,t,e),qe(r,2),ld(r));break}}t=t.return}}function Zu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;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,Vl===e&&(Hl&n)===n&&(Yl===4||Yl===3&&(Hl&62914560)===Hl&&300>Ce()-iu?!(Bl&2)&&Du(e,0):Ql|=n,eu===Hl&&(eu=0)),ld(e)}function $u(e,t){t===0&&(t=Ge()),e=ei(e,t),e!==null&&(qe(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 ye(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-Pe(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=He(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ue(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=Ce(),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-Pe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=We(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Vl,n=Hl,n=He(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&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),$e(n)){case 2:case 8:n=Ee;break;case 32:n=V;break;case 268435456:n=Oe;break;default:n=V}return r=md.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(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=He(e,e===Vl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(xu(e,r,t),pd(e,Ce()),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(){Bl&6?ye(Te,dd):fd()})}function _d(){if(cd===0){var e=la;e===0&&(e=Re,Re<<=1,!(Re&261888)&&(Re=256)),cd=e}return cd}function vd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+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[it]||null).action),o=r.submitter;o&&(t=(t=o[it]||null)?vd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`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);ws(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),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var xd=0;xd<Gr.length;xd++){var Sd=Gr[xd];Kr(Sd.toLowerCase(),`on`+(Sd[0].toUpperCase()+Sd.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),bt(`onMouseEnter`,[`mouseout`,`mouseover`]),bt(`onMouseLeave`,[`mouseout`,`mouseover`]),bt(`onPointerEnter`,[`pointerout`,`pointerover`]),bt(`onPointerLeave`,[`pointerout`,`pointerover`]),yt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),yt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),yt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),yt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),yt(`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){qr(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){qr(e)}i.currentTarget=null,a=c}}}}function Ed(e,t){var n=t[ot];n===void 0&&(n=t[ot]=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,_t.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,!sn||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 o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=ft(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}rn(function(){var r=a,i=Qt(n),o=[];a:{var c=Wr.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;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=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Lr:case Rr:case zr:l=On;break;case Ur:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}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=an(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),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Zt&&(u=n.relatedTarget||n.fromElement)&&(ft(u)||u[at]))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?ft(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:mt(l),h=u==null?c:mt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ft(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(o,c,l,d,!1),u!==null&&f!==null&&Fd(o,f,u,d,!0)}}a:{if(c=r?mt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c))if(cr)v=_r;else{v=hr;var y=mr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=sr):v=gr;if(v&&=v(e,r)){nr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Rt(c,`number`,c.value)}switch(y=r?mt(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(o,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(o,n,i)}var b;if(Un)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 Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Zn=!0)),y=Nd(r,x),0<y.length&&(x=new An(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=Nd(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),bd(o,e,r,n,i)}Td(o,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=an(e,n),i!=null&&r.unshift(Md(e,i,a)),i=an(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=an(n,a),l!=null&&o.unshift(Md(n,l,c))):i||(l=an(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
|
+
`).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===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Et(e,`class`,r);break;case`tabIndex`:Et(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Et(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Et(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=Yt(``+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=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);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=Yt(``+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),Tt(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Tt(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=qt.get(n)||n,Tt(e,n,r))}}function Vd(e,t,n,r,a,o){switch(n){case`style`:Gt(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`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(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=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!vt.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[it]||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,``):Tt(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)}}Lt(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&&zt(e,!!r,n,!0):zt(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)}Vt(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(Kt(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)}}It(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?zt(e,!!n,n?[]:``,!1):zt(e,!!n,t,!0)):zt(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)}Bt(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(Kt(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[ut]||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),dt(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[ut])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]);dt(e)}var Sf=new Map,Cf=new Set;function K(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=pt(e);t!==null&&t.tag===5&&t.type===`form`?Es(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=Ft(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cf.has(i)||(Cf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Hd(t,`link`,e),gt(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="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Lf(e);break;case`script`:a=Vf(e)}Sf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sf.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),gt(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="`+Ft(r)+`"][href="`+Ft(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vf(e)}if(!Sf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Sf.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),gt(r),n.head.appendChild(r)}}}function Nf(e,t,n){wf.S(e,t,n);var r=Df;if(r&&e){var i=ht(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=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sf.get(a))&&Gf(e,n);var c=o=r.createElement(`link`);gt(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=ht(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=m({src:e,async:!0},t),(t=Sf.get(i))&&Kf(e,t),a=n.createElement(`script`),gt(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=ht(n).hoistableScripts,i=Vf(e),a=r.get(i);a||(a=n.querySelector(Hf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Sf.get(i))&&Kf(e,t),a=n.createElement(`script`),gt(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=ae.current)?K(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=ht(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=ht(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),Sf.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},Sf.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=ht(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="`+Ft(e)+`"`}function Rf(e){return`link[rel="stylesheet"][`+e+`]`}function zf(e){return m({},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),gt(t),e.head.appendChild(t))}function Vf(e){return`[src="`+Ft(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~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,gt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),gt(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,gt(o),o;r=zf(n),(a=Sf.get(a))&&Gf(r,a),o=(e.ownerDocument||e).createElement(`link`),gt(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,gt(a),a):(r=n,(a=Sf.get(o))&&(r=m({},n),Kf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),gt(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[ut]||a[rt]||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,gt(a);return}a=t.ownerDocument||t,r=zf(r),(i=Sf.get(i))&&Gf(r,i),a=a.createElement(`link`),gt(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:R,_currentValue2:R,_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=Ke(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ke(0),this.hiddenUpdates=Ke(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=ai(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function cp(e){return e?(e=ri,e):ri}function lp(e,t,n,r,i,a){i=cp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(bu(n,e,t),Ha(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=ei(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=Qe(t);var n=ei(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=pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ve(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}ld(a),!(Bl&6)&&(ou=Ce()+500,ud(0,!1))}}break;case 31:case 13:s=ei(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=Qt(e),bp(e)}var yp=null;function bp(e){if(yp=null,e=ft(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(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(we()){case Te:return 2;case Ee:return 8;case V:case De:return 32;case Oe: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=pt(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=ft(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,tt(e.priority,function(){pp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,tt(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);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=pt(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=pt(n);a!==null&&(e.splice(t,3),t-=3,ws(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[it]||null;if(typeof a==`function`)o||zp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[it]||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[at]=null}};function Up(e){this._internalRoot=e}Up.prototype.unstable_scheduleHydration=function(e){if(e){var t=et();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.5`)throw Error(i(527,Wp,`19.2.5`));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=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Gp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Kp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kp.isDisabled&&Kp.supportsFiber)try{je=Kp.inject(Gp),Me=Kp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(i(299));var n=!1,r=``,a=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=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,a,s,c,Vp),e[at]=t.current,kd(e),new Hp(t)}})),_=i(((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=e(a(),1),y=_(),b=c(),x={locales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],defaultLocale:`en`},S={mode:`prefix-no-default`,storage:{cookies:[{name:`INTLAYER_LOCALE`,attributes:{}}],headers:[{name:`x-intlayer-locale`}]},basePath:``},C={editorURL:`http://localhost:8000`,cmsURL:`https://app.intlayer.org`,backendURL:`https://back.intlayer.org`,port:8e3,enabled:!1,dictionaryPriorityStrategy:`local_first`,liveSync:!0,liveSyncPort:4e3,liveSyncURL:`http://localhost:4000`},w={internationalization:x,routing:S,editor:C,log:{mode:`default`,prefix:`\x1B[38;5;239m[intlayer] \x1B[0m`}},T=o(),E=({children:e,value:t,additionalProps:n})=>{let r=(0,v.isValidElement)(e)?e:(0,T.jsx)(T.Fragment,{children:e});return new Proxy(r,{get(e,r,i){return r===`value`?t:n&&Object.keys(n).includes(r)?n[r]:Reflect.get(e,r,i)}})},D=e=>{if(typeof e!=`object`||!e)return e;let{type:t,props:n}=(e=>{let t=e.props?.children;if(Array.isArray(t)){let n=t.map((e,t)=>{let n=D(e);if(typeof n==`object`&&n&&`type`in n){let e=n;return(0,v.createElement)(e.type,{...e.props,key:t},...Array.isArray(e.props?.children)?e.props.children:e.props?.children===void 0?[]:[e.props.children])}return n});return{...e,props:{...e.props,children:n}}}else if(t!=null){let n=D(t);return{...e,props:{...e.props,children:[n]}}}return{...e,props:{...e.props,children:[]}}})(e);return(0,v.createElement)(t??`span`,n,...n.children)},O=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},k=`translation`,A=`enumeration`,j=`condition`,M=`insertion`,N=`file`,P=`object`,F=`array`,I=`nested`,L=`reactNode`,R=`markdown`,ee=`html`,te=`text`,ne=`number`,z=`boolean`,B=`gender`,re=`null`,ie=`unknown`,ae=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,(e,t)=>ae(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)=>ae(e,{...t,children:e,keyPath:[...t.keyPath,{type:F,key:n}]}));let n={};for(let r in e){let i={...t,children:e[r],keyPath:[...t.keyPath,{type:P,key:r}]};n[r]=ae(e[r],i)}return n},oe=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),se=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)},ce=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e))return e;if(se(e)&&se(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]:ce(e[r],t[r]));return n}return e},le=(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)=>ce(e,t))},ue={}.INTLAYER_NODE_TYPE_TRANSLATION===`false`,de={}.INTLAYER_NODE_TYPE_CONDITION===`false`,fe={}.INTLAYER_NODE_TYPE_INSERTION===`false`,pe={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},me=(e,t)=>ue?pe:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a={...n.translation??{}};for(let e in a){let t={...r,children:a[e],keyPath:[...r.keyPath,{type:k,key:e}]};a[e]=i(a[e],t)}return le(a,e,t)}},he=pe,ge=de?pe:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r={...e[j]};for(let e in r){let i=r[e];r[e]=n(i,{...t,children:i,keyPath:[...t.keyPath,{type:j,key:e}]})}return e=>{let t=O(r,typeof e==`boolean`?e:e.value);return typeof t==`function`&&typeof e==`object`?t(e):t}}},_e=fe?pe:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:M}],i=e[M],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=oe(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},ve=pe,ye=e=>pe,be=pe,xe=(e,t=!0)=>[me(e??x.defaultLocale,t?x.defaultLocale:void 0),he,ge,_e,ye(e??x.defaultLocale),be,ve].filter(Boolean),Se=(e,t,n=[])=>ae(e,{...t,plugins:n}),Ce=(e,t,n=xe(t))=>{let r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return Se(e.content,r,n)},we=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,Te=/\{\{\s*(.*?)\s*\}\}/g,Ee=(e,t={})=>{if(!Object.values(t).some(we))return{isSimple:!0,parts:e.replace(Te,(e,n)=>(t[n.trim()]??``).toString())};let n=e.split(Te),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}},V={blockQuote:`0`,breakLine:`1`,breakThematic:`2`,codeBlock:`3`,codeFenced:`4`,codeInline:`5`,footnote:`6`,footnoteReference:`7`,gfmTask:`8`,heading:`9`,headingSetext:`10`,htmlBlock:`11`,htmlComment:`12`,htmlSelfClosing:`13`,customComponent:`34`,image:`14`,link:`15`,linkAngleBraceStyleDetector:`16`,linkBareUrlDetector:`17`,newlineCoalescer:`19`,orderedList:`20`,paragraph:`21`,ref:`22`,refImage:`23`,refLink:`24`,table:`25`,tableSeparator:`26`,text:`27`,textBolded:`28`,textEmphasized:`29`,textEscaped:`30`,textMarked:`31`,textStrikethroughed:`32`,unorderedList:`33`},De={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},Oe=`allowFullScreen.allowTransparency.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),ke={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},Ae=[`style`,`script`,`pre`],je=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],Me=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Ne=/\n{2,}$/,Pe=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Fe=/^ *> ?/gm,Ie=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Le=/^ {2,}\n/,Re=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,ze=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Be=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Ve=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,He=/^(?:\n *)*\n/,Ue=/\r\n?/g,We=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Ge=/^\[\^([^\]]+)]/,Ke=/\f/g,qe=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,Je=/^\s*?\[(x|\s)\]/,Ye=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Xe=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ze=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Qe=/^ *(?!<[a-zA-Z][^ >/]* ?\/>)<([a-zA-Z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,$e=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,et=/^<!--[\s\S]*?(?:-->)/,tt=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,nt=/^ *<([a-zA-Z][a-zA-Z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,rt=/^ *<([A-Z][a-zA-Z0-9]*)(?:\s+((?:<.*?>|[^>])*))?>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/,it=/^\{.*\}$/,at=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,ot=/^<([^ >]+[:@/][^ >]+)>/,st=/-([a-z])?/gi,ct=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,lt=/(^ *\||\| *$)/g,ut=/^ *:-+: *$/,dt=/^ *:-+ *$/,ft=/^ *-+: *$/,pt=/^[^\n]+(?: {2}\n|\n{2,})/,mt=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,ht=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,gt=/^\[([^\]]*)\] ?\[([^\]]*)\]/,_t=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,vt=/\t/g,yt=/^\n+/,bt=/^\n*([ \t]*)/,xt=/(?:^|\n)( *)$/,St=`(?:\\d+\\.)`,Ct=`(?:[*+-])`,wt=/^\\([^0-9A-Za-z\s])/,Tt=/\\([^0-9A-Za-z\s])/g,Et=/^[\s\S](?:(?! {2}\n|[0-9]\.|http)[^=*_~\-\n:<`\\[!])*/,Dt=/^(:[a-zA-Z0-9-_]+:)/,Ot=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,kt="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",At=RegExp(`^([*_])\\1${Ot(1)}${kt}\\1\\1(?!\\1)`),jt=RegExp(`^([*_])${Ot(0)}${kt}\\1(?!\\1)`),Mt=RegExp(`^(==)${Ot(0)}${kt}\\1`),Nt=RegExp(`^(~~)${Ot(0)}${kt}\\1`),Pt=e=>`( *)(`+(e===1?St:Ct)+`) +`,Ft=Pt(1),It=Pt(2),Lt=e=>RegExp(`^`+(e===1?Ft:It)),Rt=Lt(1),zt=Lt(2),Bt=e=>RegExp(`^`+(e===1?Ft:It)+`[^\\n]*(?:\\n(?!\\1`+(e===1?St:Ct)+` )[^\\n]*)*(\\n|$)`,`gm`),Vt=Bt(1),Ht=Bt(2),Ut=e=>{let t=e===1?St:Ct;return RegExp(`^( *)(`+t+`) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*\\n*$)`)},Wt=Ut(1),Gt=Ut(2),Kt=e=>{let t=e.length;for(;t>0&&e[t-1]<=` `;)t--;return e.slice(0,t)},qt=(e,t)=>e.startsWith(t),Jt=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},Yt=e=>e&&e.replace(Tt,`$1`),Xt=(...e)=>e.filter(Boolean).join(` `),Zt=(e,t,n)=>{let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r??n},Qt=e=>e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,`a`).replace(/[çÇ]/g,`c`).replace(/[ðÐ]/g,`d`).replace(/[ÈÉÊËéèêë]/g,`e`).replace(/[ÏïÎîÍíÌì]/g,`i`).replace(/[Ññ]/g,`n`).replace(/[øØœŒÕõÔôÓóÒò]/g,`o`).replace(/[ÜüÛûÚúÙù]/g,`u`).replace(/[ŸÿÝý]/g,`y`).replace(/[^a-z0-9- ]/gi,``).replace(/ /gi,`-`).toLowerCase(),$t=/(javascript|vbscript|data(?!:image)):/i,en=e=>{try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if($t.test(t))return console.warn(`Input contains an unsafe JavaScript/VBScript/data expression, it will not be rendered.`,t),null}catch{return console.warn(`Input could not be decoded due to malformed syntax or characters, it will not be rendered.`,e),null}return e},tn=e=>{let t=performance.now(),n=e.replace(Ue,`
|
|
11
|
+
`).replace(Ke,``).replace(vt,` `),r=performance.now()-t;return r>20&&console.log(`normalizeWhitespace: ${r.toFixed(3)}ms, source length: ${e.length}`),n},nn=(e,t)=>{let n=performance.now();if(!t)return e;let r=e.split(`
|
|
12
|
+
`),i=!1,a=null,o=e=>e.match(/^\s*(`{3,}|~{3,})/),s=e=>{let t=o(e);if(!t)return;let n=t[1];i?a&&e.includes(a)&&(i=!1,a=null):(i=!0,a=n)},c=r.map(e=>{if(o(e)){let n=e.startsWith(t)?e.slice(t.length):e;return s(e),n}return i?e:e.startsWith(t)?e.slice(t.length):e}).join(`
|
|
13
|
+
`),l=performance.now()-n;return l>20&&console.log(`trimLeadingWhitespaceOutsideFences: ${l.toFixed(3)}ms, text length: ${e.length}, lines count: ${r.length}`),c},rn=e=>(e.indexOf(`-`)!==-1&&e.match(tt)===null&&(e=e.replace(st,(e,t)=>t.toUpperCase())),e),an=e=>{let t=performance.now(),n=[],r=``,i=!1,a=!1,o=``;if(!e)return n;for(let t=0;t<e.length;t++){let s=e[t];if((s===`"`||s===`'`)&&!i&&(a?s===o&&(a=!1,o=``):(a=!0,o=s)),s===`(`&&r.endsWith(`url`)?i=!0:s===`)`&&i&&(i=!1),s===`;`&&!a&&!i){let e=r.trim();if(e){let t=e.indexOf(`:`);if(t>0){let r=e.slice(0,t).trim(),i=e.slice(t+1).trim();n.push([r,i])}}r=``}else r+=s}let s=r.trim();if(s){let e=s.indexOf(`:`);if(e>0){let t=s.slice(0,e).trim(),r=s.slice(e+1).trim();n.push([t,r])}}let c=performance.now()-t;return c>20&&console.log(`parseStyleAttribute: ${c.toFixed(3)}ms, styleString length: ${e.length}, styles count: ${n.length}`),n},on=(e,t,n,r)=>t===`style`?an(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):je.indexOf(t)===-1?(n.match(it)&&(n=Yt(n.slice(1,n.length-1))),n===`true`?!0:n===`false`?!1:n):r(Yt(n),e,t),sn=e=>ft.test(e)?`right`:ut.test(e)?`center`:(dt.test(e),`left`),cn=e=>e.replace(lt,``).split(`|`).map(sn),ln=(e,t,n,r)=>{let i=performance.now(),a=n.inTable;n.inTable=!0;let o=[[]],s=``,c=()=>{if(!s)return;let e=o[o.length-1];e.push.apply(e,t(s,n)),s=``};e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,t,n)=>{if(e.trim()===`|`&&(c(),r)){t!==0&&t!==n.length-1&&o.push([]);return}s+=e}),c(),n.inTable=a;let l=performance.now()-i;return l>20&&console.log(`parseTableRow: ${l.toFixed(3)}ms, source length: ${e.length}, cells count: ${o.length}`),o},un=(e,t,n)=>{let r=performance.now(),i=e.trim().split(`
|
|
14
|
+
`),a=i.map(e=>ln(e,t,n,!0)),o=performance.now()-r;return o>20&&console.log(`parseTableCells: ${o.toFixed(3)}ms, source length: ${e.length}, rows count: ${i.length}`),a},dn=(e,t,n)=>{if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(qt(e,n[t]))return!0;return!1}return n(e,t)},fn=e=>(e.inline=1,e),pn=e=>fn((t,n)=>n.inline?e.exec(t):null),mn=e=>fn((t,n)=>n.inline||n.simple?e.exec(t):null),hn=e=>(t,n)=>n.inline||n.simple?null:e.exec(t),gn=e=>fn((t,n)=>typeof e==`function`?e(t,n):e.exec(t)),_n=(e,t,n)=>{let r=performance.now(),i=n.inline??!1,a=n.simple??!1;n.inline=!0,n.simple=!0;let o=e(t,n);n.inline=i,n.simple=a;let s=performance.now()-r;return s>20&&console.log(`parseInline: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},vn=(e,t,n)=>{let r=performance.now(),i=n.inline??!1,a=n.simple??!1;n.inline=!1,n.simple=!0;let o=e(t,n);n.inline=i,n.simple=a;let s=performance.now()-r;return s>20&&console.log(`parseSimpleInline: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},yn=(e,t,n={})=>{let r=performance.now(),i=n.inline||!1;n.inline=!1;let a=Kt(t),o=e(/\n\n$/.test(a)===!1?a.endsWith(`
|
|
15
|
+
`)?`${a}\n`:`${a}\n\n`:a,n);n.inline=i;let s=performance.now()-r;return s>20&&console.log(`parseBlock: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},bn=(e,t,n)=>({children:_n(t,e[2],n)}),xn=()=>({}),Sn=()=>null,Cn=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1},wn=e=>{let t=performance.now(),n=Object.keys(e);n.forEach(t=>{let n=e[t]._order;(typeof n!=`number`||!Number.isFinite(n))&&console.warn(`intlayer: Invalid order for rule \`${t}\`: ${n}`)}),n.sort((t,n)=>e[t]._order-e[n]._order||(t<n?-1:1));let r=(t,i={})=>{let a=performance.now(),o=[];if(i.prevCapture=i.prevCapture||``,t.trim())for(;t;){let a=0;for(;a<n.length;){let s=n[a],c=e[s];if(c._qualify&&!dn(t,i,c._qualify)){a++;continue}let l=performance.now(),u=c._match(t,i),d=performance.now()-l;if(d>1&&console.log(`${s}._match: ${d.toFixed(3)}ms, source length: ${t.length}`),u?.[0]){t=t.substring(u[0].length);let e=performance.now(),n=c._parse(u,r,i),a=performance.now()-e;a>1&&console.log(`${s}._parse: ${a.toFixed(3)}ms, capture length: ${u[0].length}`),i.prevCapture=(i.prevCapture||``)+u[0],n.type||=s,o.push(n);break}a++}}let s=performance.now()-a;return s>1&&console.log(`nestedParse: ${s.toFixed(3)}ms, source length: ${t.length}, result count: ${o.length}`),o},i=performance.now()-t;return i>20&&console.log(`parserFor: ${i.toFixed(3)}ms, rules count: ${n.length}`),(e,t)=>r(tn(e),t)},Tn=e=>(t,n={})=>{let r=performance.now(),i=(t,n={})=>Tn(e)(t,n);if(Array.isArray(t)){let e=n.key,a=[],o=!1,s=0;for(let e=0;e<t.length;e++){let r=i(t[e],{...n,key:s}),c=typeof r==`string`;c&&o?a[a.length-1]=a[a.length-1]+r:r!==null&&(a.push(r),s++),o=c}n.key=e;let c=performance.now()-r;return c>20&&console.log(`renderFor (array): ${c.toFixed(3)}ms, ast length: ${t.length}`),a}let a=e(t,i,n),o=performance.now()-r;return o>20&&console.log(`renderFor (single): ${o.toFixed(3)}ms, ast type: ${t.type}`),a},En=(e,t)=>(n,r,i)=>{let a=performance.now(),o=e[n.type]?._render,s=t?t(()=>o?.(n,r,i),n,r,i):o?.(n,r,i),c=performance.now()-a;return c>20&&console.log(`createRenderer: ${c.toFixed(3)}ms, ast type: ${n.type}, hasUserRender: ${!!t}`),s},Dn=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,On=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),kn=(e,t)=>{if(typeof e!=`string`)return e;let n=Zt(t,e);if(!n&&typeof e==`string`){let r=e.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===r);i&&(n=Zt(t,i))}return n||e},An=(e,t)=>{let{runtime:n,components:r={}}=e,i=t.tagfilter?[`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]:[];return(e,t,...a)=>{if(typeof e==`string`&&i.includes(e.toLowerCase()))return null;let o=typeof e==`string`,s=Xt(t?.className,t?.class),c={},l=!1;if(t)for(let e in t){let n=t[e];n!=null&&(e===`className`||e===`class`?l||=(s&&(c.className=s),!0):c[e]=n)}!l&&s&&(c.className=s);let u=c;n.normalizeProps&&o&&(u=n.normalizeProps(e,c));let d=kn(e,r);return n.createElement(d,u,...a.length===1?[a[0]]:a)}},jn=(e,t,n,r,i,a,o,s)=>{let c=e=>t.slugify?t.slugify(e,Qt):Qt(e),l=t.sanitizer??en,u=t.namedCodesToUnicode?{...ke,...t.namedCodesToUnicode}:ke,d=t=>{let n=t===1,r=n?Wt:Gt,i=n?Vt:Ht,a=n?Rt:zt;return{_qualify:e=>a.test(e),_match:fn((e,t)=>{let n=xt.exec(t.prevCapture??``),i=t.list??(!t.inline&&!t.simple);if(n&&i){let t=(n[1]||``)+e;return r.exec(t)}return null}),_order:De.HIGH,_parse(e,t,r){let o=e[2],s=n?+o.slice(0,-1):void 0,c=e[0].replace(Ne,`
|
|
16
|
+
`).match(i);if(!c)return{items:[],ordered:n,start:s};let l=!1;return{items:c.map((e,n)=>{let i=a.exec(e),o=i?i[0].length:0,s=RegExp(`^ {1,${o}}`,`gm`),u=e.replace(s,``).replace(a,``),d=n===c.length-1,f=u.indexOf(`
|
|
17
|
+
|
|
18
|
+
`)!==-1||d&&l;l=f;let p=r.inline,m=r.list;r.list=!0;let h;f?(r.inline=!1,h=`${Kt(u)}\n\n`):(r.inline=!0,h=Kt(u));let g=t(h,r);return r.inline=p,r.list=m,g}),ordered:n,start:s}},_render(t,n,r={}){let i=t.ordered?`ol`:`ul`,a={key:r.key};return t.ordered&&t.start!=null&&(a.start=t.start),e(i,a,...t.items.map((t,i)=>e(`li`,{key:i},n(t,r))))}}},f=(e,t)=>{if(t.inline||t.simple||t.inHTML&&e.indexOf(`
|
|
19
|
+
|
|
20
|
+
`)===-1&&t.prevCapture?.indexOf(`
|
|
21
|
+
|
|
22
|
+
`)===-1)return null;let n=0;for(;;){let t=e.indexOf(`
|
|
23
|
+
`,n),r=e.slice(n,t===-1?void 0:t+1);if(Cn(s,r)||t===-1||!r.trim())break;n=t+1}let r=e.slice(0,n);if(r===``)return null;let i=Kt(r);return i===``?null:[r,void 0,i]};return{[V.blockQuote]:{_qualify:[`>`],_match:hn(Pe),_order:De.HIGH,_parse(e,t,n){let r=e[0].replace(Fe,``).match(Ie),i=r?.[1],a=r?.[2]??``;return{alert:i,children:a.indexOf(`
|
|
24
|
+
`)===-1?_n(t,a,n):yn(t,a,n)}},_render(t,n,r={}){let i={key:r.key};return t.alert&&(i.className=`markdown-alert-${c(t.alert.toLowerCase())}`,t.children.unshift({attrs:{},children:[{type:V.text,text:t.alert}],noInnerParse:!0,type:V.htmlBlock,tag:`header`})),e(`blockquote`,i,n(t.children,r))}},[V.breakLine]:{_qualify:[` `],_match:gn(Le),_order:De.HIGH,_parse:xn,_render(t,n,r={}){return e(`br`,{key:r.key})}},[V.breakThematic]:{_qualify:[`--`,`__`,`**`,`- `,`* `,`_ `],_match:hn(Re),_order:De.HIGH,_parse:xn,_render(t,n,r={}){return e(`hr`,{key:r.key})}},[V.codeBlock]:{_qualify:[` `],_match:hn(Be),_order:De.MAX,_parse(e){return{type:V.codeBlock,lang:void 0,text:Yt(Kt(e[0].replace(/^ {4}/gm,``)))}},_render(t,n,r={}){let i={...t.attrs??{}},a=t.lang?`lang-${t.lang}`:`lang-plaintext`;return i.className=i.className?`${i.className} ${a}`:a,t.lang&&!i.lang&&(i.lang=t.lang),e(`pre`,{key:r.key},e(`code`,i,t.text))}},[V.codeFenced]:{_qualify:["```",`~~~`],_match:hn(ze),_order:De.MAX,_parse(e){return{attrs:a(`code`,e[3]??``),lang:e[2]||void 0,text:e[4],type:V.codeBlock}}},[V.codeInline]:{_qualify:["`"],_match:mn(Ve),_order:De.LOW,_parse(e){return{text:Yt(e[2])}},_render(t,n,r={}){return e(`code`,{key:r.key},t.text)}},[V.footnote]:{_qualify:[`[^`],_match:hn(We),_order:De.MAX,_parse(e){return r.push({footnote:e[2],identifier:e[1]}),{}},_render:Sn},[V.footnoteReference]:{_qualify:[`[^`],_match:pn(Ge),_order:De.HIGH,_parse(e){return{target:`#${c(e[1])}`,text:e[1]}},_render(t,n,r={}){return e(`a`,{key:r.key,href:l(t.target,`a`,`href`)??void 0},e(`sup`,{key:r.key},t.text))}},[V.gfmTask]:{_qualify:[`[ ]`,`[x]`],_match:pn(Je),_order:De.HIGH,_parse(e){return{completed:e[1].toLowerCase()===`x`}},_render(t,n,r={}){return e(`input`,{checked:t.completed,key:r.key,readOnly:!0,type:`checkbox`})}},[V.heading]:{_qualify:[`#`],_match:hn(n.enforceAtxHeadings?Xe:Ye),_order:De.HIGH,_parse(e,t,n){return{children:_n(t,e[2],n),id:c(e[2]),level:e[1].length}},_render(t,n,r={}){return e(`h${t.level}`,{id:t.id,key:r.key},n(t.children,r))}},[V.headingSetext]:{_qualify:e=>{let t=e.indexOf(`
|
|
25
|
+
`);return t>0&&t<e.length-1&&(e[t+1]===`=`||e[t+1]===`-`)},_match:hn(Ze),_order:De.MAX,_parse(e,t,n){return{children:_n(t,e[1],n),level:e[2]===`=`?1:2,type:V.heading}}},[V.htmlBlock]:{_qualify:e=>{if(n.disableParsingRawHTML)return!1;let t=e.match(/^ *<([a-z][a-z0-9:-]*)\b/i);if(!t)return!1;let r=t[1];return e.toLowerCase().indexOf(`</${r.toLowerCase()}>`)!==-1},_match:gn(Qe),_order:De.HIGH,_parse(e,t,n){let r=e[3].match(bt)?.[1]??``,i=nn(e[3],r),s=o(i)?yn:_n,c=e[1].trim(),l=Ae.indexOf(c.toLowerCase())!==-1,u=l?c.toLowerCase():c,d={attrs:a(u,e[2]??``),noInnerParse:l,tag:u};if(n.inAnchor=n.inAnchor||c.toLowerCase()===`a`,l)d.text=e[3];else{let e=n.inHTML;n.inHTML=!0,d.children=s(t,i,n),n.inHTML=e}return n.inAnchor=!1,d},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[V.htmlComment]:{_qualify:[`<!`],_match:gn(et),_order:De.HIGH,_parse:xn,_render:Sn},[V.htmlSelfClosing]:{_qualify:e=>n.disableParsingRawHTML?!1:/^ *<([a-zA-Z][a-zA-Z0-9:]*)[\s>/]/.test(e),_match:gn(nt),_order:De.HIGH,_parse(e){let t=e[1].trim();return{attrs:a(t,e[2]||``),tag:t}},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}})}},[V.customComponent]:{_qualify:e=>/^ *<([A-Z][a-zA-Z0-9]*)/.test(e),_match:gn(rt),_order:De.MAX,_parse(e,t,n){let r=e[3].match(bt)?.[1]??``,i=nn(e[3],r),s=o(i)?yn:_n,c=e[1].trim(),l={attrs:a(c,e[2]??``),noInnerParse:!1,tag:c},u=n.inHTML;return n.inHTML=!0,l.children=s(t,i,n),n.inHTML=u,l},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[V.paragraph]:{_match:f,_order:De.LOW,_parse:bn,_render(t,n,r={}){return e(`p`,{key:r.key},n(t.children,r))}},[V.image]:{_qualify:[`![`],_match:mn(Dn),_order:De.HIGH,_parse(e){return{alt:Yt(e[1]),target:Yt(e[2]),title:Yt(e[3])}},_render(t,n,r={}){return e(`img`,{key:r.key,alt:t.alt??void 0,title:t.title??void 0,src:l(t.target,`img`,`src`)??void 0})}},[V.link]:{_qualify:[`[`],_match:pn(On),_order:De.LOW,_parse(e,t,n){return{children:vn(t,e[1],n),target:Yt(e[2]),title:Yt(e[3])}},_render(t,n,r={}){let i=l(t.target,`a`,`href`);return e(`a`,{key:r.key,href:i??void 0,title:t.title??void 0},n(t.children,r))}},[V.linkAngleBraceStyleDetector]:{_qualify:[`<`],_match:pn(ot),_order:De.MAX,_parse(e){let t=e[1],n=!1;return t.indexOf(`@`)!==-1&&t.indexOf(`//`)===-1&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:V.text}],target:n?`mailto:${t}`:t,type:V.link}}},[V.linkBareUrlDetector]:{_qualify:(e,t)=>!!(t.inline&&!t.inAnchor&&!n.disableAutoLink&&(qt(e,`http://`)||qt(e,`https://`))),_match:pn(at),_order:De.MAX,_parse(e){return{children:[{text:e[1],type:V.text}],target:e[1],type:V.link}}},[V.newlineCoalescer]:{_match:hn(He),_order:De.LOW,_parse:xn,_render(){return`
|
|
26
|
+
`}},[V.orderedList]:d(1),[V.unorderedList]:d(2),[V.ref]:{_qualify:[`[`],_match:gn(mt),_order:De.MAX,_parse(e){return i[e[1]]={target:e[2],title:e[4]},{}},_render:Sn},[V.refImage]:{_qualify:[`![`],_match:mn(ht),_order:De.MAX,_parse(e){return{alt:e[1]?Yt(e[1]):void 0,ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`img`,{key:r.key,alt:t.alt,src:l(a.target,`img`,`src`)??void 0,title:a.title}):null}},[V.refLink]:{_qualify:e=>e[0]===`[`&&e.indexOf(`](`)===-1,_match:pn(gt),_order:De.MAX,_parse(e,t,n){return{children:vn(t,e[1],n),fallbackChildren:e[0],ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`a`,{key:r.key,href:l(a.target,`a`,`href`)??void 0,title:a.title},n(t.children,r)):e(`span`,{key:r.key},t.fallbackChildren)}},[V.table]:{_qualify:[`|`],_match:hn(ct),_order:De.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?cn(e[2]):[],i=e[3]?un(e[3],t,n):[],a=ln(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:V.table}:{children:a.flat(),type:V.paragraph}},_render(t,n,r={}){let i=t,a=e=>i.align[e]&&i.align[e]!==`left`?{textAlign:i.align[e]}:{};return e(`table`,{key:r.key},e(`thead`,null,e(`tr`,null,...i.header.map((t,i)=>e(`th`,{key:i,style:a(i)},n(t,r))))),e(`tbody`,null,...i.cells.map((t,i)=>e(`tr`,{key:i},...t.map((t,i)=>e(`td`,{key:i,style:a(i)},n(t,r)))))))}},[V.tableSeparator]:{_match:(e,t)=>t.inTable&&e[0]===`|`?/^\|/.exec(e):null,_order:De.HIGH,_parse(){return{type:V.tableSeparator}},_render(){return` | `}},[V.text]:{_match:fn((e,t)=>Dt.exec(e)||Et.exec(e)||/^[\s\S]/.exec(e)),_order:De.MIN,_parse(e){let t=e[0];return{text:t.indexOf(`&`)===-1?t:t.replace($e,(e,t)=>t.startsWith(`#x`)?String.fromCharCode(parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCharCode(parseInt(t.slice(1),10)):u[t]||e)}},_render(e){return e.text}},[V.textBolded]:{_qualify:[`**`,`__`],_match:mn(At),_order:De.MED,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`strong`,{key:r.key},n(t.children,r))}},[V.textEmphasized]:{_qualify:[`*`,`_`],_match:mn(jt),_order:De.LOW,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`em`,{key:r.key},n(t.children,r))}},[V.textEscaped]:{_qualify:[`\\`],_match:mn(wt),_order:De.HIGH,_parse(e){return{text:e[1],type:V.text}}},[V.textMarked]:{_qualify:[`==`],_match:mn(Mt),_order:De.LOW,_parse:bn,_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[V.textStrikethroughed]:{_qualify:[`~~`],_match:mn(Nt),_order:De.LOW,_parse:bn,_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},Mn=(e=``,t,n={})=>{let r=t.components??{},i=e=>t.slugify?t.slugify(e,Qt):Qt(e),a=An(t,n),o=[],s={},c=(e,n)=>{if(!n||!n.trim())return null;let r=n.match(Me);return r?r.reduce((n,r)=>{let i=r.indexOf(`=`);if(i!==-1){let a=rn(r.slice(0,i)).trim(),o=Jt(r.slice(i+1).trim()),s=Oe[a]??a;if(s===`ref`)return n;n[s]=on(e,a,o,t.sanitizer??en),typeof n[s]==`string`&&(Qe.test(n[s])||nt.test(n[s]))&&(n[s]=m(n[s].trim()))}else r!==`style`&&(n[Oe[r]??r]=!0);return n},{}):null},l=[Pe,ze,Be,n.enforceAtxHeadings?Xe:Ye,Ze,ct,Wt,Gt,rt],u=jn(a,t,n,o,s,c,e=>{let t=e.replace(yt,``),r=t.length>2048?t.slice(0,2048):t;return Cn(n.disableParsingRawHTML?l:[...l,pt,Qe,et,nt,rt],r)},l),d=n.disableParsingRawHTML?Object.keys(u).reduce((e,t)=>(t!==V.htmlBlock&&t!==V.htmlSelfClosing&&(e[t]=u[t]),e),{}):u,f=wn(d),p=Tn(En(d,n.renderRule)),m=e=>{let t=n.preserveFrontmatter?e:e.replace(qe,``),i=n.forceInline||!n.forceBlock&&_t.test(t.replace(yt,``))===!1,o=p(f(i?t:`${Kt(t).replace(yt,``)}\n\n`,{inline:i}),{inline:i});for(;typeof o[o.length-1]==`string`&&!o[o.length-1].trim();)o.pop();if(n.wrapper===null)return o;let s=n.wrapper??(i?`span`:`div`);if(o.length>1||n.forceWrapper)return a(s,{key:`outer`},o);if(o.length===1){let e=o[0];if(typeof e==`string`){let t={key:`outer`};if(!i&&r){let n=Zt(r,`p.props`,{})??{},i=Xt(t.className,n.className),o={...t,...n};return i&&(o.className=i),a(`span`,o,e)}return a(`span`,t,e)}return e}return a(s,{key:`outer`},null)};if(typeof e!=`string`)throw console.error(`intlayer: the first argument must be a string. Received`,typeof e),Error(`intlayer: the first argument must be a string`);let h=m(e);return o.length?a(`div`,null,h,a(`footer`,{key:`footer`},...o.map(e=>a(`div`,{id:i(e.identifier),key:e.identifier},e.identifier,p(f(e.footnote,{inline:!0}),{inline:!0}))))):h},Nn={}.INTLAYER_NODE_TYPE_INTLAYER_NODE===`false`,Pn={}.INTLAYER_NODE_TYPE_REACT_NODE===`false`,Fn={}.INTLAYER_NODE_TYPE_INSERTION===`false`,In=Nn?pe:{id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:t,...n})=>E({...n,value:n.children,children:n.children})},Ln=Pn?pe:{id:`react-node-plugin`,canHandle:e=>typeof e==`object`&&e?.props!==void 0&&e.key!==void 0,transform:(e,{plugins:t,...n})=>E({...n,value:`[[react-element]]`,children:D(e)})},Rn=(e,t)=>{let n=Ee(e,t);return n.isSimple?n.parts:(0,v.createElement)(v.Fragment,null,...n.parts.map((e,t)=>(0,v.createElement)(v.Fragment,{key:t},e)))},zn=Fn?pe:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:M}],i=e[M],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=Rn(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}},Bn=pe,Vn=pe,Hn=(e,t=!0)=>[me(e??x.defaultLocale,t?x.defaultLocale:void 0),he,ge,ye(e??x.defaultLocale),be,ve,In,Ln,zn,Bn,Vn].filter(Boolean),Un=(e,t)=>Ce(e,t,Hn(t)),Wn=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),Gn=(e,t=x?.locales)=>{let n=Wn(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`,``)},Kn=`https://back.intlayer.org`,qn=[`en`],Jn=(e={})=>({defaultLocale:x?.defaultLocale??`en`,mode:S?.mode??`prefix-no-default`,locales:x?.locales??qn,rewrite:S?.rewrite,domains:S?.domains,...e}),Yn=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i,domains:a}=Jn(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}},Xn=(e,t,n)=>e,Zn=(e,t,n)=>({path:e,isRewritten:!1}),Qn=(e,t=x?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o,domains:s,currentDomain:c}=Jn(n),l=Gn(e,a),u=Wn(l),d=u?new URL(l):new URL(l,`http://example.com`),f=Zn(Xn(d.pathname,void 0,void 0),t,void 0).path,p=u?`${d.protocol}//${d.host}`:``,{prefix:m}=Yn(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}`},$n=(e,t=x?.locales,n=x?.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},er={}.INTLAYER_ROUTING_STORAGE_COOKIES===`false`;({}).INTLAYER_ROUTING_STORAGE_HEADERS;var tr=(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(`; `)},nr=e=>{let{locales:t}=x;if(e?.isCookieEnabled===!1)return;let n=e=>!!e&&t.includes(e);if(!er)for(let t=0;t<(S.storage.cookies??[]).length;t++)try{let r=e?.getCookie?.(S.storage.cookies[t].name);if(n(r))return r}catch{}},rr=(e,t)=>{if(t?.isCookieEnabled!==!1&&!er&&S.storage.cookies)for(let n=0;n<S.storage.cookies.length;n++){let{name:r,attributes:i}=S.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,tr(r,e,i))}catch{}}}},ir={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)},ar=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`}},or=50,sr=new Map,cr=(e,t,n)=>{let r=t??x?.defaultLocale,i=`${r}|${n?JSON.stringify(n):``}`,a=sr.get(e);a||(a=new Map,sr.set(e,a));let o=a.get(i);return o||(a.size>or&&a.clear(),o=new e(r,n),a.set(i,o)),o},lr={Collator:function(e,t){return cr(Intl.Collator,e,t)},DateTimeFormat:function(e,t){return cr(Intl.DateTimeFormat,e,t)},DisplayNames:function(e,t){return cr(Intl.DisplayNames,e,t)},ListFormat:function(e,t){return cr(Intl.ListFormat,e,t)},NumberFormat:function(e,t){return cr(Intl.NumberFormat,e,t)},PluralRules:function(e,t){return cr(Intl.PluralRules,e,t)},RelativeTimeFormat:function(e,t){return cr(Intl.RelativeTimeFormat,e,t)},Segmenter:function(e,t){return cr(Intl.Segmenter,e,t)}},ur=(e,t=e)=>new lr.DisplayNames(t,{type:`language`}).of(e)??`Unknown locale`,dr=e=>typeof e==`object`&&e?.key!==void 0&&e?.props!==void 0,fr=(e,t)=>e.every((e,n)=>t[n]&&t[n].key===e.key&&t[n].type===e.type),pr=nr(ir),mr=(e,t)=>rr(e,{...ir,isCookieEnabled:t}),hr=()=>{typeof window<`u`&&(window.intlayer={enabled:!0})},gr=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()},_r=(0,v.createContext)({locale:pr??x?.defaultLocale,setLocale:()=>null,isCookieEnabled:!0}),vr=e=>{let t=(0,b.c)(6),{locale:n,defaultLocale:r,children:i,setLocale:a,disableEditor:o,isCookieEnabled:s}=e,{locales:c,defaultLocale:l}=x??{},[u,d]=(0,v.useState)(n??pr??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,v.useEffect)(f,p);let m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],t[5]=m):m=t[5],(0,v.useEffect)(yr,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),mr(e,s)}}),g=$n(u);return(0,T.jsx)(_r.Provider,{value:{locale:g,setLocale:h,disableEditor:o},children:i})};function yr(){hr()}var br=(e,t)=>{let{locale:n}=(0,v.useContext)(_r)??{};return(0,v.useMemo)(()=>Un(e,t??n),[e.key,n,t])},xr=({isCookieEnabled:e,onLocaleChange:t}={})=>{let{defaultLocale:n,locales:r}=x??{},{locale:i,setLocale:a,isCookieEnabled:o}=(0,v.useContext)(_r)??{};return{locale:i,defaultLocale:n,availableLocales:r,setLocale:(0,v.useCallback)(n=>{if(!r?.map(String).includes(n)){console.error(`Locale ${n} is not available`);return}a(n),mr(n,e??o??!0),t?.(n)},[r,t,a,e])}},Sr={createElement:v.createElement,cloneElement:v.cloneElement,Fragment:v.Fragment,normalizeProps:(e,t)=>t},Cr=(e=``,t={})=>{let{createElement:n,disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,namedCodesToUnicode:l,components:u,renderRule:d,sanitizer:f,slugify:p,wrapper:m,preserveFrontmatter:h,tagfilter:g}=t;return Mn(e,{runtime:n?{...Sr,createElement:n}:Sr,components:u,namedCodesToUnicode:l,sanitizer:f,slugify:p},{disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,renderRule:d,wrapper:m,preserveFrontmatter:h,tagfilter:g})},wr=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>Cr(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o}),Tr=`popstate`;function Er(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Dr(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Mr(``,{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:Nr(t)}return Fr(t,n,null,e)}function Or(e,t){if(e===!1||e==null)throw Error(t)}function kr(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Ar(){return Math.random().toString(36).substring(2,10)}function jr(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Mr(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Pr(t):t,state:n,key:t&&t.key||r||Ar(),unstable_mask:i}}function Nr({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 Pr(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 Fr(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=Er(e)?e:Mr(h.location,e,t);n&&n(r,e),l=u()+1;let d=jr(r,l),f=h.createHref(r.unstable_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=Er(e)?e:Mr(h.location,e,t);n&&n(r,e),l=u();let i=jr(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Ir(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(Tr,d),c=e,()=>{i.removeEventListener(Tr,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 Ir(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),Or(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:Nr(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function Lr(e,t,n=`/`){return Rr(e,t,n,!1)}function Rr(e,t,n,r){let i=ni((typeof t==`string`?Pr(t):t).pathname||`/`,n);if(i==null)return null;let a=Br(e);Hr(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ti(i);o=Qr(a[e],t,r)}return o}function zr(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 Br(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;Or(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=di([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Or(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Br(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Xr(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Vr(e.path))a(e,t,!0,n)}),t}function Vr(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=Vr(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 Hr(e){e.sort((e,t)=>e.score===t.score?Zr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Ur=/^:[\w-]+$/,Wr=3,Gr=2,Kr=1,qr=10,Jr=-2,Yr=e=>e===`*`;function Xr(e,t){let n=e.split(`/`),r=n.length;return n.some(Yr)&&(r+=Jr),t&&(r+=Gr),n.filter(e=>!Yr(e)).reduce((e,t)=>e+(Ur.test(t)?Wr:t===``?Kr:qr),r)}function Zr(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 Qr(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=$r({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=$r({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:di([a,u.pathname]),pathnameBase:pi(di([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=di([a,u.pathnameBase]))}return o}function $r(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ei(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 ei(e,t=!1,n=!0){kr(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 ti(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return kr(!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 ni(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 ri=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ii(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Pr(e):e,a;return n?(n=ui(n),a=n.startsWith(`/`)?ai(n.substring(1),`/`):ai(n,t)):a=t,{pathname:a,search:mi(r),hash:hi(i)}}function ai(e,t){let n=fi(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function oi(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 si(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ci(e){let t=si(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function li(e,t,n,r=!1){let i;typeof e==`string`?i=Pr(e):(i={...e},Or(!i.pathname||!i.pathname.includes(`?`),oi(`?`,`pathname`,`search`,i)),Or(!i.pathname||!i.pathname.includes(`#`),oi(`#`,`pathname`,`hash`,i)),Or(!i.search||!i.search.includes(`#`),oi(`#`,`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=ii(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ui=e=>e.replace(/\/\/+/g,`/`),di=e=>ui(e.join(`/`)),fi=e=>e.replace(/\/+$/,``),pi=e=>fi(e).replace(/^\/*/,`/`),mi=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,hi=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,gi=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 _i(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function vi(e){return di(e.map(e=>e.route.path).filter(Boolean))||`/`}var yi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function bi(e,t){let n=e;if(typeof n!=`string`||!ri.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(yi)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=ni(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{kr(!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 xi=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(xi);var Si=[`GET`,...xi];new Set(Si);var Ci=v.createContext(null);Ci.displayName=`DataRouter`;var wi=v.createContext(null);wi.displayName=`DataRouterState`;var Ti=v.createContext(!1);function Ei(){return v.useContext(Ti)}var Di=v.createContext({isTransitioning:!1});Di.displayName=`ViewTransition`;var Oi=v.createContext(new Map);Oi.displayName=`Fetchers`;var ki=v.createContext(null);ki.displayName=`Await`;var Ai=v.createContext(null);Ai.displayName=`Navigation`;var ji=v.createContext(null);ji.displayName=`Location`;var H=v.createContext({outlet:null,matches:[],isDataRoute:!1});H.displayName=`Route`;var Mi=v.createContext(null);Mi.displayName=`RouteError`;var Ni=`REACT_ROUTER_ERROR`,Pi=`REDIRECT`,Fi=`ROUTE_ERROR_RESPONSE`;function Ii(e){if(e.startsWith(`${Ni}:${Pi}:{`))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 Li(e){if(e.startsWith(`${Ni}:${Fi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new gi(t.status,t.statusText,t.data)}catch{}}function Ri(e,{relative:t}={}){Or(zi(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=v.useContext(Ai),{hash:i,pathname:a,search:o}=Gi(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:di([n,a])),r.createHref({pathname:s,search:o,hash:i})}function zi(){return v.useContext(ji)!=null}function Bi(){return Or(zi(),`useLocation() may be used only in the context of a <Router> component.`),v.useContext(ji).location}var Vi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Hi(e){v.useContext(Ai).static||v.useLayoutEffect(e)}function Ui(){let{isDataRoute:e}=v.useContext(H);return e?ua():Wi()}function Wi(){Or(zi(),`useNavigate() may be used only in the context of a <Router> component.`);let e=v.useContext(Ci),{basename:t,navigator:n}=v.useContext(Ai),{matches:r}=v.useContext(H),{pathname:i}=Bi(),a=JSON.stringify(ci(r)),o=v.useRef(!1);return Hi(()=>{o.current=!0}),v.useCallback((r,s={})=>{if(kr(o.current,Vi),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=li(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:di([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}v.createContext(null);function Gi(e,{relative:t}={}){let{matches:n}=v.useContext(H),{pathname:r}=Bi(),i=JSON.stringify(ci(n));return v.useMemo(()=>li(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Ki(e,t){return qi(e,t)}function qi(e,t,n){Or(zi(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=v.useContext(Ai),{matches:i}=v.useContext(H),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||``;fa(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.
|
|
27
|
+
|
|
28
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Bi(),d;if(t){let e=typeof t==`string`?Pr(t):t;Or(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=Lr(e,{pathname:p});kr(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),kr(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=ea(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:di([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:di([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?v.createElement(ji.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function Ji(){let e=la(),t=_i(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=v.createElement(v.Fragment,null,v.createElement(`p`,null,`💿 Hey developer 👋`),v.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,v.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,v.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),v.createElement(v.Fragment,null,v.createElement(`h2`,null,`Unexpected Application Error!`),v.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?v.createElement(`pre`,{style:i},n):null,o)}var Yi=v.createElement(Ji,null),Xi=class extends v.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=Li(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:v.createElement(H.Provider,{value:this.props.routeContext},v.createElement(Mi.Provider,{value:e,children:this.props.component}));return this.context?v.createElement(Qi,{error:e},t):t}};Xi.contextType=Ti;var Zi=new WeakMap;function Qi({children:e,error:t}){let{basename:n}=v.useContext(Ai);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ii(t.digest);if(e){let r=Zi.get(t);if(r)throw r;let i=bi(e.location,n);if(yi&&!Zi.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 Zi.set(t,n),n}return v.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function $i({routeContext:e,match:t,children:n}){let r=v.useContext(Ci);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(H.Provider,{value:e},n)}function ea(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);Or(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??{},unstable_pattern:vi(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||Yi,o&&(s<0&&c===0?(fa(`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?v.createElement(n.route.Component,null):n.route.element?n.route.element:e,v.createElement($i,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?v.createElement(Xi,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function ta(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function na(e){let t=v.useContext(Ci);return Or(t,ta(e)),t}function ra(e){let t=v.useContext(wi);return Or(t,ta(e)),t}function ia(e){let t=v.useContext(H);return Or(t,ta(e)),t}function aa(e){let t=ia(e),n=t.matches[t.matches.length-1];return Or(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function oa(){return aa(`useRouteId`)}function sa(){return ra(`useNavigation`).navigation}function ca(){let{matches:e,loaderData:t}=ra(`useMatches`);return v.useMemo(()=>e.map(e=>zr(e,t)),[e,t])}function la(){let e=v.useContext(Mi),t=ra(`useRouteError`),n=aa(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ua(){let{router:e}=na(`useNavigate`),t=aa(`useNavigate`),n=v.useRef(!1);return Hi(()=>{n.current=!0}),v.useCallback(async(r,i={})=>{kr(n.current,Vi),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var da={};function fa(e,t,n){!t&&!da[e]&&(da[e]=!0,kr(!1,n))}v.useOptimistic,v.memo(pa);function pa({routes:e,future:t,state:n,isStatic:r,onError:i}){return qi(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function ma(e){Or(!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 ha({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){Or(!zi(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=v.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Pr(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=v.useMemo(()=>{let e=ni(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return kr(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:v.createElement(Ai.Provider,{value:c},v.createElement(ji.Provider,{children:t,value:h}))}function ga({children:e,location:t}){return Ki(_a(e),t)}v.Component;function _a(e,t=[]){let n=[];return v.Children.forEach(e,(e,r)=>{if(!v.isValidElement(e))return;let i=[...t,r];if(e.type===v.Fragment){n.push.apply(n,_a(e.props.children,i));return}Or(e.type===ma,`[${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>`),Or(!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=_a(e.props.children,i)),n.push(a)}),n}var va=`get`,ya=`application/x-www-form-urlencoded`;function ba(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function xa(e){return ba(e)&&e.tagName.toLowerCase()===`button`}function Sa(e){return ba(e)&&e.tagName.toLowerCase()===`form`}function Ca(e){return ba(e)&&e.tagName.toLowerCase()===`input`}function wa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ta(e,t){return e.button===0&&(!t||t===`_self`)&&!wa(e)}var Ea=null;function Da(){if(Ea===null)try{new FormData(document.createElement(`form`),0),Ea=!1}catch{Ea=!0}return Ea}var Oa=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ka(e){return e!=null&&!Oa.has(e)?(kr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ya}"`),null):e}function Aa(e,t){let n,r,i,a,o;if(Sa(e)){let o=e.getAttribute(`action`);r=o?ni(o,t):null,n=e.getAttribute(`method`)||va,i=ka(e.getAttribute(`enctype`))||ya,a=new FormData(e)}else if(xa(e)||Ca(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?ni(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||va,i=ka(e.getAttribute(`formenctype`))||ka(o.getAttribute(`enctype`))||ya,a=new FormData(o,e),!Da()){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(ba(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=va,r=null,i=ya,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 ja={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Ma=/[&><\u2028\u2029]/g;function Na(e){return e.replace(Ma,e=>ja[e])}function Pa(e,t){if(e===!1||e==null)throw Error(t)}function Fa(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&&ni(i.pathname,t)===`/`?i.pathname=`${fi(t)}/_root.${r}`:i.pathname=`${fi(i.pathname)}.${r}`,i}async function Ia(e,t){if(e.id in t)return t[e.id];try{let n=await d(()=>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 La(e){return e!=null&&typeof e.page==`string`}function Ra(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 za(e,t,n){return Wa((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Ia(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ra).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Ba(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 Va(e,t,{includeHydrateFallback:n}={}){return Ha(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 Ha(e){return[...new Set(e)]}function Ua(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Wa(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!La(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ua(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Ga(){let e=v.useContext(Ci);return Pa(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ka(){let e=v.useContext(wi);return Pa(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var qa=v.createContext(void 0);qa.displayName=`FrameworkContext`;function Ja(){let e=v.useContext(qa);return Pa(e,`You must render this element inside a <HydratedRouter> element`),e}function Ya(e,t){let n=v.useContext(qa),[r,i]=v.useState(!1),[a,o]=v.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=v.useRef(null);v.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]),v.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:Xa(s,p),onBlur:Xa(c,m),onMouseEnter:Xa(l,p),onMouseLeave:Xa(u,m),onTouchStart:Xa(d,p)}]:[a,f,{}]:[!1,f,{}]}function Xa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Za({page:e,...t}){let n=Ei(),{router:r}=Ga(),i=v.useMemo(()=>Lr(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?v.createElement($a,{page:e,matches:i,...t}):v.createElement(eo,{page:e,matches:i,...t}):null}function Qa(e){let{manifest:t,routeModules:n}=Ja(),[r,i]=v.useState([]);return v.useEffect(()=>{let r=!1;return za(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function $a({page:e,matches:t,...n}){let r=Bi(),{future:i}=Ja(),{basename:a}=Ga(),o=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Fa(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 v.createElement(v.Fragment,null,o.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function eo({page:e,matches:t,...n}){let r=Bi(),{future:i,manifest:a,routeModules:o}=Ja(),{basename:s}=Ga(),{loaderData:c,matches:l}=Ka(),u=v.useMemo(()=>Ba(e,t,l,a,r,`data`),[e,t,l,a,r]),d=v.useMemo(()=>Ba(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=v.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=Fa(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=v.useMemo(()=>Va(d,a),[d,a]),m=Qa(d);return v.createElement(v.Fragment,null,f.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>v.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>v.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function to(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}v.Component;var no=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{no&&(window.__reactRouterVersion=`7.14.1`)}catch{}function ro({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=v.useRef();i.current??=Dr({window:r,v5Compat:!0});let a=i.current,[o,s]=v.useState({action:a.action,location:a.location}),c=v.useCallback(e=>{n===!1?s(e):v.startTransition(()=>s(e))},[n]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(ha,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function io({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=v.useState({action:n.action,location:n.location}),o=v.useCallback(e=>{r===!1?a(e):v.startTransition(()=>a(e))},[r]);return v.useLayoutEffect(()=>n.listen(o),[n,o]),v.createElement(ha,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}io.displayName=`unstable_HistoryRouter`;var ao=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oo=v.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:_}=v.useContext(Ai),y=typeof l==`string`&&ao.test(l),b=bi(l,h);l=b.to;let x=Ri(l,{relative:r}),S=Bi(),C=null;if(o){let e=li(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:di([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=Ya(n,p),D=po(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=v.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:to(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?v.createElement(v.Fragment,null,A,v.createElement(Za,{page:x})):A});oo.displayName=`Link`;var so=v.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=Gi(a,{relative:c.relative}),d=Bi(),f=v.useContext(wi),{navigator:p,basename:m}=v.useContext(Ai),h=f!=null&&Co(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=ni(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return v.createElement(oo,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});so.displayName=`NavLink`;var co=v.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=va,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=v.useContext(Ai),g=go(),_=_o(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&ao.test(s);return v.createElement(`form`,{ref:m,method:y,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,unstable_defaultShouldRevalidate:f});h&&n!==!1?v.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});co.displayName=`Form`;function lo({getKey:e,storageKey:t,...n}){let r=v.useContext(qa),{basename:i}=v.useContext(Ai),a=Bi(),o=ca();xo({getKey:e,storageKey:t});let s=v.useMemo(()=>{if(!r||!e)return null;let t=bo(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 v.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Na(JSON.stringify(t||vo))}, ${Na(JSON.stringify(s))})`}})}lo.displayName=`ScrollRestoration`;function U(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uo(e){let t=v.useContext(Ci);return Or(t,U(e)),t}function fo(e){let t=v.useContext(wi);return Or(t,U(e)),t}function po(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=Ui(),d=Bi(),f=Gi(e,{relative:o});return v.useCallback(p=>{if(Ta(p,t)){p.preventDefault();let t=n===void 0?Nr(d)===Nr(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?v.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var mo=0,ho=()=>`__${String(++mo)}__`;function go(){let{router:e}=uo(`useSubmit`),{basename:t}=v.useContext(Ai),n=oa(),r=e.fetch,i=e.navigate;return v.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Aa(e,t);a.navigate===!1?await r(a.fetcherKey||ho(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_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 _o(e,{relative:t}={}){let{basename:n}=v.useContext(Ai),r=v.useContext(H);Or(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Gi(e||`.`,{relative:t})},o=Bi();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:di([n,a.pathname])),Nr(a)}var vo=`react-router-scroll-positions`,yo={};function bo(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ni(e.pathname,n)||e.pathname},t)),i??=e.key,i}function xo({getKey:e,storageKey:t}={}){let{router:n}=uo(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=fo(`useScrollRestoration`),{basename:a}=v.useContext(Ai),o=Bi(),s=ca(),c=sa();v.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),So(v.useCallback(()=>{if(c.state===`idle`){let t=bo(o,s,a,e);yo[t]=window.scrollY}try{sessionStorage.setItem(t||vo,JSON.stringify(yo))}catch(e){kr(!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`&&(v.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||vo);e&&(yo=JSON.parse(e))}catch{}},[t]),v.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(yo,()=>window.scrollY,e?(t,n)=>bo(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),v.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{kr(!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 So(e,t){let{capture:n}=t||{};v.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Co(e,{relative:t}={}){let n=v.useContext(Di);Or(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=uo(`useViewTransitionState`),i=Gi(e,{relative:t});if(!n.isTransitioning)return!1;let a=ni(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ni(n.nextLocation.pathname,r)||n.nextLocation.pathname;return $r(i.pathname,o)!=null||$r(i.pathname,a)!=null}var wo=1,To=900*1e3,Eo=0,Do=()=>(Eo=(Eo+1)%(2**53-1),Eo.toString()),Oo=new Map,ko=e=>{if(Oo.has(e))return;let t=setTimeout(()=>{Oo.delete(e),No({type:`REMOVE_TOAST`,toastId:e})},To);Oo.set(e,t)},Ao=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,wo)};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?ko(n):e.toasts.forEach(e=>{ko(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)}}},jo=[],Mo={toasts:[]},No=e=>{Mo=Ao(Mo,e),jo.forEach(e=>{e(Mo)})},Po=({...e})=>{let t=Do(),n=e=>No({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>No({type:`DISMISS_TOAST`,toastId:t});return No({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},Fo=()=>{let e=(0,b.c)(5),[t,n]=(0,v.useState)(Mo),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>(jo.push(n),()=>{let e=jo.indexOf(n);e>-1&&jo.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,v.useEffect)(r,i);let a;return e[3]===t?a=e[4]:(a={...t,toast:Po,dismiss:Io},e[3]=t,e[4]=a),a};function Io(e){return No({type:`DISMISS_TOAST`,toastId:e})}var Lo=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(){}},Ro=new class extends Lo{#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`}},zo={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Bo=new class{#e=zo;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 Vo(e){setTimeout(e,0)}var Ho=typeof window>`u`||`Deno`in globalThis;function Uo(){}function Wo(e,t){return typeof e==`function`?e(t):e}function Go(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ko(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qo(e,t){return typeof e==`function`?e(t):e}function Jo(e,t){return typeof e==`function`?e(t):e}function Yo(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Zo(o,t.options))return!1}else if(!$o(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 Xo(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Qo(t.options.mutationKey)!==Qo(a))return!1}else if(!$o(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Zo(e,t){return(t?.queryKeyHashFn||Qo)(e)}function Qo(e){return JSON.stringify(e,(e,t)=>is(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function $o(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>$o(e[n],t[n])):!1}var es=Object.prototype.hasOwnProperty;function ts(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=rs(e)&&rs(t);if(!r&&!(is(e)&&is(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:es.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ts(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ns(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 rs(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function is(e){if(!as(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!as(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function as(e){return Object.prototype.toString.call(e)===`[object Object]`}function os(e){return new Promise(t=>{Bo.setTimeout(t,e)})}function ss(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ts(e,t)}function cs(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ls(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var us=Symbol();function ds(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===us?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fs(e,t){return typeof e==`function`?e(...t):!!e}function ps(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 ms=(()=>{let e=()=>Ho;return{isServer(){return e()},setIsServer(t){e=t}}})();function hs(){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 gs=Vo;function _s(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=gs,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 vs=_s(),ys=new class extends Lo{#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 bs(e){return Math.min(1e3*2**e,3e4)}function xs(e){return(e??`online`)===`online`?ys.isOnline():!0}var Ss=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Cs(e){let t=!1,n=0,r,i=hs(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Ss(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Ro.isFocused()&&(e.networkMode===`always`||ys.isOnline())&&e.canRun(),u=()=>xs(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??(ms.isServer()?0:3),o=e.retryDelay??bs,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),os(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 ws=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Go(this.gcTime)&&(this.#e=Bo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ms.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Bo.clearTimeout(this.#e),this.#e=void 0)}},Ts=class extends ws{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Os(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Os(this.options);e.data!==void 0&&(this.setState(Ds(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=ss(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Uo).catch(Uo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Jo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===us||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>qo(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:!Ko(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.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.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.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.#o=!0,n.signal)})},i=()=>{let e=ds(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!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.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Cs({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ss&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ss){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(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,...Es(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ds(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=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),vs.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Es(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xs(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ds(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Os(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 ks=class extends Lo{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=hs(),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),js(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ms(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ms(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 Jo(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&&!ns(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ns(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Jo(this.options.enabled,this.#t)!==Jo(t.enabled,this.#t)||qo(this.options.staleTime,this.#t)!==qo(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Jo(this.options.enabled,this.#t)!==Jo(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 Fs(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(Uo)),t}#g(){this.#b();let e=qo(this.options.staleTime,this.#t);if(ms.isServer()||this.#r.isStale||!Go(e))return;let t=Ko(this.#r.dataUpdatedAt,e)+1;this.#d=Bo.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,!(ms.isServer()||Jo(this.options.enabled,this.#t)===!1||!Go(this.#p)||this.#p===0)&&(this.#f=Bo.setInterval(()=>{(this.options.refetchIntervalInBackground||Ro.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(Bo.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(Bo.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&&js(e,t),o=i&&Ns(e,n,t,r);(a||o)&&(l={...l,...Es(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=ss(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=ss(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:Ps(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Jo(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=hs())},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),!ns(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){vs.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function As(e,t){return Jo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function js(e,t){return As(e,t)||e.state.data!==void 0&&Ms(e,t,t.refetchOnMount)}function Ms(e,t,n){if(Jo(t.enabled,e)!==!1&&qo(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Ps(e,t)}return!1}function Ns(e,t,n,r){return(e!==t||Jo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ps(e,n)}function Ps(e,t){return Jo(t.enabled,e)!==!1&&e.isStaleByTime(qo(t.staleTime,e))}function Fs(e,t){return!ns(e.getCurrentResult(),t)}function Is(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=>{ps(e,()=>t.signal,()=>n=!0)},u=ds(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();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?ls:cs;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Rs:Ls,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:Ls(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 Ls(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 Rs(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var zs=class extends ws{#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||Bs(),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=Cs({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){this.state=(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),vs.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Bs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Vs=class extends Lo{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 zs({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=Hs(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=Hs(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=Hs(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=Hs(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){vs.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=>Xo(t,e))}findAll(e={}){return this.getAll().filter(t=>Xo(e,t))}notify(e){vs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return vs.batch(()=>Promise.all(e.map(e=>e.continue().catch(Uo))))}};function Hs(e){return e.options.scope?.id}var Us=class extends Lo{#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),ns(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Qo(t.mutationKey)!==Qo(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??Bs();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){vs.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)})})}},Ws=class extends Lo{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Zo(r,t),a=this.get(i);return a||(a=new Ts({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(){vs.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=>Yo(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Yo(e,t)):t}notify(e){vs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){vs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){vs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Gs=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ws,this.#t=e.mutationCache||new Vs,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Ro.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ys.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(qo(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=Wo(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return vs.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;vs.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return vs.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=vs.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Uo).catch(Uo)}invalidateQueries(e,t={}){return vs.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=vs.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(Uo)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Uo)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(qo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Uo).catch(Uo)}fetchInfiniteQuery(e){return e.behavior=Is(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Uo).catch(Uo)}ensureInfiniteQueryData(e){return e.behavior=Is(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ys.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(Qo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{$o(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Qo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{$o(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||=Zo(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===us&&(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()}},Ks=v.createContext(void 0),qs=e=>{let t=v.useContext(Ks);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Js=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,T.jsx)(Ks.Provider,{value:e,children:t})),Ys=v.createContext(!1),Xs=()=>v.useContext(Ys);Ys.Provider;function Zs(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qs=v.createContext(Zs()),$s=()=>v.useContext(Qs),ec=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?fs(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},tc=e=>{v.useEffect(()=>{e.clearReset()},[e])},nc=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||fs(n,[e.error,r])),rc=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))}},ic=(e,t)=>e.isLoading&&e.isFetching&&!t,ac=(e,t)=>e?.suspense&&t.isPending,oc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sc(e,t,n){let r=Xs(),i=$s(),a=qs(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,rc(o),ec(o,i,s),tc(i);let c=!a.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(e=>{let t=d?l.subscribe(vs.batchCalls(e)):Uo;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o)},[o,l]),ac(o,u))throw oc(o,l,i);if(nc({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&&!ms.isServer()&&ic(u,r)&&(c?oc(o,l,i):s?.promise)?.catch(Uo).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function cc(e,t){return sc(e,ks,t)}function lc(e,t){let n=qs(t),[r]=v.useState(()=>new Us(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);let i=v.useSyncExternalStore(v.useCallback(e=>r.subscribe(vs.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=v.useCallback((e,t)=>{r.mutate(e,t).catch(Uo)},[r]);if(i.error&&fs(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var uc={queries:{retry:1,staleTime:30*1e3,gcTime:300*1e3,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1},mutations:{retry:0}},dc=e=>e.split(`_`).join(` `),fc=()=>{let e=(0,b.c)(7),{toast:t}=Fo(),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:dc(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:dc(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},pc=({children:e})=>{let{onError:t,onSuccess:n}=fc(),r=(0,v.useRef)(null);if(!r.current){let e=new Gs({defaultOptions:uc,mutationCache:new Vs({onSuccess:n,onError:t,onSettled:(t,n,r,i,a)=>{a.meta?.invalidateQueries&&a.meta.invalidateQueries.forEach(t=>{e.invalidateQueries({queryKey:t})}),a.meta?.resetQueries&&a.meta.resetQueries.forEach(t=>{e.resetQueries({queryKey:t})})}})});r.current=e}return(0,T.jsx)(Js,{client:r.current,children:e})};typeof window<`u`&&window.document&&window.document.createElement;function mc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function hc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function gc(...e){return t=>{let n=!1,r=e.map(e=>{let r=hc(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():hc(e[t],null)}}}}function _c(...e){return v.useCallback(gc(...e),e)}function vc(e,t){let n=v.createContext(t),r=e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,T.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=v.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function yc(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,T.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=v.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=>v.createContext(e));return function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,bc(i,...t)]}function bc(...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 v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function xc(e){let t=Sc(e),n=v.forwardRef((e,n)=>{let{children:r,...i}=e,a=v.Children.toArray(r),o=a.find(wc);if(o){let e=o.props.children,r=a.map(t=>t===o?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t);return(0,T.jsx)(t,{...i,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return(0,T.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Sc(e){let t=v.forwardRef((e,t)=>{let{children:n,...r}=e;if(v.isValidElement(n)){let e=Ec(n),i=Tc(r,n.props);return n.type!==v.Fragment&&(i.ref=t?gc(t,e):e),v.cloneElement(n,i)}return v.Children.count(n)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cc=Symbol(`radix.slottable`);function wc(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Cc}function Tc(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 Ec(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 Dc(e){let t=e+`CollectionProvider`,[n,r]=yc(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=v.useRef(null),a=v.useRef(new Map).current;return(0,T.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=xc(s),l=v.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,T.jsx)(c,{ref:_c(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=xc(u),p=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),s=_c(t,o),c=a(u,n);return v.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,T.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return v.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 Oc=e(h(),1),W=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=xc(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,T.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function kc(e,t){e&&Oc.flushSync(()=>e.dispatchEvent(t))}function Ac(e){let t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...e)=>t.current?.(...e),[])}function jc(e,t=globalThis?.document){let n=Ac(e);v.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 Mc=`DismissableLayer`,Nc=`dismissableLayer.update`,Pc=`dismissableLayer.pointerDownOutside`,Fc=`dismissableLayer.focusOutside`,Ic,Lc=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rc=v.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=v.useContext(Lc),[u,d]=v.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=v.useState({}),m=_c(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),y=u?h.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=_,S=Vc(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=Hc(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return jc(e=>{y===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),v.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ic=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Uc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ic)}},[u,f,n,l]),v.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Uc())},[u,l]),v.useEffect(()=>{let e=()=>p({});return document.addEventListener(Nc,e),()=>document.removeEventListener(Nc,e)},[]),(0,T.jsx)(W.div,{...c,ref:m,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:mc(e.onFocusCapture,C.onFocusCapture),onBlurCapture:mc(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:mc(e.onPointerDownCapture,S.onPointerDownCapture)})});Rc.displayName=Mc;var zc=`DismissableLayerBranch`,Bc=v.forwardRef((e,t)=>{let n=v.useContext(Lc),r=v.useRef(null),i=_c(t,r);return v.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,T.jsx)(W.div,{...e,ref:i})});Bc.displayName=zc;function Vc(e,t=globalThis?.document){let n=Ac(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Wc(Pc,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 Hc(e,t=globalThis?.document){let n=Ac(e),r=v.useRef(!1);return v.useEffect(()=>{let e=e=>{e.target&&!r.current&&Wc(Fc,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 Uc(){let e=new CustomEvent(Nc);document.dispatchEvent(e)}function Wc(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?kc(i,a):i.dispatchEvent(a)}var Gc=Rc,Kc=Bc,qc=globalThis?.document?v.useLayoutEffect:()=>{},Jc=`Portal`,Yc=v.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=v.useState(!1);qc(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Oc.createPortal((0,T.jsx)(W.div,{...r,ref:t}),o):null});Yc.displayName=Jc;function Xc(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}var Zc=e=>{let{present:t,children:n}=e,r=Qc(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=_c(r.ref,el(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null};Zc.displayName=`Presence`;function Qc(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),[o,s]=Xc(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{let e=$c(r.current);a.current=o===`mounted`?e:`none`},[o]),qc(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=$c(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),qc(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=$c(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=$c(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:v.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function $c(e){return e?.animationName||`none`}function el(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 tl=v.useInsertionEffect||qc;function nl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=rl({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=v.useRef(e!==void 0);v.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,v.useCallback(t=>{if(s){let n=il(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function rl({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return tl(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function il(e){return typeof e==`function`}var al=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`}),ol=`VisuallyHidden`,sl=v.forwardRef((e,t)=>(0,T.jsx)(W.span,{...e,ref:t,style:{...al,...e.style}}));sl.displayName=ol;var cl=r({Action:()=>tu,Close:()=>nu,Description:()=>eu,Provider:()=>Xl,Root:()=>Ql,Title:()=>$l,Toast:()=>Al,ToastAction:()=>Bl,ToastClose:()=>G,ToastDescription:()=>Rl,ToastProvider:()=>_l,ToastTitle:()=>Il,ToastViewport:()=>Sl,Viewport:()=>Zl,createToastScope:()=>ml}),ll=`ToastProvider`,[ul,dl,fl]=Dc(`Toast`),[pl,ml]=yc(`Toast`,[fl]),[hl,gl]=pl(ll),_l=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=v.useState(null),[l,u]=v.useState(0),d=v.useRef(!1),f=v.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ll}\`. Expected non-empty \`string\`.`),(0,T.jsx)(ul.Provider,{scope:t,children:(0,T.jsx)(hl,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:v.useCallback(()=>u(e=>e+1),[]),onToastRemove:v.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};_l.displayName=ll;var vl=`ToastViewport`,yl=[`F8`],bl=`toast.viewportPause`,xl=`toast.viewportResume`,Sl=v.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=yl,label:i=`Notifications ({hotkey})`,...a}=e,o=gl(vl,n),s=dl(n),c=v.useRef(null),l=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=_c(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;v.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]),v.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(bl);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(xl);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=v.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 v.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,T.jsxs)(Kc,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,T.jsx)(wl,{ref:l,onFocusFromOutsideViewport:()=>{Yl(h({tabbingDirection:`forwards`}))}}),(0,T.jsx)(ul.Slot,{scope:n,children:(0,T.jsx)(W.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,T.jsx)(wl,{ref:u,onFocusFromOutsideViewport:()=>{Yl(h({tabbingDirection:`backwards`}))}})]})});Sl.displayName=vl;var Cl=`ToastFocusProxy`,wl=v.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=gl(Cl,n);return(0,T.jsx)(sl,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});wl.displayName=Cl;var Tl=`Toast`,El=`toast.swipeStart`,Dl=`toast.swipeMove`,Ol=`toast.swipeCancel`,kl=`toast.swipeEnd`,Al=v.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=nl({prop:r,defaultProp:i??!0,onChange:a,caller:Tl});return(0,T.jsx)(Zc,{present:n||s,children:(0,T.jsx)(Nl,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:Ac(e.onPause),onResume:Ac(e.onResume),onSwipeStart:mc(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:mc(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:mc(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:mc(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)})})})});Al.displayName=Tl;var[jl,Ml]=pl(Tl,{onClose(){}}),Nl=v.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=gl(Tl,n),[g,_]=v.useState(null),y=_c(t,e=>_(e)),b=v.useRef(null),x=v.useRef(null),S=i||h.duration,C=v.useRef(0),w=v.useRef(S),E=v.useRef(0),{onToastAdd:D,onToastRemove:O}=h,k=Ac(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),A=v.useCallback(e=>{!e||e===1/0||(window.clearTimeout(E.current),C.current=new Date().getTime(),E.current=window.setTimeout(k,e))},[k]);v.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{A(w.current),l?.()},n=()=>{let e=new Date().getTime()-C.current;w.current-=e,window.clearTimeout(E.current),c?.()};return e.addEventListener(bl,n),e.addEventListener(xl,t),()=>{e.removeEventListener(bl,n),e.removeEventListener(xl,t)}}},[h.viewport,S,c,l,A]),v.useEffect(()=>{a&&!h.isClosePausedRef.current&&A(S)},[a,S,h.isClosePausedRef,A]),v.useEffect(()=>(D(),()=>O()),[D,O]);let j=v.useMemo(()=>g?Ul(g):null,[g]);return h.viewport?(0,T.jsxs)(T.Fragment,{children:[j&&(0,T.jsx)(Pl,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:j}),(0,T.jsx)(jl,{scope:n,onClose:k,children:Oc.createPortal((0,T.jsx)(ul.ItemSlot,{scope:n,children:(0,T.jsx)(Gc,{asChild:!0,onEscapeKeyDown:mc(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||k(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,T.jsx)(W.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:y,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:mc(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:mc(e.onPointerDown,e=>{e.button===0&&(b.current={x:e.clientX,y:e.clientY})}),onPointerMove:mc(e.onPointerMove,e=>{if(!b.current)return;let t=e.clientX-b.current.x,n=e.clientY-b.current.y,r=!!x.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?(x.current=l,Wl(Dl,d,f,{discrete:!1})):Gl(l,h.swipeDirection,c)?(x.current=l,Wl(El,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(b.current=null)}),onPointerUp:mc(e.onPointerUp,e=>{let t=x.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),x.current=null,b.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Gl(t,h.swipeDirection,h.swipeThreshold)?Wl(kl,p,r,{discrete:!0}):Wl(Ol,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Pl=e=>{let{__scopeToast:t,children:n,...r}=e,i=gl(Tl,t),[a,o]=v.useState(!1),[s,c]=v.useState(!1);return Kl(()=>o(!0)),v.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,T.jsx)(Yc,{asChild:!0,children:(0,T.jsx)(sl,{...r,children:a&&(0,T.jsxs)(T.Fragment,{children:[i.label,` `,n]})})})},Fl=`ToastTitle`,Il=v.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,T.jsx)(W.div,{...r,ref:t})});Il.displayName=Fl;var Ll=`ToastDescription`,Rl=v.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,T.jsx)(W.div,{...r,ref:t})});Rl.displayName=Ll;var zl=`ToastAction`,Bl=v.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,T.jsx)(Hl,{altText:n,asChild:!0,children:(0,T.jsx)(G,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${zl}\`. Expected non-empty \`string\`.`),null)});Bl.displayName=zl;var Vl=`ToastClose`,G=v.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=Ml(Vl,n);return(0,T.jsx)(Hl,{asChild:!0,children:(0,T.jsx)(W.button,{type:`button`,...r,ref:t,onClick:mc(e.onClick,i.onClose)})})});G.displayName=Vl;var Hl=v.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,T.jsx)(W.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?kc(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=Ac(e);qc(()=>{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=_l,Zl=Sl,Ql=Al,$l=Il,eu=Rl,tu=Bl,nu=G,ru=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,iu=s,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,v.createContext)({}),pu=()=>(0,v.useContext)(fu),mu=(0,v.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,v.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,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),hu=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},i)=>(0,v.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-diagonal`,[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]),Nu=hu(`move-right`,[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]),Pu=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`}]]),Fu=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`}]]),Iu=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`}]]),Lu=hu(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ru=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`}]]),zu=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`}]]),Bu=hu(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Vu=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`}]]),Hu=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`}]]),Uu=hu(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Wu=cl,Gu=({className:e,...t})=>(0,T.jsx)(Zl,{className:l(`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}),Ku=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-md p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none`,{variants:{variant:{error:`bg-error/40 text-text`,success:`bg-success/30 text-text`,default:`bg-card/80 text-text`}},defaultVariants:{variant:`default`}}),qu=({className:e,variant:t,...n})=>(0,T.jsx)(Ql,{className:l(Ku({variant:t}),e),...n}),Ju=({className:e,...t})=>(0,T.jsx)(nu,{className:l(`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,T.jsx)(Uu,{className:`size-5`})}),Yu=({className:e,...t})=>(0,T.jsx)($l,{className:l(`font-semibold text-sm [&+div]:text-xs`,e),...t}),Xu=({className:e,...t})=>(0,T.jsx)(eu,{className:l(`text-sm opacity-90`,e),...t}),Zu=()=>{let e=(0,b.c)(2),{toasts:t}=Fo(),n;return e[0]===t?n=e[1]:(n=(0,T.jsxs)(Wu.Provider,{children:[t.map(Qu),(0,T.jsx)(Gu,{})]}),e[0]=t,e[1]=n),n};function Qu(e){let{id:t,title:n,description:r,action:i,...a}=e;return(0,T.jsxs)(qu,{...a,children:[(0,T.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,T.jsx)(Yu,{children:n}),r&&(0,T.jsx)(Xu,{children:r})]}),i,(0,T.jsx)(Ju,{})]},t)}var $u=(0,v.createContext)({});function ed(e){let t=(0,v.useRef)(null);return t.current===null&&(t.current=e()),t.current}var td=typeof window<`u`?v.useLayoutEffect:v.useEffect,nd=(0,v.createContext)(null);function rd(e,t){e.indexOf(t)===-1&&e.push(t)}function id(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var ad=(e,t,n)=>n>t?t:n<e?e:n,od={},sd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function cd(e){return typeof e==`object`&&!!e}var ld=e=>/^0[^.\s]+$/u.test(e);function ud(e){let t;return()=>(t===void 0&&(t=e()),t)}var dd=e=>e,fd=(e,t)=>n=>t(e(n)),pd=(...e)=>e.reduce(fd),md=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},hd=class{constructor(){this.subscriptions=[]}add(e){return rd(this.subscriptions,e),()=>id(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}},gd=e=>e*1e3,_d=e=>e/1e3;function vd(e,t){return t?1e3/t*e:0}var yd=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bd=1e-7,xd=12;function Sd(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=yd(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>bd&&++s<xd);return o}function Cd(e,t,n,r){if(e===t&&n===r)return dd;let i=t=>Sd(t,0,1,e,n);return e=>e===0||e===1?e:yd(i(e),t,r)}var wd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Td=e=>t=>1-e(1-t),Ed=Cd(.33,1.53,.69,.99),Dd=Td(Ed),Od=wd(Dd),kd=e=>e>=1?1:(e*=2)<1?.5*Dd(e):.5*(2-2**(-10*(e-1))),Ad=e=>1-Math.sin(Math.acos(e)),jd=Td(Ad),Md=wd(Ad),Nd=Cd(.42,0,1,1),Pd=Cd(0,0,.58,1),Fd=Cd(.42,0,.58,1),Id=e=>Array.isArray(e)&&typeof e[0]!=`number`,Ld=e=>Array.isArray(e)&&typeof e[0]==`number`,Rd={linear:dd,easeIn:Nd,easeInOut:Fd,easeOut:Pd,circIn:Ad,circInOut:Md,circOut:jd,backIn:Dd,backInOut:Od,backOut:Ed,anticipate:kd},zd=e=>typeof e==`string`,Bd=e=>{if(Ld(e)){e.length;let[t,n,r,i]=e;return Cd(t,n,r,i)}else if(zd(e))return Rd[e],`${e}`,Rd[e];return e},Vd=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Hd={value:null,addProjectionMetrics:null};function Ud(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&&Hd.value&&Hd.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Wd=40;function Gd(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Vd.reduce((e,n)=>(e[n]=Ud(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=od.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Wd),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:Vd.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<Vd.length;t++)o[Vd[t]].cancel(e)},state:i,steps:o}}var{schedule:Kd,cancel:qd,state:Jd,steps:Yd}=Gd(typeof requestAnimationFrame<`u`?requestAnimationFrame:dd,!0),Xd;function Zd(){Xd=void 0}var Qd={now:()=>(Xd===void 0&&Qd.set(Jd.isProcessing||od.useManualTiming?Jd.timestamp:performance.now()),Xd),set:e=>{Xd=e,queueMicrotask(Zd)}},$d={layout:0,mainThread:0,waapi:0},ef=e=>t=>typeof t==`string`&&t.startsWith(e),tf=ef(`--`),nf=ef(`var(--`),rf=e=>nf(e)?af.test(e.split(`/*`)[0].trim()):!1,af=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function of(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var sf={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},cf={...sf,transform:e=>ad(0,1,e)},lf={...sf,default:1},uf=e=>Math.round(e*1e5)/1e5,df=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ff(e){return e==null}var pf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mf=(e,t)=>n=>!!(typeof n==`string`&&pf.test(n)&&n.startsWith(e)||t&&!ff(n)&&Object.prototype.hasOwnProperty.call(n,t)),hf=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(df);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},gf=e=>ad(0,255,e),_f={...sf,transform:e=>Math.round(gf(e))},vf={test:mf(`rgb`,`red`),parse:hf(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+_f.transform(e)+`, `+_f.transform(t)+`, `+_f.transform(n)+`, `+uf(cf.transform(r))+`)`};function yf(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 bf={test:mf(`#`),parse:yf,transform:vf.transform},xf=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sf=xf(`deg`),Cf=xf(`%`),K=xf(`px`),wf=xf(`vh`),Tf=xf(`vw`),Ef={...Cf,parse:e=>Cf.parse(e)/100,transform:e=>Cf.transform(e*100)},Df={test:mf(`hsl`,`hue`),parse:hf(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Cf.transform(uf(t))+`, `+Cf.transform(uf(n))+`, `+uf(cf.transform(r))+`)`},Of={test:e=>vf.test(e)||bf.test(e)||Df.test(e),parse:e=>vf.test(e)?vf.parse(e):Df.test(e)?Df.parse(e):bf.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?vf.transform(e):Df.transform(e),getAnimatableNone:e=>{let t=Of.parse(e);return t.alpha=0,Of.transform(t)}},kf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Af(e){return isNaN(e)&&typeof e==`string`&&(e.match(df)?.length||0)+(e.match(kf)?.length||0)>0}var jf=`number`,Mf=`color`,Nf=`var`,Pf=`var(`,Ff="${}",If=/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 Lf(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(If,e=>(Of.test(e)?(r.color.push(a),i.push(Mf),n.push(Of.parse(e))):e.startsWith(Pf)?(r.var.push(a),i.push(Nf),n.push(e)):(r.number.push(a),i.push(jf),n.push(parseFloat(e))),++a,Ff)).split(Ff),indexes:r,types:i}}function Rf(e){return Lf(e).values}function zf({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===jf?i+=uf(r[a]):e===Mf?i+=Of.transform(r[a]):i+=r[a]}return i}}function Bf(e){return zf(Lf(e))}var Vf=e=>typeof e==`number`?0:Of.test(e)?Of.getAnimatableNone(e):e,Hf=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Vf(e);function Uf(e){let t=Lf(e);return zf(t)(t.values.map((e,n)=>Hf(e,t.split[n])))}var Wf={test:Af,parse:Rf,createTransformer:Bf,getAnimatableNone:Uf};function Gf(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 Kf({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=Gf(s,r,e+1/3),a=Gf(s,r,e),o=Gf(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function qf(e,t){return n=>n>0?t:e}var Jf=(e,t,n)=>e+(t-e)*n,Yf=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Xf=[bf,vf,Df],Zf=e=>Xf.find(t=>t.test(e));function Qf(e){let t=Zf(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Df&&(n=Kf(n)),n}var $f=(e,t)=>{let n=Qf(e),r=Qf(t);if(!n||!r)return qf(e,t);let i={...n};return e=>(i.red=Yf(n.red,r.red,e),i.green=Yf(n.green,r.green,e),i.blue=Yf(n.blue,r.blue,e),i.alpha=Jf(n.alpha,r.alpha,e),vf.transform(i))},ep=new Set([`none`,`hidden`]);function tp(e,t){return ep.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function np(e,t){return n=>Jf(e,t,n)}function rp(e){return typeof e==`number`?np:typeof e==`string`?rf(e)?qf:Of.test(e)?$f:sp:Array.isArray(e)?ip:typeof e==`object`?Of.test(e)?$f:ap:qf}function ip(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>rp(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function ap(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=rp(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function op(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 sp=(e,t)=>{let n=Wf.createTransformer(t),r=Lf(e),i=Lf(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?ep.has(e)&&!i.values.length||ep.has(t)&&!r.values.length?tp(e,t):pd(ip(op(r,i),i.values),n):(`${e}${t}`,qf(e,t))};function cp(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Jf(e,t,n):rp(e)(e,t)}var lp=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Kd.update(t,e),stop:()=>qd(t),now:()=>Jd.isProcessing?Jd.timestamp:Qd.now()}},up=(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)})`},dp=2e4;function fp(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 pp(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(fp(r),dp);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:_d(i)}}var mp={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 hp(e,t){return e*Math.sqrt(1-t*t)}var gp=12;function _p(e,t,n){let r=n;for(let n=1;n<gp;n++)r-=e(r)/t(r);return r}var vp=.001;function yp({duration:e=mp.duration,bounce:t=mp.bounce,velocity:n=mp.velocity,mass:r=mp.mass}){let i,a;mp.maxDuration;let o=1-t;o=ad(mp.minDamping,mp.maxDamping,o),e=ad(mp.minDuration,mp.maxDuration,_d(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=hp(t,o),c=Math.exp(-i);return vp-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=hp(t**2,o);return(-i(t)+vp>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-vp+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=_p(i,a,s);if(e=gd(e),isNaN(c))return{stiffness:mp.stiffness,damping:mp.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var bp=[`duration`,`bounce`],xp=[`stiffness`,`damping`,`mass`];function Sp(e,t){return t.some(t=>e[t]!==void 0)}function Cp(e){let t={velocity:mp.velocity,stiffness:mp.stiffness,damping:mp.damping,mass:mp.mass,isResolvedFromDuration:!1,...e};if(!Sp(e,xp)&&Sp(e,bp))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ad(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:mp.mass,stiffness:i,damping:a}}else{let n=yp({...e,velocity:0});t={...t,...n,mass:mp.mass},t.isResolvedFromDuration=!0}return t}function wp(e=mp.visualDuration,t=mp.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}=Cp({...n,velocity:-_d(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=_d(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?mp.restSpeed.granular:mp.restSpeed.default,i||=v?mp.restDelta.granular:mp.restDelta.default;let y,b,x,S,C,w;if(h<1)x=hp(_,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=>gd(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=gd(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=gd(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(fp(T),dp),t=up(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}wp.applyToOptions=e=>{let t=pp(e,100,wp);return e.ease=t.ease,e.duration=gd(t.duration),e.type=`keyframes`,e};var Tp=5;function Ep(e,t,n){let r=Math.max(t-Tp,0);return vd(n-e(r),t-r)}function Dp({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=wp({keyframes:[f.value,m(f.value)],velocity:Ep(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 Op(e,t,n){let r=[],i=n||od.mix||cp,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=pd(Array.isArray(t)?t[n]||dd:t,a)),r.push(a)}return r}function kp(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=Op(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=md(e[r],e[r+1],n);return s[r](i)};return n?t=>l(ad(e[0],e[a-1],t)):l}function Ap(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=md(0,t,r);e.push(Jf(n,1,i))}}function jp(e){let t=[0];return Ap(t,e.length-1),t}function Mp(e,t){return e.map(e=>e*t)}function Np(e,t){return e.map(()=>t||Fd).splice(0,e.length-1)}function Pp({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Id(r)?r.map(Bd):Bd(r),a={done:!1,value:t[0]},o=kp(Mp(n&&n.length===t.length?n:jp(t),e),t,{ease:Array.isArray(i)?i:Np(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Fp=e=>e!==null;function Ip(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Fp),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Lp={decay:Dp,inertia:Dp,tween:Pp,keyframes:Pp,spring:wp};function Rp(e){typeof e.type==`string`&&(e.type=Lp[e.type])}var zp=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)}},Bp=e=>e/100,Vp=class extends zp{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!==Qd.now()&&this.tick(Qd.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},$d.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Rp(e);let{type:t=Pp,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Pp;s!==Pp&&typeof o[0]!=`number`&&(this.mixKeyframes=pd(Bp,cp(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=fp(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=ad(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!==Dp&&(b.value=Ip(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 _d(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+_d(e)}get time(){return _d(this.currentTime)}set time(e){e=gd(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 Ep(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(Qd.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=_d(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=lp,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(Qd.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,$d.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 Hp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Up=e=>e*180/Math.PI,Wp=e=>Kp(Up(Math.atan2(e[1],e[0]))),Gp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wp,rotateZ:Wp,skewX:e=>Up(Math.atan(e[1])),skewY:e=>Up(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Kp=e=>(e%=360,e<0&&(e+=360),e),qp=Wp,Jp=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Jp,scaleY:Yp,scale:e=>(Jp(e)+Yp(e))/2,rotateX:e=>Kp(Up(Math.atan2(e[6],e[5]))),rotateY:e=>Kp(Up(Math.atan2(-e[2],e[0]))),rotateZ:qp,rotate:qp,skewX:e=>Up(Math.atan(e[4])),skewY:e=>Up(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zp(e){return+!!e.includes(`scale`)}function Qp(e,t){if(!e||e===`none`)return Zp(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Xp,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Gp,i=t}if(!i)return Zp(t);let a=r[t],o=i[1].split(`,`).map(em);return typeof a==`function`?a(o):o[a]}var $p=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Qp(n,t)};function em(e){return parseFloat(e.trim())}var tm=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],nm=new Set(tm),rm=e=>e===sf||e===K,im=new Set([`x`,`y`,`z`]),am=tm.filter(e=>!im.has(e));function om(e){let t=[];return am.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var sm={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})=>Qp(t,`x`),y:(e,{transform:t})=>Qp(t,`y`)};sm.translateX=sm.x,sm.translateY=sm.y;var cm=new Set,lm=!1,um=!1,dm=!1;function fm(){if(um){let e=Array.from(cm).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=om(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)})}um=!1,lm=!1,cm.forEach(e=>e.complete(dm)),cm.clear()}function pm(){cm.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(um=!0)})}function mm(){dm=!0,pm(),fm(),dm=!1}var hm=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?(cm.add(this),lm||(lm=!0,Kd.read(pm),Kd.resolveKeyframes(fm))):(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])}Hp(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),cm.delete(this)}cancel(){this.state===`scheduled`&&(cm.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},gm=e=>e.startsWith(`--`);function _m(e,t,n){gm(t)?e.style.setProperty(t,n):e.style[t]=n}var vm={};function ym(e,t){let n=ud(e);return()=>vm[t]??n()}var bm=ym(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),xm=ym(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Sm=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Cm={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Sm([0,.65,.55,1]),circOut:Sm([.55,0,1,.45]),backIn:Sm([.31,.01,.66,-.59]),backOut:Sm([.33,1.53,.69,.99])};function wm(e,t){if(e)return typeof e==`function`?xm()?up(e,t):`ease-out`:Ld(e)?Sm(e):Array.isArray(e)?e.map(e=>wm(e,t)||Cm.easeOut):Cm[e]}function Tm(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=wm(s,i);Array.isArray(d)&&(u.easing=d),Hd.value&&$d.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 Hd.value&&p.finished.finally(()=>{$d.waapi--}),p}function Em(e){return typeof e==`function`&&`applyToOptions`in e}function Dm({type:e,...t}){return Em(e)&&xm()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Om=class extends zp{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=Dm(e);this.animation=Tm(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Ip(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),_m(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 _d(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+_d(e)}get time(){return _d(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=gd(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&&bm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),dd):r(this)}},km={anticipate:kd,backInOut:Od,circInOut:Md};function Am(e){return e in km}function jm(e){typeof e.ease==`string`&&Am(e.ease)&&(e.ease=km[e.ease])}var Mm=10,Nm=class extends Om{constructor(e){jm(e),Rp(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 Vp({...a,autoplay:!1}),s=Math.max(Mm,Qd.now()-this.startTime),c=ad(0,Mm,s-Mm),l=o.sample(s).value,{name:u}=this.options;i&&u&&_m(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Pm=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Wf.test(e)||e===`0`)&&!e.startsWith(`url(`));function Fm(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 Im(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=Pm(i,t),s=Pm(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Fm(e)||(n===`spring`||Em(n))&&r}function Lm(e){e.duration=0,e.type=`keyframes`}var Rm=new Set([`opacity`,`clipPath`,`filter`,`transform`]),zm=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Bm(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&zm.test(e[t]))return!0;return!1}var Vm=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Hm=ud(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Um(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 Hm()&&n&&(Rm.has(n)||Vm.has(n)&&Bm(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Wm=40,Gm=class extends zp{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=Qd.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||hm)(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=Qd.now();let u=!0;Im(e,i,a,o)||(u=!1,(od.instantAnimations||!s)&&l?.(Ip(e,n,t)),e[0]=e[e.length-1],Lm(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Wm?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Um(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Nm({...d,element:p})}catch{m=new Vp(d)}else m=new Vp(d);m.finished.then(()=>{this.notifyFinished()}).catch(dd),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(),mm()),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 Km(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 qm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jm(e){let t=qm.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ym(e,t,n=1){`${e}`;let[r,i]=Jm(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return sd(e)?parseFloat(e):e}return rf(i)?Ym(i,t,n+1):i}var Xm={type:`spring`,stiffness:500,damping:25,restSpeed:10},Zm=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qm={type:`keyframes`,duration:.8},$m={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},eh=(e,{keyframes:t})=>t.length>2?Qm:nm.has(e)?e.startsWith(`scale`)?Zm(t[1]):Xm:$m;function th(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function nh(e,t){let n=e?.[t]??e?.default??e;return n===e?n:th(n,e)}var rh=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function ih(e){for(let t in e)if(!rh.has(t))return!0;return!1}var ah=(e,t,n,r={},i,a)=>o=>{let s=nh(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=gd(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};ih(s)||Object.assign(u,eh(e,u)),u.duration&&=gd(u.duration),u.repeatDelay&&=gd(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Lm(u),u.delay===0&&(d=!0)),(od.instantAnimations||od.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Lm(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Ip(u.keyframes,s);if(e!==void 0){Kd.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Vp(u):new Gm(u)};function oh(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function sh(e,t,n,r){if(typeof t==`function`){let[i,a]=oh(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]=oh(r);t=t(n===void 0?e.custom:n,i,a)}return t}function ch(e,t,n){let r=e.getProps();return sh(r,t,n===void 0?r.custom:n,e)}var lh=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...tm]),uh=30,dh=e=>!isNaN(parseFloat(e)),fh={current:void 0},ph=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Qd.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=Qd.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=dh(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 hd);let n=this.events[e].add(t);return e===`change`?()=>{n(),Kd.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 fh.current&&fh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Qd.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>uh)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,uh);return vd(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 mh(e,t){return new ph(e,t)}var hh=e=>Array.isArray(e);function gh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,mh(n))}function _h(e){return hh(e)?e[e.length-1]||0:e}function vh(e,t){let{transitionEnd:n={},transition:r={},...i}=ch(e,t)||{};i={...i,...n};for(let t in i)gh(e,t,_h(i[t]))}var yh=e=>!!(e&&e.getVelocity);function bh(e){return!!(yh(e)&&e.add)}function xh(e,t){let n=e.getValue(`willChange`);if(bh(n))return n.add(t);if(!n&&od.WillChange){let n=new od.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Sh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ch=`data-`+Sh(`framerAppearId`);function wh(e){return e.props[Ch]}function Th({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Eh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?th(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=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||d&&Th(d,t))continue;let o={delay:n,...nh(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Kd.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=wh(e);if(n){let e=window.MotionHandoffAnimation(n,t,Kd);e!==null&&(o.startTime=e,f=!0)}}xh(e,t);let p=l??e.shouldReduceMotion;r.start(ah(t,r,i,p&&lh.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>Kd.update(()=>{o&&vh(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Dh(e,t,n={}){let r=ch(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(Eh(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Oh(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 Oh(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(Dh(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Km(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function kh(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Dh(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Dh(e,t,n);else{let i=typeof t==`function`?ch(e,t,n.custom):t;r=Promise.all(Eh(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Ah={test:e=>e===`auto`,parse:e=>e},jh=e=>t=>t.test(e),Mh=[sf,K,Cf,Sf,Tf,wf,Ah],Nh=e=>Mh.find(jh(e));function Ph(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ld(e)}var Fh=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Ih(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(df)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Fh.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Lh=/\b([a-z-]*)\(.*?\)/gu,Rh={...Wf,getAnimatableNone:e=>{let t=e.match(Lh);return t?t.map(Ih).join(` `):e}},zh={...Wf,getAnimatableNone:e=>{let t=Wf.parse(e);return Wf.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Bh={...sf,transform:Math.round},Vh={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:Sf,rotateX:Sf,rotateY:Sf,rotateZ:Sf,scale:lf,scaleX:lf,scaleY:lf,scaleZ:lf,skew:Sf,skewX:Sf,skewY:Sf,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:cf,originX:Ef,originY:Ef,originZ:K,zIndex:Bh,fillOpacity:cf,strokeOpacity:cf,numOctaves:Bh},Hh={...Vh,color:Of,backgroundColor:Of,outlineColor:Of,fill:Of,stroke:Of,borderColor:Of,borderTopColor:Of,borderRightColor:Of,borderBottomColor:Of,borderLeftColor:Of,filter:Rh,WebkitFilter:Rh,mask:zh,WebkitMask:zh},Uh=e=>Hh[e],Wh=new Set([Rh,zh]);function Gh(e,t){let n=Uh(e);return Wh.has(n)||(n=Wf),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Kh=new Set([`auto`,`none`,`0`]);function qh(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Kh.has(t)&&Lf(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Gh(n,i)}var Jh=class extends hm{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(),rf(r))){let i=Ym(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!lh.has(n)||e.length!==2)return;let[r,i]=e,a=Nh(r),o=Nh(i);if(of(r)!==of(i)&&sm[n]){this.needsMeasurement=!0;return}if(a!==o)if(rm(a)&&rm(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else sm[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Ph(e[t]))&&n.push(t);n.length&&qh(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=sm[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]=sm[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 Yh(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 Xh=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Zh(e){return cd(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Qh,cancel:$h}=Gd(queueMicrotask,!1),eg={x:!1,y:!1};function tg(){return eg.x||eg.y}function ng(e){return e===`x`||e===`y`?eg[e]?null:(eg[e]=!0,()=>{eg[e]=!1}):eg.x||eg.y?null:(eg.x=eg.y=!0,()=>{eg.x=eg.y=!1})}function rg(e,t){let n=Yh(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ig(e){return!(e.pointerType===`touch`||tg())}function ag(e,t,n={}){let[r,i,a]=rg(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(!ig(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 og=(e,t)=>t?e===t?!0:og(e,t.parentElement):!1,sg=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,cg=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function lg(e){return cg.has(e.tagName)||e.isContentEditable===!0}var ug=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function dg(e){return ug.has(e.tagName)||e.isContentEditable===!0}var fg=new WeakSet;function pg(e){return t=>{t.key===`Enter`&&e(t)}}function mg(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var hg=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=pg(()=>{if(fg.has(n))return;mg(n,`down`);let e=pg(()=>{mg(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>mg(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function gg(e){return sg(e)&&!tg()}var _g=new WeakSet;function vg(e,t,n={}){let[r,i,a]=rg(e,n),o=e=>{let r=e.currentTarget;if(!gg(e)||_g.has(e))return;fg.add(r),n.stopPropagation&&_g.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),fg.has(r)&&fg.delete(r),gg(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||og(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),Zh(e)&&(e.addEventListener(`focus`,e=>hg(e,i)),!lg(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function yg(e){return cd(e)&&`ownerSVGElement`in e}var bg=new WeakMap,xg,Sg=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:yg(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Cg=Sg(`inline`,`width`,`offsetWidth`),wg=Sg(`block`,`height`,`offsetHeight`);function Tg({target:e,borderBoxSize:t}){bg.get(e)?.forEach(n=>{n(e,{get width(){return Cg(e,t)},get height(){return wg(e,t)}})})}function Eg(e){e.forEach(Tg)}function Dg(){typeof ResizeObserver>`u`||(xg=new ResizeObserver(Eg))}function Og(e,t){xg||Dg();let n=Yh(e);return n.forEach(e=>{let n=bg.get(e);n||(n=new Set,bg.set(e,n)),n.add(t),xg?.observe(e)}),()=>{n.forEach(e=>{let n=bg.get(e);n?.delete(t),n?.size||xg?.unobserve(e)})}}var kg=new Set,Ag;function jg(){Ag=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};kg.forEach(t=>t(e))},window.addEventListener(`resize`,Ag)}function Mg(e){return kg.add(e),Ag||jg(),()=>{kg.delete(e),!kg.size&&typeof Ag==`function`&&(window.removeEventListener(`resize`,Ag),Ag=void 0)}}function Ng(e,t){return typeof e==`function`?Mg(e):Og(e,t)}function Pg(e){return yg(e)&&e.tagName===`svg`}var Fg=[...Mh,Of,Wf],Ig=e=>Fg.find(jh(e)),Lg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rg=()=>({x:Lg(),y:Lg()}),zg=()=>({min:0,max:0}),Bg=()=>({x:zg(),y:zg()}),Vg=new WeakMap;function Hg(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Ug(e){return typeof e==`string`||Array.isArray(e)}var Wg=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Gg=[`initial`,...Wg];function Kg(e){return Hg(e.animate)||Gg.some(t=>Ug(e[t]))}function qg(e){return!!(Kg(e)||e.variants)}function Jg(e,t,n){for(let r in t){let i=t[r],a=n[r];if(yh(i))e.addValue(r,i);else if(yh(a))e.addValue(r,mh(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,mh(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Yg={current:null},Xg={current:!1},Zg=typeof window<`u`;function Qg(){if(Xg.current=!0,Zg)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Yg.current=e.matches;e.addEventListener(`change`,t),t()}else Yg.current=!1}var $g=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],e_={};function t_(e){e_=e}function n_(){return e_}var r_=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=hm,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=Qd.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Kd.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=Kg(t),this.isVariantNode=qg(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&&yh(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,Vg.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:(Xg.current||Qg(),this.shouldReduceMotion=Yg.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(),qd(this.notifyUpdate),qd(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&&Rm.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Om({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:gd(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=nm.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Kd.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(),t.owner&&t.stop()})}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 e_){let t=e_[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):Bg()}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<$g.length;t++){let n=$g[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=Jg(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=mh(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`&&(sd(n)||ld(n))?n=parseFloat(n):!Ig(n)&&Wf.test(t)&&(n=Gh(e,t)),this.setBaseTarget(e,yh(n)?n.get():n)),yh(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=sh(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&&!yh(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 hd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Qh.render(this.render)}},i_=class extends r_{constructor(){super(...arguments),this.KeyframeResolver=Jh}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;yh(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},a_=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function o_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function s_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function c_(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 l_(e){return e===void 0||e===1}function u_({scale:e,scaleX:t,scaleY:n}){return!l_(e)||!l_(t)||!l_(n)}function d_(e){return u_(e)||f_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f_(e){return p_(e.x)||p_(e.y)}function p_(e){return e&&e!==`0%`}function m_(e,t,n){return n+t*(e-n)}function h_(e,t,n,r,i){return i!==void 0&&(e=m_(e,i,r)),m_(e,n,r)+t}function g_(e,t=0,n=1,r,i){e.min=h_(e.min,t,n,r,i),e.max=h_(e.max,t,n,r,i)}function __(e,{x:t,y:n}){g_(e.x,t.translate,t.scale,t.originPoint),g_(e.y,n.translate,n.scale,n.originPoint)}var v_=.999999999999,y_=1.0000000000001;function b_(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&&(x_(e.x,-a.scroll.offset.x),x_(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,__(e,o)),r&&d_(a.latestValues)&&w_(e,a.latestValues,a.layout?.layoutBox))}t.x<y_&&t.x>v_&&(t.x=1),t.y<y_&&t.y>v_&&(t.y=1)}function x_(e,t){e.min+=t,e.max+=t}function S_(e,t,n,r,i=.5){g_(e,t,n,Jf(e.min,e.max,i),r)}function C_(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function w_(e,t,n){let r=n??e;S_(e.x,C_(t.x,r.x),t.scaleX,t.scale,t.originX),S_(e.y,C_(t.y,r.y),t.scaleY,t.scale,t.originY)}function T_(e,t){return o_(c_(e.getBoundingClientRect(),t))}function E_(e,t,n){let r=T_(e,n),{scroll:i}=t;return i&&(x_(r.x,i.offset.x),x_(r.y,i.offset.y)),r}var D_={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},O_=tm.length;function k_(e,t,n){let r=``,i=!0;for(let a=0;a<O_;a++){let o=tm[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=Xh(s,Vh[o]);if(!c){i=!1;let t=D_[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function A_(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(nm.has(e)){o=!0;continue}else if(tf(e)){i[e]=n;continue}else{let t=Xh(n,Vh[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=k_(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 j_(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 M_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var N_={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(K.test(e))e=parseFloat(e);else return e;return`${M_(e,t.target.x)}% ${M_(e,t.target.y)}%`}},P_={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Wf.parse(e);if(i.length>5)return r;let a=Wf.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=Jf(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},F_={borderRadius:{...N_,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:N_,borderTopRightRadius:N_,borderBottomLeftRadius:N_,borderBottomRightRadius:N_,boxShadow:P_};function I_(e,{layout:t,layoutId:n}){return nm.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!F_[e]||e===`opacity`)}function L_(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(yh(r[t])||i&&yh(i[t])||I_(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function R_(e){return window.getComputedStyle(e)}var z_=class extends i_{constructor(){super(...arguments),this.type=`html`,this.renderInstance=j_}readValueFromInstance(e,t){if(nm.has(t))return this.projection?.isProjecting?Zp(t):$p(e,t);{let n=R_(e),r=(tf(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return T_(e,t)}build(e,t,n){A_(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return L_(e,t,n)}},B_={offset:`stroke-dashoffset`,array:`stroke-dasharray`},V_={offset:`strokeDashoffset`,array:`strokeDasharray`};function H_(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?B_:V_;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var U_=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function W_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(A_(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 U_)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&&H_(d,i,a,o,!1)}var G_=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`]),K_=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function q_(e,t,n,r){j_(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(G_.has(n)?n:Sh(n),t.attrs[n])}function J_(e,t,n){let r=L_(e,t,n);for(let n in e)if(yh(e[n])||yh(t[n])){let t=tm.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Y_=class extends i_{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Bg}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(nm.has(t)){let e=Uh(t);return e&&e.default||0}return t=G_.has(t)?t:Sh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return J_(e,t,n)}build(e,t,n){W_(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){q_(e,t,n,r)}mount(e){this.isSVGTag=K_(e.tagName),super.mount(e)}},X_=Gg.length;function Z_(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Z_(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<X_;n++){let r=Gg[n],i=e.props[r];(Ug(i)||i===!1)&&(t[r]=i)}return t}function Q_(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 $_=[...Wg].reverse(),ev=Wg.length;function tv(e){return t=>Promise.all(t.map(({animation:t,options:n})=>kh(e,t,n)))}function nv(e){let t=tv(e),n=av(),r=!0,i=!1,a=t=>(n,r)=>{let i=ch(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=Z_(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<ev;t++){let p=$_[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Ug(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||Hg(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=rv(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=hh(t)&&hh(n)?!Q_(t,n):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=ch(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Km(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=ch(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=av(),i=!0}}}function rv(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Q_(t,e):!1}function iv(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function av(){return{animate:iv(!0),whileInView:iv(),whileHover:iv(),whileTap:iv(),whileDrag:iv(),whileFocus:iv(),exit:iv()}}function ov(e,t){e.min=t.min,e.max=t.max}function sv(e,t){ov(e.x,t.x),ov(e.y,t.y)}function cv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var lv=1e-4,uv=1-lv,dv=1+lv,fv=.01,pv=0-fv,mv=0+fv;function hv(e){return e.max-e.min}function gv(e,t,n){return Math.abs(e-t)<=n}function _v(e,t,n,r=.5){e.origin=r,e.originPoint=Jf(t.min,t.max,e.origin),e.scale=hv(n)/hv(t),e.translate=Jf(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uv&&e.scale<=dv||isNaN(e.scale))&&(e.scale=1),(e.translate>=pv&&e.translate<=mv||isNaN(e.translate))&&(e.translate=0)}function vv(e,t,n,r){_v(e.x,t.x,n.x,r?r.originX:void 0),_v(e.y,t.y,n.y,r?r.originY:void 0)}function yv(e,t,n,r=0){e.min=(r?Jf(n.min,n.max,r):n.min)+t.min,e.max=e.min+hv(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=0){let i=r?Jf(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+hv(t)}function Sv(e,t,n,r){xv(e.x,t.x,n.x,r?.x),xv(e.y,t.y,n.y,r?.y)}function Cv(e,t,n,r,i){return e-=t,e=m_(e,1/n,r),i!==void 0&&(e=m_(e,1/i,r)),e}function wv(e,t=0,n=1,r=.5,i,a=e,o=e){if(Cf.test(t)&&(t=parseFloat(t),t=Jf(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Jf(a.min,a.max,r);e===a&&(s-=t),e.min=Cv(e.min,t,n,s,i),e.max=Cv(e.max,t,n,s,i)}function Tv(e,t,[n,r,i],a,o){wv(e,t[n],t[r],t[i],t.scale,a,o)}var Ev=[`x`,`scaleX`,`originX`],Dv=[`y`,`scaleY`,`originY`];function Ov(e,t,n,r){Tv(e.x,t,Ev,n?n.x:void 0,r?r.x:void 0),Tv(e.y,t,Dv,n?n.y:void 0,r?r.y:void 0)}function kv(e){return e.translate===0&&e.scale===1}function Av(e){return kv(e.x)&&kv(e.y)}function jv(e,t){return e.min===t.min&&e.max===t.max}function Mv(e,t){return jv(e.x,t.x)&&jv(e.y,t.y)}function Nv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pv(e,t){return Nv(e.x,t.x)&&Nv(e.y,t.y)}function Fv(e){return hv(e.x)/hv(e.y)}function Iv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Lv(e){return[e(`x`),e(`y`)]}function Rv(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 zv=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Bv=zv.length,Vv=e=>typeof e==`string`?parseFloat(e):e,Hv=e=>typeof e==`number`||K.test(e);function Uv(e,t,n,r,i,a){i?(e.opacity=Jf(0,n.opacity??1,Gv(r)),e.opacityExit=Jf(t.opacity??1,0,Kv(r))):a&&(e.opacity=Jf(t.opacity??1,n.opacity??1,r));for(let i=0;i<Bv;i++){let a=zv[i],o=Wv(t,a),s=Wv(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Hv(o)===Hv(s)?(e[a]=Math.max(Jf(Vv(o),Vv(s),r),0),(Cf.test(s)||Cf.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Jf(t.rotate||0,n.rotate||0,r))}function Wv(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Gv=qv(0,.5,jd),Kv=qv(.5,.95,dd);function qv(e,t,n){return r=>r<e?0:r>t?1:n(md(e,t,r))}function Jv(e,t,n){let r=yh(e)?e:mh(e);return r.start(ah(``,r,t,n)),r.animation}function Yv(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var Xv=(e,t)=>e.depth-t.depth,Zv=class{constructor(){this.children=[],this.isDirty=!1}add(e){rd(this.children,e),this.isDirty=!0}remove(e){id(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Xv),this.isDirty=!1,this.children.forEach(e)}};function Qv(e,t){let n=Qd.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(qd(r),e(a-t))};return Kd.setup(r,!0),()=>qd(r)}function $v(e){return yh(e)?e.get():e}var ey=class{constructor(){this.members=[]}add(e){rd(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&&(id(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(id(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)}},ty={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ny={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ry=[``,`X`,`Y`,`Z`],iy=1e3,ay=0;function oy(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=wh(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Kd,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&sy(r)}function cy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=ay++,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,Hd.value&&(ny.nodes=ny.calculatedTargetDeltas=ny.calculatedProjections=0),this.nodes.forEach(dy),this.nodes.forEach(by),this.nodes.forEach(xy),this.nodes.forEach(fy),Hd.addProjectionMetrics&&Hd.addProjectionMetrics(ny)},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 Zv)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new hd),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=yg(t)&&!Pg(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;Kd.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Qv(i,250),ty.hasAnimatedSinceResize&&(ty.hasAnimatedSinceResize=!1,this.nodes.forEach(yy)))})}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()||Oy,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Pv(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={...nh(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||yy(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(),qd(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(Sy),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&&sy(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(hy),this.nodes.forEach(my);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(gy);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(_y),this.nodes.forEach(vy),this.nodes.forEach(ly),this.nodes.forEach(uy)):this.nodes.forEach(gy),this.clearAllSnapshots();let e=Qd.now();Jd.delta=ad(0,1e3/60,e-Jd.timestamp),Jd.timestamp=e,Jd.isProcessing=!0,Yd.update.process(Jd),Yd.preRender.process(Jd),Yd.render.process(Jd),Jd.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(py),this.sharedNodes.forEach(Cy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kd.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kd.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!hv(this.snapshot.measuredBox.x)&&!hv(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||=Bg(),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&&!Av(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||d_(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)),My(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Bg();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Py))){let{scroll:e}=this.root;e&&(x_(t.x,e.offset.x),x_(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Bg();if(sv(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&&sv(t,e),x_(t.x,i.offset.x),x_(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Bg();sv(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&&(x_(r.x,-n.scroll.offset.x),x_(r.y,-n.scroll.offset.y)),d_(n.latestValues)&&w_(r,n.latestValues,n.layout?.layoutBox)}return d_(this.latestValues)&&w_(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Bg();sv(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!d_(n.latestValues))continue;let r;n.instance&&(u_(n.latestValues)&&n.updateSnapshot(),r=Bg(),sv(r,n.measurePageBox())),Ov(t,n.latestValues,n.snapshot?.layoutBox,r)}return d_(this.latestValues)&&Ov(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!==Jd.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=Jd.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=Bg(),this.targetWithTransforms=Bg()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),bv(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):sv(this.target,this.layout.layoutBox),__(this.target,this.targetDelta)):sv(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),Hd.value&&ny.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||u_(this.parent.latestValues)||f_(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=Bg(),this.relativeTargetOrigin=Bg(),Sv(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),sv(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===Jd.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;sv(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;b_(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=Bg());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(cv(this.prevProjectionDelta.x,this.projectionDelta.x),cv(this.prevProjectionDelta.y,this.projectionDelta.y)),vv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Iv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Iv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Hd.value&&ny.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=Rg(),this.projectionDelta=Rg(),this.projectionDeltaWithTransform=Rg()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Rg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Bg(),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(Dy));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;wy(a.x,e.x,n),wy(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sv(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ey(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Mv(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Bg(),sv(d,this.relativeTarget)),s&&(this.animationValues=i,Uv(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&&=(qd(this.pendingAnimation),void 0),this.pendingAnimation=Kd.update(()=>{ty.hasAnimatedSinceResize=!0,$d.layout++,this.motionValue||=mh(0),this.motionValue.jump(0,!1),this.currentAnimation=Jv(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{$d.layout--},onComplete:()=>{$d.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(iy),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&&Ny(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Bg();let t=hv(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=hv(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}sv(t,n),w_(t,i),vv(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ey),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&&oy(`z`,e,r,this.animationValues);for(let t=0;t<ry.length;t++)oy(`rotate${ry[t]}`,e,r,this.animationValues),oy(`skew${ry[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=$v(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=$v(t?.pointerEvents)||``),this.hasProjected&&!d_(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Rv(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 F_){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=F_[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?$v(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(my),this.root.sharedNodes.clear()}}}function ly(e){e.updateLayout()}function uy(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`)Lv(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=hv(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;ov(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Ny(i,t.layoutBox,n)&&Lv(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=hv(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=Rg();vv(o,n,t.layoutBox);let s=Rg();a?vv(s,e.applyTransform(r,!0),t.measuredBox):vv(s,n,t.layoutBox);let c=!Av(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=Bg();Sv(s,t.layoutBox,i.layoutBox,o);let c=Bg();Sv(c,n,a.layoutBox,o),Pv(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 dy(e){Hd.value&&ny.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 fy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function py(e){e.clearSnapshot()}function my(e){e.clearMeasurements()}function hy(e){e.isLayoutDirty=!0,e.updateLayout()}function gy(e){e.isLayoutDirty=!1}function _y(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function vy(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function yy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function by(e){e.resolveTargetDelta()}function xy(e){e.calcProjection()}function Sy(e){e.resetSkewAndRotation()}function Cy(e){e.removeLeadSnapshot()}function wy(e,t,n){e.translate=Jf(t.translate,0,n),e.scale=Jf(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ty(e,t,n,r){e.min=Jf(t.min,n.min,r),e.max=Jf(t.max,n.max,r)}function Ey(e,t,n,r){Ty(e.x,t.x,n.x,r),Ty(e.y,t.y,n.y,r)}function Dy(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Oy={duration:.45,ease:[.4,0,.1,1]},ky=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ay=ky(`applewebkit/`)&&!ky(`chrome/`)?Math.round:dd;function jy(e){e.min=Ay(e.min),e.max=Ay(e.max)}function My(e){jy(e.x),jy(e.y)}function Ny(e,t,n){return e===`position`||e===`preserve-aspect`&&!gv(Fv(t),Fv(n),.2)}function Py(e){return e!==e.root&&e.scroll?.wasRoot}var Fy=cy({attachResizeListener:(e,t)=>Yv(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Iy={current:void 0},Ly=cy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Iy.current){let e=new Fy({});e.mount(window),e.setOptions({layoutScroll:!0}),Iy.current=e}return Iy.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Ry=(0,v.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function zy(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function By(...e){return t=>{let n=!1,r=e.map(e=>{let r=zy(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():zy(e[t],null)}}}}function Vy(...e){return v.useCallback(By(...e),e)}var Hy=class extends v.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Zh(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Zh(e)&&e.offsetWidth||0,r=Zh(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}return null}componentDidUpdate(){}render(){return this.props.children}};function Uy({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,v.useId)(),s=(0,v.useRef)(null),c=(0,v.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,v.useContext)(Ry),u=Vy(s,e.props?.ref??e?.ref);return(0,v.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m}=c.current;if(t||a===!1||!s.current||!e||!u)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let _=document.createElement(`style`);l&&(_.nonce=l);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
29
|
+
[data-motion-pop-id="${o}"] {
|
|
30
|
+
position: absolute !important;
|
|
31
|
+
width: ${e}px !important;
|
|
32
|
+
height: ${u}px !important;
|
|
33
|
+
${h}px !important;
|
|
34
|
+
${g}px !important;
|
|
35
|
+
}
|
|
36
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,T.jsx)(Hy,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:v.cloneElement(e,{ref:u})})}var Wy=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=ed(Gy),d=(0,v.useId)(),f=!0,p=(0,v.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,v.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),v.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,T.jsx)(Uy,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,T.jsx)(nd.Provider,{value:p,children:e})};function Gy(){return new Map}function Ky(e=!0){let t=(0,v.useContext)(nd);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,v.useId)();(0,v.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,v.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var qy=e=>e.key||``;function Jy(e){let t=[];return v.Children.forEach(e,e=>{(0,v.isValidElement)(e)&&t.push(e)}),t}var Yy=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Ky(o),f=(0,v.useMemo)(()=>Jy(e),[e]),p=o&&!u?[]:f.map(qy),m=(0,v.useRef)(!0),h=(0,v.useRef)(f),g=ed(()=>new Map),_=(0,v.useRef)(new Set),[y,b]=(0,v.useState)(f),[x,S]=(0,v.useState)(f);td(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=qy(x[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[x,p.length,p.join(`-`)]);let C=[];if(f!==y){let e=[...f];for(let t=0;t<x.length;t++){let n=x[t],r=qy(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S(Jy(e)),b(f),null}let{forceRender:w}=(0,v.useContext)($u);return(0,T.jsx)(T.Fragment,{children:x.map(e=>{let v=qy(e),y=o&&!u?!1:f===x||p.includes(v);return(0,T.jsx)(Wy,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},Xy=(0,v.createContext)({strict:!1}),Zy={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Qy=!1;function $y(){if(Qy)return;let e={};for(let t in Zy)e[t]={isEnabled:e=>Zy[t].some(t=>!!e[t])};t_(e),Qy=!0}function eb(){return $y(),n_()}function tb(e){let t=eb();for(let n in e)t[n]={...t[n],...e[n]};t_(t)}function nb({children:e,features:t,strict:n=!1}){let[,r]=(0,v.useState)(!rb(t)),i=(0,v.useRef)(void 0);if(!rb(t)){let{renderer:e,...n}=t;i.current=e,tb(n)}return(0,v.useEffect)(()=>{rb(t)&&t().then(({renderer:e,...t})=>{tb(t),i.current=e,r(!0)})},[]),(0,T.jsx)(Xy.Provider,{value:{renderer:i.current,strict:n},children:e})}function rb(e){return typeof e==`function`}var ib=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function ab(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||ib.has(e)}var ob=r({default:()=>sb}),sb,cb=n((()=>{throw sb={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),lb=e=>!ab(e);function ub(e){typeof e==`function`&&(lb=t=>t.startsWith(`on`)?!ab(t):e(t))}try{ub((cb(),t(ob)).default)}catch{}function db(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||yh(e[i])||(lb(i)||n===!0&&ab(i)||!t&&!ab(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var fb=(0,v.createContext)({});function pb(e,t){if(Kg(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Ug(t)?t:void 0,animate:Ug(n)?n:void 0}}return e.inherit===!1?{}:t}function mb(e){let{initial:t,animate:n}=pb(e,(0,v.useContext)(fb));return(0,v.useMemo)(()=>({initial:t,animate:n}),[hb(t),hb(n)])}function hb(e){return Array.isArray(e)?e.join(` `):e}var gb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _b(e,t,n){for(let r in t)!yh(t[r])&&!I_(r,n)&&(e[r]=t[r])}function vb({transformTemplate:e},t){return(0,v.useMemo)(()=>{let n=gb();return A_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yb(e,t){let n=e.style||{},r={};return _b(r,n,e),Object.assign(r,vb(e,t)),r}function bb(e,t){let n={},r=yb(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var xb=()=>({...gb(),attrs:{}});function Sb(e,t,n,r){let i=(0,v.useMemo)(()=>{let n=xb();return W_(n,t,K_(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};_b(t,e.style,e),i.style={...t,...i.style}}return i}var Cb=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function wb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Cb.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tb(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??wb(e)?Sb:bb)(t,r,i,e),c=db(t,typeof e==`string`,a),l=e===v.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,v.useMemo)(()=>yh(u)?u.get():u,[u]);return(0,v.createElement)(e,{...l,children:d})}function Eb({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Db(n,r,i,e),renderState:t()}}function Db(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=$v(a[e]);let{initial:o,animate:s}=e,c=Kg(e),l=qg(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Hg(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=sh(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Ob=e=>(t,n)=>{let r=(0,v.useContext)(fb),i=(0,v.useContext)(nd),a=()=>Eb(e,t,r,i);return n?a():ed(a)},kb=Ob({scrapeMotionValuesFromProps:L_,createRenderState:gb}),Ab=Ob({scrapeMotionValuesFromProps:J_,createRenderState:xb}),jb=Symbol.for(`motionComponentSymbol`);function Mb(e,t,n){let r=(0,v.useRef)(n);(0,v.useInsertionEffect)(()=>{r.current=n});let i=(0,v.useRef)(null);return(0,v.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var Nb=(0,v.createContext)({});function Pb(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Fb(e,t,n,r,i,a){let{visualElement:o}=(0,v.useContext)(fb),s=(0,v.useContext)(Xy),c=(0,v.useContext)(nd),l=(0,v.useContext)(Ry),u=l.reducedMotion,d=l.skipAnimations,f=(0,v.useRef)(null),p=(0,v.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,v.useContext)(Nb);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Ib(f.current,n,i,h);let g=(0,v.useRef)(!1);(0,v.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[Ch],y=(0,v.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return td(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),y.current&&m.animationState&&m.animationState.animateChanges())}),(0,v.useEffect)(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Ib(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Lb(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Pb(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Lb(e){if(e)return e.options.allowProjection===!1?Lb(e.parent):e.projection}function Rb(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&tb(r);let a=n?n===`svg`:wb(e),o=a?Ab:kb;function s(n,s){let c,l={...(0,v.useContext)(Ry),...n,layoutId:zb(n)},{isStatic:u}=l,d=mb(n),f=o(n,u);if(!u&&typeof window<`u`){Bb(l,r);let t=Vb(l);c=t.MeasureLayout,d.visualElement=Fb(e,f,l,i,t.ProjectionNode,a)}return(0,T.jsxs)(fb.Provider,{value:d,children:[c&&d.visualElement?(0,T.jsx)(c,{visualElement:d.visualElement,...l}):null,Tb(e,n,Mb(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,v.forwardRef)(s);return c[jb]=e,c}function zb({layoutId:e}){let t=(0,v.useContext)($u).id;return t&&e!==void 0?t+`-`+e:e}function Bb(e,t){(0,v.useContext)(Xy).strict}function Vb(e){let{drag:t,layout:n}=eb();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Hb(e,t){if(typeof Proxy>`u`)return Rb;let n=new Map,r=(n,r)=>Rb(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Rb(a,void 0,e,t)),n.get(a))})}var Ub=(e,t)=>t.isSVG??wb(e)?new Y_(t):new z_(t,{allowProjection:e!==v.Fragment}),Wb=class extends a_{constructor(e){super(e),e.animationState||=nv(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Hg(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Gb=0,Kb={animation:{Feature:Wb},exit:{Feature:class extends a_{constructor(){super(...arguments),this.id=Gb++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=ch(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function qb(e){return{point:{x:e.pageX,y:e.pageY}}}var Jb=e=>t=>sg(t)&&e(t,qb(t));function Yb(e,t,n,r){return Yv(e,t,Jb(n),r)}var Xb=({current:e})=>e?e.ownerDocument.defaultView:null,Zb=(e,t)=>Math.abs(e-t);function Qb(e,t){let n=Zb(e.x,t.x),r=Zb(e.y,t.y);return Math.sqrt(n**2+r**2)}var $b=new Set([`auto`,`scroll`]),ex=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=tx(this.lastRawMoveEventInfo,this.transformPagePoint));let e=rx(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Qb(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Jd;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=tx(t,this.transformPagePoint),Kd.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=rx(e.type===`pointercancel`?this.lastMoveEventInfo:tx(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!sg(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=tx(qb(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Jd;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,rx(s,this.history)),this.removeListeners=pd(Yb(this.contextWindow,`pointermove`,this.handlePointerMove),Yb(this.contextWindow,`pointerup`,this.handlePointerUp),Yb(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);($b.has(e.overflowX)||$b.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Kd.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),qd(this.updatePoint)}};function tx(e,t){return t?{point:t(e.point)}:e}function nx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rx({point:e},t){return{point:e,delta:nx(e,ax(t)),offset:nx(e,ix(t)),velocity:ox(t,.1)}}function ix(e){return e[0]}function ax(e){return e[e.length-1]}function ox(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=ax(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>gd(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>gd(t)*2&&(r=e[1]);let a=_d(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function sx(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Jf(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Jf(n,e,r.max):Math.min(e,n)),e}function cx(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function lx(e,{top:t,left:n,bottom:r,right:i}){return{x:cx(e.x,n,i),y:cx(e.y,t,r)}}function ux(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function dx(e,t){return{x:ux(e.x,t.x),y:ux(e.y,t.y)}}function fx(e,t){let n=.5,r=hv(e),i=hv(t);return i>r?n=md(t.min,t.max-r,e.min):r>i&&(n=md(e.min,e.max-i,t.min)),ad(0,1,n)}function px(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var mx=.35;function hx(e=mx){return e===!1?e=0:e===!0&&(e=mx),{x:gx(e,`left`,`right`),y:gx(e,`top`,`bottom`)}}function gx(e,t,n){return{min:_x(e,t),max:_x(e,n)}}function _x(e,t){return typeof e==`number`?e:e[t]||0}var vx=new WeakMap,yx=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Bg(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(qb(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ng(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Lv(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Cf.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=hv(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&Kd.update(()=>i(e,t),!1,!0),xh(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Cx(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&Kd.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new ex(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Xb(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&Kd.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Sx(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=sx(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Pb(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=lx(n.layoutBox,e):this.constraints=!1,this.elastic=hx(t),r!==this.constraints&&!Pb(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Lv(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=px(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Pb(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=E_(n,r.root,this.visualElement.getTransformPagePoint()),a=dx(r.layout.layoutBox,i);if(t){let e=t(s_(a));this.hasMutatedConstraints=!!e,e&&(a=o_(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Lv(o=>{if(!Sx(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return xh(this.visualElement,e),n.start(ah(e,n,0,t,this.visualElement,!1))}stopAnimation(){Lv(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Lv(t=>{let{drag:n}=this.getProps();if(!Sx(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-Jf(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Pb(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Lv(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=fx({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Lv(t=>{if(!Sx(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Jf(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;vx.set(this.visualElement,this);let e=this.visualElement.current,t=Yb(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&dg(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Pb(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=xx(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Kd.read(r);let o=Yv(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Lv(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=mx,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function bx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function xx(e,t,n){let r=Ng(e,bx(n)),i=Ng(t,bx(n));return()=>{r(),i()}}function Sx(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cx(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var wx=class extends a_{constructor(e){super(e),this.removeGroupControls=dd,this.removeListeners=dd,this.controls=new yx(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dd}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Tx=e=>(t,n)=>{e&&Kd.update(()=>e(t,n),!1,!0)},Ex=class extends a_{constructor(){super(...arguments),this.removePointerDownListener=dd}onPointerDown(e){this.session=new ex(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xb(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Tx(e),onStart:Tx(t),onMove:Tx(n),onEnd:(e,t)=>{delete this.session,r&&Kd.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Yb(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Dx=!1,Ox=class extends v.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Dx&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ty.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Dx=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Kd.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Qh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Dx=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function kx(e){let[t,n]=Ky(),r=(0,v.useContext)($u);return(0,T.jsx)(Ox,{...e,layoutGroup:r,switchLayoutGroup:(0,v.useContext)(Nb),isPresent:t,safeToRemove:n})}var Ax={pan:{Feature:Ex},drag:{Feature:wx,ProjectionNode:Ly,MeasureLayout:kx}};function jx(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Kd.postRender(()=>i(t,qb(t)))}var Mx=class extends a_{mount(){let{current:e}=this.node;e&&(this.unmount=ag(e,(e,t)=>(jx(this.node,t,`Start`),e=>jx(this.node,e,`End`))))}unmount(){}},Nx=class extends a_{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=pd(Yv(this.node.current,`focus`,()=>this.onFocus()),Yv(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Px(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Kd.postRender(()=>i(t,qb(t)))}var Fx=class extends a_{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=vg(e,(e,t)=>(Px(this.node,t,`Start`),(e,{success:t})=>Px(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Ix=new WeakMap,Lx=new WeakMap,Rx=e=>{let t=Ix.get(e.target);t&&t(e)},zx=e=>{e.forEach(Rx)};function Bx({root:e,...t}){let n=e||document;Lx.has(n)||Lx.set(n,{});let r=Lx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(zx,{root:e,...t})),r[i]}function Vx(e,t,n){let r=Bx(t);return Ix.set(e,n),r.observe(e),()=>{Ix.delete(e),r.unobserve(e)}}var Hx={some:0,all:1},Ux=class extends a_{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Hx[r]};this.stopObserver=Vx(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Wx(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Wx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Gx={inView:{Feature:Ux},tap:{Feature:Fx},focus:{Feature:Nx},hover:{Feature:Mx}},Kx={layout:{ProjectionNode:Ly,MeasureLayout:kx}},qx=Hb({...Kb,...Gx,...Ax,...Kx},Ub),Jx={renderer:Ub,...Kb,...Gx},Yx=e=>{let t=(0,b.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,T.jsx)(nb,{features:Jx,children:n}),t[0]=n,t[1]=r),r},Xx=e=>{let t=(0,b.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,T.jsx)(Zu,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,T.jsx)(Yx,{children:(0,T.jsxs)(pc,{children:[r,n]})}),t[1]=n,t[2]=i),i},Zx=e=>{let t=(0,b.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,T.jsx)(ro,{children:(0,T.jsx)(ga,{children:(0,T.jsx)(ma,{path:`*`,element:n})})}),t[0]=n,t[1]=r),r},Qx={key:`dictionary-edition-drawer`,content:{nodeType:`translation`,translation:{en:{openDictionaryEditor:{popoverContent:`Open Dictionary in Editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},"en-GB":{openDictionaryEditor:{popoverContent:`Click to open the dictionary in the editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},fr:{openDictionaryEditor:{popoverContent:`Ouvrir le dictionnaire dans l’éditeur`,label:`Cliquez pour ouvrir le dictionnaire dans l’éditeur`},backButtonText:`Liste des dictionnaires`,modalTitle:`Modifier le dictionnaire`,noDictionaryFocused:`Aucun dictionnaire sélectionné`,focusedDictionaryNotFound:`Dictionnaire focalisé non trouvé`},es:{openDictionaryEditor:{popoverContent:`Abrir el diccionario en el editor`,label:`Haga clic para abrir el diccionario en el editor`},backButtonText:`Lista de diccionarios`,modalTitle:`Editar el diccionario`,noDictionaryFocused:`No hay diccionario enfocado`,focusedDictionaryNotFound:`Diccionario enfocado no encontrado`},de:{openDictionaryEditor:{popoverContent:`Wörterbuch im Editor öffnen`,label:`Klicken Sie hier, um das Wörterbuch im Editor zu öffnen`},backButtonText:`Wörterbuchliste`,modalTitle:`Wörterbuch bearbeiten`,noDictionaryFocused:`Kein Wörterbuch ausgewählt`,focusedDictionaryNotFound:`Ausgewähltes Wörterbuch nicht gefunden`},ja:{openDictionaryEditor:{popoverContent:`エディターで辞書を開く`,label:`エディターで辞書を開く`},backButtonText:`辞書リスト`,modalTitle:`辞書を編集`,noDictionaryFocused:`フォーカスされた辞書がありません`,focusedDictionaryNotFound:`フォーカスされた辞書が見つかりません`},ko:{openDictionaryEditor:{popoverContent:`편집기에서 사전 열기`,label:`편집기에서 사전 열기`},backButtonText:`사전 목록`,modalTitle:`사전 편집`,noDictionaryFocused:`포커스가 있는 사전이 없습니다`,focusedDictionaryNotFound:`포커스가 있는 사전이 없습니다`},zh:{openDictionaryEditor:{popoverContent:`点击打开词典到编辑器`,label:`点击打开词典到编辑器`},backButtonText:`词典列表`,modalTitle:`编辑词典`,noDictionaryFocused:`没有聚焦的词典`,focusedDictionaryNotFound:`没有聚焦的词典`},it:{openDictionaryEditor:{popoverContent:`Apri il dizionario nell’editor`,label:`Fai clic per aprire il dizionario nell’editor`},backButtonText:`Elenco di dizionari`,modalTitle:`Modifica dizionario`,noDictionaryFocused:`Nessun dizionario selezionato`,focusedDictionaryNotFound:`Nessun dizionario selezionato`},pt:{openDictionaryEditor:{popoverContent:`Abrir o dicionário no editor`,label:`Clique para abrir o dicionário no editor`},backButtonText:`Lista de dicionários`,modalTitle:`Editar dicionário`,noDictionaryFocused:`Nenhum dicionário focalizado`,focusedDictionaryNotFound:`Nenhum dicionário focalizado`},hi:{openDictionaryEditor:{popoverContent:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`,label:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`},backButtonText:`शब्दकोश सूची`,modalTitle:`शब्दकोश संपादित करें`,noDictionaryFocused:`कोई फोकस शब्दकोश नहीं है`,focusedDictionaryNotFound:`कोई फोकस शब्दकोश नहीं है`},ar:{openDictionaryEditor:{popoverContent:`انقر لفتح قاموس في المحرر`,label:`انقر لفتح قاموس في المحرر`},backButtonText:`قائمة القوامل`,modalTitle:`تحرير قاموس`,noDictionaryFocused:`لا يوجد قاموس مرتبط`,focusedDictionaryNotFound:`لا يوجد قاموس مرتبط`},ru:{openDictionaryEditor:{popoverContent:`Нажмите, чтобы открыть словарь в редакторе`,label:`Нажмите, чтобы открыть словарь в редакторе`},backButtonText:`Список словарей`,modalTitle:`Редактировать словарь`,noDictionaryFocused:`Нет фокусированного словаря`,focusedDictionaryNotFound:`Нет фокусированного словаря`}}},localIds:[`dictionary-edition-drawer::local::client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`]},$x=au(`flex flex-col text-text backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{primary:`border-primary`,secondary:`border-secondary`,neutral:`border-neutral`,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:``,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),eS=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:u,...d})=>(0,T.jsx)(`div`,{className:l($x({roundedSize:t,transparency:r,padding:n,separator:i,border:typeof o==`boolean`?o?`with`:`none`:void 0,background:c,borderColor:s,gap:u}),a),...d,children:e}),tS=({className:e,strokeWidth:t=4})=>(0,T.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:l(`size-full`,e),children:(0,T.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,T.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,T.jsx)(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,T.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),(0,T.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,T.jsx)(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,T.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),nS=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>(0,T.jsx)(T.Fragment,{children:t&&n?(0,T.jsxs)(`div`,{className:`relative size-full`,children:[(0,T.jsx)(`div`,{className:l(`absolute top-0 left-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,T.jsx)(tS,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,T.jsx)(`div`,{className:l(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,T.jsx)(tS,{className:`size-10 max-h-full max-w-full`})}):e??(0,T.jsx)(T.Fragment,{})}),rS=au(`flex-none shrink-0`,{variants:{size:{sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-4`,"icon-xl":`size-5`}},defaultVariants:{size:`md`}}),iS=au(`relative inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{sm:`min-h-7 px-3 text-xs max-md:py-1`,md:`min-h-8 px-6 text-sm max-md:py-2`,lg:`min-h-10 px-8 text-lg max-md:py-3`,xl:`min-h-11 px-10 text-xl max-md:py-4`,"icon-sm":`p-1.5`,"icon-md":`p-1.5`,"icon-lg":`p-2`,"icon-xl":`p-3`},color:{primary:`hover-primary-500/20 text-primary ring-primary-500/20 *:text-text-light`,secondary:`hover-secondary-500/20 text-secondary ring-secondary-500/20 *:text-text-light`,destructive:`hover-destructive-500/20 text-destructive ring-destructive-500/20 *:text-text-light`,neutral:`text-neutral ring-neutral-500/5 *:text-text-light`,card:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,light:`hover-white-500/20 text-white ring-white/20 *:text-text-light`,dark:`text-neutral-800 ring-text-light/50 *:text-text-light`,text:`text-text ring-text/20 *:text-text-opposite`,current:`hover-current-500/10 text-current ring-current/10 *:text-text-light`,"text-inverse":`text-text-opposite ring-text-opposite/20 *:text-text`,error:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,success:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,custom:``},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]`,"4xl":`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,"5xl":`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,full:`rounded-full`},variant:{default:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],outline:[`rounded-2xl border-[1.3px] border-current bg-current/0 *:text-current!`,`hover:bg-current/20 focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],none:`border-none bg-current/0 text-inherit hover:bg-current/0`,link:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,"invisible-link":`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,fade:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],input:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{left:`justify-start text-left`,center:`justify-center text-center`,right:`justify-end text-right`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`default`,size:`md`,color:`custom`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),aS=({variant:e,size:t,color:n,children:r,Icon:i,IconRight:a,iconClassName:o,isLoading:s=!1,isActive:c,isSelected:u,isFullWidth:d,roundedSize:f,textAlign:p,disabled:m,label:h,className:g,type:_=`button`,"aria-describedby":v,"aria-expanded":y,"aria-haspopup":b,"aria-pressed":x,...S})=>{let C=e===`link`||e===`invisible-link`,w=!r&&(i||a),E={"aria-label":w?h??void 0:void 0,"aria-labelledby":void 0,"aria-describedby":v,"aria-expanded":y,"aria-haspopup":b,"aria-pressed":c===void 0?x:c,"aria-busy":s,"aria-current":c?`page`:void 0,"aria-disabled":m||s,"aria-selected":u},D=t===`icon-sm`||t===`icon-md`||t===`icon-lg`||t===`icon-xl`;return(0,T.jsxs)(`button`,{disabled:s||m,role:C?`link`:`button`,type:_,className:iS({variant:e,size:t,color:n,isFullWidth:d,roundedSize:f,textAlign:p??(a?`left`:`center`),className:g}),...E,...S,children:[i&&!s&&(0,T.jsx)(i,{className:rS({size:t,className:l(!D&&`mr-3`,o)}),"aria-hidden":`true`}),(0,T.jsx)(`div`,{className:l(`flex items-center justify-center transition-[width] duration-300`,s&&t===`sm`&&`w-3`,s&&t===`md`&&`w-4`,s&&t===`lg`&&`w-5`,s&&t===`xl`&&`w-6`),children:(0,T.jsx)(nS,{className:rS({size:t,className:l(!D&&`mr-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,T.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&w&&(0,T.jsx)(`span`,{className:`sr-only`,children:h}),a&&(0,T.jsx)(a,{className:rS({size:t,className:l(!D&&`ml-3`,o)}),"aria-hidden":`true`})]})},oS=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>(0,T.jsx)(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:l(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,i&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...o,children:(0,T.jsx)(`div`,{style:{minHeight:`${a}px`},className:l(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})}),sS=e=>{let t=(0,b.c)(8),{children:n,header:r,isOpen:i,defaultIsOpen:a,onToggle:o,onClick:s,disabled:c,contentClassName:u,headerClassName:d,contentId:f,"aria-label":p,...m}=e,h=a===void 0?!1:a,g=c===void 0?!1:c,_=i!==void 0,[y,x]=(0,v.useState)(h),S=(0,v.useId)(),C=_?i:y,w=!C,E=f??`${S}-accordion-content`,D;t[0]!==g||t[1]!==_||t[2]!==C||t[3]!==s||t[4]!==o?(D=e=>{if(g)return;let t=!C;_||x(t),o?.(t),s?.(e)},t[0]=g,t[1]=_,t[2]=C,t[3]=s,t[4]=o,t[5]=D):D=t[5];let O=D,k;return t[6]===O?k=t[7]:(k=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),O(e))},t[6]=O,t[7]=k),(0,T.jsxs)(`div`,{className:`w-full`,children:[(0,T.jsx)(aS,{variant:`hoverable`,color:`text`,onClick:O,onKeyDown:k,disabled:g,isFullWidth:!0,className:l(`flex items-center justify-between gap-2`,d),IconRight:yu,iconClassName:l(`transform transition-transform duration-500 ease-in-out`,C?`rotate-0`:`-rotate-180`),"aria-expanded":C,"aria-controls":E,"aria-label":p,role:`button`,...m,children:r}),(0,T.jsx)(oS,{id:E,tabIndex:w?-1:void 0,isHidden:w,className:u,role:`region`,"aria-labelledby":E,children:n})]})},cS=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>(0,T.jsx)(`div`,{className:l(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:(0,T.jsx)(sS,{isOpen:a,label:t,header:(0,T.jsxs)(`div`,{className:`flex w-full`,children:[(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,T.jsx)(`span`,{className:l(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&(0,T.jsx)(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&(0,T.jsx)(`p`,{className:`pl-3 text-card text-sm`,children:n})]}),children:(0,T.jsx)(`div`,{className:`size-full px-2`,children:r})})}),lS=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:F},s=[...t,o];return(0,T.jsx)(cS,{level:t.length,title:`${a}`,description:``,isSelected:fr(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:(0,T.jsx)(hT,{...e,keyPath:s,section:n})},JSON.stringify(n))})},uS=e=>e?.getAttribute(`aria-selected`)===`true`,dS=(e,t)=>{let n=(0,b.c)(23),r;n[0]===t?r=n[1]:(r=t===void 0?{selector:uS,isHoverable:!1,orientation:`horizontal`}:t,n[0]=t,n[1]=r);let{selector:i,isHoverable:a,orientation:o}=r,s=i===void 0?uS:i,c=a===void 0?!1:a,l=o===void 0?`horizontal`:o,[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=e.current.length,_;n[2]!==f||n[3]!==e.current||n[4]!==l||n[5]!==s?(_=()=>{let t;if(f?(t=f,m.current&&=(clearTimeout(m.current),null)):t=e.current.find(s)??null,!t){d(l===`vertical`?e=>{let t=e,n={top:t?.top??0,height:t?.height??0,opacity:0};return h.current=n,n}:e=>{let t=e,n={left:t?.left??0,width:t?.width??0,opacity:0};return h.current=n,n});return}if(l===`vertical`){let e={top:t.offsetTop,height:t.offsetHeight,opacity:1};d(e),h.current=e}else{let e={left:t.offsetLeft,width:t.offsetWidth,opacity:1};d(e),h.current=e}},n[2]=f,n[3]=e.current,n[4]=l,n[5]=s,n[6]=_):_=n[6];let y=_,x;n[7]!==y||n[8]!==f||n[9]!==c||n[10]!==e.current||n[11]!==s?(x=()=>{y(),window.addEventListener(`resize`,y),window.addEventListener(`DOMContentLoaded`,y);let t=[];e.current.forEach(e=>{if(e){let n=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&t.attributeName===`aria-selected`){y();break}});n.observe(e,{attributes:!0,attributeFilter:[`aria-selected`]}),t.push(n)}});let n=[],r=e=>{if(!e)return;let t=new ResizeObserver(()=>{y()});t.observe(e),n.push(t)},i=e.current.find(s)??null;i&&r(i),f&&r(f);let a=e=>{m.current&&=(clearTimeout(m.current),null),p(e.currentTarget)},o=()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{p(null)},150)};return c&&e.current.forEach(e=>{e?.addEventListener(`mouseenter`,a,{passive:!0}),e?.addEventListener(`mouseleave`,o,{passive:!0})}),()=>{m.current&&clearTimeout(m.current),window.removeEventListener(`resize`,y),window.removeEventListener(`DOMContentLoaded`,y),t.forEach(fS),n.forEach(pS),e.current.forEach(e=>{e?.removeEventListener(`mouseenter`,a),e?.removeEventListener(`mouseleave`,o)})}},n[7]=y,n[8]=f,n[9]=c,n[10]=e.current,n[11]=s,n[12]=x):x=n[12];let S;n[13]!==f||n[14]!==g||n[15]!==e||n[16]!==l||n[17]!==s?(S=[e,s,f,g,l],n[13]=f,n[14]=g,n[15]=e,n[16]=l,n[17]=s,n[18]=S):S=n[18],(0,v.useEffect)(x,S);let C;return n[19]!==y||n[20]!==u||n[21]!==l?(C={choiceIndicatorPosition:u,calculatePosition:y,orientation:l},n[19]=y,n[20]=u,n[21]=l,n[22]=C):C=n[22],C};function fS(e){e.disconnect()}function pS(e){e.disconnect()}var mS=[{content:`Off`,value:!1},{content:`On`,value:!0}],hS=au(`flex w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-[1.5px]`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,destructive:`border-destructive bg-destructive text-destructive`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`},disabled:{true:`cursor-not-allowed opacity-50`,false:``}},defaultVariants:{color:`primary`,disabled:!1}}),gS=au(`z-1 w-full flex-1 cursor-pointer font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-text-opposite motion-reduce:transition-none`,{variants:{size:{sm:`px-2 py-1 text-xs`,md:`p-2 text-sm`,lg:`p-4 text-base`}},defaultVariants:{size:`md`}}),_S=au(`absolute top-0 z-0 h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary data-[indicator=true]:text-text`,secondary:`bg-secondary data-[indicator=true]:text-text`,destructive:`bg-destructive data-[indicator=true]:text-text`,neutral:`bg-neutral data-[indicator=true]:text-white`,light:`bg-white data-[indicator=true]:text-black`,dark:`bg-neutral-800 data-[indicator=true]:text-white`,text:`bg-text data-[indicator=true]:text-text-opposite`}}}),vS=({choices:e=mS,value:t,defaultValue:n,onChange:r,color:i=`primary`,size:a=`md`,className:o,itemClassName:s,hoverable:c=!0,disabled:u=!1})=>{let[d,f]=(0,v.useState)(t??n??e[0].value),[p,m]=(0,v.useState)(null),h=(0,v.useRef)([]),g=(0,v.useRef)(null),{choiceIndicatorPosition:_}=dS(h,{isHoverable:c}),y=e.findIndex(e=>e.value===d),b=c&&p!==null?p:y,x=e=>{f(e),r?.(e)};return(0,v.useEffect)(()=>{t!==void 0&&f(t)},[t]),(0,T.jsx)(`div`,{className:hS({color:i,disabled:u,className:o}),role:`tablist`,"aria-disabled":u?`true`:void 0,children:(0,T.jsxs)(`div`,{className:`relative flex size-full flex-row items-center justify-center`,children:[e.map((e,t)=>{let{content:n,value:r,...i}=e,o=typeof r==`string`||typeof r==`number`,c=t===y,d=t===b;return(0,v.createElement)(`button`,{...i,className:l(gS({size:a}),u&&`cursor-not-allowed`,s),key:o?r:t,role:`tab`,onClick:()=>x(r),"aria-selected":c?`true`:void 0,"data-indicator":d?`true`:void 0,disabled:u||c,tabIndex:c?0:-1,ref:e=>{h.current[t]=e},onMouseEnter:()=>!u&&m(t),onMouseLeave:()=>!u&&m(null)},n)}),_&&(0,T.jsx)(`div`,{className:l(_S({color:i})),style:_,ref:g})]})})},yS=(0,v.createContext)(null),bS=({children:e,manager:t})=>(0,T.jsx)(yS.Provider,{value:t,children:e}),xS=()=>(0,v.useContext)(yS),SS=(0,v.createContext)(void 0),CS=()=>{let e=(0,b.c)(14),t=xS(),n=(0,v.useContext)(SS),[r,i]=(0,v.useState)(t?.focusedContent.value??n?.focusedContent??null),a;e[0]!==t||e[1]!==n?.focusedContent?(a=()=>{if(!t){i(n?.focusedContent??null);return}let e=e=>i(e.detail);return t.focusedContent.addEventListener(`change`,e),()=>t.focusedContent.removeEventListener(`change`,e)},e[0]=t,e[1]=n?.focusedContent,e[2]=a):a=e[2];let o=n?.focusedContent,s;e[3]!==t||e[4]!==o?(s=[t,o],e[3]=t,e[4]=o,e[5]=s):s=e[5],(0,v.useEffect)(a,s);let c;e[6]===n?.setFocusedContent?c=e[7]:(c=n?.setFocusedContent??wS,e[6]=n?.setFocusedContent,e[7]=c);let l;e[8]===n?.setFocusedContentKeyPath?l=e[9]:(l=n?.setFocusedContentKeyPath??TS,e[8]=n?.setFocusedContentKeyPath,e[9]=l);let u;return e[10]!==r||e[11]!==c||e[12]!==l?(u={focusedContent:r,setFocusedContent:c,setFocusedContentKeyPath:l},e[10]=r,e[11]=c,e[12]=l,e[13]=u):u=e[13],u};function wS(){}function TS(){}var ES=(e,t)=>{try{let n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;let i=n.pathname.replace(/\/$/,``),a=r.pathname.replace(/\/$/,``);return!(i!==``&&a!==``&&i!==a)}catch(n){return console.error(`Invalid URL(s)`,n,{url1:e,url2:t}),!1}},DS=function(e){return e.INTLAYER_CLIENT_READY=`INTLAYER_CLIENT_READY`,e.INTLAYER_ARE_YOU_THERE=`INTLAYER_ARE_YOU_THERE`,e.INTLAYER_EDITOR_ACTIVATE=`INTLAYER_EDITOR_ACTIVATE`,e.INTLAYER_EDITOR_ENABLED=`INTLAYER_EDITOR_ENABLED`,e.INTLAYER_CONFIGURATION=`INTLAYER_CONFIGURATION`,e.INTLAYER_CURRENT_LOCALE=`INTLAYER_CURRENT_LOCALE`,e.INTLAYER_URL_CHANGE=`INTLAYER_URL_CHANGE`,e.INTLAYER_LOCALE_DICTIONARIES_CHANGED=`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,e.INTLAYER_DISTANT_DICTIONARIES_CHANGED=`INTLAYER_DISTANT_DICTIONARIES_CHANGED`,e.INTLAYER_HOVERED_CONTENT_CHANGED=`INTLAYER_HOVERED_CONTENT_CHANGED`,e.INTLAYER_FOCUSED_CONTENT_CHANGED=`INTLAYER_FOCUSED_CONTENT_CHANGED`,e.INTLAYER_EDITED_CONTENT_CHANGED=`INTLAYER_EDITED_CONTENT_CHANGED`,e.INTLAYER_IFRAME_CLICKED=`INTLAYER_IFRAME_CLICKED`,e}({}),OS=e=>{let t=new MouseEvent(`mousedown`,{bubbles:!0,cancelable:!0,view:window}),n=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window});Object.assign(n,{iframeData:e}),Object.assign(t,{iframeData:e}),window.dispatchEvent(n),window.dispatchEvent(t)},kS=`__intlayer_editor_manager__`,AS=`__intlayer_editor_manager_events__`,jS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[AS]||(e[AS]=new EventTarget),e[AS]},MS=()=>typeof window>`u`?null:window[kS]??null,NS=e=>{if(typeof window<`u`){let t=window;t[kS]=e}jS().dispatchEvent(new CustomEvent(`change`,{detail:e}))},PS=e=>{let t=jS(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}};function FS(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var IS=globalThis,LS=IS.ShadowRoot&&(IS.ShadyCSS===void 0||IS.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,RS=Symbol(),zS=new WeakMap,BS=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==RS)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(LS&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=zS.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&zS.set(t,e))}return e}toString(){return this.cssText}},VS=e=>new BS(typeof e==`string`?e:e+``,void 0,RS),HS=(e,...t)=>new BS(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,RS),US=(e,t)=>{if(LS)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=IS.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},WS=LS?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return VS(t)})(e):e,{is:GS,defineProperty:KS,getOwnPropertyDescriptor:qS,getOwnPropertyNames:JS,getOwnPropertySymbols:YS,getPrototypeOf:XS}=Object,ZS=globalThis,QS=ZS.trustedTypes,$S=QS?QS.emptyScript:``,eC=ZS.reactiveElementPolyfillSupport,tC=(e,t)=>e,nC={toAttribute(e,t){switch(t){case Boolean:e=e?$S:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},rC=(e,t)=>!GS(e,t),iC={attribute:!0,type:String,converter:nC,reflect:!1,useDefault:!1,hasChanged:rC};Symbol.metadata??=Symbol(`metadata`),ZS.litPropertyMetadata??=new WeakMap;var aC=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=iC){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&KS(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=qS(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??iC}static _$Ei(){if(this.hasOwnProperty(tC(`elementProperties`)))return;let e=XS(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(tC(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tC(`properties`))){let e=this.properties,t=[...JS(e),...YS(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(WS(e))}else e!==void 0&&t.push(WS(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return US(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?nC:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?nC:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??rC)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};aC.elementStyles=[],aC.shadowRootOptions={mode:`open`},aC[tC(`elementProperties`)]=new Map,aC[tC(`finalized`)]=new Map,eC?.({ReactiveElement:aC}),(ZS.reactiveElementVersions??=[]).push(`2.1.2`);var oC=globalThis,sC=e=>e,cC=oC.trustedTypes,lC=cC?cC.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,uC=`$lit$`,dC=`lit$${Math.random().toFixed(9).slice(2)}$`,fC=`?`+dC,pC=`<${fC}>`,mC=document,hC=()=>mC.createComment(``),gC=e=>e===null||typeof e!=`object`&&typeof e!=`function`,_C=Array.isArray,vC=e=>_C(e)||typeof e?.[Symbol.iterator]==`function`,yC=`[
|
|
37
|
+
\f\r]`,bC=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xC=/-->/g,SC=/>/g,CC=RegExp(`>|${yC}(?:([^\\s"'>=/]+)(${yC}*=${yC}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),wC=/'/g,TC=/"/g,EC=/^(?:script|style|textarea|title)$/i,DC=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),OC=Symbol.for(`lit-noChange`),kC=Symbol.for(`lit-nothing`),AC=new WeakMap,jC=mC.createTreeWalker(mC,129);function MC(e,t){if(!_C(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return lC===void 0?t:lC.createHTML(t)}var NC=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=bC;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===bC?c[1]===`!--`?o=xC:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=CC):(EC.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=CC):o=SC:o===CC?c[0]===`>`?(o=i??bC,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?CC:c[3]===`"`?TC:wC):o===TC||o===wC?o=CC:o===xC||o===SC?o=bC:(o=CC,i=void 0);let d=o===CC&&e[t+1].startsWith(`/>`)?` `:``;a+=o===bC?n+pC:l>=0?(r.push(s),n.slice(0,l)+uC+n.slice(l)+dC+d):n+dC+(l===-2?t:d)}return[MC(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},PC=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=NC(t,n);if(this.el=e.createElement(l,r),jC.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=jC.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(uC)){let t=u[o++],n=i.getAttribute(e).split(dC),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?zC:r[1]===`?`?BC:r[1]===`@`?VC:RC}),i.removeAttribute(e)}else e.startsWith(dC)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(EC.test(i.tagName)){let e=i.textContent.split(dC),t=e.length-1;if(t>0){i.textContent=cC?cC.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],hC()),jC.nextNode(),c.push({type:2,index:++a});i.append(e[t],hC())}}}else if(i.nodeType===8)if(i.data===fC)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(dC,e+1))!==-1;)c.push({type:7,index:a}),e+=dC.length-1}a++}}static createElement(e,t){let n=mC.createElement(`template`);return n.innerHTML=e,n}};function FC(e,t,n=e,r){if(t===OC)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=gC(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=FC(e,i._$AS(e,t.values),i,r)),t}var IC=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??mC).importNode(t,!0);jC.currentNode=r;let i=jC.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new LC(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new HC(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=jC.nextNode(),a++)}return jC.currentNode=mC,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},LC=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=kC,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=FC(this,e,t),gC(e)?e===kC||e==null||e===``?(this._$AH!==kC&&this._$AR(),this._$AH=kC):e!==this._$AH&&e!==OC&&this._(e):e._$litType$===void 0?e.nodeType===void 0?vC(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==kC&&gC(this._$AH)?this._$AA.nextSibling.data=e:this.T(mC.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=PC.createElement(MC(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new IC(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=AC.get(e.strings);return t===void 0&&AC.set(e.strings,t=new PC(e)),t}k(t){_C(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(hC()),this.O(hC()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=sC(e).nextSibling;sC(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},RC=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=kC,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=kC}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=FC(this,e,t,0),a=!gC(e)||e!==this._$AH&&e!==OC,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=FC(this,r[n+o],t,o),s===OC&&(s=this._$AH[o]),a||=!gC(s)||s!==this._$AH[o],s===kC?e=kC:e!==kC&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===kC?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},zC=class extends RC{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===kC?void 0:e}},BC=class extends RC{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==kC)}},VC=class extends RC{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=FC(this,e,t,0)??kC)===OC)return;let n=this._$AH,r=e===kC&&n!==kC||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==kC&&(n===kC||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},HC=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){FC(this,e)}},UC=oC.litHtmlPolyfillSupport;UC?.(PC,LC),(oC.litHtmlVersions??=[]).push(`3.3.2`);var WC=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new LC(t.insertBefore(hC(),e),e,void 0,n??{})}return i._$AI(e),i},GC=globalThis,KC=class extends aC{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=WC(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return OC}};KC._$litElement$=!0,KC.finalized=!0,GC.litElementHydrateSupport?.({LitElement:KC});var qC=GC.litElementPolyfillSupport;qC?.({LitElement:KC}),(GC.litElementVersions??=[]).push(`4.2.2`);var JC={attribute:!0,type:String,converter:nC,reflect:!1,hasChanged:rC},YC=(e=JC,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function XC(e){return(t,n)=>typeof n==`object`?YC(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function ZC(e){return XC({...e,state:!0,attribute:!1})}var QC=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function $C(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return QC(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return QC(n,r,{get(){return a(this)}})}}var ew=class extends KC{constructor(...e){super(...e),this.keyPathJson=`[]`,this.dictionaryKey=``,this._editorEnabled=!1,this._isInIframe=!1,this._isSelected=!1,this._editedValue=void 0,this._unsubManager=null,this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null}static{this.styles=HS`
|
|
38
|
+
:host {
|
|
39
|
+
display: contents;
|
|
40
|
+
}
|
|
41
|
+
`}connectedCallback(){super.connectedCallback(),typeof window<`u`&&(this._isInIframe=window.self!==window.top),this._subscribeToManager()}disconnectedCallback(){super.disconnectedCallback(),this._teardown()}updated(e){if(e.has(`keyPathJson`)||e.has(`dictionaryKey`)){let e=MS();e&&this._updateEditedValue(e)}}_teardown(){this._unsubManager?.(),this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null}_subscribeToManager(){let e=MS();e&&this._setupManagerSubscriptions(e),this._unsubManager=PS(e=>{this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editorEnabled=!1,this._isSelected=!1,this._editedValue=void 0)})}_setupManagerSubscriptions(e){this._editorEnabled=e.editorEnabled.value??!1,this._updateIsSelected(e.focusedContent.value),this._updateEditedValue(e);let t=e=>{this._editorEnabled=e.detail},n=e=>{this._updateIsSelected(e.detail)},r=()=>{this._updateEditedValue(e)};e.editorEnabled.addEventListener(`change`,t),e.focusedContent.addEventListener(`change`,n),e.editedContent.addEventListener(`change`,r),this._unsubEnabled=()=>e.editorEnabled.removeEventListener(`change`,t),this._unsubFocused=()=>e.focusedContent.removeEventListener(`change`,n),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,r)}_getRawKeyPath(){try{return JSON.parse(this.keyPathJson)}catch{return[]}}_getFilteredKeyPath(){return this._getRawKeyPath().filter(e=>e.type!==k)}_updateEditedValue(e){let t=this._getFilteredKeyPath();if(!this.dictionaryKey||t.length===0){this._editedValue=void 0;return}let n=this._getRawKeyPath(),r=n[n.length-1]?.type;if(r===`markdown`||r===`html`||r===`insertion`||r===`file`){this._editedValue=void 0;return}let i=e.getContentValue(this.dictionaryKey,t);if(typeof i==`object`&&i&&i.nodeType===`translation`){let t=e.currentLocale.value;i=t?i[k][t]:void 0}this._editedValue=i}_updateIsSelected(e){if(!e){this._isSelected=!1;return}let t=this._getFilteredKeyPath();this._isSelected=e.dictionaryKey===this.dictionaryKey&&(e.keyPath?.length??0)>0&&fr(e.keyPath??[],t)}_handlePress(e){e.stopPropagation();let t=MS();t&&t.focusedContent.set({dictionaryKey:this.dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),MS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this.dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),MS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,null)}render(){if(!this._isInIframe||!this._editorEnabled)return DC`<slot></slot>`;let e=this._editedValue,t=typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:DC`<slot></slot>`;return DC`
|
|
42
|
+
<intlayer-content-selector
|
|
43
|
+
?is-selecting=${this._isSelected}
|
|
44
|
+
@intlayer:press=${this._handlePress}
|
|
45
|
+
@intlayer:hover=${this._handleHover}
|
|
46
|
+
@intlayer:unhover=${this._handleUnhover}
|
|
47
|
+
>
|
|
48
|
+
${t}
|
|
49
|
+
</intlayer-content-selector>
|
|
50
|
+
`}};FS([XC({type:String,attribute:`key-path`})],ew.prototype,`keyPathJson`,void 0),FS([XC({type:String,attribute:`dictionary-key`})],ew.prototype,`dictionaryKey`,void 0),FS([ZC()],ew.prototype,`_editorEnabled`,void 0),FS([ZC()],ew.prototype,`_isInIframe`,void 0),FS([ZC()],ew.prototype,`_isSelected`,void 0),FS([ZC()],ew.prototype,`_editedValue`,void 0);var tw=()=>{typeof customElements>`u`||customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,ew)},nw=class extends KC{constructor(...e){super(...e),this.dictionaryKey=``,this.keyPathJson=`[]`,this.locale=``,this._editedText=null,this._unsubManager=null,this._unsubEditedContent=null}static{this.styles=HS`
|
|
51
|
+
:host {
|
|
52
|
+
display: contents;
|
|
53
|
+
}
|
|
54
|
+
`}connectedCallback(){super.connectedCallback(),this._subscribeToManager()}disconnectedCallback(){super.disconnectedCallback(),this._teardown()}_teardown(){this._unsubManager?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEditedContent=null}_getKeyPath(){try{return JSON.parse(this.keyPathJson)}catch{return[]}}_resolveEditedText(e){let t=this._getKeyPath(),n=e.getContentValue(this.dictionaryKey,t);if(n==null){this._editedText=null;return}if(typeof n==`string`||typeof n==`number`){this._editedText=String(n);return}if(typeof n==`object`){let e=this.locale||void 0,r=Se(n,{locale:e,dictionaryKey:this.dictionaryKey,keyPath:t},xe(e));typeof r==`string`||typeof r==`number`?this._editedText=String(r):(console.error(`[intlayer-edited-content] Incorrect edited content format. Expected string. Value: ${JSON.stringify(r)}`),this._editedText=null);return}this._editedText=null}_setupManagerSubscriptions(e){this._resolveEditedText(e);let t=()=>this._resolveEditedText(e);e.editedContent.addEventListener(`change`,t),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,t)}_subscribeToManager(){let e=MS();e&&this._setupManagerSubscriptions(e),this._unsubManager=PS(e=>{this._unsubEditedContent?.(),this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):this._editedText=null})}render(){return DC`
|
|
55
|
+
<intlayer-content-selector-wrapper
|
|
56
|
+
key-path=${this.keyPathJson}
|
|
57
|
+
dictionary-key=${this.dictionaryKey}
|
|
58
|
+
>
|
|
59
|
+
${this._editedText===null?DC`<slot></slot>`:this._editedText}
|
|
60
|
+
</intlayer-content-selector-wrapper>
|
|
61
|
+
`}};FS([XC({type:String,attribute:`dictionary-key`})],nw.prototype,`dictionaryKey`,void 0),FS([XC({type:String,attribute:`key-path`})],nw.prototype,`keyPathJson`,void 0),FS([XC({type:String,attribute:`locale`})],nw.prototype,`locale`,void 0),FS([ZC()],nw.prototype,`_editedText`,void 0);var rw=()=>{typeof customElements>`u`||customElements.get(`intlayer-edited-content`)||customElements.define(`intlayer-edited-content`,nw)},iw=()=>Math.random().toString(36).slice(2),aw=class{constructor(e){this._subscribers=new Map,this._windowHandler=null,this._seenMessageIds=new Set,this._config=e,this.senderId=iw()}start(){typeof window>`u`||this._windowHandler||(this._windowHandler=e=>{this._handleMessage(e)},window.addEventListener(`message`,this._windowHandler))}stop(){this._windowHandler&&=(window.removeEventListener(`message`,this._windowHandler),null)}send(e,t){let n={type:e,data:t,senderId:this.senderId,messageId:iw()};for(let e of this._config.allowedOrigins)e&&this._config.postMessageFn(n,e)}subscribe(e,t){return this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(t),()=>{this._subscribers.get(e)?.delete(t)}}_handleMessage(e){let t=e.data;if(!t||typeof t!=`object`)return;let{type:n,data:r,senderId:i,messageId:a}=t;if(!n||typeof n!=`string`||i===this.senderId)return;if(a){if(this._seenMessageIds.has(a))return;this._seenMessageIds.add(a),this._seenMessageIds.size>200&&this._seenMessageIds.clear()}let{allowedOrigins:o}=this._config;if(!(!o||o.length===0||o.includes(`*`)||o.filter(e=>!!e&&e!==``).some(t=>ES(t,e.origin))))return;let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},ow=class extends EventTarget{constructor(e,t,n={}){super(),this._unsubscribers=[],this._key=e,this._messenger=t,this._options={emit:n.emit??!0,receive:n.receive??!0},n.initialValue!==void 0&&(this._value=n.initialValue)}get value(){return this._value}set(e){this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e})),this._options.emit&&this._messenger.send(`${this._key}/post`,e)}start(){if(this._options.receive){let e=this._messenger.subscribe(`${this._key}/post`,e=>{this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e}))});this._unsubscribers.push(e)}if(this._options.emit){let e=this._messenger.subscribe(`${this._key}/get`,(e,t)=>{t!==this._messenger.senderId&&this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)});this._unsubscribers.push(e)}this._options.receive&&this._value===void 0&&this._messenger.send(`${this._key}/get`)}stop(){for(let e of this._unsubscribers)e();this._unsubscribers.length=0}postCurrentValue(){this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)}},sw=class{constructor(e){this._mousedownHandler=null,this._unsubscribeMerge=null,this._messenger=e}startInterceptor(){typeof window>`u`||(this._mousedownHandler=()=>{this._messenger.send(`INTLAYER_IFRAME_CLICKED`)},window.addEventListener(`mousedown`,this._mousedownHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(`INTLAYER_IFRAME_CLICKED`,OS)}stopInterceptor(){this._mousedownHandler&&=(window.removeEventListener(`mousedown`,this._mousedownHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},cw=class{constructor(e){this._originalPushState=null,this._originalReplaceState=null,this._listeners=[],this._messenger=e}start(){if(typeof window>`u`)return;let e=()=>{this._messenger.send(`INTLAYER_URL_CHANGE/post`,window.location.pathname)};this._originalPushState=history.pushState,this._originalReplaceState=history.replaceState;let t=e=>function(...t){e.apply(this,t),window.dispatchEvent(new Event(`locationchange`))};history.pushState=t(this._originalPushState),history.replaceState=t(this._originalReplaceState);for(let t of[`locationchange`,`popstate`,`hashchange`,`load`]){let n=e;window.addEventListener(t,n),this._listeners.push([t,n])}e()}stop(){if(!(typeof window>`u`)){for(let[e,t]of this._listeners)window.removeEventListener(e,t);this._listeners=[],this._originalPushState&&=(history.pushState=this._originalPushState,null),this._originalReplaceState&&=(history.replaceState=this._originalReplaceState,null)}}},lw=(e,t,n)=>{let r=e,i=null,a=[];if(t.length===0)return n;try{for(let e=0;e<t.length;e++){let o=t[e];if(i=r,(o.type===`object`||o.type===`array`)&&(a=[o.key],(!r[o.key]||typeof r[o.key]!=`object`)&&(r[o.key]={}),r=r[o.key]),(o.type===`translation`||o.type===`enumeration`)&&(a=[o.type,o.key],(!r[o.type]||typeof r[o.type]!=`object`)&&(r[o.type]={}),(!r[o.type][o.key]||typeof r[o.type][o.key]!=`object`)&&(r[o.type][o.key]={}),r=r[o.type][o.key]),(o.type===`enumeration`||o.type===`condition`)&&o.type!==`enumeration`&&(a=[o.type,o.key],r=r[o.type][o.key]),(o.type===`markdown`||o.type===`html`||o.type===`insertion`)&&(a=[o.type],(!r[o.type]||typeof r[o.type]!=`object`)&&(r[o.type]=``),r=r[o.type]),o.type===`file`&&(a=[`content`],r=r.content),e===t.length-1&&i&&a.length>0){let e=i;for(let t of a.slice(0,-1))e=e[t];let t=a[a.length-1];if(n===void 0)if(Array.isArray(e)){let n=Number(t);!Number.isNaN(n)&&n>=0&&n<e.length&&e.splice(n,1)}else delete e[t];else e[t]=n}}return e}catch(r){return console.error(`Cannot edit dictionary by key path`,{dictionaryContent:e,keyPath:t,newValue:n},r),e}},uw=(e,t,n)=>{let r=structuredClone(e);for(let e of t)n&&r?.nodeType===`translation`&&(r=r?.[k]?.[n]),(e.type===`object`||e.type===`array`)&&(r=r?.[e.key]),(e.type===`translation`||e.type===`condition`||e.type===`enumeration`)&&(r=r?.[e.type]?.[e.key]),(e.type===`markdown`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(r=r?.[e.type]);return r},dw=(e,t,n)=>{let r=structuredClone(n);switch(e){case k:return{nodeType:k,[k]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case A:return{nodeType:A,[A]:{1:r??``}};case j:return{nodeType:j,[j]:{true:r??``,false:r??``}};case M:return{nodeType:M,[M]:{insertion:r??``}};case I:return{nodeType:I,[I]:{dictionaryKey:``}};case R:return{nodeType:R,[R]:r??``};case ee:return{nodeType:ee,[ee]:r??``,customComponents:[]};case N:return{nodeType:N,[N]:r??``};case P:return{newKey:r??``};case F:return[r??``];case te:return r??``;case ne:return r??0;case z:return r??!0;default:return r??``}},fw=e=>{if(typeof e==`string`)return``;if(typeof e==`number`)return 0;if(typeof e==`boolean`)return!0;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`html`?fw(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?fw(t):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(fw);let t=Object.entries(e).map(([e,t])=>[e,fw(t)]);return Object.fromEntries(t)},pw=e=>{if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`file`||t.nodeType===`markdown`||t.nodeType===`html`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},mw=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,hw=e=>[k,A,j,M,N,P,F,I,L,R,ee,te,ne,z,B,re,ie].includes(e),gw=e=>{if(typeof e==`string`)return te;if(mw(e)){let t=e.nodeType;return hw(t)?t:ie}return Array.isArray(e)?F:dr(e)?L:typeof e==`number`?ne:typeof e==`boolean`?z:e&&typeof e==`object`?P:e===null?re:ie},_w=(e,t,n)=>{let r=e,i=null,a=null;for(let e of n)i=r,(e.type===`object`||e.type===`array`)&&(a=e.key,r=r[e.key]),(e.type===`translation`||e.type===`enumeration`||e.type===`condition`)&&(a=e.type,r=r[e.type][e.key]),(e.type===`markdown`||e.type===`reactNode`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(a=e.type,r=r[e.type]);if(i&&a!==null)if(Array.isArray(i))i[a]=r;else{let e={};for(let n of Object.keys(i))n===a&&t!==void 0?e[t]=r:e[n]=i[n];Object.keys(i).forEach(e=>{delete i[e]}),Object.assign(i,e)}return e},vw=class{constructor(e){this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this._mode=e.mode,this._configuration=e.configuration,this.messenger=new aw(e.messenger),this.editorEnabled=new ow(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new ow(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new ow(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new ow(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new ow(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new ow(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this._urlManager=new cw(this.messenger),this._iframeInterceptor=new sw(this.messenger)}start(){this.messenger.start(),this.editorEnabled.start(),this.focusedContent.start(),this.localeDictionaries.start(),this.editedContent.start(),this.configuration.start(),this.currentLocale.start(),this._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),this.messenger.send(`INTLAYER_EDITED_CONTENT_CHANGED/get`),this._configuration?.editor?.enabled!==!1&&this._setupActivationHandshake()):(this._iframeInterceptor.startMerger(),this._setupEditorHandshake())}stop(){this._unsubAreYouThere?.(),this._unsubActivate?.(),this._unsubClientReady?.(),this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this.messenger.stop(),this.editorEnabled.stop(),this.focusedContent.stop(),this.localeDictionaries.stop(),this.editedContent.stop(),this.configuration.stop(),this.currentLocale.stop(),this._urlManager.stop(),this._iframeInterceptor.stopInterceptor(),this._iframeInterceptor.stopMerger()}pingClient(){this._mode===`editor`&&this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}setFocusedContentKeyPath(e){let t=e.filter(e=>e.type!==k),n=this.focusedContent.value;n&&this.focusedContent.set({...n,keyPath:t})}setLocaleDictionary(e){if(!e.localId)return;let t=this.localeDictionaries.value??{};this.localeDictionaries.set({...t,[e.localId]:e})}setEditedDictionary(e){if(!e.localId){console.error(`setEditedDictionary: missing localId`,e);return}let t=this.editedContent.value??{};this.editedContent.set({...t,[e.localId]:e})}setEditedContent(e,t){let n=this.editedContent.value??{};this.editedContent.set({...n,[e]:{...n[e],content:t}})}addContent(e,t,n=[],r=!0){let i=this.editedContent.value??{},a=(this.localeDictionaries.value??{})[e]?.content,o=structuredClone(i[e]?.content??a),s=n;if(!r){let e=0,t=n.slice(0,-1),r=n[n.length-1],i=r.key;for(;uw(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=lw(o,s,t);this.editedContent.set({...i,[e]:{...i[e],content:c}})}renameContent(e,t,n=[]){let r=this.editedContent.value??{},i=(this.localeDictionaries.value??{})[e]?.content,a=_w(structuredClone(r[e]?.content??i),t,n);this.editedContent.set({...r,[e]:{...r[e],content:a}})}removeContent(e,t){let n=this.editedContent.value??{},r=(this.localeDictionaries.value??{})[e]?.content,i=lw(structuredClone(n[e]?.content??r),t,uw(r,t));this.editedContent.set({...n,[e]:{...n[e],content:i}})}restoreContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearAllContent(){this.editedContent.set({})}getContentValue(e,t){let n=this.editedContent.value;if(!n)return;let r=t.filter(e=>e.type!==k),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:uw(n[e]?.content??{},r,this.currentLocale.value);let a=Object.keys(n).filter(t=>t.startsWith(`${e}:`)&&(!i||t in i));for(let e of a){let t=uw(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_setupEditorHandshake(){this._unsubClientReady=this.messenger.subscribe(`INTLAYER_CLIENT_READY`,()=>{this.editorEnabled.set(!0),this.messenger.send(`INTLAYER_EDITOR_ACTIVATE`)}),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}_setupActivationHandshake(){this.messenger.send(`INTLAYER_CLIENT_READY`),this._unsubAreYouThere=this.messenger.subscribe(`INTLAYER_ARE_YOU_THERE`,()=>{this.messenger.send(`INTLAYER_CLIENT_READY`)}),this._unsubActivate=this.messenger.subscribe(`INTLAYER_EDITOR_ACTIVATE`,()=>{this.editorEnabled.set(!0),this._broadcastData()})}_broadcastData(){let e=this.configuration.value;e&&this.messenger.send(`INTLAYER_CONFIGURATION/post`,e);let t=this.currentLocale.value;t&&this.messenger.send(`INTLAYER_CURRENT_LOCALE/post`,t);let n=this.localeDictionaries.value;n&&this.messenger.send(`INTLAYER_LOCALE_DICTIONARIES_CHANGED/post`,n)}async _loadDictionaries(){try{let e=(await d(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-B599AqSH.js`);return{getUnmergedDictionaries:e}},[])).getUnmergedDictionaries(),t=Object.fromEntries(Object.values(e).flat().map(e=>[e.localId,e]));this.localeDictionaries.set(t),this.editorEnabled.value&&this._broadcastData()}catch(e){console.warn(`[intlayer] Failed to load unmerged dictionaries:`,e)}}},yw=class extends KC{constructor(...e){super(...e),this._initialized=!1,this._unsubManager=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._init()}disconnectedCallback(){super.disconnectedCallback(),this._unsubManager?.(),this._unsubManager=null,this._initialized&&=(Dw(),!1)}updated(e){e.has(`configuration`)&&!this._initialized&&this._init(),e.has(`locale`)&&this.locale&&this._syncLocale(this.locale)}_init(){this._initialized||(Ew(),this._initialized=!0,this.locale&&this._syncLocale(this.locale))}_syncLocale(e){let t=MS();t?t.currentLocale.set(e):(this._unsubManager?.(),this._unsubManager=PS(t=>{t&&(this._unsubManager?.(),this._unsubManager=null,t.currentLocale.set(e))}))}};FS([XC({attribute:!1})],yw.prototype,`configuration`,void 0),FS([XC({type:String})],yw.prototype,`locale`,void 0);var bw=()=>{typeof customElements>`u`||customElements.get(`intlayer-editor`)||customElements.define(`intlayer-editor`,yw)},xw=250,Sw=class extends KC{constructor(...e){super(...e),this.isSelecting=!1,this.pressDuration=xw,this._isHovered=!1,this._isSelectingState=!1,this._pressTimer=null,this._clickOutsideHandler=null}static{this.styles=HS`
|
|
62
|
+
:host {
|
|
63
|
+
display: contents;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.wrapper {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
user-select: none;
|
|
70
|
+
border-radius: 0.375rem;
|
|
71
|
+
outline-width: 2px;
|
|
72
|
+
outline-offset: 4px;
|
|
73
|
+
outline-style: solid;
|
|
74
|
+
outline-color: transparent;
|
|
75
|
+
transition: all 100ms 50ms ease-in-out;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wrapper[data-active] {
|
|
79
|
+
outline-color: inherit;
|
|
80
|
+
}
|
|
81
|
+
`}connectedCallback(){super.connectedCallback(),this._clickOutsideHandler=e=>{e.composedPath().includes(this)||(this._isSelectingState=!1,this._dispatch(`intlayer:click-outside`))},document.addEventListener(`mousedown`,this._clickOutsideHandler)}disconnectedCallback(){super.disconnectedCallback(),this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),null),this._clearPressTimer()}_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._dispatch(`intlayer:press`)},this.pressDuration)}_handleMouseEnter(){this._isHovered=!0,this._dispatch(`intlayer:hover`)}_handleMouseUpOrLeave(){this._isHovered&&(this._isHovered=!1,this._dispatch(`intlayer:unhover`)),this._clearPressTimer()}_handleClick(e){(this.isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1}render(){return DC`
|
|
82
|
+
<span
|
|
83
|
+
class="wrapper"
|
|
84
|
+
?data-active=${this.isSelecting||this._isSelectingState||this._isHovered}
|
|
85
|
+
role="button"
|
|
86
|
+
tabindex="0"
|
|
87
|
+
@mousedown=${this._handleMouseDown}
|
|
88
|
+
@mouseup=${this._handleMouseUpOrLeave}
|
|
89
|
+
@mouseleave=${this._handleMouseUpOrLeave}
|
|
90
|
+
@mouseenter=${this._handleMouseEnter}
|
|
91
|
+
@click=${this._handleClick}
|
|
92
|
+
@touchstart=${this._handleMouseDown}
|
|
93
|
+
@touchend=${this._handleMouseUpOrLeave}
|
|
94
|
+
@touchcancel=${this._handleMouseUpOrLeave}
|
|
95
|
+
@blur=${this._handleBlur}
|
|
96
|
+
@keyup=${()=>{}}
|
|
97
|
+
>
|
|
98
|
+
<slot></slot>
|
|
99
|
+
</span>
|
|
100
|
+
`}};FS([XC({type:Boolean,attribute:`is-selecting`})],Sw.prototype,`isSelecting`,void 0),FS([XC({type:Number,attribute:`press-duration`})],Sw.prototype,`pressDuration`,void 0),FS([ZC()],Sw.prototype,`_isHovered`,void 0),FS([ZC()],Sw.prototype,`_isSelectingState`,void 0),FS([$C(`.wrapper`)],Sw.prototype,`_wrapper`,void 0);var Cw=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,Sw),tw(),rw(),bw())},ww=()=>({allowedOrigins:[C?.editorURL,C?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),Tw=0,Ew=()=>{Tw++;let e=MS();if(e)return e;let t=new vw({mode:`client`,messenger:ww(),configuration:w});return NS(t),Cw(),t.start(),t},Dw=()=>{Tw=Math.max(0,Tw-1),!(Tw>0)&&(MS()?.stop(),NS(null))},Ow=(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,v.useState)(o),l=(0,v.useRef)(o),u=(0,v.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 ow(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,v.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,y;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{u.current?.postCurrentValue()},r[13]=y):y=r[13];let x=y,S;return r[14]===s?S=r[15]:(S=[s,_,x],r[14]=s,r[15]=S),S},kw=(e,t)=>Ow(DS.INTLAYER_URL_CHANGE,e,t),Aw=()=>{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,v.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,v.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},jw=()=>{let e=(0,b.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=Aw(),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},Mw=()=>{let e=(0,b.c)(3),t=xS(),[n,r]=(0,v.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,v.useEffect)(i,a),n},Nw=(e,t,n)=>{for(let r of t)try{if(uw(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},Pw=()=>{let e=(0,b.c)(12),{localeDictionaries:t}=Aw(),n=Mw(),{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=Nw(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},Fw=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,v.useRef)(null);i.current||=new vw({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,v.useEffect)(()=>(Cw(),NS(a),a.start(),()=>{a.stop(),NS(null)}),[a]),(0,T.jsx)(bS,{manager:a,children:e})},Iw=(0,v.createContext)(void 0),Lw=()=>{let e=(0,b.c)(4),t=xS(),n=(0,v.useContext)(Iw),[r,i]=(0,v.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,v.useEffect)(a,o),r??n},Rw=()=>{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},zw=()=>{let e=(0,b.c)(6),t=xS(),[n,r]=(0,v.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,v.useEffect)(i,a);let o=Rw(),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},Bw=()=>{let e=(0,b.c)(5),t=xS(),[n,r]=(0,v.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,v.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},Vw=()=>{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},Hw=(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,v.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},Uw=()=>{Hw(DS.INTLAYER_IFRAME_CLICKED,OS)},Ww=e=>{let t=(0,b.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=uw(i,n,Mw());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,u=s??r,d;t[1]!==n||t[2]!==o?(d=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=d):d=t[3];let f;return t[4]!==n||t[5]!==a?(f=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=f):f=t[6],(0,T.jsx)(`button`,{type:`button`,className:l(`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:d,children:(0,T.jsx)(vS,{value:u,onChange:f})})},Gw=e=>{let{keyPath:t,section:n}=e;return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!mT.includes(e)).map(r=>{let i={type:j,key:r},a=[...t,i],o=n[j][r];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,v.createElement)(hT,{...e,key:r,keyPath:a,section:o})]})})})},Kw=e=>{let{keyPath:t,section:n}=e;return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!mT.includes(e)).map(r=>{let i={type:A,key:r},a=[...t,i],o=n[A][r];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,v.createElement)(hT,{...e,key:r,keyPath:a,section:o})]})})})},qw=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,v.useState)(!1),u=(0,v.useRef)(null),d=e=>{e.stopPropagation(),c(!1),n()},f=e=>{e.stopPropagation(),c(!1),t()},p=!e||e===``?`-`:e,m=(0,v.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||u.current&&!u.current.contains(e.target)&&(c(!1),n())},[n]);return(0,v.useEffect)(()=>(s?document.addEventListener(`click`,m):document.removeEventListener(`click`,m),()=>document.removeEventListener(`click`,m)),[m,s]),(0,T.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:u,...o,children:[(0,T.jsxs)(`div`,{className:l(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,T.jsx)(aS,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:vu,onClick:d,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,T.jsx)(aS,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Uu,onClick:f,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,T.jsxs)(`div`,{className:l(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,T.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:p}),(0,T.jsx)(aS,{label:`Edit`,Icon:Fu,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},Jw=(...e)=>e.filter(Boolean).join(` `),Yw=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`}}),Xw=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,T.jsx)(`input`,{className:Jw(Yw({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),Zw=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,T.jsx)(`textarea`,{className:l(`resize-none`,Yw({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),Qw=24,$w=12,eT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,v.useRef)(null);(0,v.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=Qw*r+$w,s=Qw+$w;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,v.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,T.jsx)(Zw,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:l(`overflow-y-auto`,t&&`resize-none`,e),...a})},tT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,v.useRef)(null);return(0,v.useImperativeHandle)(n,()=>i.current),(0,T.jsx)(qw,{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,T.jsx)(eT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},nT=e=>{let t=(0,b.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,u=Mw(),d;t[0]!==u||t[1]!==i||t[2]!==a||t[3]!==n?(d=a??uw(i,n,u),t[0]=u,t[1]=i,t[2]=a,t[3]=n,t[4]=d):d=t[4];let f=d;if(f&&typeof f!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let p=n.length,m=String(f??r),h;if(t[6]!==m||t[7]!==n||t[8]!==p||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],h=(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,p===2&&`hover:bg-card/30`,p>=3&&``),onClick:e,children:typeof c==`function`?c(m):(0,T.jsx)(tT,{"aria-label":`Editable field`,defaultValue:m,onSave:e=>o({keyPath:n,newValue:e}),onCancel:rT})}),t[6]=m,t[7]=n,t[8]=p,t[9]=o,t[10]=s,t[11]=c,t[12]=h}else h=t[12];return h};function rT(){return null}var iT=e=>{let t=(0,b.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=zw(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=uw(e.editedContent,n),s=r[N],{content:c}=r,l=[...n,{type:N}],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,T.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,T.jsx)(nT,{...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},aT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:ee}],i=n[ee];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(hT,{...e,keyPath:r,section:i})})},oT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:M}],i=n[M];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(hT,{...e,keyPath:r,section:i})})},sT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(hT,{...e,keyPath:r,section:i})})},cT=(0,v.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(lT),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:P},o=[...n,i],c=fr(o,s);return(0,T.jsx)(cS,{level:n.length,title:gr(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,T.jsx)(hT,{...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 lT(e){return!mT.includes(e)}var uT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,v.useRef)(null);return(0,v.useImperativeHandle)(n,()=>i.current),(0,T.jsx)(qw,{value:(0,v.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,T.jsx)(Xw,{ref:i,...r})})},dT=e=>{let t=(0,b.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Mw(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=uw(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let u=c;if(u!==void 0&&typeof u!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let d=n.length,f=String(u??r),p;if(t[5]!==f||t[6]!==n||t[7]!==d||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],p=(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,d===2&&`hover:bg-card/30`,d>=3&&``),onClick:e,children:(0,T.jsx)(uT,{"aria-label":`Editable number field`,type:`number`,defaultValue:f,onSave:r,onCancel:fT})}),t[5]=f,t[6]=n,t[7]=d,t[8]=a,t[9]=o,t[10]=p}else p=t[10];return p};function fT(){return null}var pT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,T.jsx)(hT,{...e,keyPath:a,section:o})},mT=[`filePath`,`id`,`nodeType`],hT=(0,v.memo)(e=>{let t=Mw(),n=(0,v.useMemo)(()=>uw(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,v.useMemo)(()=>gw(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,T.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,T.jsx)(sT,{...e,section:n}):r===`html`?(0,T.jsx)(aT,{...e,section:n}):r===`translation`?(0,T.jsx)(pT,{...e,section:n}):r===`enumeration`?(0,T.jsx)(Kw,{...e,section:n}):r===`condition`?(0,T.jsx)(Gw,{...e,section:n}):r===`insertion`?(0,T.jsx)(oT,{...e,section:n}):r===`array`?(0,T.jsx)(lS,{...e,section:n}):r===`file`?(0,T.jsx)(iT,{...e,section:n}):(0,T.jsx)(cT,{...e,section:n});if(typeof n==`string`)return(0,T.jsx)(nT,{...e,section:n});if(typeof n==`number`)return(0,T.jsx)(dT,{...e,section:n});if(typeof n==`boolean`)return(0,T.jsx)(Ww,{...e,section:n})}),gT=e=>{let t=(0,b.c)(6),{dictionary:n,...r}=e,i=Mw(),{editedContent:a,addEditedContent:o}=zw(),{focusedContent:s,setFocusedContentKeyPath:c}=Pw(),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,T.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,v.createElement)(hT,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},_T={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`]},vT=(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,v.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,v.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},yT=(0,v.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),bT=()=>(0,v.useContext)(yT),xT=e=>{let t=(0,b.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=xr(),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]=vT(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,T.jsx)(yT,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[3]=n,t[4]=i,t[5]=s,t[6]=c,t[7]=l):l=t[7],l},ST=e=>{let t=(0,b.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,v.useState)(n),[u,d]=(0,v.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(CT)},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 y=_,x=e=>{e.key===`Enter`&&!i&&w?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),m())},S,C;t[6]===n?(S=t[7],C=t[8]):(S=()=>{l(n),d(wT)},C=[n],t[6]=n,t[7]=S,t[8]=C),(0,v.useEffect)(S,C);let w=a?.(c)??!0;return(0,T.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,T.jsx)(Xw,{onChange:y,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!w,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,T.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,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(aS,{Icon:vu,label:`Save changes${w?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!w,onClick:g,"aria-describedby":w?void 0:`validation-error`}),(0,T.jsx)(aS,{Icon:Uu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function CT(e){return e+1}function wT(e){return e+1}var TT={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},ET=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),DT=e=>e.reduce((e,t)=>{let n=e??{},r=ET(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=DT([TT,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=DT([TT.headers,...t.map(e=>e.headers)]),s=DT(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=DT(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()},OT=(e={},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(`
|
|
101
|
+
`);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}},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})}},kT=(e={},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(`
|
|
102
|
+
`);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`})}},AT=(e={},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}})}},jT=(e={},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`})}},MT=(e={},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})}},NT=(e={},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}})}},PT=(e={},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}}})}},FT=(e={},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`})}},IT=e=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},LT=(e={},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`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},RT=(e={},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`}),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`})}},zT=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},BT=(e={},t=w)=>{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`})}},VT=(e={},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`})}},HT=(e={},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`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},UT=(e={},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 WT(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 GT(e,t,n=`.`,r){if(!WT(t))return GT(e,{},n,r);let i=Object.assign({},t);for(let t in 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]]:WT(a)&&WT(i[t])?i[t]=GT(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function KT(e){return(...t)=>t.reduce((t,n)=>GT(t,n,``,e),{})}var qT=KT(),JT=(e={},t)=>{let n=qT(t??{},w);return{organization:LT(e,n),project:RT(e,n),user:HT(e,n),oAuth:IT(n),dictionary:jT(e,n),stripe:BT(e,n),ai:OT(e,n),audit:kT(e,n),tag:VT(e,n),search:zT(e,n),editor:MT(e,n),newsletter:FT(e,n),github:NT(e,n),gitlab:PT(e,n),bitbucket:AT(e,n),showcaseProject:UT(e,n)}},YT=e=>{let t=(0,b.c)(8),n=Lw(),r=e??n??w,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`oAuth2AccessToken`],t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=IT(r),t[1]=r,t[2]=a);let o=!!(r.editor.clientId&&r.editor.clientSecret),s;t[3]!==a.getOAuth2AccessToken||t[4]!==o?(s={queryKey:i,queryFn:a.getOAuth2AccessToken,enabled:o,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[3]=a.getOAuth2AccessToken,t[4]=o,t[5]=s):s=t[5];let{data:c}=cc(s),l=c?.data,u;return t[6]===l?u=t[7]:(u={oAuth2AccessToken:l},t[6]=l,t[7]=u),u};function XT(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var ZT=XT({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`}),QT=`1.6.5`;function $T(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 eE(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 tE(){return nE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var nE={stubThis:e=>e};function rE(e){let{id:t}=e;return{...e,id:eE(t),transports:e.transports}}function iE(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 aE=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 oE({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 aE({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 aE({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 aE({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 aE({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 aE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new aE({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 aE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new aE({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(!iE(t))return new aE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new aE({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 aE({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 aE({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 sE=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}}},cE=[`cross-platform`,`platform`];function lE(e){if(e&&!(cE.indexOf(e)<0))return e}async function uE(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(!tE())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:eE(t.challenge),user:{...t.user,id:eE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(rE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=sE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw oE({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){dE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=$T(e))}catch(e){dE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=$T(c.getAuthenticatorData())}catch(e){dE(`getAuthenticatorData()`,e)}return{id:o,rawId:$T(s),response:{attestationObject:$T(c.attestationObject),clientDataJSON:$T(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:lE(a.authenticatorAttachment)}}function dE(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 fE(){if(!tE())return pE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?pE.stubThis(new Promise(e=>e(!1))):pE.stubThis(e.isConditionalMediationAvailable())}var pE={stubThis:e=>e};function mE({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 aE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new aE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!iE(t))return new aE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new aE({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 aE({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 hE(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(!tE())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(rE));let a={...t,challenge:eE(t.challenge),allowCredentials:i},o={};if(n){if(!await fE())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=sE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw mE({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=$T(u.userHandle)),{id:c,rawId:$T(l),response:{authenticatorData:$T(u.authenticatorData),clientDataJSON:$T(u.clientDataJSON),signature:$T(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:lE(s.authenticatorAttachment)}}var gE=`1.6.5`,_E=Symbol.for(`better-auth:broadcast-channel`),vE=()=>Math.floor(Date.now()/1e3),yE=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:vE()}))}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 bE(e=`better-auth.message`){return globalThis[_E]||(globalThis[_E]=new yE(e)),globalThis[_E]}var xE=Symbol.for(`better-auth:focus-manager`),SE=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 CE(){return globalThis[xE]||(globalThis[xE]=new SE),globalThis[xE]}var wE=Symbol.for(`better-auth:online-manager`),TE=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 EE(){return globalThis[wE]||(globalThis[wE]=new TE),globalThis[wE]}var DE={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*:/},OE=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,kE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},AE=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function jE(e){return e instanceof Date&&!isNaN(e.getTime())}function ME(e){let t=AE.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 jE(f)?f:null}function NE(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 kE)return kE[s];if(!OE.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(DE).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=ME(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function PE(e,t={strict:!0}){return NE(e,t)}var FE=[],IE=0,LE=4,RE=0,zE=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=IE+LE;t<FE.length;)FE[t]===e?FE.splice(t,LE):t+=LE;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){RE++;let i=!FE.length;for(let i of t)FE.push(i,n.value,e,r);if(i){for(IE=0;IE<FE.length;IE+=LE)FE[IE](FE[IE+1],FE[IE+2],FE[IE+3]);FE.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},BE=5,VE=6,HE=10,UE=(e,t,n,r)=>(e.events=e.events||{},e.events[n+HE]||(e.events[n+HE]=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+HE](),delete e.events[n+HE])}),WE=1e3,GE=(e,t)=>UE(e,n=>{let r=t(n);r&&e.events[VE].push(r)},BE,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[VE]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[VE])t();e.events[VE]=[]}},WE)},()=>{e.listen=n,e.off=r}}),KE=()=>typeof window>`u`,qE=(e,t,n,r)=>{let i=zE({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()=>{KE()||(o?await a():GE(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},JE=()=>Math.floor(Date.now()/1e3);function YE(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var XE=5;function ZE(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||EE().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=JE(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=JE(),r(`/get-session`).then(async e=>{let{data:a,error:o}=YE(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=YE(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=JE(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(JE()-c.lastSessionRequest<XE)return;c.lastSessionRequest=JE()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=JE(),n.set(!n.get()))},d=e=>{bE().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=bE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=CE().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=EE().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),bE().setup(),CE().setup(),EE().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 QE=Object.create(null),$E=e=>({}),eD=new Proxy(QE,{get(e,t){return $E()[t]??QE[t]},has(e,t){return t in $E()||t in QE},set(e,t,n){let r=$E(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=$E(!0);return delete n[t],!0},ownKeys(){let e=$E(!0);return Object.keys(e)}});function tD(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 tD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return tD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return tD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return tD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return tD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return tD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return tD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function nD(){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 rD(e){let t=e.split(`
|
|
103
|
+
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
104
|
+
at `))}function iD(e,t){class n extends e{#e;constructor(...e){if(nD()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=rD(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 aD={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};iD(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:aD[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 oD=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function sD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new oD(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function cD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new oD(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof oD?t:new oD(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function lD(e,t=`/api/auth`){if(cD(e),sD(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function uD(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 dD(e,t,n,r,i){if(e)return lD(e,t);if(r!==!1){let e=eD.BETTER_AUTH_URL||eD.NEXT_PUBLIC_BETTER_AUTH_URL||eD.PUBLIC_BETTER_AUTH_URL||eD.NUXT_PUBLIC_BETTER_AUTH_URL||eD.NUXT_PUBLIC_AUTH_URL||(eD.BASE_URL===`/`?void 0:eD.BASE_URL);if(e)return lD(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&uD(o,`proto`)&&uD(a,`host`))try{return lD(`${o}://${a}`,t)}catch{}if(n){let e=fD(n.url);if(!e)throw new oD(`Could not get origin from request. Please provide a valid base URL.`);return lD(e,t)}if(typeof window<`u`&&window.location)return lD(window.location.origin,t)}function fD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var pD={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 mD(e,t){let n=zE(!1),r=qE(n,`/get-session`,e,{method:`GET`}),i=()=>{};return GE(r,()=>{let a=ZE({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}function hD(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 gD(e,t,n=`.`,r){if(!hD(t))return gD(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]]:hD(a)&&hD(i[t])?i[t]=gD(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function _D(e){return(...t)=>t.reduce((t,n)=>gD(t,n,``,e),{})}var vD=_D(),yD=Object.defineProperty,bD=Object.defineProperties,xD=Object.getOwnPropertyDescriptors,SD=Object.getOwnPropertySymbols,CD=Object.prototype.hasOwnProperty,wD=Object.prototype.propertyIsEnumerable,TD=(e,t,n)=>t in e?yD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ED=(e,t)=>{for(var n in t||={})CD.call(t,n)&&TD(e,n,t[n]);if(SD)for(var n of SD(t))wD.call(t,n)&&TD(e,n,t[n]);return e},DD=(e,t)=>bD(e,xD(t)),OD=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)}},kD=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}},AD=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}},jD=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 MD(e){if(typeof e==`number`)return new AD({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new AD(e);case`exponential`:return new jD(e);default:throw Error(`Invalid retry strategy`)}}var ND=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},PD=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function FD(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 PD.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function ID(e){try{return JSON.parse(e),!0}catch{return!1}}function LD(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 RD(e){try{return JSON.parse(e)}catch{return e}}function zD(e){return typeof e==`function`}function BD(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&zD(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&zD(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function VD(e){let t=new Headers(e?.headers),n=await ND(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=HD(e?.body);n&&t.set(`content-type`,n)}return t}function HD(e){return LD(e)?`application/json`:null}function UD(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(LD(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`&&LD(e.body)?new URLSearchParams(e.body).toString():e.body}function WD(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return JD.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function GD(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var KD=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function qD(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new KD(n.issues);return n.value}var JD=[`get`,`post`,`put`,`patch`,`delete`],YD=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=DD(ED({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=DD(ED({},e),{body:i.input?await qD(i.input,n?.body):n?.body,params:i.params?await qD(i.params,n?.params):n?.params,query:i.query?await qD(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),XD=e=>{async function t(t,n){let r=DD(ED(ED({},e),n),{plugins:[...e?.plugins||[],YD(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await QD(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 QD(t,r)}return t};function ZD(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];JD.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 QD=async(e,t)=>{let{hooks:n,url:r,options:i}=await kD(e,t),a=BD(i),o=new AbortController,s=i.signal??o.signal,c=ZD(r,i),l=UD(i),u=await VD(i),d=WD(r,i),f=DD(ED({},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}=GD(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(DD(ED({},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=FD(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??RD)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await qD(f.output,r.data));for(let e of n.onSuccess)e&&await e(DD(ED({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??RD,_=await m.text(),v=ID(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:DD(ED({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(DD(ED({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=MD(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 QD(e,DD(ED({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new OD(m.status,m.statusText,v?y:_);return{data:null,error:DD(ED({},y),{status:m.status,statusText:m.statusText})}},$D=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{}}},eO=(e,t)=>{let n=`credentials`in Request.prototype,r=dD(e?.baseURL,e?.basePath,void 0,t)??$D(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=XD({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?PE(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[pD],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=mD(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=vD(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function tO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function nO(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 rO(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`||tO(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=nO(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 iO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function aO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=eO(e),s={};for(let[e,t]of Object.entries(r))s[`use${iO(e)}`]=t;return rO({...n,...s,$fetch:i,$store:o},i,t,r,a)}var oO=(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;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await hE({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-authentication`,{body:{response:l},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:ZT.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 uE({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 aE?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:ZT.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:ZT.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:ZT.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),sO=()=>{let e=zE();return{id:`passkey`,version:QT,$InferServerPlugin:{},getActions:(t,n)=>oO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:qE(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:ZT}},cO=`1.6.5`,lO=e=>({id:`sso-client`,version:cO,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),uO=()=>({id:`magic-link`,version:gE,$InferServerPlugin:{}}),dO=XT({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`}),fO=e=>({id:`two-factor`,version:gE,$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:dO}),pO=e=>aO({baseURL:e,withCredentials:!0,plugins:[fO({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}}),sO(),uO(),lO()]}),mO=e=>{let t=e?.editor?.backendURL??w?.editor?.backendURL;t||(t=Kn,console.dir({intlayerConfig:e,configuration:w},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=pO(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})}},hO=(e,t)=>{let n=(0,b.c)(14),r=Lw(),i=t??r??w,a=qs(),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 mO(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:6e4,gcTime:3e5,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=cc(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},gO=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}=hO(r,i),{oAuth2AccessToken:l}=YT(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},_O=e=>{let t=(0,b.c)(5),n=Lw(),{oAuth2AccessToken:r}=gO(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=JT({...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},vO=e=>{let t=(0,b.c)(2),n=Lw(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=mO(r),t[0]=r,t[1]=i),i},yO=e=>{let t=(0,b.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=Lw(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=gO(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},bO=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}=yO(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],cc(l)},xO=()=>{let e=(0,b.c)(6),t=vO(),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),lc(a)},SO=(e,t)=>{let n=(0,b.c)(9),r=_O(),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],bO(o)},CO=()=>{let e=(0,b.c)(6),t=_O(),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),lc(a)},wO=()=>{let e=(0,b.c)(6),t=_O(),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),lc(a)},TO=(e,t)=>{let n=(0,b.c)(9),r=_O(),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],bO(o)},EO=()=>{let e=(0,b.c)(3),t=_O(),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),lc(r)},DO=()=>{let e=(0,b.c)(3),t=_O(),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),lc(r)},OO=()=>{let e=(0,b.c)(3),t=_O(),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),cc(r)},kO=()=>{let e=(0,b.c)(3),t=_O(),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),lc(r)},AO=``,jO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(AO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===AO?``:t.split(AO).join(``)}).join(`
|
|
105
|
+
`)},MO=e=>{let t=e.split(`
|
|
106
|
+
`);return t.length===0?[``]:t},NO=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),PO=(e,t)=>{if(t<=0)return 0;if(NO){let n=[...NO.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},FO=(e,t)=>{if(t>=e.length)return e.length;if(NO){let n=[...NO.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},IO=(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},LO=(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},RO=(e,t)=>e.slice(0,t).lastIndexOf(`
|
|
107
|
+
`)+1,zO=(e,t)=>{let n=e.indexOf(`
|
|
108
|
+
`,t);return n===-1?e.length:n},BO=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,v.useState)(()=>MO(i)),s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=e!==void 0,u=(0,v.useRef)(a);u.current=a,(0,v.useEffect)(()=>{l&&e!==void 0&&o(MO(e))},[e,l]);let d=()=>u.current.join(`
|
|
109
|
+
`),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(`
|
|
110
|
+
`).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,v.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},y=(e,t)=>{let r=MO(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=jO(s.current),i=MO(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(`
|
|
111
|
+
`);if(t.hasSelection)y(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=PO(r,t.start);y(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=FO(r,t.start);y(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(`
|
|
112
|
+
`),i=t.data??t.dataTransfer?.getData(`text/plain`)??``;y(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(`
|
|
113
|
+
`),i=t.data;y(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(`
|
|
114
|
+
`);if(e.key===`Enter`){e.preventDefault(),y(n.slice(0,t.start)+`
|
|
115
|
+
`+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?RO(n,t.start):e.altKey?IO(n,t.start):PO(n,t.start),y(n.slice(0,r)+n.slice(t.start),r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start>=n.length)return;let r;r=e.metaKey?zO(n,t.start):e.altKey?LO(n,t.start):FO(n,t.start),y(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(`
|
|
116
|
+
`),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i),y(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(`
|
|
117
|
+
`);y(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}},VO=({index:e,text:t,isLast:n,ghostText:r})=>(0,T.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,T.jsx)(`span`,{"data-editable":!0,children:t||``}),r&&(0,T.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,T.jsx)(`br`,{})]}),HO=24,UO=12,WO=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:u,ghostText:d,ghostLine:f,ghostOffset:p,onClick:m,className:h,dir:g=`auto`,ref:_,...y})=>{let{lines:b,containerRef:x,getText:S,handleInput:C,handleBeforeInput:w,handleKeyDown:E,handleCut:D,handlePaste:O,handleDrop:k,handleDragOver:A,getCursorOffset:j,setCaretPosition:M,caretFromFlatOffset:N}=BO({value:e,defaultValue:t,onChange:n,disabled:i}),P=(0,v.useRef)(null),F=e=>{P.current=e,x.current=e};(0,v.useImperativeHandle)(_,()=>({getContainer:()=>P.current,getText:S,focus:()=>P.current?.focus(),getCursorOffset:j,setCursorAtOffset:e=>{M(N(e,b))}})),(0,v.useEffect)(()=>{if(!s||!P.current)return;let e=P.current,t=HO*o+UO,n=HO*a+UO;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`},[b,s,o,a]);let I=b.length===1&&b[0]===``,L=d&&f!==void 0&&p!==void 0;return(0,T.jsxs)(`div`,{className:`relative w-full`,children:[I&&r&&(0,T.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,T.jsx)(`div`,{...y,ref:F,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":L?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:C,onBeforeInput:w,onKeyDown:E,onCut:D,onPaste:O,onDrop:k,onDragOver:A,onClick:m,className:l(`resize-none whitespace-pre-wrap break-words outline-none`,Yw({variant:u,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,h),children:b.map((e,t)=>(0,T.jsx)(VO,{index:t,text:e,isLast:t===b.length-1,ghostText:L&&f===t?d:void 0},t))})]})},GO=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,v.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,v.useState)(``),s=(0,v.useRef)(null);(0,v.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(`
|
|
118
|
+
`);return(0,T.jsx)(WO,{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`]})},KO=()=>{let e=(0,b.c)(9),{session:t,revalidateSession:n,setSession:r}=gO(),{mutate:i}=xO(),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},qO=e=>{let t=(0,b.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=KO(),[l,u]=(0,v.useState)(n),[d,f]=(0,v.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(JO)},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,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>u(e.currentTarget.value??``),t[5]=y):y=t[5];let x=y,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),_()):e.key===`Escape`&&(e.preventDefault(),h())},C,w;t[6]===n?(C=t[7],w=t[8]):(C=()=>{u(n),f(YO)},w=[n],t[6]=n,t[7]=C,t[8]=w),(0,v.useEffect)(C,w);let E=a?.(l)??!0;return(0,T.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,T.jsx)(GO,{onChange:x,onKeyDown:S,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":!E,...s},d),(p||o)&&(0,T.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,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(aS,{Icon:vu,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:_,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,T.jsx)(aS,{Icon:Uu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:h,disabled:i})]}),o]})]},n)};function JO(e){return e+1}function YO(e){return e+1}var XO=(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},ZO=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,T.jsxs)(`label`,{className:l(`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,T.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),QO=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`,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`,"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`,hoverable:`block rounded-lg border-none bg-current/0 hover:bg-current/10 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`}}),$O=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},ek=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(ek):(0,v.isValidElement)(e)?ek(e.props.children):!1,tk=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:u,size:d,isExternalLink:f,isPageSection:p,href:m,...h}=e,g=f??$O(e),_=p??m?.startsWith(`#`)??!1,v=ek(i),y=t===`button`||t===`button-outlined`,b=g?`noopener noreferrer nofollow`:void 0,x=g?`_blank`:`_self`;return(0,T.jsxs)(`a`,{href:u&&m&&!g&&!_?Qn(m,u):m,"aria-label":a,rel:b,target:x,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:l(QO({variant:t,color:n,roundedSize:r,underlined:c,size:d,className:o})),...h,children:[y&&v?(0,T.jsx)(`span`,{children:i}):i,g&&v&&(0,T.jsx)(Du,{className:`ml-2 inline-block size-4`}),_&&(0,T.jsx)(Nu,{className:`ml-2 inline-block size-4`})]})},nk=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,rk=`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`,ik=({className:e,...t})=>(0,T.jsx)(`h1`,{className:l(`font-bold text-2xl`,e),...t}),ak=({className:e,...t})=>(0,T.jsx)(`h2`,{className:l(`mb-2 font-bold text-2xl`,nk,e),...t}),ok=({className:e,...t})=>(0,T.jsx)(`h3`,{className:l(`mb-2 font-bold text-xl`,nk,e),...t}),sk=({className:e,...t})=>(0,T.jsx)(`h4`,{className:l(`font-bold text-lg`,nk,e),...t}),ck=({className:e,...t})=>(0,T.jsx)(`h5`,{className:l(`font-bold text-base`,nk,e),...t}),lk=({className:e,...t})=>(0,T.jsx)(`h6`,{className:l(`ml-3 font-bold text-base`,nk,e),...t}),uk=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),dk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},fk=(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},pk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?uk(t):void 0;return(0,T.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(fk(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),dk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:l(r&&rk,n),...i,children:t})},mk=({isClickable:e,...t})=>(0,T.jsx)(ik,{...t}),hk=({isClickable:e=!1,...t})=>(0,T.jsx)(pk,{H:ak,isClickable:e,...t}),gk=({isClickable:e=!1,...t})=>(0,T.jsx)(pk,{H:ok,isClickable:e,...t}),_k=({isClickable:e=!1,...t})=>(0,T.jsx)(pk,{H:sk,isClickable:e,...t}),vk=({isClickable:e=!1,...t})=>(0,T.jsx)(pk,{H:ck,isClickable:e,...t}),yk=({isClickable:e=!1,...t})=>(0,T.jsx)(pk,{H:lk,isClickable:e,...t}),bk=(0,v.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),xk=()=>(0,v.useContext)(bk),Sk=e=>{let t=(0,b.c)(8),{children:n}=e,[r,i]=vT(`packageManager`,`npm`),[a,o]=vT(`codeFormat`,`typescript`),[s,c]=vT(`contentDeclarationFormat`,`typescript`),l;return t[0]!==n||t[1]!==a||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==i?(l=(0,T.jsx)(bk,{value:{packageManager:r,setPackageManager:i,codeFormat:a,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:c},children:n}),t[0]=n,t[1]=a,t[2]=s,t[3]=r,t[4]=o,t[5]=c,t[6]=i,t[7]=l):l=t[7],l},Ck={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},wk=700,Tk=({isRollable:e=!0,minHeight:t=wk,children:n,className:r})=>{let[i,a]=(0,v.useState)(0),[o,s]=(0,v.useState)(!0),c=(0,v.useRef)(null),{expandCollapseContent:u}=br(Ck),d=i>t;return(0,v.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?d?(0,T.jsxs)(oS,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,T.jsx)(`div`,{className:l(`grid w-full`,r),ref:c,children:n}),(0,T.jsx)(`button`,{className:l(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,o?`w-full`:`w-32`),type:`button`,onClick:()=>s(e=>!e),children:u(o)})]}):(0,T.jsx)(`div`,{className:l(`grid w-full`,r),ref:c,children:n}):n},Ek=e=>{let t=(0,b.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=xk(),s=r.packageManager===void 0,c=i===r.packageManager,l=r.codeFormat===void 0,u=a===r.codeFormat,d=r.contentDeclarationFormat===void 0,f=o===r.contentDeclarationFormat;if((s||c)&&(l||u)&&(d||f))return n;let p;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,T.jsx)(T.Fragment,{}),t[0]=p):p=t[0],p},Dk={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]};function Ok(e,[t,n]){return Math.min(n,Math.max(t,e))}var kk=v.createContext(void 0);function Ak(e){let t=v.useContext(kk);return e||t||`ltr`}var jk=0;function Mk(){v.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Nk()),document.body.insertAdjacentElement(`beforeend`,e[1]??Nk()),jk++,()=>{jk===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),jk--}},[])}function Nk(){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 Pk=`focusScope.autoFocusOnMount`,Fk=`focusScope.autoFocusOnUnmount`,Ik={bubbles:!1,cancelable:!0},Lk=`FocusScope`,Rk=v.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),l=Ac(i),u=Ac(a),d=v.useRef(null),f=_c(t,e=>c(e)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Gk(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Gk(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Gk(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]),v.useEffect(()=>{if(s){Kk.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Pk,Ik);s.addEventListener(Pk,l),s.dispatchEvent(t),t.defaultPrevented||(zk(Yk(Vk(s)),{select:!0}),document.activeElement===e&&Gk(s))}return()=>{s.removeEventListener(Pk,l),setTimeout(()=>{let t=new CustomEvent(Fk,Ik);s.addEventListener(Fk,u),s.dispatchEvent(t),t.defaultPrevented||Gk(e??document.body,{select:!0}),s.removeEventListener(Fk,u),Kk.remove(p)},0)}}},[s,l,u,p]);let m=v.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]=Bk(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Gk(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Gk(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,T.jsx)(W.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Rk.displayName=Lk;function zk(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Gk(r,{select:t}),document.activeElement!==n)return}function Bk(e){let t=Vk(e);return[Hk(t,e),Hk(t.reverse(),e)]}function Vk(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 Hk(e,t){for(let n of e)if(!Uk(n,{upTo:t}))return n}function Uk(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 Wk(e){return e instanceof HTMLInputElement&&`select`in e}function Gk(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wk(e)&&t&&e.select()}}var Kk=qk();function qk(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Jk(e,t),e.unshift(t)},remove(t){e=Jk(e,t),e[0]?.resume()}}}function Jk(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yk(e){return e.filter(e=>e.tagName!==`A`)}var Xk=v.useId||(()=>void 0),Zk=0;function Qk(e){let[t,n]=v.useState(Xk());return qc(()=>{e||n(e=>e??String(Zk++))},[e]),e||(t?`radix-${t}`:``)}var $k=[`top`,`right`,`bottom`,`left`],eA=Math.min,tA=Math.max,nA=Math.round,rA=Math.floor,iA=e=>({x:e,y:e}),aA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function oA(e,t,n){return tA(e,eA(t,n))}function sA(e,t){return typeof e==`function`?e(t):e}function cA(e){return e.split(`-`)[0]}function lA(e){return e.split(`-`)[1]}function uA(e){return e===`x`?`y`:`x`}function dA(e){return e===`y`?`height`:`width`}function fA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function pA(e){return uA(fA(e))}function mA(e,t,n){n===void 0&&(n=!1);let r=lA(e),i=pA(e),a=dA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=CA(o)),[o,CA(o)]}function hA(e){let t=CA(e);return[gA(e),t,gA(t)]}function gA(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var _A=[`left`,`right`],vA=[`right`,`left`],yA=[`top`,`bottom`],bA=[`bottom`,`top`];function xA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?vA:_A:t?_A:vA;case`left`:case`right`:return t?yA:bA;default:return[]}}function SA(e,t,n,r){let i=lA(e),a=xA(cA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(gA)))),a}function CA(e){let t=cA(e);return aA[t]+e.slice(t.length)}function wA(e){return{top:0,right:0,bottom:0,left:0,...e}}function TA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:wA(e)}function EA(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 DA(e,t,n){let{reference:r,floating:i}=e,a=fA(t),o=pA(t),s=dA(o),c=cA(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(lA(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 OA(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}=sA(t,e),p=TA(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=EA(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=EA(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 kA=50,AA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:OA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=DA(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<kA&&(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}=DA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},jA=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}=sA(e,t)||{};if(l==null)return{};let d=TA(u),f={x:n,y:r},p=pA(i),m=dA(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=eA(d[_],T),D=eA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=oA(O,A,k),M=!c.arrow&&lA(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}}}),MA=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}=sA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=cA(r),_=fA(o),v=cA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[CA(o)]:hA(o)),x=p!==`none`;!d&&x&&b.push(...SA(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=mA(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`&&_!==fA(t))||T.every(e=>fA(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=fA(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 NA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function PA(e){return $k.some(t=>e[t]>=0)}var FA=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=sA(e,t);switch(i){case`referenceHidden`:{let e=NA(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:PA(e)}}}case`escaped`:{let e=NA(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:PA(e)}}}default:return{}}}}},IA=new Set([`left`,`top`]);async function LA(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=cA(n),s=lA(n),c=fA(n)===`y`,l=IA.has(o)?-1:1,u=a&&c?-1:1,d=sA(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 RA=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 LA(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}}}}},zA=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}=sA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=fA(cA(i)),p=uA(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=oA(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=oA(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}}}}}},BA=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}=sA(e,t),u={x:n,y:r},d=fA(i),f=uA(d),p=u[f],m=u[d],h=sA(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=IA.has(cA(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}}}},VA=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}=sA(e,t),u=await o.detectOverflow(t,l),d=cA(i),f=lA(i),p=fA(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=eA(h-u[g],v),x=eA(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=tA(u.left,0),t=tA(u.right,0),n=tA(u.top,0),r=tA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:tA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:tA(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 HA(){return typeof window<`u`}function UA(e){return KA(e)?(e.nodeName||``).toLowerCase():`#document`}function WA(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function GA(e){return((KA(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function KA(e){return HA()?e instanceof Node||e instanceof WA(e).Node:!1}function qA(e){return HA()?e instanceof Element||e instanceof WA(e).Element:!1}function JA(e){return HA()?e instanceof HTMLElement||e instanceof WA(e).HTMLElement:!1}function YA(e){return!HA()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof WA(e).ShadowRoot}function XA(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=sj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ZA(e){return/^(table|td|th)$/.test(UA(e))}function QA(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var $A=/transform|translate|scale|rotate|perspective|filter/,ej=/paint|layout|strict|content/,tj=e=>!!e&&e!==`none`,nj;function rj(e){let t=qA(e)?sj(e):e;return tj(t.transform)||tj(t.translate)||tj(t.scale)||tj(t.rotate)||tj(t.perspective)||!aj()&&(tj(t.backdropFilter)||tj(t.filter))||$A.test(t.willChange||``)||ej.test(t.contain||``)}function ij(e){let t=lj(e);for(;JA(t)&&!oj(t);){if(rj(t))return t;if(QA(t))return null;t=lj(t)}return null}function aj(){return nj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),nj}function oj(e){return/^(html|body|#document)$/.test(UA(e))}function sj(e){return WA(e).getComputedStyle(e)}function cj(e){return qA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lj(e){if(UA(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||YA(e)&&e.host||GA(e);return YA(t)?t.host:t}function uj(e){let t=lj(e);return oj(t)?e.ownerDocument?e.ownerDocument.body:e.body:JA(t)&&XA(t)?t:uj(t)}function dj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=uj(e),i=r===e.ownerDocument?.body,a=WA(r);if(i){let e=fj(a);return t.concat(a,a.visualViewport||[],XA(r)?r:[],e&&n?dj(e):[])}else return t.concat(r,dj(r,[],n))}function fj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pj(e){let t=sj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=JA(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=nA(n)!==a||nA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function mj(e){return qA(e)?e:e.contextElement}function hj(e){let t=mj(e);if(!JA(t))return iA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=pj(t),o=(a?nA(n.width):n.width)/r,s=(a?nA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var gj=iA(0);function _j(e){let t=WA(e);return!aj()||!t.visualViewport?gj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==WA(e)?!1:t}function yj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=mj(e),o=iA(1);t&&(r?qA(r)&&(o=hj(r)):o=hj(e));let s=vj(a,n,r)?_j(a):iA(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=WA(a),t=r&&qA(r)?WA(r):r,n=e,i=fj(n);for(;i&&r&&t!==n;){let e=hj(i),t=i.getBoundingClientRect(),r=sj(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=WA(i),i=fj(n)}}return EA({width:u,height:d,x:c,y:l})}function bj(e,t){let n=cj(e).scrollLeft;return t?t.left+n:yj(GA(e)).left+n}function xj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-bj(e,n),y:n.top+t.scrollTop}}function Sj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=GA(r),s=t?QA(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=iA(1),u=iA(0),d=JA(r);if((d||!d&&!a)&&((UA(r)!==`body`||XA(o))&&(c=cj(r)),d)){let e=yj(r);l=hj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?xj(o,c):iA(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 Cj(e){return Array.from(e.getClientRects())}function wj(e){let t=GA(e),n=cj(e),r=e.ownerDocument.body,i=tA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=tA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+bj(e),s=-n.scrollTop;return sj(r).direction===`rtl`&&(o+=tA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Tj=25;function Ej(e,t){let n=WA(e),r=GA(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=aj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=bj(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<=Tj&&(a-=o)}else l<=Tj&&(a+=l);return{width:a,height:o,x:s,y:c}}function Dj(e,t){let n=yj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=JA(e)?hj(e):iA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Oj(e,t,n){let r;if(t===`viewport`)r=Ej(e,n);else if(t===`document`)r=wj(GA(e));else if(qA(t))r=Dj(t,n);else{let n=_j(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return EA(r)}function kj(e,t){let n=lj(e);return n===t||!qA(n)||oj(n)?!1:sj(n).position===`fixed`||kj(n,t)}function Aj(e,t){let n=t.get(e);if(n)return n;let r=dj(e,[],!1).filter(e=>qA(e)&&UA(e)!==`body`),i=null,a=sj(e).position===`fixed`,o=a?lj(e):e;for(;qA(o)&&!oj(o);){let t=sj(o),n=rj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||XA(o)&&!n&&kj(e,o))?r=r.filter(e=>e!==o):i=t,o=lj(o)}return t.set(e,r),r}function jj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?QA(t)?[]:Aj(t,this._c):[].concat(n),r],o=Oj(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=Oj(t,a[e],i);s=tA(n.top,s),c=eA(n.right,c),l=eA(n.bottom,l),u=tA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Mj(e){let{width:t,height:n}=pj(e);return{width:t,height:n}}function Nj(e,t,n){let r=JA(t),i=GA(t),a=n===`fixed`,o=yj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=iA(0);function l(){c.x=bj(i)}if(r||!r&&!a)if((UA(t)!==`body`||XA(i))&&(s=cj(t)),r){let e=yj(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?xj(i,s):iA(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 Pj(e){return sj(e).position===`static`}function Fj(e,t){if(!JA(e)||sj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return GA(e)===n&&(n=n.ownerDocument.body),n}function Ij(e,t){let n=WA(e);if(QA(e))return n;if(!JA(e)){let t=lj(e);for(;t&&!oj(t);){if(qA(t)&&!Pj(t))return t;t=lj(t)}return n}let r=Fj(e,t);for(;r&&ZA(r)&&Pj(r);)r=Fj(r,t);return r&&oj(r)&&Pj(r)&&!rj(r)?n:r||ij(e)||n}var Lj=async function(e){let t=this.getOffsetParent||Ij,n=this.getDimensions,r=await n(e.floating);return{reference:Nj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rj(e){return sj(e).direction===`rtl`}var zj={convertOffsetParentRelativeRectToViewportRelativeRect:Sj,getDocumentElement:GA,getClippingRect:jj,getOffsetParent:Ij,getElementRects:Lj,getClientRects:Cj,getDimensions:Mj,getScale:hj,isElement:qA,isRTL:Rj};function Bj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vj(e,t){let n=null,r,i=GA(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=rA(d),h=rA(i.clientWidth-(u+f)),g=rA(i.clientHeight-(d+p)),_=rA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:tA(0,eA(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&&!Bj(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 Hj(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=mj(e),u=i||a?[...l?dj(l):[],...t?dj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Vj(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?yj(e):null;c&&g();function g(){let t=yj(e);h&&!Bj(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 Uj=RA,Wj=zA,Gj=MA,Kj=VA,qj=FA,Jj=jA,Yj=BA,Xj=(e,t,n)=>{let r=new Map,i={platform:zj,...n},a={...i.platform,_c:r};return AA(e,t,{...i,platform:a})},Zj=typeof document<`u`?v.useLayoutEffect:function(){};function Qj(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(!Qj(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)&&!Qj(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function $j(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eM(e,t){let n=$j(e);return Math.round(t*n)/n}function tM(e){let t=v.useRef(e);return Zj(()=>{t.current=e}),t}function nM(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]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Qj(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=tM(c),O=tM(i),k=tM(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Xj(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Qj(T.current,t)&&(T.current=t,Oc.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Zj(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);Zj(()=>(j.current=!0,()=>{j.current=!1}),[]),Zj(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=v.useMemo(()=>({reference:x,floating:S}),[x,S]),P=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=eM(N.floating,u.x),r=eM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...$j(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var rM=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?{}:Jj({element:r.current,padding:i}).fn(n):r?Jj({element:r,padding:i}).fn(n):{}}}},iM=(e,t)=>{let n=Uj(e);return{name:n.name,fn:n.fn,options:[e,t]}},aM=(e,t)=>{let n=Wj(e);return{name:n.name,fn:n.fn,options:[e,t]}},oM=(e,t)=>({fn:Yj(e).fn,options:[e,t]}),sM=(e,t)=>{let n=Gj(e);return{name:n.name,fn:n.fn,options:[e,t]}},cM=(e,t)=>{let n=Kj(e);return{name:n.name,fn:n.fn,options:[e,t]}},lM=(e,t)=>{let n=qj(e);return{name:n.name,fn:n.fn,options:[e,t]}},uM=(e,t)=>{let n=rM(e);return{name:n.name,fn:n.fn,options:[e,t]}},dM=`Arrow`,fM=v.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,T.jsx)(W.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,T.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});fM.displayName=dM;var pM=fM;function mM(e){let[t,n]=v.useState(void 0);return qc(()=>{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 hM=`Popper`,[gM,_M]=yc(hM),[vM,yM]=gM(hM),bM=e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return(0,T.jsx)(vM,{scope:t,anchor:r,onAnchorChange:i,children:n})};bM.displayName=hM;var xM=`PopperAnchor`,SM=v.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=yM(xM,n),o=v.useRef(null),s=_c(t,o),c=v.useRef(null);return v.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,T.jsx)(W.div,{...i,ref:s})});SM.displayName=xM;var CM=`PopperContent`,[wM,TM]=gM(CM),EM=v.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=yM(CM,n),[_,y]=v.useState(null),b=_c(t,e=>y(e)),[x,S]=v.useState(null),C=mM(x),w=C?.width??0,E=C?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(AM),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=nM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>Hj(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[iM({mainAxis:i+E,alignmentAxis:o}),c&&aM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?oM():void 0,...j}),c&&sM({...j}),cM({...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`)}}),x&&uM({element:x,padding:s}),jM({arrowWidth:w,arrowHeight:E}),f&&lM({strategy:`referenceHidden`,...j})]}),[L,R]=MM(P),ee=Ac(m);qc(()=>{F&&ee?.()},[F,ee]);let te=I.arrow?.x,ne=I.arrow?.y,z=I.arrow?.centerOffset!==0,[B,re]=v.useState();return qc(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,T.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,T.jsx)(wM,{scope:n,placedSide:L,onArrowChange:S,arrowX:te,arrowY:ne,shouldHideArrow:z,children:(0,T.jsx)(W.div,{"data-side":L,"data-align":R,...h,ref:b,style:{...h.style,animation:F?void 0:`none`}})})})});EM.displayName=CM;var DM=`PopperArrow`,OM={top:`bottom`,right:`left`,bottom:`top`,left:`right`},kM=v.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=TM(DM,n),a=OM[i.placedSide];return(0,T.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,T.jsx)(pM,{...r,ref:t,style:{...r.style,display:`block`}})})});kM.displayName=DM;function AM(e){return e!==null}var jM=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]=MM(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 MM(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var NM=bM,PM=SM,FM=EM,IM=kM;function LM(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var RM=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},zM=new WeakMap,BM=new WeakMap,VM={},HM=0,UM=function(e){return e&&(e.host||UM(e.parentNode))},WM=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=UM(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})},GM=function(e,t,n,r){var i=WM(t,Array.isArray(e)?e:[e]);VM[n]||(VM[n]=new WeakMap);var a=VM[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=(zM.get(e)||0)+1,l=(a.get(e)||0)+1;zM.set(e,c),a.set(e,l),o.push(e),c===1&&i&&BM.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(),HM++,function(){o.forEach(function(e){var t=zM.get(e)-1,i=a.get(e)-1;zM.set(e,t),a.set(e,i),t||(BM.has(e)||e.removeAttribute(r),BM.delete(e)),i||e.removeAttribute(n)}),HM--,HM||(zM=new WeakMap,zM=new WeakMap,BM=new WeakMap,VM={})}},KM=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||RM(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),GM(r,i,n,`aria-hidden`)):function(){return null}},qM=function(){return qM=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},qM.apply(this,arguments)};function JM(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 YM(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 XM=`right-scroll-bar-position`,ZM=`width-before-scroll-bar`,QM=`with-scroll-bars-hidden`,$M=`--removed-body-scroll-bar-size`;function eN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function tN(e,t){var n=(0,v.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 nN=typeof window<`u`?v.useLayoutEffect:v.useEffect,rN=new WeakMap;function iN(e,t){var n=tN(t||null,function(t){return e.forEach(function(e){return eN(e,t)})});return nN(function(){var t=rN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||eN(e,null)}),i.forEach(function(e){r.has(e)||eN(e,a)})}rN.set(n,e)},[e]),n}function aN(e){return e}function oN(e,t){t===void 0&&(t=aN);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 sN(e){e===void 0&&(e={});var t=oN(null);return t.options=qM({async:!0,ssr:!1},e),t}var cN=function(e){var t=e.sideCar,n=JM(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 v.createElement(r,qM({},n))};cN.isSideCarExport=!0;function lN(e,t){return e.useMedium(t),cN}var uN=sN(),dN=function(){},fN=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:dN,onWheelCapture:dN,onTouchMoveCapture:dN}),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,y=_===void 0?`div`:_,b=e.gapMode,x=JM(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=iN([n,t]),w=qM(qM({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:uN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),qM(qM({},w),{ref:C})):v.createElement(y,qM({},w,{className:c,ref:C}),s))});fN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fN.classNames={fullWidth:ZM,zeroRight:XM};var pN,mN=function(){if(pN)return pN;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function hN(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mN();return t&&e.setAttribute(`nonce`,t),e}function gN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _N(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hN())&&(gN(t,n),_N(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yN=function(){var e=vN();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bN=function(){var e=yN();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xN={left:0,top:0,right:0,gap:0},SN=function(e){return parseInt(e||``,10)||0},CN=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[SN(n),SN(r),SN(i)]},wN=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xN;var t=CN(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])}},TN=bN(),EN=`data-scroll-locked`,DN=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
119
|
+
.${QM} {
|
|
120
|
+
overflow: hidden ${r};
|
|
121
|
+
padding-right: ${s}px ${r};
|
|
122
|
+
}
|
|
123
|
+
body[${EN}] {
|
|
124
|
+
overflow: hidden ${r};
|
|
125
|
+
overscroll-behavior: contain;
|
|
126
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
127
|
+
padding-left: ${i}px;
|
|
128
|
+
padding-top: ${a}px;
|
|
129
|
+
padding-right: ${o}px;
|
|
130
|
+
margin-left:0;
|
|
131
|
+
margin-top:0;
|
|
132
|
+
margin-right: ${s}px ${r};
|
|
133
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.${XM} {
|
|
137
|
+
right: ${s}px ${r};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.${ZM} {
|
|
141
|
+
margin-right: ${s}px ${r};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.${XM} .${XM} {
|
|
145
|
+
right: 0 ${r};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.${ZM} .${ZM} {
|
|
149
|
+
margin-right: 0 ${r};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
body[${EN}] {
|
|
153
|
+
${$M}: ${s}px;
|
|
154
|
+
}
|
|
155
|
+
`},ON=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},kN=function(){v.useEffect(function(){return document.body.setAttribute(EN,(ON()+1).toString()),function(){var e=ON()-1;e<=0?document.body.removeAttribute(EN):document.body.setAttribute(EN,e.toString())}},[])},AN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;kN();var a=v.useMemo(function(){return wN(i)},[i]);return v.createElement(TN,{styles:DN(a,!t,i,n?``:`!important`)})},jN=!1;if(typeof window<`u`)try{var MN=Object.defineProperty({},`passive`,{get:function(){return jN=!0,!0}});window.addEventListener(`test`,MN,MN),window.removeEventListener(`test`,MN,MN)}catch{jN=!1}var NN=jN?{passive:!1}:!1,PN=function(e){return e.tagName===`TEXTAREA`},FN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!PN(e)&&n[t]===`visible`)},IN=function(e){return FN(e,`overflowY`)},LN=function(e){return FN(e,`overflowX`)},RN=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),VN(e,r)){var i=HN(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zN=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},BN=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},VN=function(e,t){return e===`v`?IN(t):LN(t)},HN=function(e,t){return e===`v`?zN(t):BN(t)},UN=function(e,t){return e===`h`&&t===`rtl`?-1:1},WN=function(e,t,n,r,i){var a=UN(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=HN(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&VN(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},GN=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},KN=function(e){return[e.deltaX,e.deltaY]},qN=function(e){return e&&`current`in e?e.current:e},JN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},YN=function(e){return`
|
|
156
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
157
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
158
|
+
`},XN=0,ZN=[];function QN(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(XN++)[0],a=v.useState(bN)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=YM([e.lockRef.current],(e.shards||[]).map(qN),!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=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=GN(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=RN(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=RN(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 WN(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!ZN.length||ZN[ZN.length-1]!==a)){var r=`deltaY`in n?KN(n):GN(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&JN(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(qN).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=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:$N(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=GN(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,KN(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,GN(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return ZN.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,NN),document.addEventListener(`touchmove`,c,NN),document.addEventListener(`touchstart`,u,NN),function(){ZN=ZN.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,NN),document.removeEventListener(`touchmove`,c,NN),document.removeEventListener(`touchstart`,u,NN)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:YN(i)}):null,p?v.createElement(AN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $N(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var eP=lN(uN,QN),tP=v.forwardRef(function(e,t){return v.createElement(fN,qM({},e,{ref:t,sideCar:eP}))});tP.classNames=fN.classNames;var nP=[` `,`Enter`,`ArrowUp`,`ArrowDown`],rP=[` `,`Enter`],iP=`Select`,[aP,oP,sP]=Dc(iP),[cP,lP]=yc(iP,[sP,_M]),uP=_M(),[dP,fP]=cP(iP),[pP,mP]=cP(iP),hP=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=uP(t),[g,_]=v.useState(null),[y,b]=v.useState(null),[x,S]=v.useState(!1),C=Ak(l),[w,E]=nl({prop:r,defaultProp:i??!1,onChange:a,caller:iP}),[D,O]=nl({prop:o,defaultProp:s,onChange:c,caller:iP}),k=v.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=v.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,T.jsx)(NM,{...h,children:(0,T.jsxs)(dP,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Qk(),value:D,onValueChange:O,open:w,onOpenChange:E,dir:C,triggerPointerDownPosRef:k,disabled:f,children:[(0,T.jsx)(aP.Provider,{scope:t,children:(0,T.jsx)(pP,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:v.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,T.jsxs)(uF,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:D,onChange:e=>O(e.target.value),disabled:f,form:m,children:[D===void 0?(0,T.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};hP.displayName=iP;var gP=`SelectTrigger`,_P=v.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=uP(n),o=fP(gP,n),s=o.disabled||r,c=_c(t,o.onTriggerChange),l=oP(n),u=v.useRef(`touch`),[d,f,p]=fF(e=>{let t=l().filter(e=>!e.disabled),n=pF(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,T.jsx)(PM,{asChild:!0,...a,children:(0,T.jsx)(W.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":dF(o.value)?``:void 0,...i,ref:c,onClick:mc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:mc(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:mc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&nP.includes(e.key)&&(m(),e.preventDefault())})})})});_P.displayName=gP;var vP=`SelectValue`,yP=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=fP(vP,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=_c(t,c.onValueNodeChange);return qc(()=>{l(u)},[l,u]),(0,T.jsx)(W.span,{...s,ref:d,style:{pointerEvents:`none`},children:dF(c.value)?(0,T.jsx)(T.Fragment,{children:o}):a})});yP.displayName=vP;var bP=`SelectIcon`,xP=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,T.jsx)(W.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});xP.displayName=bP;var SP=`SelectPortal`,CP=e=>(0,T.jsx)(Yc,{asChild:!0,...e});CP.displayName=SP;var wP=`SelectContent`,TP=v.forwardRef((e,t)=>{let n=fP(wP,e.__scopeSelect),[r,i]=v.useState();if(qc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Oc.createPortal((0,T.jsx)(DP,{scope:e.__scopeSelect,children:(0,T.jsx)(aP.Slot,{scope:e.__scopeSelect,children:(0,T.jsx)(`div`,{children:e.children})})}),t):null}return(0,T.jsx)(jP,{...e,ref:t})});TP.displayName=wP;var EP=10,[DP,OP]=cP(wP),kP=`SelectContentImpl`,AP=xc(`SelectContent.RemoveScroll`),jP=v.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,y=fP(wP,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=_c(t,e=>x(e)),[E,D]=v.useState(null),[O,k]=v.useState(null),A=oP(n),[j,M]=v.useState(!1),N=v.useRef(!1);v.useEffect(()=>{if(b)return KM(b)},[b]),Mk();let P=v.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&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,S]),F=v.useCallback(()=>P([E,b]),[P,E,b]);v.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=y;v.useEffect(()=>{if(b){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():b.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})}}},[b,I,L]),v.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[R,ee]=fF(e=>{let t=A().filter(e=>!e.disabled),n=pF(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),te=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&(D(e),r&&(N.current=!0))},[y.value]),ne=v.useCallback(()=>b?.focus(),[b]),z=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&k(e)},[y.value]),B=r===`popper`?FP:NP,re=B===FP?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,T.jsx)(DP,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:E,onItemLeave:ne,itemTextRefCallback:z,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:j,searchRef:R,children:(0,T.jsx)(tP,{as:AP,allowPinchZoom:!0,children:(0,T.jsx)(Rk,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:mc(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,T.jsx)(Rc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,T.jsx)(B,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...re,onPlaced:()=>M(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:mc(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(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()}})})})})})})});jP.displayName=kP;var MP=`SelectItemAlignedPosition`,NP=v.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=fP(wP,n),o=OP(wP,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=_c(t,e=>u(e)),f=oP(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=v.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-EP,d=Ok(a,[EP,Math.max(EP,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-EP,d=Ok(a,[EP,Math.max(EP,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-EP*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-EP,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=`${EP}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]);qc(()=>b(),[b]);let[x,S]=v.useState();return qc(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,T.jsx)(IP,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,T.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,T.jsx)(W.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});NP.displayName=MP;var PP=`SelectPopperPosition`,FP=v.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=EP,...a}=e,o=uP(n);return(0,T.jsx)(FM,{...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)`}})});FP.displayName=PP;var[IP,LP]=cP(wP,{}),RP=`SelectViewport`,zP=v.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=OP(RP,n),o=LP(RP,n),s=_c(t,a.onViewportChange),c=v.useRef(0);return(0,T.jsxs)(T.Fragment,{children:[(0,T.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,T.jsx)(aP.Slot,{scope:n,children:(0,T.jsx)(W.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:mc(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-EP*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})})})]})});zP.displayName=RP;var BP=`SelectGroup`,[VP,HP]=cP(BP),UP=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Qk();return(0,T.jsx)(VP,{scope:n,id:i,children:(0,T.jsx)(W.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});UP.displayName=BP;var WP=`SelectLabel`,GP=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=HP(WP,n);return(0,T.jsx)(W.div,{id:i.id,...r,ref:t})});GP.displayName=WP;var KP=`SelectItem`,[qP,JP]=cP(KP),YP=v.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=fP(KP,n),c=OP(KP,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=_c(t,e=>c.itemRefCallback?.(e,r,i)),h=Qk(),g=v.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,T.jsx)(qP,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,T.jsx)(aP.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,T.jsx)(W.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:mc(o.onFocus,()=>p(!0)),onBlur:mc(o.onBlur,()=>p(!1)),onClick:mc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:mc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:mc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:mc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:mc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:mc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(rP.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});YP.displayName=KP;var XP=`SelectItemText`,ZP=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=fP(XP,n),s=OP(XP,n),c=JP(XP,n),l=mP(XP,n),[u,d]=v.useState(null),f=_c(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=v.useMemo(()=>(0,T.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return qc(()=>(h(m),()=>g(m)),[h,g,m]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(W.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Oc.createPortal(a.children,o.valueNode):null]})});ZP.displayName=XP;var QP=`SelectItemIndicator`,$P=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return JP(QP,n).isSelected?(0,T.jsx)(W.span,{"aria-hidden":!0,...r,ref:t}):null});$P.displayName=QP;var eF=`SelectScrollUpButton`,tF=v.forwardRef((e,t)=>{let n=OP(eF,e.__scopeSelect),r=LP(eF,e.__scopeSelect),[i,a]=v.useState(!1),o=_c(t,r.onScrollButtonChange);return qc(()=>{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,T.jsx)(iF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});tF.displayName=eF;var nF=`SelectScrollDownButton`,rF=v.forwardRef((e,t)=>{let n=OP(nF,e.__scopeSelect),r=LP(nF,e.__scopeSelect),[i,a]=v.useState(!1),o=_c(t,r.onScrollButtonChange);return qc(()=>{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,T.jsx)(iF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});rF.displayName=nF;var iF=v.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=OP(`SelectScrollButton`,n),o=v.useRef(null),s=oP(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),qc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,T.jsx)(W.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:mc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:mc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:mc(i.onPointerLeave,()=>{c()})})}),aF=`SelectSeparator`,oF=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,T.jsx)(W.div,{"aria-hidden":!0,...r,ref:t})});oF.displayName=aF;var sF=`SelectArrow`,cF=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=uP(n),a=fP(sF,n),o=OP(sF,n);return a.open&&o.position===`popper`?(0,T.jsx)(IM,{...i,...r,ref:t}):null});cF.displayName=sF;var lF=`SelectBubbleInput`,uF=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=v.useRef(null),a=_c(r,i),o=LM(t);return v.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,T.jsx)(W.select,{...n,style:{...al,...n.style},ref:a,defaultValue:t})});uF.displayName=lF;function dF(e){return e===``||e===void 0}function fF(e){let t=Ac(e),n=v.useRef(``),r=v.useRef(0),i=v.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=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function pF(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=mF(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 mF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var hF=hP,gF=_P,_F=yP,vF=xP,yF=CP,bF=TP,xF=zP,SF=UP,CF=GP,wF=YP,TF=ZP,EF=$P,DF=tF,OF=rF,kF=oF,AF=hF,jF=SF,MF=_F,NF=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,T.jsxs)(gF,{suppressHydrationWarning:!0,className:l(`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,T.jsx)(vF,{asChild:!0,children:(0,T.jsx)(Cu,{className:`size-4 opacity-50`})})]}),PF=({className:e,...t})=>(0,T.jsx)(DF,{className:l(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,T.jsx)(Su,{})}),FF=({className:e,...t})=>(0,T.jsx)(OF,{className:l(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,T.jsx)(yu,{})}),IF=({className:e,children:t,position:n=`popper`,...r})=>(0,T.jsx)(yF,{children:(0,T.jsxs)(bF,{className:l(`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,T.jsx)(PF,{}),(0,T.jsx)(xF,{className:l(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,T.jsx)(FF,{})]})}),LF=({className:e,...t})=>(0,T.jsx)(CF,{className:l(`px-1 py-0.5 font-semibold text-sm`,e),...t}),RF=({className:e,children:t,...n})=>(0,T.jsxs)(wF,{className:l(`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,T.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,T.jsx)(EF,{children:(0,T.jsx)(vu,{className:`size-4`})})}),(0,T.jsx)(TF,{children:t})]}),zF=({className:e,...t})=>(0,T.jsx)(kF,{className:l(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=AF;J.Group=jF,J.Value=MF,J.Trigger=NF,J.ScrollUpButton=PF,J.ScrollDownButton=FF,J.Content=IF,J.Label=LF,J.Item=RF,J.Separator=zF;var BF=()=>{let e=(0,b.c)(8),{codeFormat:t,setCodeFormat:n,setContentDeclarationFormat:r}=xk(),i=br(Dk),a;e[0]!==n||e[1]!==r?(a=e=>{n(e),r(e)},e[0]=n,e[1]=r,e[2]=a):a=e[2];let o;return e[3]!==t||e[4]!==i.codeFormat.label.value||e[5]!==i.codeFormat.placeholder.value||e[6]!==a?(o=(0,T.jsxs)(J,{value:t,onValueChange:a,children:[(0,T.jsx)(J.Trigger,{className:`py-1!`,"aria-label":i.codeFormat.label.value,children:(0,T.jsx)(J.Value,{placeholder:i.codeFormat.placeholder.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),(0,T.jsx)(J.Item,{value:`esm`,children:`ESM`}),(0,T.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`})]})]}),e[3]=t,e[4]=i.codeFormat.label.value,e[5]=i.codeFormat.placeholder.value,e[6]=a,e[7]=o):o=e[7],o},VF=()=>{let e=(0,b.c)(5),{contentDeclarationFormat:t,setContentDeclarationFormat:n}=xk(),r=br(Dk),i;return e[0]!==r.contentDeclarationFormat.label.value||e[1]!==r.contentDeclarationFormat.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,T.jsxs)(J,{value:t,onValueChange:n,children:[(0,T.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.contentDeclarationFormat.label.value,children:(0,T.jsx)(J.Value,{placeholder:r.contentDeclarationFormat.placeholder.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),(0,T.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`}),(0,T.jsx)(J.Item,{value:`esm`,children:`ESM`}),(0,T.jsx)(J.Item,{value:`json`,children:`JSON`})]})]}),e[0]=r.contentDeclarationFormat.label.value,e[1]=r.contentDeclarationFormat.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},HF={key:`code`,content:{nodeType:`translation`,translation:{en:{title:`Copy code`,description:`Copy the code to the clipboard`},"en-GB":{title:`Copy code`,description:`Copy the code to the clipboard`},fr:{title:`Copier le code`,description:`Copier le code dans le presse-papiers`},es:{title:`Copiar código`,description:`Copiar el código al portapapeles`},de:{title:`Code kopieren`,description:`Kopieren Sie den Code in die Zwischenablage`},ja:{title:`コードをコピー`,description:`コードをクリップボードにコピー`},ko:{title:`코드 복사`,description:`코드를 클립보드에 복사`},zh:{title:`复制代码`,description:`复制代码到剪贴板`},it:{title:`Copiare il codice`,description:`Copiare il codice nella clipboard`},pt:{title:`Copiar código`,description:`Copiar o código para a área de transferência`},hi:{title:`कोड कॉपी करें`,description:`कोड को क्लिपबोर्ड पर कॉपी करें`},ar:{title:`نسخ الكود`,description:`نسخ الكود إلى الحافظة`},ru:{title:`Копировать код`,description:`Копировать код в буфер обмена`}}},localIds:[`code::local::../@intlayer/design-system/dist/esm/components/IDE/code.content.mjs`,`code::local::../@intlayer/design-system/dist/esm/components/IDE/copyCode.content.mjs`]},UF=({children:e,className:t,identifier:n,...r})=>(0,T.jsx)(`div`,{className:l(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),WF=({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,...u})=>(0,T.jsx)(eS,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:l(`absolute z-50 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),...u,children:e});UF.Detail=WF;var GF=e=>(0,T.jsx)(UF,{...e}),KF=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,v.useRef)(null),[i,a]=(0,v.useState)(e),[o,s]=(0,v.useState)(t),[c,l]=(0,v.useState)(void 0);return(0,v.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,T.jsx)(WF,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},qF=GF;qF.Detail=KF;var JF={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`]},YF=e=>{let t=(0,b.c)(6),{content:n,...r}=e,[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),{label:c}=br(JF),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,v.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,T.jsx)(aS,{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})},XF=e=>{let{code:t,...n}=e,{title:r,description:i}=br(HF);return(0,T.jsxs)(qF,{identifier:`copy`,children:[(0,T.jsx)(YF,{content:t,...n}),(0,T.jsxs)(qF.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,T.jsx)(`strong`,{children:r}),(0,T.jsx)(`p`,{className:`text-neutral`,children:i})]})]})},ZF=()=>{let e=(0,b.c)(5),{packageManager:t,setPackageManager:n}=xk(),r=br(Dk);br(Dk);let i;return e[0]!==r.packageManager.label.value||e[1]!==r.packageManager.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,T.jsxs)(J,{value:t,onValueChange:n,children:[(0,T.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.packageManager.label.value,children:(0,T.jsx)(J.Value,{placeholder:r.packageManager.placeholder.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`npm`,children:`npm`}),(0,T.jsx)(J.Item,{value:`pnpm`,children:`pnpm`}),(0,T.jsx)(J.Item,{value:`yarn`,children:`yarn`}),(0,T.jsx)(J.Item,{value:`bun`,children:`bun`})]})]}),e[0]=r.packageManager.label.value,e[1]=r.packageManager.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},QF=700,$F=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:d,isRollable:f=!0,...p})=>{let m=e?.endsWith(`
|
|
159
|
+
`)?e.slice(0,-1):e,h=s||c||d;return(0,T.jsx)(Ek,{packageManager:s,codeFormat:c,contentDeclarationFormat:d,children:(0,T.jsxs)(eS,{className:l(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...p,children:[r&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl bg-card/50 py-1.5 pr-12 pl-4 text-neutral text-xs`,children:[(0,T.jsx)(`span`,{className:`truncate`,children:o??t}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,T.jsx)(ZF,{}),c&&(0,T.jsx)(BF,{}),d&&(0,T.jsx)(VF,{})]})]}),(0,T.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,T.jsx)(`div`,{className:l(`absolute right-2 bottom-0 flex h-7 items-center`,h&&`h-11`),children:(0,T.jsx)(XF,{code:m})})})]}),(0,T.jsx)(Tk,{minHeight:QF,isRollable:f,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:(0,T.jsx)(u,{lang:t,isDarkMode:n,children:m})})]})})},eI=(0,v.createContext)({tabsValues:{},setTabsValues:()=>{}}),tI=()=>(0,v.useContext)(eI),nI=e=>{let t=(0,b.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},t[0]=r):r=t[0];let[i,a]=(0,v.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,T.jsx)(eI,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},rI=e=>{let t=(0,b.c)(38),{enable:n,onSwipeLeft:r,onSwipeRight:i,itemIndex:a,itemCount:o,thresholdPct:s,touchAction:c,disableWhenSelectingText:l}=e,u=n===void 0?!0:n,d=s===void 0?20:s,f=c===void 0?`pan-y`:c,p=l===void 0?!0:l,m=(0,v.useRef)(null),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(0),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1},t[0]=x):x=t[0];let S=(0,v.useRef)(x),C=(0,v.useRef)(!1),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{let e=m.current;return e?e.clientWidth:0},t[1]=w):w=t[1];let T=w,E;t[2]!==o||t[3]!==a?(E=e=>{let t=a<=0,n=a>=o-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},t[2]=o,t[3]=a,t[4]=E):E=t[4];let D=E,O;t[5]===u?O=t[6]:(O=e=>{u&&S.current.pointerId===null&&(S.current.pointerId=e.pointerId,S.current.startX=e.clientX,S.current.startY=e.clientY,S.current.lastX=e.clientX,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current=!1,g(!1),y(0))},t[5]=u,t[6]=O);let k=O,A;t[7]!==D||t[8]!==p||t[9]!==u||t[10]!==h?(A=e=>{if(!u||S.current.pointerId!==e.pointerId)return;let t=T();if(!t)return;let n=e.clientX-S.current.startX,r=e.clientY-S.current.startY;if(p){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){C.current=!0;return}}if(!S.current.axisLocked){let e=Math.abs(n),t=Math.abs(r);(e>6||t>6)&&(S.current.axisLocked=!0,S.current.isHorizontal=e>t)}if(S.current.isHorizontal){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),h||g(!0),y(D(n/t*100)),S.current.lastX=e.clientX}},t[7]=D,t[8]=p,t[9]=u,t[10]=h,t[11]=A):A=t[11];let j=A,M;t[12]!==_||t[13]!==r||t[14]!==i||t[15]!==d?(M=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=S.current.isHorizontal,n=_;if(g(!1),y(0),S.current.pointerId=null,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current){C.current=!1;return}t&&(n>d?i?.():n<-d&&r?.())},t[12]=_,t[13]=r,t[14]=i,t[15]=d,t[16]=M):M=t[16];let N=M,P;t[17]!==u||t[18]!==N?(P=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[17]=u,t[18]=N,t[19]=P):P=t[19];let F=P,I;t[20]!==u||t[21]!==N?(I=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[20]=u,t[21]=N,t[22]=I):I=t[22];let L=I,R;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{y(0),g(!1)},t[23]=R):R=t[23];let ee;t[24]===a?ee=t[25]:(ee=[a],t[24]=a,t[25]=ee),(0,v.useEffect)(R,ee);let te;t[26]===f?te=t[27]:(te={touchAction:f},t[26]=f,t[27]=te);let ne;t[28]!==L||t[29]!==k||t[30]!==j||t[31]!==F||t[32]!==te?(ne={ref:m,onPointerDown:k,onPointerMove:j,onPointerUp:F,onPointerCancel:L,style:te},t[28]=L,t[29]=k,t[30]=j,t[31]=F,t[32]=te,t[33]=ne):ne=t[33];let z;return t[34]!==_||t[35]!==h||t[36]!==ne?(z={containerRef:m,isDragging:h,dragDeltaPct:_,containerProps:ne},t[34]=_,t[35]=h,t[36]=ne,t[37]=z):z=t[37],z},iI=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`}}),aI=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`}}),oI=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,v.useRef)([]),c=(0,v.useRef)(null),{choiceIndicatorPosition:u,calculatePosition:d}=dS(s,{isHoverable:i,orientation:a});return(0,v.useEffect)(()=>{d()},[t]),(0,T.jsxs)(`div`,{className:l(iI({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,v.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}})}),u&&(0,T.jsx)(`div`,{className:l(aI({color:r,orientation:a})),style:u,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},sI=(0,v.createContext)(void 0),cI=au(`relative w-full rounded-lg`,{variants:{background:{with:`border border-neutral/20 bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),lI=({children:e,...t})=>(0,T.jsx)(`div`,{...t,children:e});lI.displayName=`TabItem`;var uI=Object.assign(e=>{let t=(0,b.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...u}=e,d=v.Children.toArray(a).filter(dI),f=d[0]?.props?.value,{tabsValues:p,setTabsValues:m}=tI(),[h,g]=(0,v.useState)(n??f??``),_=(r&&typeof p==`object`?p?.[r]:h)??n??f,y;t[0]===_?y=t[1]:(y=e=>e.props.value===_,t[0]=_,t[1]=y);let x=d.findIndex(y),S=d.length,{containerProps:C,dragDeltaPct:w,isDragging:E}=rI({itemIndex:x,itemCount:S,onSwipeLeft:()=>{let e=d[Math.min(S-1,x+1)]?.props?.value;e&&D(e)},onSwipeRight:()=>{let e=d[Math.max(0,x-1)]?.props?.value;e&&D(e)}}),D=e=>{g(e),typeof m==`function`&&m(t=>({...t,[r]:e}))},O={activeTab:h??f??``,setActiveTab:D},k;return t[2]!==x||t[3]!==c?(k=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===x;return(0,T.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:l(`w-full min-w-0 p-6 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!o&&`pointer-events-none opacity-0`,a),children:(0,T.jsx)(`div`,{className:l(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=x,t[3]=c,t[4]=k):k=t[4],(0,T.jsx)(sI.Provider,{value:O,children:(0,T.jsxs)(`div`,{className:l(cI({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...u,children:[(0,T.jsx)(`div`,{className:l(`flex shrink-0 gap-3 p-3`,s),children:(0,T.jsx)(oI,{selectedChoice:_,tabs:d.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=_===n;return(0,T.jsx)(`button`,{className:l(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:r,onClick:()=>!r&&D(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,T.jsx)(`div`,{className:l(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...C,children:(0,T.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:l(`grid w-full min-w-0`,c&&`h-full`,E?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${d.length}, 100%)`,transform:`translateX(-${x*100-(E?w:0)}%)`},children:d.map(k)})})]})})},{Item:lI});function dI(e){return(0,v.isValidElement)(e)&&e.type===lI}var fI=e=>{let t=(0,b.c)(3),[n,r]=(0,v.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,v.useEffect)(i,a),n},pI=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()})}},mI=[],hI=()=>{let e=(0,b.c)(2),t=(0,v.useSyncExternalStore)(pI.subscribe,pI.getSnapshot,gI),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:pI.addBlockage,removeBlockage:pI.removeBlockage,isElementScrollBlocked:pI.isElementScrollBlocked},e[0]=t,e[1]=n),n};function gI(){return mI}var _I=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}=hI(),d=fI(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,v.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},vI=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`}}),yI={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`},bI=qx.create(eS),xI=e=>{let t=(0,b.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:u,isScrollable:d,disableScroll:f,padding:p,...m}=e,h=o===void 0?!1:o,g=c===void 0?`md`:c,_=d===void 0?!1:d,y=f===void 0?!0:f,x=p===void 0?`none`:p,S=fI(i),C=r&&y,w;t[0]===C?w=t[1]:(w={key:`modal`,disableScroll:C},t[0]=C,t[1]=w),_I(w);let E,D;if(t[2]!==r||t[3]!==a?(E=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},D=[r,a],t[2]=r,t[3]=a,t[4]=E,t[5]=D):(E=t[4],D=t[5]),(0,v.useEffect)(E,D),!S){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{}),t[6]=e):e=t[6],e}let O=!!s,k=yI[x||`none`],A;return t[7]===a?A=t[8]:(A=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=A),(0,Oc.createPortal)((0,T.jsx)(qx.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:A,"aria-hidden":!r,children:(0,T.jsxs)(bI,{onClick:SI,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:vI({size:g,className:u}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...m,children:[(0,T.jsxs)(`div`,{className:l(`relative flex-none px-4 pt-4`,h&&O?`flex items-start`:h?`flex justify-end`:O?`items-center`:`hidden`),children:[O&&(0,T.jsx)(gk,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),h&&(0,T.jsx)(aS,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Uu,size:`icon-md`})]}),(0,T.jsx)(`div`,{className:l(`flex min-h-0 w-full flex-1 flex-col`,_===!0&&`overflow-auto`,_===`y`&&`overflow-y-auto overflow-x-hidden`,_===`x`&&`overflow-x-auto overflow-y-hidden`,!_&&`overflow-visible`),children:(0,T.jsx)(`div`,{className:l(`flex h-full w-full flex-1 flex-col`,k),children:n})})]})}),S)};function SI(e){return e.stopPropagation()}var CI={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},localIds:[`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`]},wI=e=>{let t=(0,b.c)(6),{setIsModalOpen:n}=e,{modal:r}=br(CI),i;if(t[0]!==r.description||t[1]!==r.title||t[2]!==n){let e;t[4]===n?e=t[5]:(e=()=>{n(!0)},t[4]=n,t[5]=e),i=(0,T.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,T.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,T.jsxs)(qF,{identifier:`expand`,children:[(0,T.jsx)(aS,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:Mu}),(0,T.jsxs)(qF.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,T.jsx)(`strong`,{children:r.title}),(0,T.jsx)(`p`,{className:`text-neutral`,children:r.description})]})]})})}),t[0]=r.description,t[1]=r.title,t[2]=n,t[3]=i}else i=t[3];return i},TI=(0,v.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,T.jsx)(`table`,{ref:r,className:l(`w-full table-auto overflow-hidden text-left`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),EI=.55,DI=5,OI=30,kI=(e,t,n)=>{let r=(0,b.c)(3),i;r[0]!==t||r[1]!==e?(i=()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(OI,Math.max(DI,(n[t]??0)*EI));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${OI}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},r[0]=t,r[1]=e,r[2]=i):i=r[2],(0,v.useEffect)(i,n)},AI=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,v.useState)(!1),[c,u]=(0,v.useState)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null);kI(d,f,[a.children,o]),(0,v.useEffect)(()=>{if(o&&c!==null&&f.current){let e=f.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-neutral/40`,`dark:bg-neutral-dark/40`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,v.useEffect)(()=>{o||u(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),s(!0))}i?.(e)};return(0,T.jsxs)(`div`,{className:`group relative`,children:[n&&(0,T.jsx)(wI,{setIsModalOpen:s}),(0,T.jsx)(Tk,{isRollable:t,className:`max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,children:(0,T.jsx)(TI,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,T.jsx)(xI,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,T.jsx)(`div`,{className:`grid`,children:(0,T.jsx)(TI,{ref:f,className:l(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,T.jsx)(T.Fragment,{})})]})},jI=e=>(0,T.jsx)(mk,{isClickable:!0,className:`text-text`,...e}),MI=e=>(0,T.jsx)(hk,{isClickable:!0,className:`mt-16 text-text`,...e}),NI=e=>(0,T.jsx)(gk,{isClickable:!0,className:`mt-5 text-text`,...e}),PI=e=>(0,T.jsx)(_k,{isClickable:!0,className:`mt-3 text-text`,...e}),FI=e=>(0,T.jsx)(vk,{isClickable:!0,className:`mt-3 text-text`,...e}),II=e=>(0,T.jsx)(yk,{isClickable:!0,className:`mt-3 text-text`,...e}),LI=e=>(0,T.jsx)(`strong`,{className:`text-text`,...e}),RI=(0,v.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,T.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-sm`,children:i.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,T.jsx)($F,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),zI=e=>function(t){return(0,T.jsx)(RI,{...t,isDarkMode:e})},BI=({className:e,...t})=>(0,T.jsx)(`blockquote`,{className:l(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),VI=({className:e,...t})=>(0,T.jsx)(`ul`,{className:l(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),HI=({className:e,...t})=>(0,T.jsx)(`ol`,{className:l(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),UI=({className:e,alt:t,src:n,...r})=>(0,T.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:l(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),WI=e=>t=>(0,T.jsx)(tk,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),GI={h1:jI,h2:MI,h3:NI,h4:PI,h5:FI,h6:II,strong:LI,blockquote:BI,ul:VI,ol:HI,img:UI,pre:e=>(0,T.jsx)(T.Fragment,{children:e.children}),table:e=>(0,T.jsx)(AI,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,T.jsx)(`th`,{className:l(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,T.jsx)(`tr`,{className:l(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,T.jsx)(`td`,{className:l(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,T.jsx)(`hr`,{className:l(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,T.jsx)(uI,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:uI.Item,Columns:({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`flex-1`,e),...t})},KI=(e,t)=>({...GI,code:zI(e),a:WI(t)}),qI=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,T.jsx)(Sk,{children:(0,T.jsx)(nI,{children:wr(e,{components:{...KI(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),JI=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}},YI=e=>{let t=(0,b.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=JI(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,v.useState)(a??null),[l,u]=(0,v.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,v.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,T.jsxs)(`div`,{className:`flex gap-1`,children:[(0,T.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,T.jsx)(J.Trigger,{className:`w-20`,children:(0,T.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`<`,children:`<`}),(0,T.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,T.jsx)(J.Item,{value:`=`,children:`=`}),(0,T.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,T.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,T.jsx)(Xw,{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},XI=e=>{let t=(0,b.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=zw(),s=Lw(),{mutate:c,isPending:l}=DO(),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,T.jsx)(qO,{variant:`default`,onContentChange:u,additionalButtons:(0,T.jsx)(aS,{Icon:Hu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},ZI=e=>{let t=(0,b.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=zw(),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,T.jsx)(ST,{variant:`default`,onContentChange:o,...i})},QI=[{content:`False`,value:!1},{content:`True`,value:!0}],$I=e=>{let t=(0,b.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=zw(),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,T.jsx)(vS,{choices:QI,value:!0,onChange:o,color:`text`,size:`sm`,...i})},eL=e=>{let t=(0,b.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=xr(),{selectedLocales:c,availableLocales:l}=bT(),u=n[k],d;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==n||t[7]!==u||t[8]!==c){let e=Object.keys(u),f=l.length>c.length?c:[...new Set([...l,...e])],p=n[k],m;t[10]!==p||t[11]!==s||t[12]!==i||t[13]!==r||t[14]!==o||t[15]!==a?(m=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:ur(e,o)})}),(0,T.jsx)(`tr`,{className:`flex`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:p[e]??fw(p[s]),keyPath:[...r,{type:k,key:e}],dictionary:i,renderSection:a})})})]},t)},t[10]=p,t[11]=s,t[12]=i,t[13]=r,t[14]=o,t[15]=a,t[16]=m):m=t[16],d=(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:f.map(m)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=n,t[7]=u,t[8]=c,t[9]=d}else d=t[9];return d},tL=e=>{let t=(0,b.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=zw(),{addNewEnumeration:s,removeEnumeration:c}=br(_T),l=n[A],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,fw(l[d])??``,[...r,{type:A,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,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[A]).map(e=>{let t=[...r,{type:A,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(`div`,{className:`flex flex-1`,children:(0,T.jsx)(aS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Vu,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,T.jsx)(`tr`,{className:`w-full p-2`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(YI,{value:e,onChange:t=>{let a=n[A],s=XO(a,e,t),c={...n,[A]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(dL,{section:l[e]??fw(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,T.jsx)(aS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Lu,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},nL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[j];return(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:i[e]??fw(i.true),keyPath:[...t,{type:j,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},rL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[B];return(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:i[e]??fw(i.male),keyPath:[...t,{type:B,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},iL=e=>{let t=(0,b.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=zw(),{addNewElement:s,removeElement:c}=br(_T),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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,T.jsx)(aS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:F,key:t}];o(i.localId,void 0,e)},Icon:Vu,children:c.text})]})})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:e??fw(n[0]),keyPath:[...r,{type:F,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:F,key:n.length}];o(i.localId,fw(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,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,T.jsx)(aS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Lu,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},aL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:P,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??fw(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(dL,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),oL=e=>{let t=(0,b.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,v.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:ee}],l=n[ee];s=(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsx)(vS,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,T.jsx)(fL,{section:l,keyPath:c,dictionary:i,renderSection:a===1?pL:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},sL=e=>{let t=(0,b.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,v.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[R],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,T.jsx)(qI,{isDarkMode:a,children:e}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsx)(vS,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,T.jsx)(fL,{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},cL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:M}],i=e[M];return(0,T.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,T.jsx)(fL,{section:i,keyPath:r,...n})})},lL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:N}],i=e[N],{content:a}=e;return(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,T.jsx)(fL,{section:a,keyPath:r,...n})]})},uL=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=zw(),s=i[I],c=[...t,{type:I}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,T.jsx)(ZO,{children:`Dictionary key`}),(0,T.jsx)(ST,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,T.jsx)(ZO,{children:`Path (optional)`}),(0,T.jsx)(ST,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},dL=e=>{let t=(0,b.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=br(_T),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=gw(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,T.jsx)(`span`,{children:`(React Node)`}),(0,T.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,T.jsx)(uL,{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,T.jsx)(eL,{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,T.jsx)(tL,{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,T.jsx)(nL,{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,T.jsx)(rL,{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===`insertion`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,T.jsx)(cL,{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===`markdown`){let e;t[40]!==i||t[41]!==o||t[42]!==r||t[43]!==n?(e=(0,T.jsx)(sL,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[40]=i,t[41]=o,t[42]=r,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`html`){let e;t[45]!==i||t[46]!==r||t[47]!==n?(e=(0,T.jsx)(oL,{dictionary:i,keyPath:r,section:n}),t[45]=i,t[46]=r,t[47]=n,t[48]=e):e=t[48],l=e;break bb0}if(e===`file`){let e;t[49]!==i||t[50]!==r||t[51]!==a||t[52]!==n?(e=(0,T.jsx)(lL,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[49]=i,t[50]=r,t[51]=a,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`array`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,T.jsx)(iL,{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===`object`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,T.jsx)(aL,{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===`number`){let e;t[64]!==i||t[65]!==r||t[66]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:(0,T.jsx)(ZI,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[64]=i,t[65]=r,t[66]=n,t[67]=e):e=t[67],l=e;break bb0}if(e===`text`){let e;t[68]!==i||t[69]!==r||t[70]!==a||t[71]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,T.jsx)(XI,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[68]=i,t[69]=r,t[70]=a,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`boolean`){let e;t[73]!==i||t[74]!==r||t[75]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:(0,T.jsx)($I,{dictionary:i,keyPath:r,value:n})}),t[73]=i,t[74]=r,t[75]=n,t[76]=e):e=t[76],l=e;break bb0}c=(0,T.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},fL=e=>(0,T.jsx)(eS,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`xl`,children:(0,T.jsx)(dL,{...e})});function pL(e){return(0,T.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}var mL={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`]},hL=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]||``,gL=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`}}),_L=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Ce(mL).linkLabel;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(tk,{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,T.jsx)(`span`,{itemProp:`name`,children:n})}),(0,T.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},vL=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=br(mL);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(aS,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,T.jsx)(`span`,{itemProp:`name`,children:t})}),(0,T.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},yL=({children:e,position:t,className:n,...r})=>(0,T.jsxs)(`span`,{itemProp:`item`,className:l(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,T.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,T.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),bL=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,T.jsx)(xu,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:u,spacing:d,...f})=>{let p=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,T.jsx)(`nav`,{"aria-label":o,children:(0,T.jsx)(`ol`,{className:l(gL({size:u,spacing:d}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...f,children:p.map((e,t)=>{let o=t===p.length-1,c=typeof e==`object`&&typeof e.href==`string`,u=typeof e==`object`&&typeof e.onClick==`function`,d=t===p.length-1,f=d?i:void 0,m=e===`...`,h=e.text??e,g=hL(n);if(m)return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,T.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,T.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,T.jsx)(`span`,{className:l(g),children:a})})]},`truncated-${h}`);let _=(0,T.jsx)(yL,{position:t+1,"aria-current":f,className:l(`transition-colors duration-200`,d&&`text-neutral-900`),children:h},h);c?_=(0,T.jsx)(_L,{href:e.href,color:n,position:t+1,locale:r,"aria-current":f,className:l(d&&`cursor-default text-neutral-900`),children:h},h):u&&(_=(0,T.jsx)(vL,{onClick:e.onClick,color:n,position:t+1,"aria-current":f,className:l(d&&`cursor-default text-neutral-900`),children:h},h));let y=(0,v.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:h,className:`flex items-center`},_);return o?y:(0,T.jsxs)(v.Fragment,{children:[y,(0,T.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,T.jsx)(`span`,{className:l(g),children:a})})]},h)})})})},xL=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,T.jsx)(bL,{links:[...a?[{text:gr(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:t.key?.toString()??``}))],locale:r,elementType:`location`,color:i}),SL={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`]},CL=({children:e,className:t,identifier:n,...r})=>(0,T.jsx)(`div`,{className:l(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});CL.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,T.jsx)(aS,{className:l([`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}),CL.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,...c})=>(0,T.jsx)(`div`,{className:l(`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,T.jsx)(oS,{isHidden:t,className:l(`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,children:e})});function wL(e){return Array.isArray?Array.isArray(e):PL(e)===`[object Array]`}function TL(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 EL(e){return e==null?``:TL(e)}function DL(e){return typeof e==`string`}function OL(e){return typeof e==`number`}function kL(e){return e===!0||e===!1||jL(e)&&PL(e)==`[object Boolean]`}function AL(e){return typeof e==`object`}function jL(e){return AL(e)&&e!==null}function ML(e){return e!=null}function NL(e){return!e.trim().length}function PL(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var FL=`Incorrect 'index' type`,IL=e=>`Invalid value for key ${e}`,LL=e=>`Pattern length exceeds max of ${e}.`,RL=e=>`Missing ${e} property in key`,zL=e=>`Property 'weight' in key '${e}' must be a positive integer`,BL=Object.prototype.hasOwnProperty,VL=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=HL(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 HL(e){let t=null,n=null,r=null,i=1,a=null;if(DL(e)||wL(e))r=e,t=UL(e),n=WL(e);else{if(!BL.call(e,`name`))throw Error(RL(`name`));let o=e.name;if(r=o,BL.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(zL(o));t=UL(o),n=WL(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function UL(e){return wL(e)?e:e.split(`.`)}function WL(e){return wL(e)?e.join(`.`):e}function GL(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(ML(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!ML(s))return;if(a===t.length-1&&(DL(s)||OL(s)||kL(s)||typeof s==`bigint`))n.push(o===void 0?EL(s):{v:EL(s),i:o});else if(wL(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,DL(t)?t.split(`.`):t,0),r?n:n[0]}var KL={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},qL={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},JL={location:0,threshold:.6,distance:100},YL={useExtendedSearch:!1,useTokenSearch:!1,getFn:GL,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...qL,...KL,...JL,...YL}),XL=/[^ ]+/g;function ZL(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(XL).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 QL=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=ZL(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,DL(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();DL(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(!ML(e)||NL(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(ML(i)){if(wL(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(ML(n)){if(DL(n)){if(!NL(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(ML(n.v)){let t=DL(n.v)?n.v:EL(n.v);if(!NL(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(DL(i)&&!NL(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 $L(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new QL({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(HL)),i.setSources(t),i.create(),i}function eR(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new QL({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function tR(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 nR=32;function rR(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>nR)throw Error(LL(nR));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=tR(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function iR(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 aR(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 oR={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},sR=RegExp(`[`+Object.keys(oR).join(``)+`]`,`g`),cR=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(sR,e=>oR[e]):e=>e,lR=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?cR(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:iR(e),startIndex:t})},d=this.pattern.length;if(d>nR){let e=0,t=d%nR,n=d-t;for(;e<n;)u(this.pattern.substr(e,nR),e),e+=nR;if(t){let e=d-nR;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?cR(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}=rR(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=aR(u)),p}},uR=class{constructor(e){this.pattern=e}static isMultiMatch(e){return dR(e,this.multiRegex)}static isSingleMatch(e){return dR(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function dR(e,t){let n=e.match(t);return n?n[1]:null}var fR=class extends uR{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]}}},pR=class extends uR{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]}}},mR=class extends uR{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]}}},hR=class extends uR{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]}}},gR=class extends uR{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]}}},_R=class extends uR{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]}}},vR=class extends uR{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 lR(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)}},yR=class extends uR{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}}},bR=[fR,yR,mR,hR,_R,gR,pR,vR],xR=bR.length,SR=`\0`,CR=`|`;function wR(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 TR(e,t={}){return e.replace(/\\\|/g,SR).split(CR).map(e=>{let n=wR(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<xR;){let e=bR[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<xR;){let e=bR[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var ER=new Set([vR.type,yR.type]),DR=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?cR(e):e,this.pattern=e,this.query=TR(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?cR(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&&(ER.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=aR(o)),e}}return{isMatch:!1,score:1}}},OR=[];function kR(...e){OR.push(...e)}function AR(e,t){for(let n=0,r=OR.length;n<r;n+=1){let r=OR[n];if(r.condition(e,t))return new r(e,t)}return new lR(e,t)}var jR={AND:`$and`,OR:`$or`},MR={PATH:`$path`,PATTERN:`$val`},NR=e=>!!(e[jR.AND]||e[jR.OR]),PR=e=>!!e[MR.PATH],FR=e=>!wL(e)&&AL(e)&&!NR(e),IR=e=>({[jR.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function LR(e,t,{auto:n=!0}={}){let r=e=>{if(DL(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=AR(e,t)),r}let i=Object.keys(e),a=PR(e);if(!a&&i.length>1&&!NR(e))return r(IR(e));if(FR(e)){let r=a?e[MR.PATH]:i[0],o=a?e[MR.PATTERN]:e[r];if(!DL(o))throw Error(IL(r));let s={keyId:WL(r),pattern:o};return n&&(s.searcher=AR(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];wL(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return NR(e)||(e=IR(e)),r(e)}function RR(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 zR(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=RR(e.matches,{ignoreFieldNorm:t})})}var BR=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 VR(e,t){let n=e.matches;t.matches=[],ML(n)&&n.forEach(e=>{if(!ML(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 HR(e,t){t.score=e.score}function UR(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(VR),r&&i.push(HR),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var WR=/\b\w+\b/g;function GR({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=cR(n)),n.match(WR)||[]}}}function KR(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 qR(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 JR(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 YR=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new VL(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=AR(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 QL))throw Error(FL);if(this._myIndex=t||$L(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=GR({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=KR(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(ML(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=GR({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});qR(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)JR(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&&JR(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(DL(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return OL(n)&&n>-1&&(e=e.slice(0,n)),e}let c=OL(n)&&n>0&&DL(e),l;if(c){let t=new BR(n);DL(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=DL(e)?DL(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),zR(l,{ignoreFieldNorm:s}),a&&l.sort(o),OL(n)&&n>-1&&(l=l.slice(0,n));return UR(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(!ML(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=RR(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=LR(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===jR.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(ML(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(!ML(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=RR(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!ML(t))return[];let r=[];if(wL(t))t.forEach(({v:t,i,n:a})=>{if(!ML(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}},XR=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=GR({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 lR(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=aR(t)),o}};YR.version=`7.3.0`,YR.createIndex=$L,YR.parseIndex=eR,YR.config=Y,YR.match=function(e,t,n){return AR(e,{...Y,...n}).searchIn(t)},YR.parseQuery=LR,kR(DR),kR(XR),YR.use=function(...e){e.forEach(e=>kR(e))};var ZR=`locale-switcher-content`,QR=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=br(SL),s=(0,v.useRef)(null),{locale:c}=xr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=bT(),f=(0,v.useMemo)(()=>l.map(e=>({locale:e,englishName:ur(e,`en`),currentLocaleName:ur(e,c),ownLocaleName:ur(e)})),[l,c]),[p,m]=(0,v.useState)(``),[h,g]=vT(`locale-content-selector-see-all-locales`,!1),_=(0,v.useMemo)(()=>new YR(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),y=(0,v.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),b=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},x=e=>{g(e),d(e?l:[c])};return(0,T.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,T.jsxs)(CL,{identifier:ZR,children:[(0,T.jsx)(CL.Trigger,{identifier:ZR,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,T.jsx)(`div`,{className:`px-2 py-1`,children:(0,T.jsx)(Au,{size:16})}),(0,T.jsx)(Pu,{className:`self-center`,size:16})]})}),(0,T.jsx)(CL.Panel,{identifier:ZR,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,T.jsxs)(eS,{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,T.jsx)(`div`,{className:`m-auto p-2`,children:(0,T.jsx)(vS,{defaultValue:h,onChange:x,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`p-3`,children:(0,T.jsx)(Xw,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,T.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:y.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,T.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,T.jsx)(aS,{onClick:()=>b(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,T.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,T.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,T.jsx)(vu,{className:`size-full`})}),(0,T.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,T.jsx)(`span`,{dir:ar(e),lang:e,children:i}),(0,T.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,T.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},$R=e=>{let t=pw(e),n=gw(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?$R(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},ez=e=>{let t=(0,b.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=x,o=uw(n,r,Mw()),{addEditedContent:s}=Rw(),{setFocusedContentKeyPath:c,focusedContent:l}=Pw(),{addNewElement:u,goToField:d}=br(_T),f=gw(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&fr(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=$R(o);if(!o)return(0,T.jsx)(T.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,T.jsx)(aS,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:xu,children:gr(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,T.jsx)(T.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,T.jsx)(ez,{keyPath:[...r,{type:k,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,T.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`condition`)return(0,T.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,T.jsx)(ez,{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:F,key:t}];return $R(e)?(0,T.jsxs)(aS,{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,T.jsx)(sS,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,T.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,T.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,T.jsx)(ez,{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,T.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,T.jsx)(aS,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:F,key:o.length}],t=o,n=fw(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Lu,children:u.text})]})}return typeof o.nodeType==`string`?(0,T.jsx)(ez,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,T.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:P,key:e}];return $R(uw(n,t))?(0,T.jsx)(aS,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:xu,children:gr(e)},e):(0,T.jsx)(sS,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:gr(e),children:(0,T.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,T.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,T.jsx)(ez,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,T.jsxs)(T.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},tz=e=>{let t=(0,b.c)(3),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=zw(),{focusedContent:c,setFocusedContentKeyPath:l}=Pw(),u=c?.keyPath,d=s?.[o]?.content===void 0?i:s?.[o]?.content,f=Mw(),p=uw(d,u??[],f),m;t[0]===d?m=t[1]:(m=$R(d),t[0]=d,t[1]=m);let h=m,g=$R(p),_;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],t[2]=_):_=t[2],(0,v.useEffect)(()=>{p===void 0&&l(c?.keyPath?.slice(0,-1)??[])},_),(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,T.jsx)(xL,{dictionaryKey:a,keyPath:u??[],onClickKeyPath:l}),(0,T.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,T.jsx)(QR,{})})]}),(0,T.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!h&&Object.keys(d).length>0&&(0,T.jsx)(eS,{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:`xl`,transparency:`xs`,children:(0,T.jsx)(ez,{keyPath:[],section:d,dictionary:n})}),(g||(u??[]).length>0)&&(0,T.jsx)(fL,{keyPath:u??[],section:p,dictionary:n,isDarkMode:r})]})]})},nz=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`}}),rz=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:u,tabIndex:d,"aria-label":f,...p})=>{let m=a?`button`:`span`,h=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},g=e=>{e.stopPropagation(),c?.()};return(0,T.jsxs)(m,{className:l(nz({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?h:void 0,role:u||(a?`button`:`status`),tabIndex:a?d??0:d,"aria-label":f||(a?`${i} button`:void 0),...p,children:[i,o&&(0,T.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:g,"aria-label":`Remove ${i} badge`,children:(0,T.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,T.jsx)(`title`,{children:`Remove badge`}),(0,T.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`})]})})]})},iz=`Dialog`,[az,oz]=yc(iz),[sz,cz]=az(iz),lz=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=nl({prop:r,defaultProp:i??!1,onChange:a,caller:iz});return(0,T.jsx)(sz,{scope:t,triggerRef:s,contentRef:c,contentId:Qk(),titleId:Qk(),descriptionId:Qk(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};lz.displayName=iz;var uz=`DialogTrigger`,dz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=cz(uz,n),a=_c(t,i.triggerRef);return(0,T.jsx)(W.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":jz(i.open),...r,ref:a,onClick:mc(e.onClick,i.onOpenToggle)})});dz.displayName=uz;var fz=`DialogPortal`,[pz,mz]=az(fz,{forceMount:void 0}),hz=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=cz(fz,t);return(0,T.jsx)(pz,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,T.jsx)(Zc,{present:n||a.open,children:(0,T.jsx)(Yc,{asChild:!0,container:i,children:e})}))})};hz.displayName=fz;var gz=`DialogOverlay`,_z=v.forwardRef((e,t)=>{let n=mz(gz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=cz(gz,e.__scopeDialog);return a.modal?(0,T.jsx)(Zc,{present:r||a.open,children:(0,T.jsx)(yz,{...i,ref:t})}):null});_z.displayName=gz;var vz=xc(`DialogOverlay.RemoveScroll`),yz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=cz(gz,n);return(0,T.jsx)(tP,{as:vz,allowPinchZoom:!0,shards:[i.contentRef],children:(0,T.jsx)(W.div,{"data-state":jz(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),bz=`DialogContent`,xz=v.forwardRef((e,t)=>{let n=mz(bz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=cz(bz,e.__scopeDialog);return(0,T.jsx)(Zc,{present:r||a.open,children:a.modal?(0,T.jsx)(Sz,{...i,ref:t}):(0,T.jsx)(Cz,{...i,ref:t})})});xz.displayName=bz;var Sz=v.forwardRef((e,t)=>{let n=cz(bz,e.__scopeDialog),r=v.useRef(null),i=_c(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return KM(e)},[]),(0,T.jsx)(wz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:mc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:mc(e.onFocusOutside,e=>e.preventDefault())})}),Cz=v.forwardRef((e,t)=>{let n=cz(bz,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,T.jsx)(wz,{...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()}})}),wz=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=cz(bz,n),c=v.useRef(null),l=_c(t,c);return Mk(),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Rk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,T.jsx)(Rc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":jz(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Fz,{titleId:s.titleId}),(0,T.jsx)(Lz,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Tz=`DialogTitle`,Ez=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=cz(Tz,n);return(0,T.jsx)(W.h2,{id:i.titleId,...r,ref:t})});Ez.displayName=Tz;var Dz=`DialogDescription`,Oz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=cz(Dz,n);return(0,T.jsx)(W.p,{id:i.descriptionId,...r,ref:t})});Oz.displayName=Dz;var kz=`DialogClose`,Az=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=cz(kz,n);return(0,T.jsx)(W.button,{type:`button`,...r,ref:t,onClick:mc(e.onClick,()=>i.onOpenChange(!1))})});Az.displayName=kz;function jz(e){return e?`open`:`closed`}var Mz=`DialogTitleWarning`,[Nz,Pz]=vc(Mz,{contentName:bz,titleName:Tz,docsSlug:`dialog`}),Fz=({titleId:e})=>{let t=Pz(Mz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
160
|
+
|
|
161
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
162
|
+
|
|
163
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Iz=`DialogDescriptionWarning`,Lz=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pz(Iz).contentName}}.`;return v.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Rz=lz,zz=hz,Bz=_z,Vz=xz,Hz=1,Uz=.9,Wz=.8,Gz=.17,Kz=.1,qz=.999,Jz=.9999,Yz=.99,Xz=/[\\\/_+.#"@\[\(\{&]/,Zz=/[\\\/_+.#"@\[\(\{&]/g,Qz=/[\s-]/,$z=/[\s-]/g;function eB(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Hz:Yz;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=eB(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Hz:Xz.test(e.charAt(l-1))?(d*=Wz,p=e.slice(i,l-1).match(Zz),p&&i>0&&(d*=qz**+p.length)):Qz.test(e.charAt(l-1))?(d*=Uz,m=e.slice(i,l-1).match($z),m&&i>0&&(d*=qz**+m.length)):(d*=Gz,i>0&&(d*=qz**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Jz)),(d<Kz&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=eB(e,t,n,r,l+1,a+2,o),f*Kz>d&&(d=f*Kz)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function tB(e){return e.toLowerCase().replace($z,` `)}function nB(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,eB(e,t,tB(e),tB(t),0,0,{})}var rB=Symbol.for(`react.lazy`),iB=v.use;function aB(e){return typeof e==`object`&&!!e&&`then`in e}function oB(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===rB&&`_payload`in e&&aB(e._payload)}function sB(e){let t=lB(e),n=v.forwardRef((e,n)=>{let{children:r,...i}=e;oB(r)&&typeof iB==`function`&&(r=iB(r._payload));let a=v.Children.toArray(r),o=a.find(dB);if(o){let e=o.props.children,r=a.map(t=>t===o?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t);return(0,T.jsx)(t,{...i,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return(0,T.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var cB=sB(`Slot`);function lB(e){let t=v.forwardRef((e,t)=>{let{children:n,...r}=e;if(oB(n)&&typeof iB==`function`&&(n=iB(n._payload)),v.isValidElement(n)){let e=pB(n),i=fB(r,n.props);return n.type!==v.Fragment&&(i.ref=t?gc(t,e):e),v.cloneElement(n,i)}return v.Children.count(n)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uB=Symbol(`radix.slottable`);function dB(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===uB}function fB(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 pB(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 mB=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=sB(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,T.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),hB=`[cmdk-group=""]`,gB=`[cmdk-group-items=""]`,_B=`[cmdk-group-heading=""]`,vB=`[cmdk-item=""]`,yB=`${vB}:not([aria-disabled="true"])`,bB=`cmdk-item-select`,xB=`data-value`,SB=(e,t,n)=>nB(e,t,n),CB=v.createContext(void 0),wB=()=>v.useContext(CB),TB=v.createContext(void 0),EB=()=>v.useContext(TB),DB=v.createContext(void 0),OB=v.forwardRef((e,t)=>{let n=HB(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=HB(()=>new Set),i=HB(()=>new Map),a=HB(()=>new Map),o=HB(()=>new Set),s=BB(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,y=Qk(),b=Qk(),x=Qk(),S=v.useRef(null),C=GB();VB(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),VB(()=>{C(6,A)},[]);let w=v.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=v.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??SB;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(gB);t?t.appendChild(e.parentElement===t?e:e.closest(`${gB} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${gB} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${hB}[${xB}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(xB);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(hB)?.querySelector(_B))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${vB}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(yB)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(xB))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(xB))}function F(e){let t=j()?.closest(hB),n;for(;t&&!n;)t=e>0?RB(t,hB):zB(t,hB),n=t?.querySelector(yB);n?w.setState(`value`,n.getAttribute(xB)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return v.createElement(mB.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:g&&e.ctrlKey&&R(e);break;case`ArrowUp`:R(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(bB);t.dispatchEvent(e)}}}}},v.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:JB},c),qB(e,e=>v.createElement(TB.Provider,{value:w},v.createElement(CB.Provider,{value:T},e))))}),kB=v.forwardRef((e,t)=>{let n=Qk(),r=v.useRef(null),i=v.useContext(DB),a=wB(),o=BB(e),s=o.current?.forceMount??i?.forceMount;VB(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=WB(n,r,[e.value,e.children,r],e.keywords),l=EB(),u=UB(e=>e.value&&e.value===c.current),d=UB(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);v.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(bB,f),()=>t.removeEventListener(bB,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:y,...b}=e;return v.createElement(mB.div,{ref:gc(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),AB=v.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Qk(),s=v.useRef(null),c=v.useRef(null),l=Qk(),u=wB(),d=UB(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);VB(()=>u.group(o),[]),WB(o,s,[e.value,e.heading,c]);let f=v.useMemo(()=>({id:o,forceMount:i}),[i]);return v.createElement(mB.div,{ref:gc(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&v.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),qB(e,e=>v.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},v.createElement(DB.Provider,{value:f},e))))}),jB=v.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=v.useRef(null),a=UB(e=>!e.search);return!n&&!a?null:v.createElement(mB.div,{ref:gc(i,t),...r,"cmdk-separator":``,role:`separator`})}),MB=v.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=EB(),o=UB(e=>e.search),s=UB(e=>e.selectedItemId),c=wB();return v.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),v.createElement(mB.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),NB=v.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=v.useRef(null),o=v.useRef(null),s=UB(e=>e.selectedItemId),c=wB();return v.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),v.createElement(mB.div,{ref:gc(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},qB(e,e=>v.createElement(`div`,{ref:gc(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),PB=v.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return v.createElement(Rz,{open:n,onOpenChange:r},v.createElement(zz,{container:o},v.createElement(Bz,{"cmdk-overlay":``,className:i}),v.createElement(Vz,{"aria-label":e.label,"cmdk-dialog":``,className:a},v.createElement(OB,{ref:t,...s}))))}),FB=v.forwardRef((e,t)=>UB(e=>e.filtered.count===0)?v.createElement(mB.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),IB=v.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return v.createElement(mB.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},qB(e,e=>v.createElement(`div`,{"aria-hidden":!0},e)))}),LB=Object.assign(OB,{List:NB,Item:kB,Input:MB,Group:AB,Separator:jB,Dialog:PB,Empty:FB,Loading:IB});function RB(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function zB(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function BB(e){let t=v.useRef(e);return VB(()=>{t.current=e}),t}var VB=typeof window>`u`?v.useEffect:v.useLayoutEffect;function HB(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function UB(e){let t=EB(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function WB(e,t,n,r=[]){let i=v.useRef(),a=wB();return VB(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(xB,s),i.current=s}),i}var GB=()=>{let[e,t]=v.useState(),n=HB(()=>new Map);return VB(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function KB(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function qB({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(KB(t),{ref:t.ref},n(t.props.children)):n(t)}var JB={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},YB=({className:e,...t})=>(0,T.jsx)(LB,{className:l(`flex flex-col overflow-hidden rounded-md`,e),...t}),XB=({children:e,...t})=>(0,T.jsx)(lz,{...t,children:(0,T.jsx)(xz,{className:`overflow-hidden p-0`,children:(0,T.jsx)(YB,{className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5`,children:e})})}),ZB=({className:e,...t})=>(0,T.jsxs)(`div`,{className:`flex w-full items-center`,"cmdk-input-wrapper":``,children:[(0,T.jsx)(Bu,{className:`mr-2 size-4 shrink-0 opacity-50`}),(0,T.jsx)(LB.Input,{className:l(`flex w-full rounded-md bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}),QB=({className:e,...t})=>(0,T.jsx)(LB.List,{className:l(`max-h-[300px] overflow-y-auto overflow-x-hidden`,e),...t}),$B=e=>(0,T.jsx)(LB.Empty,{className:`py-6 text-center text-sm`,...e}),eV=({className:e,...t})=>(0,T.jsx)(LB.Group,{className:l(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs`,e),...t}),tV=({className:e,...t})=>(0,T.jsx)(LB.Separator,{className:l(`-mx-1 h-px bg-border`,e),...t}),nV=({className:e,...t})=>(0,T.jsx)(LB.Item,{className:l(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50`,e),...t}),rV=({className:e,...t})=>(0,T.jsx)(`span`,{className:l(`ml-auto text-muted-foreground text-xs tracking-widest`,e),...t}),iV={...YB,Dialog:XB,Input:ZB,List:QB,Empty:$B,Group:eV,Separator:tV,Item:nV,Shortcut:rV},aV=(0,v.createContext)(null),oV=()=>{let e=(0,v.useContext)(aV);if(!e)throw Error(`useMultiSelect must be used within MultiSelectProvider`);return e},sV=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:i,children:a,dir:o,...s})=>{let[c,u]=(0,v.useState)(t??[]),[d,f]=(0,v.useState)(``),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(-1),_=(0,v.useRef)(null),[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(``);(0,v.useEffect)(()=>{e&&u(e)},[e]);let C=(0,v.useCallback)(e=>{if(c.includes(e)){let t=c.filter(t=>t!==e);u(t),n?.(t)}else{let t=[...c,e];u(t),n?.(t)}},[c]),w=(0,v.useCallback)(e=>{e.preventDefault();let t=e.currentTarget,n=t.value.substring(t.selectionStart??0,t.selectionEnd??0);S(n),b(n===d)},[d]),E=(0,v.useCallback)(e=>{e.stopPropagation();let t=_.current;if(!t)return;let n=()=>{let e=h+1;g(e>c.length-1?r?0:-1:e)},i=()=>{let e=h-1;g(e<0?c.length-1:e)},a=()=>{g(h-1<=0?c.length-1==0?-1:0:h-1)};switch(e.key){case`ArrowLeft`:o===`rtl`?c.length>0&&(h!==-1||r)&&n():c.length>0&&t.selectionStart===0&&i();break;case`ArrowRight`:o===`rtl`?c.length>0&&t.selectionStart===0&&i():c.length>0&&(h!==-1||r)&&n();break;case`Backspace`:case`Delete`:c.length>0&&(h!==-1&&h<c.length?(C(c[h]),a()):(t.selectionStart===0&&x===d||y)&&C(c[c.length-1]));break;case`Enter`:m(!0);break;case`Escape`:h===-1?p&&m(!1):g(-1);break}},[c,d,h,r]);return(0,T.jsx)(aV,{value:(0,v.useMemo)(()=>({value:c,onValueChange:C,open:p,setOpen:m,inputValue:d,setInputValue:f,activeIndex:h,setActiveIndex:g,ref:_,handleSelect:w}),[c,C,p,m,d,f,h,g,_,w]),children:(0,T.jsx)(YB,{onKeyDown:E,className:l(`flex w-full flex-col gap-2 overflow-visible bg-transparent`,i),dir:o,...s,children:a})})},cV=({className:e,getBadgeValue:t=e=>e,validationStyleEnabled:n=!1,children:r,...i})=>{let{value:a,onValueChange:o,activeIndex:s}=oV(),c=(0,v.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]);return(0,T.jsxs)(`div`,{className:l(`flex w-full flex-col gap-3`,`cursor-pointer 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-within:outline-none`,`focus-within:ring-3`,`focus-within:ring-neutral-200`,`dark:focus-within:ring-neutral-500`,`focus-within:ring-offset-white`,`dark:focus-within:ring-offset-neutral-500`,`[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,n&&`valid:border-success invalid:border-error`,e),...i,children:[a.length>0&&(0,T.jsx)(`div`,{className:`flex w-full flex-wrap gap-1`,children:a.map((e,n)=>(0,T.jsxs)(rz,{className:l(`flex items-center gap-1 rounded-xl px-1`,s===n&&`ring-2 ring-muted-foreground`),color:`text`,children:[(0,T.jsx)(`span`,{className:`text-xs`,children:t(e)}),(0,T.jsxs)(`button`,{"aria-label":`Remove ${e} option`,"aria-roledescription":`button to remove option`,onMouseDown:c,onClick:()=>o(e),children:[(0,T.jsxs)(`span`,{className:`sr-only`,children:[`Remove `,e,` option`]}),(0,T.jsx)(Uu,{className:`size-4 cursor-pointer`})]})]},e))}),r]})},lV=e=>{let t=(0,b.c)(5),{className:n,...r}=e,{setOpen:i,inputValue:a,setInputValue:o,activeIndex:s,setActiveIndex:c,handleSelect:u,ref:d}=oV(),f,p;t[0]===i?(f=t[1],p=t[2]):(f=()=>i(!1),p=()=>i(!0),t[0]=i,t[1]=f,t[2]=p);let m;return t[3]===c?m=t[4]:(m=()=>c(-1),t[3]=c,t[4]=m),(0,T.jsx)(iV.Input,{...r,tabIndex:0,ref:d,value:a,onValueChange:s===-1?o:void 0,onSelect:u,onBlur:f,onFocus:p,onClick:m,className:l(`ml-2 flex-1 cursor-pointer outline-hidden`,n,s!==-1&&`caret-transparent`)})},uV=e=>{let t=(0,b.c)(2),{children:n}=e,{open:r}=oV(),i=r&&n,a;return t[0]===i?a=t[1]:(a=(0,T.jsx)(`div`,{className:`relative`,children:i}),t[0]=i,t[1]=a),a},dV=({className:e,children:t})=>(0,T.jsxs)(iV.List,{className:l(`absolute top-0 z-10 flex w-full flex-col gap-2`,`rounded-xl p-2 shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`transition-colors`,e),children:[t,(0,T.jsx)(iV.Empty,{children:(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`No results found`})})]}),fV=e=>{let t=(0,b.c)(4),{className:n,value:r,children:i,...a}=e,{value:o,onValueChange:s,setInputValue:c}=oV(),u=mV,d=o.includes(r),f;return t[0]!==s||t[1]!==c||t[2]!==r?(f=()=>{s(r),c(``)},t[0]=s,t[1]=c,t[2]=r,t[3]=f):f=t[3],(0,T.jsxs)(iV.Item,{...a,onSelect:f,className:l(`flex cursor-pointer justify-between`,`rounded-lg px-2 py-1`,`transition-colors`,`hover:bg-neutral/10`,d&&`opacity-50`,a.disabled&&`cursor-not-allowed opacity-50`,n),onMouseDown:u,children:[i,d&&(0,T.jsx)(vu,{className:`size-4`})]})},pV=sV;pV.Trigger=cV,pV.Input=lV,pV.Content=uV,pV.List=dV,pV.Item=fV;function mV(e){e.preventDefault(),e.stopPropagation()}var hV=e=>e.type===`checkbox`,gV=e=>e instanceof Date,_V=e=>e==null,vV=e=>typeof e==`object`,yV=e=>!_V(e)&&!Array.isArray(e)&&vV(e)&&!gV(e),bV=e=>yV(e)&&e.target?hV(e.target)?e.target.checked:e.target.value:e,xV=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),SV=e=>{let t=e.constructor&&e.constructor.prototype;return yV(t)&&t.hasOwnProperty(`isPrototypeOf`)},CV=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function wV(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(CV&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(yV(e)&&SV(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=wV(e[t]));return r}var TV=e=>/^\w*$/.test(e),EV=e=>e===void 0,DV=e=>Array.isArray(e)?e.filter(Boolean):[],OV=e=>DV(e.replace(/["|']|\]/g,``).split(/\.|\[/)),X=(e,t,n)=>{if(!t||!yV(e))return n;let r=(TV(t)?[t]:OV(t)).reduce((e,t)=>_V(e)?e:e[t],e);return EV(r)||r===e?EV(e[t])?n:e[t]:r},kV=e=>typeof e==`boolean`,AV=e=>typeof e==`function`,jV=(e,t,n)=>{let r=-1,i=TV(t)?[t]:OV(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=yV(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(t===`__proto__`||t===`constructor`||t===`prototype`)return;e[t]=a,e=e[t]}},MV={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},NV={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},PV={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},FV=`form`,IV=`root`,LV=v.createContext(null);LV.displayName=`HookFormControlContext`;var RV=()=>v.useContext(LV),zV=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==NV.all&&(t._proxyFormState[i]=!r||NV.all),n&&(n[i]=!0),e[i]}});return i},BV=typeof window<`u`?v.useLayoutEffect:v.useEffect;function VV(e){let t=RV(),{control:n=t,disabled:r,name:i,exact:a}=e||{},[o,s]=v.useState(n._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return BV(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s({...n._formState,...e})}}),[i,r,a]),v.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),v.useMemo(()=>zV(o,n,c.current,!1),[o,n])}var HV=e=>typeof e==`string`,UV=(e,t,n,r,i)=>HV(e)?(r&&t.watch.add(e),X(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),X(n,e))):(r&&(t.watchAll=!0),n),WV=e=>_V(e)||!vV(e);function GV(e,t,n=new WeakSet){if(WV(e)||WV(t))return Object.is(e,t);if(gV(e)&&gV(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(let a of r){let r=e[a];if(!i.includes(a))return!1;if(a!==`ref`){let e=t[a];if(gV(r)&&gV(e)||(yV(r)||Array.isArray(r))&&(yV(e)||Array.isArray(e))?!GV(r,e,n):!Object.is(r,e))return!1}}return!0}function KV(e){let t=RV(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=v.useRef(i),l=v.useRef(s),u=v.useRef(void 0),d=v.useRef(n),f=v.useRef(r);l.current=s;let[p,m]=v.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),h=v.useCallback(e=>{let t=UV(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),g=v.useCallback(e=>{if(!a){let t=UV(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);GV(e,u.current)||(m(e),u.current=e)}else m(t)}},[n._formValues,n._names,a,r]);BV(()=>((d.current!==n||!GV(f.current,r))&&(d.current=n,f.current=r,g()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{g(e.values)}})),[n,o,r,g]),v.useEffect(()=>n._removeUnmounted());let _=d.current!==n,y=f.current,b=v.useMemo(()=>{if(a)return null;let e=!_&&!GV(y,r);return _||e?h():null},[a,_,r,y,h]);return b===null?p:b}function qV(e){let t=RV(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=xV(i._names.array,n),l=KV({control:i,name:n,defaultValue:v.useMemo(()=>X(i._formValues,n,X(i._defaultValues,n,o)),[i,n,o]),exact:s}),u=VV({control:i,name:n,exact:s}),d=v.useRef(e),f=v.useRef(void 0),p=v.useRef(i.register(n,{...e.rules,value:l,...kV(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;let m=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!X(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!X(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!X(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!X(u.validatingFields,n)},error:{enumerable:!0,get:()=>X(u.errors,n)}}),[u,n]),h=v.useCallback(e=>p.current.onChange({target:{value:bV(e),name:n},type:MV.CHANGE}),[n]),g=v.useCallback(()=>p.current.onBlur({target:{value:X(i._formValues,n),name:n},type:MV.BLUR}),[n,i._formValues]),_=v.useCallback(e=>{let t=X(i._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>AV(e.focus)&&e.focus(),select:()=>AV(e.select)&&e.select(),setCustomValidity:t=>AV(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>AV(e.reportValidity)&&e.reportValidity()})},[i._fields,n]),y=v.useMemo(()=>({name:n,value:l,...kV(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h,onBlur:g,ref:_}),[n,r,u.disabled,h,g,_,l]);return v.useEffect(()=>{let e=i._options.shouldUnregister||a,t=f.current;t&&t!==n&&!c&&i.unregister(t),i.register(n,{...d.current.rules,...kV(d.current.disabled)?{disabled:d.current.disabled}:{}});let r=(e,t)=>{let n=X(i._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){let e=wV(X(i._options.defaultValues,n,d.current.defaultValue));jV(i._defaultValues,n,e),EV(X(i._formValues,n))&&jV(i._formValues,n,e)}return!c&&i.register(n),f.current=n,()=>{(c?e&&!i._state.action:e)?i.unregister(n):r(n,!1)}},[n,i,c,a]),v.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),v.useMemo(()=>({field:y,formState:u,fieldState:m}),[y,u,m])}var JV=e=>e.render(qV(e)),YV=v.createContext(null);YV.displayName=`HookFormContext`;var XV=()=>v.useContext(YV),ZV=e=>{let{children:t,watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_}=e,y=v.useMemo(()=>({watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_}),[o,m,l,i,r,f,h,d,u,a,g,s,_,c,p,n]);return v.createElement(YV.Provider,{value:y},v.createElement(LV.Provider,{value:y.control},t))},QV=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},$V=e=>Array.isArray(e)?e:[e],eH=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function tH(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&yV(i)&&a){let e=tH(i,a);yV(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var nH=e=>yV(e)&&!Object.keys(e).length,rH=e=>e.type===`file`,iH=e=>{if(!CV)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},aH=e=>e.type===`select-multiple`,oH=e=>e.type===`radio`,sH=e=>oH(e)||hV(e),cH=e=>iH(e)&&e.isConnected;function lH(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=EV(e)?r++:e[t[r++]];return e}function uH(e){for(let t in e)if(e.hasOwnProperty(t)&&!EV(e[t]))return!1;return!0}function dH(e,t){let n=Array.isArray(t)?t:TV(t)?[t]:OV(t),r=n.length===1?e:lH(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(yV(r)&&nH(r)||Array.isArray(r)&&uH(r))&&dH(e,n.slice(0,-1)),e}var fH=e=>{for(let t in e)if(AV(e[t]))return!0;return!1};function pH(e){return Array.isArray(e)||yV(e)&&!fH(e)}function mH(e,t={}){for(let n in e){let r=e[n];pH(r)?(t[n]=Array.isArray(r)?[]:{},mH(r,t[n])):EV(r)||(t[n]=!0)}return t}function hH(e,t,n){n||=mH(t);for(let r in e){let i=e[r];if(pH(i))EV(t)||WV(n[r])?n[r]=mH(i,Array.isArray(i)?[]:{}):hH(i,_V(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!GV(i,e)}}return n}var gH={value:!1,isValid:!1},_H={value:!0,isValid:!0},vH=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!EV(e[0].attributes.value)?EV(e[0].value)||e[0].value===``?_H:{value:e[0].value,isValid:!0}:_H:gH}return gH},yH=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>EV(e)?e:t?e===``?NaN:e&&+e:n&&HV(e)?new Date(e):r?r(e):e,bH={isValid:!1,value:null},xH=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,bH):bH;function SH(e){let t=e.ref;return rH(t)?t.files:oH(t)?xH(e.refs).value:aH(t)?[...t.selectedOptions].map(({value:e})=>e):hV(t)?vH(e.refs).value:yH(EV(t.value)?e.ref.value:t.value,e)}var CH=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wH=(e,t,n,r)=>{let i={};for(let n of e){let e=X(t,n);e&&jV(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},TH=e=>e instanceof RegExp,EH=e=>EV(e)?e:TH(e)?e.source:yV(e)?TH(e.value)?e.value.source:e.value:e,DH=e=>({isOnSubmit:!e||e===NV.onSubmit,isOnBlur:e===NV.onBlur,isOnChange:e===NV.onChange,isOnAll:e===NV.all,isOnTouch:e===NV.onTouched}),OH=`AsyncFunction`,kH=e=>!!e&&!!e.validate&&!!(AV(e.validate)&&e.validate.constructor.name===OH||yV(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===OH)),AH=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),jH=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),MH=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=X(e,i);if(n){let{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(MH(a,t))break}else if(yV(a)&&MH(a,t))break}}};function NH(e,t,n){let r=X(e,n);if(r||TV(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=X(t,r),o=X(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var PH=(e,t,n,r)=>{n(e);let{name:i,...a}=e;return nH(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||NV.all))},FH=(e,t,n)=>!e||!t||e===t||$V(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),IH=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,LH=(e,t)=>!DV(X(e,t)).length&&dH(e,t),RH=(e,t,n)=>{let r=$V(X(e,n));return jV(r,IV,t[n]),jV(e,n,r),e};function zH(e,t,n=`validate`){if(HV(e)||Array.isArray(e)&&e.every(HV)||kV(e)&&!e)return{type:n,message:HV(e)?e:``,ref:t}}var BH=e=>yV(e)&&!TH(e)?e:{value:e,message:``},VH=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=X(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{i&&y.reportValidity&&(y.setCustomValidity(kV(e)?``:e||``),y.reportValidity())},x={},S=oH(o),C=hV(o),w=S||C,T=(g||rH(o))&&EV(o.value)&&EV(v)||iH(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,E=QV.bind(null,h,r,x),D=(e,t,n,r=PV.maxLength,i=PV.minLength)=>{let a=e?t:n;x[h]={type:e?r:i,message:a,ref:o,...E(e?r:i,a)}};if(a?!Array.isArray(v)||!v.length:c&&(!w&&(T||_V(v))||kV(v)&&!v||C&&!vH(s).isValid||S&&!xH(s).isValid)){let{value:e,message:t}=HV(c)?{value:!!c,message:c}:BH(c);if(e&&(x[h]={type:PV.required,message:t,ref:y,...E(PV.required,t)},!r))return b(t),x}if(!T&&(!_V(d)||!_V(f))){let e,t,n=BH(f),i=BH(d);if(!_V(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;_V(n.value)||(e=r>n.value),_V(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;HV(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),HV(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(D(!!e,n.message,i.message,PV.max,PV.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(HV(v)||a&&Array.isArray(v))){let e=BH(l),t=BH(u),n=!_V(e.value)&&v.length>+e.value,i=!_V(t.value)&&v.length<+t.value;if((n||i)&&(D(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!T&&HV(v)){let{value:e,message:t}=BH(p);if(TH(e)&&!v.match(e)&&(x[h]={type:PV.pattern,message:t,ref:o,...E(PV.pattern,t)},!r))return b(t),x}if(m){if(AV(m)){let e=zH(await m(v,n),y);if(e&&(x[h]={...e,...E(PV.validate,e.message)},!r))return b(e.message),x}else if(yV(m)){let e={};for(let t in m){if(!nH(e)&&!r)break;let i=zH(await m[t](v,n),y,t);i&&(e={...i,...E(t,i.message)},b(i.message),r&&(x[h]=e))}if(!nH(e)&&(x[h]={ref:y,...e},!r))return x}}return b(!0),x},HH={mode:NV.onSubmit,reValidateMode:NV.onChange,shouldFocusError:!0};function UH(e={}){let t={...HH,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:AV(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=(yV(t.defaultValues)||yV(t.values))&&wV(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:wV(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...u},f={...d},p={array:eH(),state:eH()},m=t.criteriaMode===NV.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=async e=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||f.isValid||e)){let e;t.resolver?(e=nH((await T()).errors),_()):e=await O({fields:r,onlyCheckValid:!0,eventType:MV.VALID}),e!==n.isValid&&p.state.next({isValid:e})}},_=(e,r)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?jV(n.validatingFields,e,r):dH(n.validatingFields,e))}),p.state.next({validatingFields:n.validatingFields,isValidating:!nH(n.validatingFields)}))},v=e=>{let t=hH(i,a),r=CH(e);jV(n.dirtyFields,r,X(t,r))},y=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){if(o.action=!0,u&&Array.isArray(X(r,e))){let t=s(X(r,e),c.argA,c.argB);l&&jV(r,e,t)}if(u&&Array.isArray(X(n.errors,e))){let t=s(X(n.errors,e),c.argA,c.argB);l&&jV(n.errors,e,t),LH(n.errors,e)}if((d.touchedFields||f.touchedFields)&&u&&Array.isArray(X(n.touchedFields,e))){let t=s(X(n.touchedFields,e),c.argA,c.argB);l&&jV(n.touchedFields,e,t)}(d.dirtyFields||f.dirtyFields)&&v(e),p.state.next({name:e,isDirty:A(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else jV(a,e,i)},b=(e,t)=>{jV(n.errors,e,t),p.state.next({errors:n.errors})},x=e=>{n.errors=e,p.state.next({errors:n.errors,isValid:!1})},S=(e,t,n,s)=>{let c=X(r,e);if(c){let r=X(a,e,EV(n)?X(i,e):n);EV(r)||s&&s.defaultChecked||t?jV(a,e,t?r:SH(c._f)):N(e,r),o.mount&&!o.action&&g()}},C=(e,r,a,o,s)=>{let c=!1,l=!1,u={name:e};if(!t.disabled){if(!a||o){(d.isDirty||f.isDirty)&&(l=n.isDirty,n.isDirty=u.isDirty=A(),c=l!==u.isDirty);let t=GV(X(i,e),r);l=!!X(n.dirtyFields,e),t?dH(n.dirtyFields,e):jV(n.dirtyFields,e,!0),u.dirtyFields=n.dirtyFields,c||=(d.dirtyFields||f.dirtyFields)&&l!==!t}if(a){let t=X(n.touchedFields,e);t||(jV(n.touchedFields,e,a),u.touchedFields=n.touchedFields,c||=(d.touchedFields||f.touchedFields)&&t!==a)}c&&s&&p.state.next(u)}return c?u:{}},w=(e,r,i,a)=>{let o=X(n.errors,e),s=(d.isValid||f.isValid)&&kV(r)&&n.isValid!==r;if(t.delayError&&i?(c=h(()=>b(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?jV(n.errors,e,i):dH(n.errors,e)),(i?!GV(o,i):o)||!nH(a)||s){let t={...a,...s&&kV(r)?{isValid:r}:{},errors:n.errors,name:e};n={...n,...t},p.state.next(t)}},T=async e=>(_(e,!0),await t.resolver(a,t.context,wH(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),E=async e=>{let{errors:t}=await T(e);if(_(e),e)for(let r of e){let e=X(t,r);e?jV(n.errors,r,e):dH(n.errors,r)}else n.errors=t;return t},D=async({name:t,eventType:r})=>{if(e.validate){let i=await e.validate({formValues:a,formState:n,name:t,eventType:r});if(yV(i))for(let e in i)i[e]&&z(`${FV}.${e}`,{message:HV(i.message)?i.message:``,type:PV.validate});else HV(i)||!i?z(FV,{message:i||``,type:PV.validate}):ne(FV);return i}return!0},O=async({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(l.runRootValidation=!0,!await D({name:o,eventType:c})&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r,...f}=u;if(r){let o=s.array.has(r.name),c=u._f&&kH(u._f);c&&d.validatingFields&&_([r.name],!0);let f=await VH(u,s.disabled,a,m,t.shouldUseNativeValidation&&!i,o);if(c&&d.validatingFields&&_([r.name]),f[r.name]&&(l.valid=!1,i)||(!i&&(X(f,r.name)?o?RH(n.errors,f,r.name):jV(n.errors,r.name,f[r.name]):dH(n.errors,r.name)),e.shouldUseNativeValidation&&f[r.name]))break}!nH(f)&&await O({context:l,onlyCheckValid:i,fields:f,name:o,eventType:c})}}return l.valid},k=()=>{for(let e of s.unMount){let t=X(r,e);t&&(t._f.refs?t._f.refs.every(e=>!cH(e)):!cH(t._f.ref))&&ae(e)}s.unMount=new Set},A=(e,n)=>!t.disabled&&(e&&n&&jV(a,e,n),!GV(ee(),i)),j=(e,t,n)=>UV(e,s,{...o.mount?a:EV(t)?i:HV(e)?{[e]:t}:t},n,t),M=e=>DV(X(o.mount?a:i,e,t.shouldUnregister?X(i,e,[]):[])),N=(e,t,n={})=>{let i=X(r,e),o=t;if(i){let n=i._f;n&&(!n.disabled&&jV(a,e,yH(t,n)),o=iH(n.ref)&&_V(t)?``:t,aH(n.ref)?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?hV(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(Array.isArray(o)?e.checked=!!o.find(t=>t===e.value):e.checked=o===e.value||!!o)}):n.refs.forEach(e=>e.checked=e.value===o):rH(n.ref)?n.ref.value=``:(n.ref.value=o,n.ref.type||p.state.next({name:e,values:wV(a)})))}(n.shouldDirty||n.shouldTouch)&&C(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&R(e)},P=(e,t,n)=>{for(let i in t){if(!t.hasOwnProperty(i))return;let a=t[i],o=e+`.`+i,c=X(r,o);(s.array.has(e)||yV(a)||c&&!c._f)&&!gV(a)?P(o,a,n):N(o,a,n)}},F=(e,t,i={})=>{let c=X(r,e),l=s.array.has(e),u=wV(t);jV(a,e,u),l?(p.array.next({name:e,values:wV(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&i.shouldDirty&&(v(e),p.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:A(e,u)}))):c&&!c._f&&!_V(u)?P(e,u,i):N(e,u,i),jH(e,s)?p.state.next({...n,name:e,values:wV(a)}):p.state.next({name:o.mount?e:void 0,values:wV(a)})},I=async i=>{o.mount=!0;let l=i.target,u=l.name,h=!0,v=X(r,u),y=e=>{h=Number.isNaN(e)||gV(e)&&isNaN(e.getTime())||GV(e,X(a,u,e))},b=DH(t.mode),x=DH(t.reValidateMode);if(v){let o,S,E=l.type?SH(v._f):bV(i),k=i.type===MV.BLUR||i.type===MV.FOCUS_OUT,A=!AH(v._f)&&!e.validate&&!t.resolver&&!X(n.errors,u)&&!v._f.deps||IH(k,X(n.touchedFields,u),n.isSubmitted,x,b),j=jH(u,s,k);jV(a,u,E),k?(!l||!l.readOnly)&&(v._f.onBlur&&v._f.onBlur(i),c&&c(0)):v._f.onChange&&v._f.onChange(i);let M=C(u,E,k),N=!nH(M)||j;if(!k&&p.state.next({name:u,type:i.type,values:wV(a)}),A)return(d.isValid||f.isValid)&&(t.mode===`onBlur`?k&&g():k||g()),N&&p.state.next({name:u,...j?{}:M});if(!t.resolver&&e.validate&&await D({name:u,eventType:i.type}),!k&&j&&p.state.next({...n}),t.resolver){let{errors:e}=await T([u]);if(_([u]),y(E),h){let t=NH(n.errors,r,u),i=NH(e,r,t.name||u);o=i.error,u=i.name,S=nH(e)}}else _([u],!0),o=(await VH(v,s.disabled,a,m,t.shouldUseNativeValidation))[u],_([u]),y(E),h&&(o?S=!1:(d.isValid||f.isValid)&&(S=await O({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));h&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&R(v._f.deps),w(u,S,o,M))}},L=(e,t)=>{if(X(n.errors,t)&&e.focus)return e.focus(),1},R=async(e,i={})=>{let a,o,c=$V(e);if(t.resolver){let t=await E(EV(e)?e:c);a=nH(t),o=e?!c.some(e=>X(t,e)):a}else e?(o=(await Promise.all(c.map(async e=>{let t=X(r,e);return await O({fields:t&&t._f?{[e]:t}:t,eventType:MV.TRIGGER})}))).every(Boolean),!(!o&&!n.isValid)&&g()):o=a=await O({fields:r,name:e,eventType:MV.TRIGGER});return p.state.next({...!HV(e)||(d.isValid||f.isValid)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&MH(r,L,e?c:s.mount),o},ee=(e,t)=>{let r={...o.mount?a:i};return t&&(r=tH(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),EV(e)?r:HV(e)?X(r,e):e.map(e=>X(r,e))},te=(e,t)=>({invalid:!!X((t||n).errors,e),isDirty:!!X((t||n).dirtyFields,e),error:X((t||n).errors,e),isValidating:!!X(n.validatingFields,e),isTouched:!!X((t||n).touchedFields,e)}),ne=e=>{let t=e?$V(e):void 0;t?.forEach(e=>dH(n.errors,e)),t?t.forEach(e=>{p.state.next({name:e,errors:n.errors})}):p.state.next({errors:{}})},z=(e,t,i)=>{let a=(X(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,...l}=X(n.errors,e)||{};jV(n.errors,e,{...l,...t,ref:a}),p.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},B=(e,t)=>AV(e)?p.state.subscribe({next:n=>`values`in n&&e(j(void 0,t),n)}):j(e,t,!0),re=e=>p.state.subscribe({next:t=>{FH(e.name,t.name,e.exact)&&PH(t,e.formState||d,he,e.reRenderRoot)&&e.callback({values:{...a},...n,...t,defaultValues:i})}}).unsubscribe,ie=e=>(o.mount=!0,f={...f,...e.formState},re({...e,formState:{...u,...e.formState}})),ae=(e,o={})=>{for(let c of e?$V(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(dH(r,c),dH(a,c)),!o.keepError&&dH(n.errors,c),!o.keepDirty&&dH(n.dirtyFields,c),!o.keepTouched&&dH(n.touchedFields,c),!o.keepIsValidating&&dH(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&dH(i,c);p.state.next({values:wV(a)}),p.state.next({...n,...o.keepDirty?{isDirty:A()}:{}}),!o.keepIsValid&&g()},oe=({disabled:e,name:t})=>{if(kV(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&g()}},se=(e,n={})=>{let a=X(r,e),c=kV(n.disabled)||kV(t.disabled),l=!s.registerName.has(e)&&a&&!a._f.mount;return jV(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),s.mount.add(e),a&&!l?oe({disabled:kV(n.disabled)?n.disabled:t.disabled,name:e}):S(e,!0,n.value),{...c?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:EH(n.min),max:EH(n.max),minLength:EH(n.minLength),maxLength:EH(n.maxLength),pattern:EH(n.pattern)}:{},name:e,onChange:I,onBlur:I,ref:c=>{if(c){s.registerName.add(e),se(e,n),s.registerName.delete(e),a=X(r,e);let t=EV(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=sH(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;jV(r,e,{_f:{...a._f,...o?{refs:[...l.filter(cH),t,...Array.isArray(X(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}}),S(e,!1,void 0,t)}else a=X(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(xV(s.array,e)&&o.action)&&s.unMount.add(e)}}},ce=()=>t.shouldFocusError&&MH(r,L,s.mount),le=e=>{kV(e)&&(p.state.next({disabled:e}),MH(r,(t,n)=>{let i=X(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},ue=(e,i)=>async o=>{let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=wV(a);if(p.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await T();_(),n.errors=e,l=wV(t)}else await O({fields:r,eventType:MV.SUBMIT});if(s.disabled.size)for(let e of s.disabled)dH(l,e);if(dH(n.errors,IV),nH(n.errors)){p.state.next({errors:{}});try{await e(l,o)}catch(e){c=e}}else i&&await i({...n.errors},o),ce(),setTimeout(ce);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nH(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c},de=(e,t={})=>{X(r,e)&&(EV(t.defaultValue)?F(e,wV(X(i,e))):(F(e,t.defaultValue),jV(i,e,wV(t.defaultValue))),t.keepTouched||dH(n.touchedFields,e),t.keepDirty||(dH(n.dirtyFields,e),n.isDirty=t.defaultValue?A(e,wV(X(i,e))):A()),t.keepError||(dH(n.errors,e),d.isValid&&g()),p.state.next({...n}))},fe=(e,c={})=>{let l=e?wV(e):i,u=wV(l),f=nH(e),m=f?i:u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(hH(i,a))]);for(let t of Array.from(e)){let e=X(n.dirtyFields,t),r=X(a,t),i=X(m,t);e&&!EV(r)?jV(m,t,r):!e&&!EV(i)&&F(t,i)}}else{if(CV&&EV(e))for(let e of s.mount){let t=X(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(iH(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)F(e,X(m,e));else r={}}a=t.shouldUnregister?c.keepDefaultValues?wV(i):{}:wV(m),p.array.next({values:{...m}}),p.state.next({values:{...m}})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!d.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!nH(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),p.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:f?!1:c.keepDirty?n.isDirty:!!(c.keepDefaultValues&&!GV(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:c.keepDirtyValues?c.keepDefaultValues&&a?hH(i,a):n.dirtyFields:c.keepDefaultValues&&e?hH(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},pe=(e,n)=>fe(AV(e)?e(a):e,{...t.resetOptions,...n}),me=(e,t={})=>{let n=X(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&AV(e.select)&&e.select()})}},he=e=>{n={...n,...e}},ge={control:{register:se,unregister:ae,getFieldState:te,handleSubmit:ue,setError:z,_subscribe:re,_runSchema:T,_updateIsValidating:_,_focusError:ce,_getWatch:j,_getDirty:A,_setValid:g,_setFieldArray:y,_setDisabledField:oe,_setErrors:x,_getFieldArray:M,_reset:fe,_resetDefaultValues:()=>AV(t.defaultValues)&&t.defaultValues().then(e=>{pe(e,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:k,_disableForm:le,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e}}},subscribe:ie,trigger:R,register:se,handleSubmit:ue,watch:B,setValue:F,getValues:ee,reset:pe,resetField:de,clearErrors:ne,unregister:ae,setError:z,setFocus:me,getFieldState:te};return{...ge,formControl:ge}}function WH(e={}){let t=v.useRef(void 0),n=v.useRef(void 0),[r,i]=v.useState({isDirty:!1,isValidating:!1,isLoading:AV(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:AV(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!AV(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...i}=UH(e);t.current={...i,formState:r}}let a=t.current.control;return a._options=e,BV(()=>{let e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),v.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),v.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),v.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),v.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),v.useEffect(()=>{if(a._proxyFormState.isDirty){let e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}},[a,r.isDirty]),v.useEffect(()=>{e.values&&!GV(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),a._options.resetOptions?.keepIsValid||a._setValid(),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),v.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=v.useMemo(()=>zV(r,a),[a,r]),t.current}var GH=(e,t,n)=>{if(e&&`reportValidity`in e){let r=X(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},KH=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?GH(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>GH(t,n,e))}},qH=(e,t)=>{t.shouldUseNativeValidation&&KH(e,t);let n={};for(let r in e){let i=X(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(JH(t.names||Object.keys(e),r)){let e=Object.assign({},X(n,r));jV(e,`root`,a),jV(n,r,e)}else jV(n,r,a)}return n},JH=(e,t)=>{let n=YH(t);return e.some(e=>YH(e).match(`^${n}\\.\\d+`))};function YH(e){return e.replace(/\]|\[/g,``)}Object.freeze({status:`aborted`});function Z(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var XH=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ZH=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},QH={};function $H(e){return e&&Object.assign(QH,e),QH}function eU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function tU(e,t){return typeof t==`bigint`?t.toString():t}function nU(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function rU(e){return e==null}function iU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var aU=Symbol(`evaluating`);function oU(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==aU)return r===void 0&&(r=aU,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function sU(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function cU(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function lU(e){return JSON.stringify(e)}function uU(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var dU=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function fU(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var pU=nU(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function mU(e){if(fU(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(fU(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function hU(e){return mU(e)?{...e}:Array.isArray(e)?[...e]:e}var gU=new Set([`string`,`number`,`symbol`]);function _U(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function vU(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function yU(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function bU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return vU(e,cU(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return sU(this,`shape`,e),e},checks:[]}))}function xU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return vU(e,cU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return sU(this,`shape`,r),r},checks:[]}))}function SU(e,t){if(!mU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return vU(e,cU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return sU(this,`shape`,n),n}}))}function CU(e,t){if(!mU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return vU(e,cU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return sU(this,`shape`,n),n}}))}function wU(e,t){return vU(e,cU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return sU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function TU(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return vU(t,cU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return sU(this,`shape`,i),i},checks:[]}))}function EU(e,t,n){return vU(t,cU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return sU(this,`shape`,i),i}}))}function DU(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function OU(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function kU(e){return typeof e==`string`?e:e?.message}function AU(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=kU(e.inst?._zod.def?.error?.(e))??kU(t?.error?.(e))??kU(n.customError?.(e))??kU(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function jU(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function MU(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var NU=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,tU,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},PU=Z(`$ZodError`,NU),FU=Z(`$ZodError`,NU,{Parent:Error});function IU(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function LU(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var RU=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new XH;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>AU(e,a,$H())));throw dU(t,i?.callee),t}return o.value},zU=RU(FU),BU=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>AU(e,a,$H())));throw dU(t,i?.callee),t}return o.value},VU=BU(FU),HU=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new XH;return a.issues.length?{success:!1,error:new(e??PU)(a.issues.map(e=>AU(e,i,$H())))}:{success:!0,data:a.value}},UU=HU(FU),WU=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>AU(e,i,$H())))}:{success:!0,data:a.value}},GU=WU(FU),KU=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return RU(e)(t,n,i)},qU=e=>(t,n,r)=>RU(e)(t,n,r),JU=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return BU(e)(t,n,i)},YU=e=>async(t,n,r)=>BU(e)(t,n,r),XU=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return HU(e)(t,n,i)},ZU=e=>(t,n,r)=>HU(e)(t,n,r),QU=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return WU(e)(t,n,i)},$U=e=>async(t,n,r)=>WU(e)(t,n,r),eW=/^[cC][^\s-]{8,}$/,tW=/^[0-9a-z]+$/,nW=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,rW=/^[0-9a-vA-V]{20}$/,iW=/^[A-Za-z0-9]{27}$/,aW=/^[a-zA-Z0-9_-]{21}$/,oW=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,sW=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,cW=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,lW=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,uW=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function dW(){return new RegExp(uW,`u`)}var fW=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pW=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,mW=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,hW=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,gW=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_W=/^[A-Za-z0-9_-]*$/,vW=/^\+[1-9]\d{6,14}$/,yW=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,bW=RegExp(`^${yW}$`);function xW(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function SW(e){return RegExp(`^${xW(e)}$`)}function CW(e){let t=xW({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${yW}T(?:${r})$`)}var wW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},TW=/^[^A-Z]*$/,EW=/^[^a-z]*$/,DW=Z(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),OW=Z(`$ZodCheckMaxLength`,(e,t)=>{var n;DW.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!rU(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=jU(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),kW=Z(`$ZodCheckMinLength`,(e,t)=>{var n;DW.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!rU(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=jU(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),AW=Z(`$ZodCheckLengthEquals`,(e,t)=>{var n;DW.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!rU(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=jU(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),jW=Z(`$ZodCheckStringFormat`,(e,t)=>{var n,r;DW.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),MW=Z(`$ZodCheckRegex`,(e,t)=>{jW.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),NW=Z(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=TW,jW.init(e,t)}),PW=Z(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=EW,jW.init(e,t)}),FW=Z(`$ZodCheckIncludes`,(e,t)=>{DW.init(e,t);let n=_U(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),IW=Z(`$ZodCheckStartsWith`,(e,t)=>{DW.init(e,t);let n=RegExp(`^${_U(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),LW=Z(`$ZodCheckEndsWith`,(e,t)=>{DW.init(e,t);let n=RegExp(`.*${_U(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),RW=Z(`$ZodCheckOverwrite`,(e,t)=>{DW.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),zW=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
164
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
165
|
+
`))}},BW={major:4,minor:3,patch:6},VW=Z(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=BW;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=DU(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new XH;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=DU(e,t))});else{if(e.issues.length===t)continue;r||=DU(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(DU(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new XH;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new XH;return o.then(e=>t(e,r,a))}return t(o,r,a)}}oU(e,`~standard`,()=>({validate:t=>{try{let n=UU(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return GU(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),HW=Z(`$ZodString`,(e,t)=>{VW.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??wW(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),UW=Z(`$ZodStringFormat`,(e,t)=>{jW.init(e,t),HW.init(e,t)}),WW=Z(`$ZodGUID`,(e,t)=>{t.pattern??=sW,UW.init(e,t)}),GW=Z(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=cW(e)}else t.pattern??=cW();UW.init(e,t)}),KW=Z(`$ZodEmail`,(e,t)=>{t.pattern??=lW,UW.init(e,t)}),qW=Z(`$ZodURL`,(e,t)=>{UW.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),JW=Z(`$ZodEmoji`,(e,t)=>{t.pattern??=dW(),UW.init(e,t)}),YW=Z(`$ZodNanoID`,(e,t)=>{t.pattern??=aW,UW.init(e,t)}),XW=Z(`$ZodCUID`,(e,t)=>{t.pattern??=eW,UW.init(e,t)}),ZW=Z(`$ZodCUID2`,(e,t)=>{t.pattern??=tW,UW.init(e,t)}),QW=Z(`$ZodULID`,(e,t)=>{t.pattern??=nW,UW.init(e,t)}),$W=Z(`$ZodXID`,(e,t)=>{t.pattern??=rW,UW.init(e,t)}),eG=Z(`$ZodKSUID`,(e,t)=>{t.pattern??=iW,UW.init(e,t)}),tG=Z(`$ZodISODateTime`,(e,t)=>{t.pattern??=CW(t),UW.init(e,t)}),nG=Z(`$ZodISODate`,(e,t)=>{t.pattern??=bW,UW.init(e,t)}),rG=Z(`$ZodISOTime`,(e,t)=>{t.pattern??=SW(t),UW.init(e,t)}),iG=Z(`$ZodISODuration`,(e,t)=>{t.pattern??=oW,UW.init(e,t)}),aG=Z(`$ZodIPv4`,(e,t)=>{t.pattern??=fW,UW.init(e,t),e._zod.bag.format=`ipv4`}),oG=Z(`$ZodIPv6`,(e,t)=>{t.pattern??=pW,UW.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),sG=Z(`$ZodCIDRv4`,(e,t)=>{t.pattern??=mW,UW.init(e,t)}),cG=Z(`$ZodCIDRv6`,(e,t)=>{t.pattern??=hW,UW.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function lG(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var uG=Z(`$ZodBase64`,(e,t)=>{t.pattern??=gW,UW.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{lG(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function dG(e){if(!_W.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return lG(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var fG=Z(`$ZodBase64URL`,(e,t)=>{t.pattern??=_W,UW.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{dG(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),pG=Z(`$ZodE164`,(e,t)=>{t.pattern??=vW,UW.init(e,t)});function mG(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var hG=Z(`$ZodJWT`,(e,t)=>{UW.init(e,t),e._zod.check=n=>{mG(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),gG=Z(`$ZodUnknown`,(e,t)=>{VW.init(e,t),e._zod.parse=e=>e}),_G=Z(`$ZodNever`,(e,t)=>{VW.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function vG(e,t,n){e.issues.length&&t.issues.push(...OU(n,e.issues)),t.value[n]=e.value}var yG=Z(`$ZodArray`,(e,t)=>{VW.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>vG(t,n,e))):vG(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function bG(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...OU(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function xG(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=yU(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function SG(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>bG(e,n,i,t,u))):bG(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var CG=Z(`$ZodObject`,(e,t)=>{if(VW.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=nU(()=>xG(t));oU(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=fU,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>bG(n,t,e,s,r))):bG(i,t,e,s,r)}return i?SG(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),wG=Z(`$ZodObjectJIT`,(e,t)=>{CG.init(e,t);let n=e._zod.parse,r=nU(()=>xG(t)),i=e=>{let t=new zW([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=lU(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=lU(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
166
|
+
if (${n}.issues.length) {
|
|
167
|
+
if (${o} in input) {
|
|
168
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
169
|
+
...iss,
|
|
170
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
171
|
+
})));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (${n}.value === undefined) {
|
|
176
|
+
if (${o} in input) {
|
|
177
|
+
newResult[${o}] = undefined;
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
newResult[${o}] = ${n}.value;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
`):t.write(`
|
|
184
|
+
if (${n}.issues.length) {
|
|
185
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
186
|
+
...iss,
|
|
187
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
188
|
+
})));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (${n}.value === undefined) {
|
|
192
|
+
if (${o} in input) {
|
|
193
|
+
newResult[${o}] = undefined;
|
|
194
|
+
}
|
|
195
|
+
} else {
|
|
196
|
+
newResult[${o}] = ${n}.value;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=fU,s=!QH.jitless,c=s&&pU.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?SG([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function TG(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=>!DU(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=>AU(e,r,$H())))}),t)}var EG=Z(`$ZodUnion`,(e,t)=>{VW.init(e,t),oU(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),oU(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),oU(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),oU(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=>iU(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>TG(t,i,e,a)):TG(s,i,e,a)}}),DG=Z(`$ZodIntersection`,(e,t)=>{VW.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])=>kG(e,t,n)):kG(e,i,a)}});function OG(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(mU(e)&&mU(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=OG(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=OG(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 kG(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}),DU(e))return e;let o=OG(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var AG=Z(`$ZodEnum`,(e,t)=>{VW.init(e,t);let n=eU(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>gU.has(typeof e)).map(e=>typeof e==`string`?_U(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}}),jG=Z(`$ZodTransform`,(e,t)=>{VW.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ZH(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));if(i instanceof Promise)throw new XH;return n.value=i,n}});function MG(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var NG=Z(`$ZodOptional`,(e,t)=>{VW.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,oU(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),oU(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${iU(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>MG(t,e.value)):MG(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),PG=Z(`$ZodExactOptional`,(e,t)=>{NG.init(e,t),oU(e._zod,`values`,()=>t.innerType._zod.values),oU(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),FG=Z(`$ZodNullable`,(e,t)=>{VW.init(e,t),oU(e._zod,`optin`,()=>t.innerType._zod.optin),oU(e._zod,`optout`,()=>t.innerType._zod.optout),oU(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${iU(e.source)}|null)$`):void 0}),oU(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)}),IG=Z(`$ZodDefault`,(e,t)=>{VW.init(e,t),e._zod.optin=`optional`,oU(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=>LG(e,t)):LG(r,t)}});function LG(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var RG=Z(`$ZodPrefault`,(e,t)=>{VW.init(e,t),e._zod.optin=`optional`,oU(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))}),zG=Z(`$ZodNonOptional`,(e,t)=>{VW.init(e,t),oU(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=>BG(t,e)):BG(i,e)}});function BG(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 VG=Z(`$ZodCatch`,(e,t)=>{VW.init(e,t),oU(e._zod,`optin`,()=>t.innerType._zod.optin),oU(e._zod,`optout`,()=>t.innerType._zod.optout),oU(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=>AU(e,n,$H()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>AU(e,n,$H()))},input:e.value}),e.issues=[]),e)}}),HG=Z(`$ZodPipe`,(e,t)=>{VW.init(e,t),oU(e._zod,`values`,()=>t.in._zod.values),oU(e._zod,`optin`,()=>t.in._zod.optin),oU(e._zod,`optout`,()=>t.out._zod.optout),oU(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=>UG(e,t.in,n)):UG(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>UG(e,t.out,n)):UG(r,t.out,n)}});function UG(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var WG=Z(`$ZodReadonly`,(e,t)=>{VW.init(e,t),oU(e._zod,`propValues`,()=>t.innerType._zod.propValues),oU(e._zod,`values`,()=>t.innerType._zod.values),oU(e._zod,`optin`,()=>t.innerType?._zod?.optin),oU(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(GG):GG(r)}});function GG(e){return e.value=Object.freeze(e.value),e}var KG=Z(`$ZodCustom`,(e,t)=>{DW.init(e,t),VW.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=>qG(t,n,r,e));qG(i,n,r,e)}});function qG(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(MU(e))}}var JG,YG=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 XG(){return new YG}(JG=globalThis).__zod_globalRegistry??(JG.__zod_globalRegistry=XG());var ZG=globalThis.__zod_globalRegistry;function QG(e,t){return new e({type:`string`,...Q(t)})}function $G(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Q(t)})}function eK(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Q(t)})}function tK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Q(t)})}function nK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Q(t)})}function rK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Q(t)})}function iK(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Q(t)})}function aK(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Q(t)})}function oK(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Q(t)})}function sK(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Q(t)})}function cK(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Q(t)})}function lK(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Q(t)})}function uK(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Q(t)})}function dK(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Q(t)})}function fK(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Q(t)})}function pK(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Q(t)})}function mK(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Q(t)})}function hK(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Q(t)})}function gK(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Q(t)})}function _K(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Q(t)})}function vK(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Q(t)})}function yK(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Q(t)})}function bK(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Q(t)})}function xK(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Q(t)})}function SK(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Q(t)})}function CK(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Q(t)})}function wK(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Q(t)})}function TK(e){return new e({type:`unknown`})}function EK(e,t){return new e({type:`never`,...Q(t)})}function DK(e,t){return new OW({check:`max_length`,...Q(t),maximum:e})}function OK(e,t){return new kW({check:`min_length`,...Q(t),minimum:e})}function kK(e,t){return new AW({check:`length_equals`,...Q(t),length:e})}function AK(e,t){return new MW({check:`string_format`,format:`regex`,...Q(t),pattern:e})}function jK(e){return new NW({check:`string_format`,format:`lowercase`,...Q(e)})}function MK(e){return new PW({check:`string_format`,format:`uppercase`,...Q(e)})}function NK(e,t){return new FW({check:`string_format`,format:`includes`,...Q(t),includes:e})}function PK(e,t){return new IW({check:`string_format`,format:`starts_with`,...Q(t),prefix:e})}function FK(e,t){return new LW({check:`string_format`,format:`ends_with`,...Q(t),suffix:e})}function IK(e){return new RW({check:`overwrite`,tx:e})}function LK(e){return IK(t=>t.normalize(e))}function RK(){return IK(e=>e.trim())}function zK(){return IK(e=>e.toLowerCase())}function BK(){return IK(e=>e.toUpperCase())}function VK(){return IK(e=>uU(e))}function HK(e,t,n){return new e({type:`array`,element:t,...Q(n)})}function UK(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Q(n)})}function WK(e){let t=GK(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(MU(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(MU(r))}},e(n.value,n)));return t}function GK(e,t){let n=new DW({check:`custom`,...Q(t)});return n._zod.check=e,n}function KK(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??ZG,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 qK(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,qK(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`&&XK(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function JK(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>
|
|
200
|
+
|
|
201
|
+
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 YK(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.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:QK(t,`input`,e.processors),output:QK(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function XK(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 XK(r.element,n);if(r.type===`set`)return XK(r.valueType,n);if(r.type===`lazy`)return XK(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 XK(r.innerType,n);if(r.type===`intersection`)return XK(r.left,n)||XK(r.right,n);if(r.type===`record`||r.type===`map`)return XK(r.keyType,n)||XK(r.valueType,n);if(r.type===`pipe`)return XK(r.in,n)||XK(r.out,n);if(r.type===`object`){for(let e in r.shape)if(XK(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(XK(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(XK(e,n))return!0;return!!(r.rest&&XK(r.rest,n))}return!1}var ZK=(e,t={})=>n=>{let r=KK({...n,processors:t});return qK(e,r),JK(r,e),YK(r,e)},QK=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=KK({...i??{},target:a,io:t,processors:n});return qK(e,o),JK(o,e),YK(o,e)},$K={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},eq=(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=$K[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}))])}},tq=(e,t,n,r)=>{n.not={}},nq=(e,t,n,r)=>{let i=e._zod.def,a=eU(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},rq=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},iq=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},aq=(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=qK(a.element,t,{...r,path:[...r.path,`items`]})},oq=(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]=qK(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=qK(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},sq=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>qK(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},cq=(e,t,n,r)=>{let i=e._zod.def,a=qK(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=qK(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]]},lq=(e,t,n,r)=>{let i=e._zod.def,a=qK(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`}]},uq=(e,t,n,r)=>{let i=e._zod.def;qK(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},dq=(e,t,n,r)=>{let i=e._zod.def;qK(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},fq=(e,t,n,r)=>{let i=e._zod.def;qK(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)))},pq=(e,t,n,r)=>{let i=e._zod.def;qK(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},mq=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;qK(a,t,r);let o=t.seen.get(e);o.ref=a},hq=(e,t,n,r)=>{let i=e._zod.def;qK(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},gq=(e,t,n,r)=>{let i=e._zod.def;qK(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType};function _q(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function vq(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]=QV(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function yq(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]=QV(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function bq(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(_q(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&KH({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:qH(vq(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(_q(function(){return Promise.resolve((n.mode===`sync`?zU:VU)(e,r,t)).then(function(e){return a.shouldUseNativeValidation&&KH({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return e instanceof PU}(e))return{values:{},errors:qH(yq(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 xq=async e=>e&&typeof e.then==`function`?await e:e,Sq=({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 xq(t?.(i)),a.success?await xq(n?.(a.data)):await xq(r?.(Error(a.error.issues.map(e=>e.message).join(`, `))))};return(0,T.jsx)(ZV,{...s,children:(0,T.jsx)(`form`,{className:l(`flex flex-col gap-y-6`,i),onSubmit:s.handleSubmit(c),autoComplete:o?`on`:`off`,noValidate:!0,children:a})})},Cq=(e,t)=>{let n=(0,b.c)(13),r;n[0]===e?r=n[1]:(r=bq(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=WH(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}=VV(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},wq=e=>{let{id:t,...n}=e,r=(0,v.useId)(),i=t??r;return(0,T.jsx)(Tq,{value:{id:i},children:(0,T.jsx)(`div`,{className:`flex flex-col gap-2 p-2`,id:i,suppressHydrationWarning:!0,...n})})},Tq=(0,v.createContext)({}),Eq=(0,v.createContext)({}),Dq=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,T.jsx)(Eq,{value:i,children:(0,T.jsx)(JV,{...n})}),t[4]=n,t[5]=i,t[6]=a):a=t[6],a},Oq=()=>{let e=(0,b.c)(11),t=(0,v.useContext)(Eq),n=(0,v.useContext)(Tq),{getFieldState:r,formState:i}=XV(),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},kq=({className:e,children:t,...n})=>(0,T.jsxs)(`i`,{className:l(`text-neutral-400 text-xs`,e),...n,children:[`ⓘ `,t]}),Aq=e=>{let{className:t,...n}=e,{error:r,formItemId:i}=Oq();return(0,T.jsx)(ZO,{className:l(`mb-2`,r&&`text-error`,t),htmlFor:i,...n})},jq=({isRequired:e})=>e?(0,T.jsx)(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):(0,T.jsx)(T.Fragment,{}),Mq=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>(0,T.jsxs)(`div`,{className:`ml-1 flex gap-1 align-middle text-base leading-none`,children:[e&&(0,T.jsxs)(Aq,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:l(`font-bold`,i),children:[e,(0,T.jsx)(jq,{isRequired:t})]}),n&&(0,T.jsx)(kq,{content:n})]}),Nq=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o,className:s})=>(0,T.jsxs)($.Item,{className:l(`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,s),children:[(t||e)&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-1 p-1 leading-none`,children:[e&&(0,T.jsx)(Mq,{isRequired:n,info:r,htmlFor:o,children:e}),t&&(0,T.jsx)($.Description,{children:t})]}),(0,T.jsx)($.Control,{children:i}),a&&(0,T.jsx)($.Message,{"data-testid":`error-message`})]}),Pq=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}=Oq(),{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,T.jsx)(Nq,{htmlFor:n,label:r,description:s,isRequired:d,info:o,showErrorMessage:f,"aria-invalid":!!p,className:l,children:(0,T.jsx)(i,{"data-testid":`element`,id:n,...g,...u,value:v,onChange:y,children:u.children})})},Fq=e=>{let t=(0,b.c)(6),{control:n}=XV(),r;t[0]===e?r=t[1]:(r=t=>{let{field:n}=t;return(0,T.jsx)(Pq,{...e,field:n})},t[0]=e,t[1]=r);let i;return t[2]!==n||t[3]!==e.name||t[4]!==r?(i=(0,T.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},Iq=e=>(0,T.jsx)(Fq,{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:uT,...e}),Lq=e=>(0,T.jsx)(Fq,{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:tT,...e}),Rq=e=>(0,T.jsx)(Fq,{id:e.name,"data-testid":e.name,Element:Xw,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),zq=e=>{let t=(0,b.c)(5),[n,r]=(0,v.useState)(!1),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>{e.preventDefault(),e.stopPropagation(),r(Bq)},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,T.jsxs)(`div`,{className:`relative`,children:[(0,T.jsx)(Xw,{...e,"aria-label":`password`,type:n?`text`:`password`}),(0,T.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,T.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 Bq(e){return!e}var Vq=({autoComplete:e,...t})=>(0,T.jsx)(Fq,{Element:zq,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}),Hq=e=>[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)],Uq=(e,t)=>{try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}},Wq=`
|
|
202
|
+
[data-input-otp] {
|
|
203
|
+
--nojs-bg: white !important;
|
|
204
|
+
--nojs-fg: black !important;
|
|
205
|
+
|
|
206
|
+
background-color: var(--nojs-bg) !important;
|
|
207
|
+
color: var(--nojs-fg) !important;
|
|
208
|
+
caret-color: var(--nojs-fg) !important;
|
|
209
|
+
letter-spacing: .25em !important;
|
|
210
|
+
text-align: center !important;
|
|
211
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
212
|
+
border-radius: 4px !important;
|
|
213
|
+
width: 100% !important;
|
|
214
|
+
}
|
|
215
|
+
@media (prefers-color-scheme: dark) {
|
|
216
|
+
[data-input-otp] {
|
|
217
|
+
--nojs-bg: black !important;
|
|
218
|
+
--nojs-fg: white !important;
|
|
219
|
+
}
|
|
220
|
+
}`,Gq=18,Kq=40,qq=`${Kq}px`,Jq=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),Yq=e=>{let t=(0,b.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.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-Gq,f=c;document.querySelectorAll(Jq).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>=Kq)};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,v.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 y;t[14]!==r||t[15]!==a||t[16]!==i?(y=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=y):y=t[17],(0,v.useEffect)(_,y);let x;return t[18]!==o||t[19]!==f?(x={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:qq},t[18]=o,t[19]=f,t[20]=x):x=t[20],x},Xq=e=>{let t=(0,v.useRef)(void 0);return(0,v.useEffect)(()=>{t.current=e}),t.current},Zq=(0,v.createContext)({}),Qq=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:u,containerClassName:d,noScriptCSSFallback:f=Wq,render:p,children:m,...h})=>{let[g,_]=(0,v.useState)(typeof h.defaultValue==`string`?h.defaultValue:``),y=e??g,b=Xq(y),x=e=>{t?.(e),_(e)},S=r===void 0?null:typeof r==`string`?new RegExp(r):r,C=(0,v.useRef)(null),w=(0,v.useRef)(null),E=(0,v.useRef)({value:y,onChange:x,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),D=(0,v.useRef)({prev:[C.current?.selectionStart??null,C.current?.selectionEnd??null,C.current?.selectionDirection??`none`]});(0,v.useEffect)(()=>{let e=C.current,t=w.current;if(!e||!t)return;E.current.value!==e.value&&E.current.onChange(e.value),D.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){N(null),F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=D.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&&C.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;L(t!==null&&n!==null?t===n?t:u:null),N(u),F(d),D.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&j(!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;`;Uq(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Uq(e.sheet,`[data-input-otp]:autofill { ${t} }`),Uq(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Uq(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; } }`),Uq(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[O,k]=(0,v.useState)(!1),[A,j]=(0,v.useState)(!1),[M,N]=(0,v.useState)(null),[P,F]=(0,v.useState)(null),[I,L]=(0,v.useState)(null);(0,v.useEffect)(()=>{Hq(()=>{C.current?.dispatchEvent(new Event(`input`));let e=C.current?.selectionStart??null,t=C.current?.selectionEnd??null,n=C.current?.selectionDirection??`none`;e!==null&&t!==null&&(N(e),F(t),L(e),D.current.prev=[e,t,n])})},[y,A]),(0,v.useEffect)(()=>{b!==void 0&&y!==b&&b.length<n&&y.length===n&&o?.(y)},[n,o,b,y]);let R=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=A&&I!==null?I:null;e!==R.current&&(R.current=e,s?.(e))},[A,I,s]);let ee=Yq({containerRef:w,inputRef:C,pushPasswordManagerStrategy:c,isFocused:A}),te=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&S&&!S.test(t)){e.preventDefault();return}typeof b==`string`&&t.length<b.length&&document.dispatchEvent(new Event(`selectionchange`)),x(t)},ne=()=>{if(C.current){let e=Math.min(C.current.value.length,n-1),t=C.current.value.length;C.current?.setSelectionRange(e,t),N(e),F(t)}j(!0)},z=e=>{let t=C.current;if(!u&&(!E.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=u?u(r):r;e.preventDefault();let a=C.current?.selectionStart,o=C.current?.selectionEnd,s=(a===o?y.slice(0,a??0)+i+y.slice(a??0):y.slice(0,a??0)+i+y.slice(o??0)).slice(0,n);if(!(s.length>0&&S&&!S.test(s))&&t){t.value=s,x(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),N(e),F(r)}},B={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)`},re=(0,T.jsx)(`input`,{autoComplete:h.autoComplete||`one-time-code`,...h,"data-input-otp":!0,"data-input-otp-placeholder-shown":y.length===0||void 0,"data-input-otp-mss":M,"data-input-otp-mse":P,inputMode:a,pattern:S?.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:B,maxLength:n,value:y,ref:C,onPaste:e=>{z(e),h.onPaste?.(e)},onChange:te,onMouseOver:e=>{k(!0),h.onMouseOver?.(e)},onMouseLeave:e=>{k(!1),h.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=C.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&L(t)}}),h.onKeyDown?.(e)},onFocus:e=>{ne(),h.onFocus?.(e)},onBlur:e=>{j(!1),h.onBlur?.(e)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=A&&M!==null&&P!==null&&(M===P&&t===M||t>=M&&t<P),r=y[t]===void 0?null:y[t];return{char:r,placeholderChar:y[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:A,isHovering:!h.disabled&&O,setSelection:e=>{let t=C.current;if(!t||h.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=y[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),N(a),F(o),j(!0)}},ae=p===void 0?(0,T.jsx)(Zq.Provider,{value:ie,children:m}):p(ie);return(0,T.jsxs)(T.Fragment,{children:[f!==null&&(0,T.jsx)(`noscript`,{children:(0,T.jsx)(`style`,{children:f})}),(0,T.jsxs)(`div`,{ref:w,className:l(`relative`,h.disabled?`cursor-default`:`cursor-text`,d),children:[ae,(0,T.jsx)(`div`,{className:`absolute inset-0`,children:re})]})]})},$q=({className:e,render:t,...n})=>(0,T.jsx)(Qq,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:l(`disabled:cursor-not-allowed`,e),render:t,...n}),eJ=({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`z-10 flex items-center gap-3`,e),...t}),tJ=e=>{let t=(0,b.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,v.useContext)(Zq),{char:c,isActive:u}=s?.slots[n]??{},d;t[0]===s?d=t[1]:(d=s??{},t[0]=s,t[1]=d);let{setSelection:f}=d,p;t[2]!==n||t[3]!==i||t[4]!==f?(p=e=>{f?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=f,t[5]=p):p=t[5];let m=p,h;t[6]!==n||t[7]!==a||t[8]!==f?(h=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=f,t[9]=h):h=t[9];let g=h;return(0,T.jsx)(aS,{isSelected:u,variant:`input`,color:`custom`,tabIndex:-1,className:l(`relative z-10 px-2!`,u&&`ring-4!`,r),onClick:m,onKeyDown:g,label:null,...o,children:(0,T.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},nJ=e=>(0,T.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,T.jsx)(ju,{})}),rJ=e=>(0,T.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}),iJ=e=>e?.getAttribute(`aria-selected`)===`true`,aJ=({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}=Oq(),f=(0,v.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=dS(f,{selector:iJ,isHoverable:!0});return(0,v.useEffect)(()=>{m()},[]),(0,T.jsx)(Nq,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,T.jsx)($q,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(eJ,{children:[(0,T.jsx)(tJ,{index:0,ref:e=>{f.current[0]=e}}),(0,T.jsx)(tJ,{index:1,ref:e=>{f.current[1]=e}}),(0,T.jsx)(tJ,{index:2,ref:e=>{f.current[2]=e}})]}),(0,T.jsx)(nJ,{}),(0,T.jsxs)(eJ,{children:[(0,T.jsx)(tJ,{index:3,ref:e=>{f.current[3]=e}}),(0,T.jsx)(tJ,{index:4,ref:e=>{f.current[4]=e}}),(0,T.jsx)(tJ,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,T.jsx)(rJ,{style:p})]})})})},oJ=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}=XV();return(0,T.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,T.jsx)(aJ,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},sJ=({className:e,...t})=>(0,T.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,T.jsx)(Bu,{className:`absolute left-2 size-4`}),(0,T.jsx)(Xw,{...t,type:`search`,className:l(`pl-8`,e)})]}),cJ=e=>(0,T.jsx)(Fq,{id:e.name,"data-testid":e.name,Element:sJ,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),lJ=e=>(0,T.jsx)(Fq,{Element:Zw,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}),uJ=e=>(0,T.jsx)(Fq,{Element:eT,id:e.name,"data-testid":e.name,...e}),dJ=au([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`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:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),fJ=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,T.jsx)(`input`,{type:`checkbox`,className:l(dJ({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),pJ=e=>{let{label:t,name:n,id:r}=e;return t?(0,T.jsxs)(`label`,{htmlFor:r??n,className:l(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,T.jsx)(fJ,{id:r??n,...e}),t]}):(0,T.jsx)(fJ,{id:r??n,...e})},mJ=({inputLabel:e,value:t,onChange:n,...r})=>(0,T.jsx)(pJ,{...r,label:e,checked:!!t,onChange:n}),hJ=({autoComplete:e,...t})=>(0,T.jsx)(Fq,{Element:mJ,id:t.name,"data-testid":t.name,autoComplete:e,...t}),gJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=Oq();return(0,T.jsx)(Nq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(pV,{onValueChange:t.onChange,values:t.value,...l,children:c})})},_J=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=XV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(gJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},vJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=Oq();return(0,T.jsx)(Nq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},yJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=XV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(vJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},bJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=Oq();return(0,T.jsx)(Nq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(vS,{...t,...l,children:c})})},xJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=XV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(bJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},SJ=e=>{let t=(0,b.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=Oq(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,T.jsx)(cB,{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},CJ=e=>{let t=(0,b.c)(3),{formDescriptionId:n}=Oq(),r;return t[0]!==n||t[1]!==e?(r=(0,T.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},wJ=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=Oq(),a=r?String(r?.message??``):t;return a?(0,T.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=Sq;$.Description=CJ,$.Control=SJ,$.Field=Dq,$.Item=wq,$.Label=Mq,$.Message=wJ,$.Element=Fq,$.Input=Rq,$.InputPassword=Vq,$.Checkbox=hJ,$.TextArea=lJ,$.AutoSizedTextArea=uJ,$.Button=aS,$.Select=yJ,$.MultiSelect=_J,$.EditableFieldInput=Iq,$.EditableFieldTextArea=Lq,$.SwitchSelector=xJ,$.OTP=oJ,$.SearchInput=cJ;var TJ=Z(`ZodISODateTime`,(e,t)=>{tG.init(e,t),ZJ.init(e,t)});function EJ(e){return xK(TJ,e)}var DJ=Z(`ZodISODate`,(e,t)=>{nG.init(e,t),ZJ.init(e,t)});function OJ(e){return SK(DJ,e)}var kJ=Z(`ZodISOTime`,(e,t)=>{rG.init(e,t),ZJ.init(e,t)});function AJ(e){return CK(kJ,e)}var jJ=Z(`ZodISODuration`,(e,t)=>{iG.init(e,t),ZJ.init(e,t)});function MJ(e){return wK(jJ,e)}var NJ=(e,t)=>{PU.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>LU(e,t)},flatten:{value:t=>IU(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,tU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,tU,2)}},isEmpty:{get(){return e.issues.length===0}}})};Z(`ZodError`,NJ);var PJ=Z(`ZodError`,NJ,{Parent:Error}),FJ=RU(PJ),IJ=BU(PJ),LJ=HU(PJ),RJ=WU(PJ),zJ=KU(PJ),BJ=qU(PJ),VJ=JU(PJ),HJ=YU(PJ),UJ=XU(PJ),WJ=ZU(PJ),GJ=QU(PJ),KJ=$U(PJ),qJ=Z(`ZodType`,(e,t)=>(VW.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:QK(e,`input`),output:QK(e,`output`)}}),e.toJSONSchema=ZK(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(cU(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>vU(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>FJ(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>LJ(e,t,n),e.parseAsync=async(t,n)=>IJ(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>RJ(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>zJ(e,t,n),e.decode=(t,n)=>BJ(e,t,n),e.encodeAsync=async(t,n)=>VJ(e,t,n),e.decodeAsync=async(t,n)=>HJ(e,t,n),e.safeEncode=(t,n)=>UJ(e,t,n),e.safeDecode=(t,n)=>WJ(e,t,n),e.safeEncodeAsync=async(t,n)=>GJ(e,t,n),e.safeDecodeAsync=async(t,n)=>KJ(e,t,n),e.refine=(t,n)=>e.check(QY(t,n)),e.superRefine=t=>e.check($Y(t)),e.overwrite=t=>e.check(IK(t)),e.optional=()=>PY(e),e.exactOptional=()=>IY(e),e.nullable=()=>RY(e),e.nullish=()=>PY(RY(e)),e.nonoptional=t=>WY(e,t),e.array=()=>SY(e),e.or=t=>EY([e,t]),e.and=t=>OY(e,t),e.transform=t=>JY(e,MY(t)),e.default=t=>BY(e,t),e.prefault=t=>HY(e,t),e.catch=t=>KY(e,t),e.pipe=t=>JY(e,t),e.readonly=()=>XY(e),e.describe=t=>{let n=e.clone();return ZG.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return ZG.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return ZG.get(e);let n=e.clone();return ZG.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),JJ=Z(`_ZodString`,(e,t)=>{HW.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(AK(...t)),e.includes=(...t)=>e.check(NK(...t)),e.startsWith=(...t)=>e.check(PK(...t)),e.endsWith=(...t)=>e.check(FK(...t)),e.min=(...t)=>e.check(OK(...t)),e.max=(...t)=>e.check(DK(...t)),e.length=(...t)=>e.check(kK(...t)),e.nonempty=(...t)=>e.check(OK(1,...t)),e.lowercase=t=>e.check(jK(t)),e.uppercase=t=>e.check(MK(t)),e.trim=()=>e.check(RK()),e.normalize=(...t)=>e.check(LK(...t)),e.toLowerCase=()=>e.check(zK()),e.toUpperCase=()=>e.check(BK()),e.slugify=()=>e.check(VK())}),YJ=Z(`ZodString`,(e,t)=>{HW.init(e,t),JJ.init(e,t),e.email=t=>e.check($G(QJ,t)),e.url=t=>e.check(aK(tY,t)),e.jwt=t=>e.check(bK(gY,t)),e.emoji=t=>e.check(oK(nY,t)),e.guid=t=>e.check(eK($J,t)),e.uuid=t=>e.check(tK(eY,t)),e.uuidv4=t=>e.check(nK(eY,t)),e.uuidv6=t=>e.check(rK(eY,t)),e.uuidv7=t=>e.check(iK(eY,t)),e.nanoid=t=>e.check(sK(rY,t)),e.guid=t=>e.check(eK($J,t)),e.cuid=t=>e.check(cK(iY,t)),e.cuid2=t=>e.check(lK(aY,t)),e.ulid=t=>e.check(uK(oY,t)),e.base64=t=>e.check(_K(pY,t)),e.base64url=t=>e.check(vK(mY,t)),e.xid=t=>e.check(dK(sY,t)),e.ksuid=t=>e.check(fK(cY,t)),e.ipv4=t=>e.check(pK(lY,t)),e.ipv6=t=>e.check(mK(uY,t)),e.cidrv4=t=>e.check(hK(dY,t)),e.cidrv6=t=>e.check(gK(fY,t)),e.e164=t=>e.check(yK(hY,t)),e.datetime=t=>e.check(EJ(t)),e.date=t=>e.check(OJ(t)),e.time=t=>e.check(AJ(t)),e.duration=t=>e.check(MJ(t))});function XJ(e){return QG(YJ,e)}var ZJ=Z(`ZodStringFormat`,(e,t)=>{UW.init(e,t),JJ.init(e,t)}),QJ=Z(`ZodEmail`,(e,t)=>{KW.init(e,t),ZJ.init(e,t)}),$J=Z(`ZodGUID`,(e,t)=>{WW.init(e,t),ZJ.init(e,t)}),eY=Z(`ZodUUID`,(e,t)=>{GW.init(e,t),ZJ.init(e,t)}),tY=Z(`ZodURL`,(e,t)=>{qW.init(e,t),ZJ.init(e,t)}),nY=Z(`ZodEmoji`,(e,t)=>{JW.init(e,t),ZJ.init(e,t)}),rY=Z(`ZodNanoID`,(e,t)=>{YW.init(e,t),ZJ.init(e,t)}),iY=Z(`ZodCUID`,(e,t)=>{XW.init(e,t),ZJ.init(e,t)}),aY=Z(`ZodCUID2`,(e,t)=>{ZW.init(e,t),ZJ.init(e,t)}),oY=Z(`ZodULID`,(e,t)=>{QW.init(e,t),ZJ.init(e,t)}),sY=Z(`ZodXID`,(e,t)=>{$W.init(e,t),ZJ.init(e,t)}),cY=Z(`ZodKSUID`,(e,t)=>{eG.init(e,t),ZJ.init(e,t)}),lY=Z(`ZodIPv4`,(e,t)=>{aG.init(e,t),ZJ.init(e,t)}),uY=Z(`ZodIPv6`,(e,t)=>{oG.init(e,t),ZJ.init(e,t)}),dY=Z(`ZodCIDRv4`,(e,t)=>{sG.init(e,t),ZJ.init(e,t)}),fY=Z(`ZodCIDRv6`,(e,t)=>{cG.init(e,t),ZJ.init(e,t)}),pY=Z(`ZodBase64`,(e,t)=>{uG.init(e,t),ZJ.init(e,t)}),mY=Z(`ZodBase64URL`,(e,t)=>{fG.init(e,t),ZJ.init(e,t)}),hY=Z(`ZodE164`,(e,t)=>{pG.init(e,t),ZJ.init(e,t)}),gY=Z(`ZodJWT`,(e,t)=>{hG.init(e,t),ZJ.init(e,t)}),_Y=Z(`ZodUnknown`,(e,t)=>{gG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function vY(){return TK(_Y)}var yY=Z(`ZodNever`,(e,t)=>{_G.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tq(e,t,n,r)});function bY(e){return EK(yY,e)}var xY=Z(`ZodArray`,(e,t)=>{yG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aq(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(OK(t,n)),e.nonempty=t=>e.check(OK(1,t)),e.max=(t,n)=>e.check(DK(t,n)),e.length=(t,n)=>e.check(kK(t,n)),e.unwrap=()=>e.element});function SY(e,t){return HK(xY,e,t)}var CY=Z(`ZodObject`,(e,t)=>{wG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oq(e,t,n,r),oU(e,`shape`,()=>t.shape),e.keyof=()=>AY(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vY()}),e.loose=()=>e.clone({...e._zod.def,catchall:vY()}),e.strict=()=>e.clone({...e._zod.def,catchall:bY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>SU(e,t),e.safeExtend=t=>CU(e,t),e.merge=t=>wU(e,t),e.pick=t=>bU(e,t),e.omit=t=>xU(e,t),e.partial=(...t)=>TU(NY,e,t[0]),e.required=(...t)=>EU(UY,e,t[0])});function wY(e,t){return new CY({type:`object`,shape:e??{},...Q(t)})}var TY=Z(`ZodUnion`,(e,t)=>{EG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sq(e,t,n,r),e.options=t.options});function EY(e,t){return new TY({type:`union`,options:e,...Q(t)})}var DY=Z(`ZodIntersection`,(e,t)=>{DG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cq(e,t,n,r)});function OY(e,t){return new DY({type:`intersection`,left:e,right:t})}var kY=Z(`ZodEnum`,(e,t)=>{AG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nq(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 kY({...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 kY({...t,checks:[],...Q(r),entries:i})}});function AY(e,t){return new kY({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var jY=Z(`ZodTransform`,(e,t)=>{jG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iq(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ZH(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(MU(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(MU(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function MY(e){return new jY({type:`transform`,transform:e})}var NY=Z(`ZodOptional`,(e,t)=>{NG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function PY(e){return new NY({type:`optional`,innerType:e})}var FY=Z(`ZodExactOptional`,(e,t)=>{PG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function IY(e){return new FY({type:`optional`,innerType:e})}var LY=Z(`ZodNullable`,(e,t)=>{FG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function RY(e){return new LY({type:`nullable`,innerType:e})}var zY=Z(`ZodDefault`,(e,t)=>{IG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function BY(e,t){return new zY({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():hU(t)}})}var VY=Z(`ZodPrefault`,(e,t)=>{RG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function HY(e,t){return new VY({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():hU(t)}})}var UY=Z(`ZodNonOptional`,(e,t)=>{zG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function WY(e,t){return new UY({type:`nonoptional`,innerType:e,...Q(t)})}var GY=Z(`ZodCatch`,(e,t)=>{VG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function KY(e,t){return new GY({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var qY=Z(`ZodPipe`,(e,t)=>{HG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mq(e,t,n,r),e.in=t.in,e.out=t.out});function JY(e,t){return new qY({type:`pipe`,in:e,out:t})}var YY=Z(`ZodReadonly`,(e,t)=>{WG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function XY(e){return new YY({type:`readonly`,innerType:e})}var ZY=Z(`ZodCustom`,(e,t)=>{KG.init(e,t),qJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rq(e,t,n,r)});function QY(e,t={}){return UK(ZY,e,t)}function $Y(e){return WK(e)}var eX={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`]},tX=e=>{let t=(0,b.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,u]=(0,v.useState)(!1),{setLocaleDictionary:d}=jw(),{mutate:f,isPending:p}=wO(),{mutate:m,isPending:h}=kO(),{mutate:g,isPending:_}=CO(),y=h||_,{editedContent:x,restoreEditedContent:S}=zw(),{deleteButton:C,resetButton:w,saveButton:E,publishButton:D,downloadButton:O,confirmation:k}=br(eX),{isAuthenticated:A}=gO(),j=x?.[n.localId],M;t[0]!==n||t[1]!==j?(M=j&&JSON.stringify(j)!==JSON.stringify(n),t[0]=n,t[1]=j,t[2]=M):M=t[2];let N=M,P=n?.id!==void 0,F;t[3]!==n||t[4]!==x||t[5]!==o||t[6]!==S||t[7]!==d||t[8]!==m?(F=async()=>{x?.[n.localId]&&m({dictionary:{...n,...x?.[n.localId]}},{onSuccess:()=>{d(x?.[n.localId]),S(n.localId),u(!1),o?.()}})},t[3]=n,t[4]=x,t[5]=o,t[6]=S,t[7]=d,t[8]=m,t[9]=F):F=t[9];let I=F,L;t[10]!==n||t[11]!==x||t[12]!==o||t[13]!==g||t[14]!==S||t[15]!==d?(L=()=>{let e={...n,...x?.[n.localId]};g({dictionaries:[e]},{onSuccess:t=>{t&&(d(e),S(n.localId),o?.())}})},t[10]=n,t[11]=x,t[12]=o,t[13]=g,t[14]=S,t[15]=d,t[16]=L):L=t[16];let R=L,ee;t[17]!==f||t[18]!==n||t[19]!==a?(ee=()=>{n.id&&f({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=f,t[18]=n,t[19]=a,t[20]=ee):ee=t[20];let te=ee,ne;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ne=()=>u(!1),t[21]=ne):ne=t[21];let z;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>u(!1),t[22]=z):z=t[22],(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(xI,{isOpen:c,title:k.title.value,size:`md`,onClose:ne,padding:`md`,children:(0,T.jsxs)(`form`,{className:`size-full`,children:[(0,T.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:k.message}),(0,T.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,T.jsx)($.Button,{label:k.cancelButton.label.value,disabled:!N||y,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:z,children:k.cancelButton.text}),(0,T.jsx)($.Button,{label:k.confirmButton.label.value,disabled:!N||y,Icon:zu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:I,children:k.confirmButton.text})]})]})}),(0,T.jsxs)(`form`,{className:l(`flex justify-end gap-2 max-md:flex-col`,i),...s,children:[r.includes(`remote`)&&P&&a&&A&&(0,T.jsx)($.Button,{label:C.label.value,Icon:Vu,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:p,onClick:te,children:C.text}),N&&(0,T.jsx)($.Button,{label:w.label.value,disabled:!N,Icon:Ru,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>S(n.localId),children:w.text}),r.includes(`local`)&&(0,T.jsx)($.Button,{label:O.label.value,disabled:!N||y,Icon:Eu,color:`text`,variant:A?`outline`:`default`,className:`max-md:w-full`,isLoading:h,onClick:()=>u(!0),children:O.text}),r.includes(`remote`)&&A&&!P&&(0,T.jsx)($.Button,{label:D.label.value,disabled:y,Icon:_u,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:R,children:D.text}),r.includes(`remote`)&&A&&P&&N&&(0,T.jsx)($.Button,{label:E.label.value,disabled:!N||y,Icon:zu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:R,children:E.text})]})]})},nX={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`]},rX=(e,t=2e3,n,r)=>{let[i,a]=(0,v.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))}}}},iX=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:u,disable:d,preventDefault:f,stopPropagation:p,size:m}=e,h=a===void 0?`Copy to clipboard`:a,g=o===void 0?`Copied to clipboard`:o,_=s===void 0?2e3:s,v=f===void 0?!0:f,y=p===void 0?!0:p,x=m===void 0?14:m,{isCopied:S,copy:C}=rX(n,_,c,u);if(d){let e;return t[0]!==r||t[1]!==i?(e=(0,T.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let w;if(t[3]!==g||t[4]!==h||t[5]!==r||t[6]!==i||t[7]!==C||t[8]!==S||t[9]!==v||t[10]!==x||t[11]!==y||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{v&&e.preventDefault(),y&&e.stopPropagation(),C()},o=S?g:h,s=S?wu:Tu;w=(0,T.jsxs)(`span`,{className:l(`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":S,"data-testid":`copy-to-clipboard`,children:[(0,T.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,T.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:x,"aria-hidden":`true`})]}),t[3]=g,t[4]=h,t[5]=r,t[6]=i,t[7]=C,t[8]=S,t[9]=v,t[10]=x,t[11]=y,t[12]=n,t[13]=w}else w=t[13];return w},aX={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`]},oX={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`]},sX=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:_}=br(oX),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=wY({title:XJ({error:y}).refine(cX,{error:i.value}).optional(),key:XJ({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:XJ({error:x}).optional(),projectIds:SY(XJ({error:S})).default([e]),tags:SY(XJ({error:C})).default([]),location:AY([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:AY([`static`,`dynamic`,`fetch`]).optional(),filePath:XJ({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 cX(e){return e.length===0||e.length>=4}var lX=e=>{let t=(0,b.c)(55),{dictionary:n,mode:r}=e,{session:i}=hO(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=SO(),{data:l}=TO(),u=s?.data??[],d=l?.data??[],f=sX(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}=Cq(f,m),{editedContent:_,setEditedDictionary:y}=zw(),{titleInput:x,keyInput:S,descriptionInput:C,projectInput:w,tagsSelect:E,locationSelect:D,importModeSelect:O,filePathInput:k,auditButton:A}=br(aX),{mutate:j,isPending:M}=EO(),N=_?.[n.localId],P;t[5]!==n||t[6]!==h?(P=()=>{h.reset({...n,location:n.location??`remote`})},t[5]=n,t[6]=h,t[7]=P):P=t[7];let F=h?.reset,I;t[8]!==n||t[9]!==F?(I=[n,F],t[8]=n,t[9]=F,t[10]=I):I=t[10],(0,v.useEffect)(P,I);let L;t[11]!==n||t[12]!==h||t[13]!==N?(L=()=>{N===void 0&&h.reset({...n,location:n.location??`remote`})},t[11]=n,t[12]=h,t[13]=N,t[14]=L):L=t[14];let R;t[15]===N?R=t[16]:(R=[N],t[15]=N,t[16]=R),(0,v.useEffect)(L,R);let ee;t[17]!==j||t[18]!==n||t[19]!==h||t[20]!==y||t[21]!==N?(ee=()=>{let e={...n,...N};j({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(t?.data)try{let n=t.data.fileContent;y(t=>({...t,...e,...n})),h.reset({...e,...n})}catch(e){console.error(e)}}})},t[17]=j,t[18]=n,t[19]=h,t[20]=y,t[21]=N,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 z=KV(ne),B=z===`local`||z===`hybrid`,re;t[25]!==n||t[26]!==h||t[27]!==y?(re=e=>{h.setValue(`key`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},key:e}))},t[25]=n,t[26]=h,t[27]=y,t[28]=re):re=t[28];let ie;t[29]!==n||t[30]!==h||t[31]!==y?(ie=e=>{h.setValue(`title`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},title:e}))},t[29]=n,t[30]=h,t[31]=y,t[32]=ie):ie=t[32];let ae;t[33]!==n||t[34]!==h||t[35]!==y?(ae=e=>{h.setValue(`description`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},description:e}))},t[33]=n,t[34]=h,t[35]=y,t[36]=ae):ae=t[36];let oe;t[37]!==n||t[38]!==h||t[39]!==D||t[40]!==r||t[41]!==y?(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),y(e=>({...n,...e??{},location:r,filePath:i}))},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),y(e=>({...n,...e??{},location:r}))};return(0,T.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,T.jsx)($.Label,{className:`ml-1`,children:D.label}),(0,T.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,T.jsx)(pJ,{id:`location-local`,name:`location-local`,label:D.local.value,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,T.jsx)(pJ,{id:`location-remote`,name:`location-remote`,label:D.remote.value,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,T.jsx)($.Description,{children:D.testDescription}),(0,T.jsx)($.Message,{})]})},t[37]=n,t[38]=h,t[39]=D,t[40]=r,t[41]=y,t[42]=oe):oe=t[42];let se;t[43]!==n||t[44]!==h||t[45]!==y?(se=e=>{h.setValue(`importMode`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},importMode:e}))},t[43]=n,t[44]=h,t[45]=y,t[46]=se):se=t[46];let ce;t[47]!==n||t[48]!==h||t[49]!==y?(ce=e=>{let t=[e].flat();h.setValue(`projectIds`,t,{shouldDirty:!0}),y(e=>({...n,...e??{},projectIds:t}))},t[47]=n,t[48]=h,t[49]=y,t[50]=ce):ce=t[50];let le;return t[51]!==n||t[52]!==h||t[53]!==y?(le=e=>{let t=[e].flat();h.setValue(`tags`,t,{shouldDirty:!0}),y(e=>({...n,...e??{},tags:t}))},t[51]=n,t[52]=h,t[53]=y,t[54]=le):le=t[54],(0,T.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,T.jsx)($.EditableFieldInput,{name:`key`,label:S.label,placeholder:S.label.value,description:S.description,disabled:g,isRequired:!0,onSave:re}),(0,T.jsx)($.EditableFieldInput,{name:`title`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ie})]}),(0,T.jsx)($.EditableFieldTextArea,{name:`description`,label:C.label,placeholder:C.placeholder.value,description:C.description,disabled:g,onSave:ae}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,T.jsx)($.Field,{control:h.control,name:`location`,render:oe}),(0,T.jsx)(Yy,{mode:`wait`,children:B&&(0,T.jsx)(qx.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,T.jsx)($.Input,{name:`filePath`,label:k.label.value,placeholder:k.placeholder.value,description:k.description.value,disabled:g||!B,onChange:e=>{let t=e.target.value;y(e=>({...n,...e??{},filePath:t}))}})},`filePath-input`)})]}),(0,T.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,T.jsxs)($.Select,{name:`importMode`,label:O.label.value,description:O.description.value,onValueChange:se,children:[(0,T.jsx)(J.Trigger,{children:(0,T.jsx)(J.Value,{placeholder:O.label.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`static`,children:O.static.value}),(0,T.jsx)(J.Item,{value:`dynamic`,children:O.dynamic.value}),(0,T.jsx)(J.Item,{value:`live`,children:O.live.value})]})]})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,T.jsxs)($.MultiSelect,{name:`projectIds`,label:w.label.value,description:w.description,onValueChange:ce,children:[(0,T.jsx)(pV.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,T.jsx)(pV.Input,{placeholder:w.placeholder.value})}),(0,T.jsx)(pV.Content,{children:(0,T.jsx)(nS,{isLoading:c,children:(0,T.jsx)(pV.List,{children:u?.map(uX)})})})]}),(0,T.jsxs)($.MultiSelect,{name:`tags`,label:E.label.value,description:E.description,onValueChange:le,children:[(0,T.jsx)(pV.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,T.jsx)(pV.Input,{placeholder:E.placeholder.value})}),(0,T.jsx)(pV.Content,{children:(0,T.jsx)(nS,{isLoading:c,children:(0,T.jsx)(pV.List,{children:d?.map(dX)})})})]})]}),(0,T.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,T.jsx)($.Button,{type:`button`,size:`icon-md`,label:A.label.value,Icon:Hu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||M,isLoading:M})})]})};function uX(e){return(0,T.jsx)(pV.Item,{value:String(e.id),children:e.name},String(e.id))}function dX(e){return(0,T.jsx)(pV.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var fX=(0,v.lazy)(()=>d(()=>import(`./dist-JQ-XU7Cq.js`).then(e=>({default:e.Editor})),__vite__mapDeps([0,1,2]))),pX=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,v.useRef)(null),c=(0,v.useRef)(null),[u,d]=(0,v.useState)({height:0,width:0}),f=n?`vs-dark-transparent`:`hc-light-theme`,p=(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(f),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}),d({height:n,width:s.current?.clientWidth??0})},m=r??(typeof e==`string`?e.split(`
|
|
221
|
+
`).length>1:!1);return(0,T.jsxs)(`div`,{className:l(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,T.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,T.jsx)(`div`,{className:l(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,T.jsx)(YF,{content:e})})}),(0,T.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,T.jsx)(v.Suspense,{fallback:(0,T.jsx)(nS,{}),children:(0,T.jsx)(fX,{...u,defaultLanguage:`typescript`,language:t,loading:(0,T.jsx)(nS,{}),defaultValue:String(e).replace(/\n$/,``),onMount:p,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:m?`on`:`off`},theme:f,className:`my-2 rounded-md`})})})]})},mX=e=>{let t=(0,b.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=zw(),o=hX,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,T.jsx)(pX,{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 hX(e){try{return JSON.parse(e),!0}catch{return!1}}var gX={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`]},_X={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`,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`,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`,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`,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`,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:`列挙`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,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`,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`,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:`गणना`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},vX=e=>{let t=(0,b.c)(22),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,triggerPlaceHolder:d,nest:f,gender:p,condition:m,markdown:h,insertion:g,reactNode:_,file:y}=br(_X),x;t[0]===n?x=t[1]:(x=gw(n),t[0]=n,t[1]=x);let[S,C]=(0,v.useState)(x),w;t[2]===r?w=t[3]:(w=e=>{C(e),r(e)},t[2]=r,t[3]=w);let E=w,D;return t[4]!==l||t[5]!==s||t[6]!==m||t[7]!==u||t[8]!==y||t[9]!==p||t[10]!==g||t[11]!==S||t[12]!==h||t[13]!==i||t[14]!==f||t[15]!==c||t[16]!==o||t[17]!==E||t[18]!==_||t[19]!==a||t[20]!==d?(D=(0,T.jsxs)(J,{value:S,onValueChange:E,children:[(0,T.jsx)(J.Trigger,{children:(0,T.jsx)(J.Value,{placeholder:d})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:k,children:i}),(0,T.jsx)(J.Item,{value:te,children:a}),(0,T.jsx)(J.Item,{value:ne,children:o}),(0,T.jsx)(J.Item,{value:z,children:s}),(0,T.jsx)(J.Item,{value:P,children:c}),(0,T.jsx)(J.Item,{value:F,children:l}),(0,T.jsx)(J.Item,{value:A,children:u}),(0,T.jsx)(J.Item,{value:B,children:p}),(0,T.jsx)(J.Item,{value:M,children:g}),(0,T.jsx)(J.Item,{value:R,children:h}),(0,T.jsx)(J.Item,{value:I,children:f}),(0,T.jsx)(J.Item,{value:j,children:m}),(0,T.jsx)(J.Item,{value:L,disabled:!0,children:_}),(0,T.jsx)(J.Item,{value:N,children:y})]})]}),t[4]=l,t[5]=s,t[6]=m,t[7]=u,t[8]=y,t[9]=p,t[10]=g,t[11]=S,t[12]=h,t[13]=i,t[14]=f,t[15]=c,t[16]=o,t[17]=E,t[18]=_,t[19]=a,t[20]=d,t[21]=D):D=t[21],D},yX=e=>{let t=(0,b.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=Lw()?.internationalization.locales??[],s=gw(n),c=pw(n),l=e=>{a(dw(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,T.jsx)(vX,{section:n,onValueChange:e=>a(dw(e,o))}),(0,T.jsx)(yX,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,T.jsx)(vX,{section:n,onValueChange:e=>a(dw(e,o))}),(0,T.jsx)(yX,{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(dw(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(vX,{section:n,onValueChange:s}),(0,T.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,T.jsx)(SX,{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(dw(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,T.jsx)(vX,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},bX=e=>{let t=(0,b.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=Pw(),{renameEditedContent:c,addEditedContent:l}=Rw(),{titleInput:u,deleteButton:d}=br(gX),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,T.jsx)(eS,{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":fr(i,o?.keyPath??[]),onClick:e,children:(0,T.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,T.jsxs)(`div`,{className:`w-full`,children:[(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,T.jsx)(uT,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,T.jsx)(aS,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Vu,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,T.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,gr(n),` )`]})]}),(0,T.jsx)(yX,{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},xX=e=>{let t=(0,b.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=br(gX),{setFocusedContentKeyPath:o}=Pw(),{addEditedContent:s}=Rw();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.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:P,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,T.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,T.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,T.jsx)(`li`,{className:`flex w-full`,children:(0,T.jsx)(bX,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:P,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,T.jsx)(aS,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Lu,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},SX=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,T.jsx)(bX,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,T.jsx)(xX,{section:e,keyPath:t,dictionaryLocalId:n}),CX=e=>{let t=(0,b.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=zw(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,T.jsx)(bX,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},wX=e=>{let t=(0,b.c)(20),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=Lw(),{returnToDictionaryList:d}=br(nX),{focusedContent:f,setFocusedContent:p}=Pw(),{setLocaleDictionary:m}=jw(),h;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(h=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=h):h=t[4];let g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],t[5]=g):g=t[5],(0,v.useEffect)(h,g);let _;if(t[6]!==u?.internationalization.locales||t[7]!==n||t[8]!==i||t[9]!==a||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==d||t[14]!==p||t[15]!==l){let e;t[17]!==o||t[18]!==p?(e=()=>{p(null),o?.()},t[17]=o,t[18]=p,t[19]=e):e=t[19],_=(0,T.jsx)(xT,{availableLocales:u?.internationalization.locales??[],children:(0,T.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,T.jsx)(aS,{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,T.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,T.jsxs)(uI,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[a.includes(`remote`)&&(0,T.jsx)(uI.Item,{label:`Details`,value:`details`,children:(0,T.jsx)(lX,{dictionary:n,mode:a})}),(0,T.jsx)(uI.Item,{label:`Structure`,value:`structure`,children:(0,T.jsx)(CX,{dictionary:n})}),(0,T.jsx)(uI.Item,{label:`Content`,value:`content`,children:(0,T.jsx)(tz,{dictionary:n,isDarkMode:i})}),(0,T.jsx)(uI.Item,{label:`JSON`,value:`json`,children:(0,T.jsx)(mX,{dictionary:n,isDarkMode:i})})]})}),(0,T.jsxs)(`div`,{className:`sticky bottom-16 z-20 flex shrink-0 flex-wrap items-center justify-end gap-10 border-card border-t p-4 md:bottom-0`,children:[(0,T.jsx)(iX,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,T.jsx)(tX,{dictionary:n,mode:a,onDelete:e,onSave:s})]})]})}),t[6]=u?.internationalization.locales,t[7]=n,t[8]=i,t[9]=a,t[10]=r,t[11]=o,t[12]=s,t[13]=d,t[14]=p,t[15]=l,t[16]=_}else _=t[16];return _},TX=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}},EX=()=>{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)},DX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},OX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},kX=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},AX=(e=`md`)=>{let t=TX(e),n=EX(),r=kX(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:DX(),isMac:OX()}},jX=e=>{let t=(0,b.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=AX(n),t[0]=n,t[1]=r);let[i,a]=(0,v.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(AX(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,v.useEffect)(o,s),i},MX=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,v.useRef)(``),p=(0,v.useRef)(null),[m,h]=(0,v.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,y;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(y=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]=y):y=t[8];let x=y,S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{_()},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,v.useEffect)(S,C);let w=m.length>=l,T;return t[11]!==m||t[12]!==x||t[13]!==w?(T={setSearch:x,search:m,hasMinChars:w},t[11]=m,t[12]=x,t[13]=w,t[14]=T):T=t[14],T},NX=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()})}},PX=()=>{let e=(0,b.c)(2),t=(0,v.useSyncExternalStore)(NX.subscribe,NX.getSnapshot,FX),n;return e[0]===t?n=e[1]:(n={open:NX.open,close:NX.close,set:NX.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function FX(){return{}}var IX={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`]},LX=e=>e.split(` + `).map(e=>e.trim()),RX=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,zX=(e,t)=>{let n=t.map(RX),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(RX(e)));if(!i)return!1;let a=RX(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},BX=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,VX=(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},HX=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,u=a===void 0?!1:a,d=s===void 0?`md`:s,{isMac:f}=jX(),p;t[0]!==f||t[1]!==n?(p=LX(VX(n,f??!1)),t[0]=f,t[1]=n,t[2]=p):p=t[2];let m=p,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Set,t[3]=h):h=t[3];let[g,_]=(0,v.useState)(h),y,x;if(t[4]!==u||t[5]!==f||t[6]!==m||t[7]!==r?(y=()=>{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(f?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(BX(i))):a.add(i.toUpperCase()),_(a),!u&&r&&zX(e,m)){let t=m.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{_(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)}},x=[m,r,f,u],t[4]=u,t[5]=f,t[6]=m,t[7]=r,t[8]=y,t[9]=x):(y=t[8],x=t[9]),(0,v.useEffect)(y,x),!c)return null;let S;t[10]===g?S=t[11]:(S=e=>{let t=e.toUpperCase(),n=RX(e);return g.has(e)||g.has(t)||g.has(n)||e===`⌘`&&g.has(`Meta`)||e===`Ctrl`&&g.has(`Control`)||e===`⌥`&&g.has(`Alt`)||e===`Alt`&&g.has(`Alt`)||e===`←`&&g.has(`ArrowLeft`)||e===`→`&&g.has(`ArrowRight`)||e===`↑`&&g.has(`ArrowUp`)||e===`↓`&&g.has(`ArrowDown`)},t[10]=g,t[11]=S);let C=S,w;if(t[12]!==o||t[13]!==C||t[14]!==m||t[15]!==n||t[16]!==d){let e;t[18]!==C||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=BX(e);return(0,T.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,T.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,T.jsx)(`span`,{className:l(`min-w-4 px-0.5 text-center`,C(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=C,t[19]=n,t[20]=e):e=t[20],w=(0,T.jsx)(`kbd`,{className:l(`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`,d===`sm`&&`text-xs`,d===`md`&&`text-sm`,d===`lg`&&`text-base`,o),children:m.map(e)}),t[12]=o,t[13]=C,t[14]=m,t[15]=n,t[16]=d,t[17]=w}else w=t[17];return w},UX=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,T.jsx)(`div`,{className:l(`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,T.jsx)(`div`,{style:{minWidth:`${n}px`},className:l(r===`right`&&`ml-auto`),children:e})}),WX=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},GX=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=br(IX),{isMobile:d}=jX(`md`),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=fI(l),{open:h,close:g,isOpen:_}=PX(),y=_(t),b=y;_I({disableScroll:b,key:t?`right_drawer_${t}`:`right_drawer`}),(0,v.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=b&&a,r=e.target&&!f.current.contains(e.target),i=WX(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[b,g,c,a,t]);let x=(0,v.useRef)(c);return(0,v.useEffect)(()=>{x.current=c},[c]),(0,v.useEffect)(()=>{s!==void 0&&s!==y&&(s?h(t):(g(t),x.current?.()))},[s,y,t,h,g]),m?(0,Oc.createPortal)((0,T.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,T.jsx)(UX,{isHidden:!b,align:`right`,children:(0,T.jsxs)(eS,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,T.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,T.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,T.jsx)(`div`,{children:o&&(0,T.jsx)(aS,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:bu,children:o?.text})}),(0,T.jsx)(`div`,{children:(0,T.jsxs)(qF,{identifier:`close-drawer`,children:[(0,T.jsx)(aS,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Uu,size:`icon-md`}),(0,T.jsx)(qF.Detail,{identifier:`close-drawer`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,T.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,T.jsx)(HX,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,T.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,T.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,T.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,T.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,T.jsx)(T.Fragment,{})},KX=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`}}),qX=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,T.jsx)(`div`,{className:KX({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),JX=`dictionaryList`,YX=e=>`dictionary_edition_${e}`,XX=e=>{let t=(0,b.c)(20),n;t[0]===e?n=t[1]:(n=YX(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=PX(),{getEditedContentValue:s}=Rw(),{focusedContent:c,setFocusedContent:l}=Pw(),u,d;t[2]!==c||t[3]!==r||t[4]!==a?(u=()=>{c&&(c.keyPath?.length??0)>0&&a(r)},d=[c,a,r],t[2]=c,t[3]=r,t[4]=a,t[5]=u,t[6]=d):(u=t[5],d=t[6]),(0,v.useEffect)(u,d);let f;t[7]!==i||t[8]!==r?(f=i(r),t[7]=i,t[8]=r,t[9]=f):f=t[9];let p;t[10]!==o||t[11]!==c||t[12]!==r||t[13]!==l?(p=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[10]=o,t[11]=c,t[12]=r,t[13]=l,t[14]=p):p=t[14];let m;return t[15]!==c||t[16]!==s||t[17]!==f||t[18]!==p?(m={isOpen:f,focusedContent:c,getEditedContentValue:s,close:p},t[15]=c,t[16]=s,t[17]=f,t[18]=p,t[19]=m):m=t[19],m},ZX=e=>{let t=(0,b.c)(73),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=br(Qx),l;t[0]===n?l=t[1]:(l=YX(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=XX(n),{setFocusedContent:p}=Pw(),{open:m}=PX(),h;t[2]===m?h=t[3]:(h=()=>m(JX),t[2]=m,t[3]=h);let g=h,{data:_}=OO(),y;t[4]!==f||t[5]!==g||t[6]!==p?(y=()=>{f(),p(null),g()},t[4]=f,t[5]=g,t[6]=p,t[7]=y):y=t[7];let x=y,[S,C]=(0,v.useState)(!1),w;t[8]===x?w=t[9]:(w=()=>{C(!1),x()},t[8]=x,t[9]=w);let E=w;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,T.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let D,O,k,A,j,M,N,P,F,I;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==x||t[17]!==u||t[18]!==a||t[19]!==_){j=Symbol.for(`react.early_return_sentinel`);bb0:{if(O=_?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!O){let e;t[30]===c?e=t[31]:(e=(0,T.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[30]=c,t[31]=e),j=e;break bb0}D=GX,I=u,t[32]!==i.value||t[33]!==x?(k={onBack:x,text:i.value},t[32]=i.value,t[33]=x,t[34]=k):k=t[34],A=f;let e;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>C(!0),t[35]=e):e=t[35];let n;t[36]===a.label.value?n=t[37]:(n=(0,T.jsx)(aS,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Iu,label:a.label.value,onClick:e}),t[36]=a.label.value,t[37]=n);let r;t[38]===a.popoverContent?r=t[39]:(r=(0,T.jsx)(qF.Detail,{identifier:`open-dictionary-editor`,children:(0,T.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[38]=a.popoverContent,t[39]=r);let o;t[40]!==n||t[41]!==r?(o=(0,T.jsxs)(qF,{identifier:`open-dictionary-editor`,children:[n,r]}),t[40]=n,t[41]=r,t[42]=o):o=t[42],F=(0,T.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,T.jsx)(`h3`,{className:`w-full text-center text-lg`,children:O.title?O.title:O.key}),o]}),M=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dashed pb-3`,N=(0,T.jsx)(qX,{color:`text`,roundedSize:`full`,size:`xs`,children:O.key}),P=O.filePath&&(0,T.jsx)(qX,{color:`blue`,roundedSize:`full`,size:`xs`,children:O.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=x,t[17]=u,t[18]=a,t[19]=_,t[20]=D,t[21]=O,t[22]=k,t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I}else D=t[20],O=t[21],k=t[22],A=t[23],j=t[24],M=t[25],N=t[26],P=t[27],F=t[28],I=t[29];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let L;t[43]===O.id?L=t[44]:(L=O.id&&(0,T.jsx)(qX,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[43]=O.id,t[44]=L);let R;t[45]!==L||t[46]!==M||t[47]!==N||t[48]!==P?(R=(0,T.jsxs)(`div`,{className:M,children:[N,P,L]}),t[45]=L,t[46]=M,t[47]=N,t[48]=P,t[49]=R):R=t[49];let ee;t[50]!==R||t[51]!==F?(ee=(0,T.jsxs)(T.Fragment,{children:[F,R]}),t[50]=R,t[51]=F,t[52]=ee):ee=t[52];let te;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[53]=te):te=t[53];let ne;t[54]!==O||t[55]!==x?(ne=(0,T.jsx)(tX,{dictionary:O,mode:te,className:`mb-4 flex-col px-3`,onDelete:x}),t[54]=O,t[55]=x,t[56]=ne):ne=t[56];let z;t[57]!==O||t[58]!==S||t[59]!==d||t[60]!==x||t[61]!==r||t[62]!==o||t[63]!==E?(z=d&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(xI,{isOpen:S,onClose:()=>C(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,T.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,T.jsx)(wX,{dictionary:O,onClickDictionaryList:E,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{C(!1),x()},onSave:()=>{C(!1)}})})}),(0,T.jsx)(gT,{dictionary:O})]}),t[57]=O,t[58]=S,t[59]=d,t[60]=x,t[61]=r,t[62]=o,t[63]=E,t[64]=z):z=t[64];let B;return t[65]!==D||t[66]!==k||t[67]!==A||t[68]!==ee||t[69]!==ne||t[70]!==z||t[71]!==I?(B=(0,T.jsx)(D,{identifier:I,backButton:k,onClose:A,header:ee,footer:ne,children:z}),t[65]=D,t[66]=k,t[67]=A,t[68]=ee,t[69]=ne,t[70]=z,t[71]=I,t[72]=B):B=t[72],B},QX=e=>{let t=(0,b.c)(4),{isDarkMode:n}=e,{focusedContent:r}=Pw(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,T.jsx)(ZX,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},$X={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`]},eZ=()=>{let{drawerTitle:e,buttonLabel:t}=br($X),{set:n}=PX(),{localeDictionaries:r}=Aw(),{editedContent:i}=zw(),{setFocusedContent:a}=Pw(),{setSearch:o,search:s}=MX(),c=(0,v.useMemo)(()=>new YR(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,v.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({[JX]:!1,[YX(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,T.jsxs)(GX,{title:e.label.value,identifier:JX,children:[(0,T.jsx)(`div`,{className:`p-3 pb-4`,children:(0,T.jsx)(sJ,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,T.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,T.jsx)(`li`,{className:`w-full`,children:(0,T.jsx)(aS,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:xu,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Fu:void 0,children:(0,T.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,T.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,T.jsx)(qX,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,T.jsx)(qX,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,T.jsx)(qX,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,T.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},tZ={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`]},nZ=()=>{let e=(0,b.c)(8),{message:t}=br(tZ),[n]=Ow(DS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=l(`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,T.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},rZ=e=>{let t=(0,b.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,T.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,T.jsx)(nZ,{})}),i=(0,T.jsx)(QX,{}),a=(0,T.jsx)(eZ,{}),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,T.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},iZ=()=>{let e=(0,b.c)(2),[t,n]=(0,v.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(aZ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,v.useEffect)(r,i),t};function aZ(e){return e.json()}var oZ=e=>{let t=(0,b.c)(11),{children:n,iframeRef:r}=e,i=iZ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(nS,{}),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,T.jsx)(Fw,{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},sZ={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`]},cZ=()=>{let e=(0,b.c)(9),{editedContent:t,setEditedContentState:n}=zw(),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,v.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,v.useEffect)(s,c),i},lZ={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`]},uZ=()=>{let e=(0,b.c)(11),{title:t,description:n,documentationLink:r}=br(lZ),i;e[0]===t?i=e[1]:(i=(0,T.jsx)(gk,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,T.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,T.jsx)(tk,{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,T.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},dZ=e=>{let t=(0,b.c)(23),{iframeRef:n,applicationPath:r}=e,i=br(sZ),{editor:a}=Lw()??{},{enabled:o}=Bw(),s=Vw();cZ(),Uw();let[c,u]=(0,v.useState)(!0),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={receive:!0,emit:!1},t[0]=d):d=t[0];let[f]=kw(void 0,d),p,m;if(t[1]===f?(p=t[2],m=t[3]):(p=()=>{typeof f==`string`&&window.history.replaceState({},``,f)},m=[f],t[1]=f,t[2]=p,t[3]=m),(0,v.useEffect)(p,m),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(eS,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,T.jsx)(uZ,{})}),t[4]=e):e=t[4],e}let h;t[5]===c?h=t[6]:(h=(0,T.jsx)(nS,{isLoading:c}),t[5]=c,t[6]=h);let g=`${a.applicationURL}${r}`,_=i.intlayerApplication.value,y=c&&`hidden`,x;t[7]===y?x=t[8]:(x=l(`size-full`,y),t[7]=y,t[8]=x);let S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{u(!1)},t[9]=S):S=t[9];let C;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==g||t[13]!==x?(C=(0,T.jsx)(`iframe`,{src:g,title:_,sandbox:`allow-scripts allow-same-origin`,className:x,ref:n,onLoad:S}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=g,t[13]=x,t[14]=C):C=t[14];let w;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(w=!o&&(0,T.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,T.jsx)(aS,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=w):w=t[18];let E;return t[19]!==C||t[20]!==w||t[21]!==h?(E=(0,T.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[h,C,w]}),t[19]=C,t[20]=w,t[21]=h,t[22]=E):E=t[22],E},fZ=()=>{let e=(0,b.c)(2),t=(0,v.useRef)(null),n=Bi(),r;return e[0]===n.pathname?r=e[1]:(r=(0,T.jsx)(oZ,{iframeRef:t,children:(0,T.jsx)(vr,{disableEditor:!0,children:(0,T.jsx)(rZ,{children:(0,T.jsx)(dZ,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,y.createRoot)(document.getElementById(`root`)).render((0,T.jsx)(v.StrictMode,{children:(0,T.jsx)(()=>{let e=(0,b.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(Zx,{children:(0,T.jsx)(Xx,{children:(0,T.jsx)(fZ,{})})}),e[0]=t):t=e[0],t},{})}));
|