intlayer-editor 8.7.13 → 8.7.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-DZZq_NQS.js","assets/chunk-BNv3lrIs.js","assets/bundle-web-CobWMSw6.js","assets/dist-BCfLtl_t.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-qkae3Ky5.js","assets/chunk-BNv3lrIs.js","assets/bundle-web-D7Z9ISK8.js","assets/dist-Bivx-BVy.js"])))=>i.map(i=>d[i]);
2
2
  import{a as e,i as t,n,r,t as i}from"./chunk-BNv3lrIs.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 a=i((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=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)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),o=i(((e,t)=>{t.exports=a()})),s=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}}}})),c=i(((e,t)=>{t.exports=s()})),l=i((e=>{var t=o();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var 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`})),u=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=l()})),d=i((e=>{var t=c(),n=o(),r=u();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function 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 l(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 d(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 f(e){if(s(e)!==e)throw Error(i(188))}function p(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 f(a),e;if(o===r)return f(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 m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=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 ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function L(e){return{current:e}}function R(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function z(e,t){re++,ne[re]=e.current,e.current=t}var ie=L(null),ae=L(null),oe=L(null),se=L(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(ie),z(ie,e)}function le(){R(ie),R(ae),R(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Xd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(R(ie),R(ae)),se.current===e&&(R(se),op._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -53,26 +53,26 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
53
53
  .wrapper[data-active] {
54
54
  outline-color: inherit;
55
55
  }
56
- `,oT=typeof HTMLElement<`u`?HTMLElement:class{},sT=class extends oT{_isSelecting=!1;_pressDuration=iT;_isHovered=!1;_isSelectingState=!1;_wrapper;_pressTimer=null;_clickOutsideHandler=null;static get observedAttributes(){return[`is-selecting`,`press-duration`]}get isSelecting(){return this._isSelecting}set isSelecting(e){this._isSelecting=e,this._updateActiveState()}get pressDuration(){return this._pressDuration}set pressDuration(e){this._pressDuration=e}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=aT,e.appendChild(t);let n=document.createElement(`span`);n.className=`wrapper`,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`),n.appendChild(document.createElement(`slot`)),e.appendChild(n),this._wrapper=n,n.addEventListener(`mousedown`,()=>this._handleMouseDown()),n.addEventListener(`mouseup`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseleave`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseenter`,()=>this._handleMouseEnter()),n.addEventListener(`click`,e=>this._handleClick(e)),n.addEventListener(`touchstart`,()=>this._handleMouseDown()),n.addEventListener(`touchend`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`touchcancel`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`blur`,()=>this._handleBlur())}attributeChangedCallback(e,t,n){e===`is-selecting`?(this._isSelecting=n!==null,this._updateActiveState()):e===`press-duration`&&(this._pressDuration=n===null?iT:parseInt(n,10))}connectedCallback(){this._clickOutsideHandler=e=>{e.composedPath().includes(this)||(this._isSelectingState=!1,this._dispatch(`intlayer:click-outside`),this._updateActiveState())},document.addEventListener(`mousedown`,this._clickOutsideHandler)}disconnectedCallback(){this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),null),this._clearPressTimer()}_updateActiveState(){this._isSelecting||this._isSelectingState||this._isHovered?this._wrapper.setAttribute(`data-active`,``):this._wrapper.removeAttribute(`data-active`)}_clearPressTimer(){this._pressTimer!==null&&(clearTimeout(this._pressTimer),this._pressTimer=null)}_dispatch(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>{this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)},this._pressDuration)}_handleMouseEnter(){this._isHovered=!0,this._updateActiveState(),this._dispatch(`intlayer:hover`)}_handleMouseUpOrLeave(){this._isHovered&&(this._isHovered=!1,this._dispatch(`intlayer:unhover`)),this._clearPressTimer(),this._updateActiveState()}_handleClick(e){(this._isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},cT=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,sT),Iw(),zw(),rT())},lT=()=>({allowedOrigins:[b?.editorURL,b?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),uT=0,dT=()=>{uT++;let e=jw();if(e)return e;let t=new eT({mode:`client`,messenger:lT(),configuration:x});return Mw(t),cT(),t.start(),t},fT=()=>{uT=Math.max(0,uT-1),!(uT>0)&&(jw()?.stop(),Mw(null))},pT=(e,t,n)=>{let r=(0,_.c)(16),i=bw(),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,h.useState)(o),l=(0,h.useRef)(o),u=(0,h.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 Hw(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,g;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(g=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=g):g=r[11],(0,h.useEffect)(d,g);let v;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=v):v=r[12];let y=v,b;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{u.current?.postCurrentValue()},r[13]=b):b=r[13];let x=b,S;return r[14]===s?S=r[15]:(S=[s,y,x],r[14]=s,r[15]=S),S},mT=(e,t)=>pT(Ew.INTLAYER_URL_CHANGE,e,t),hT=()=>{let e=(0,_.c)(13),t=bw(),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,h.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,h.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},gT=()=>{let e=(0,_.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=hT(),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},_T=()=>{let e=(0,_.c)(3),t=bw(),[n,r]=(0,h.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,h.useEffect)(i,a),n},vT=(e,t,n)=>{for(let r of t)try{if(Kw(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},yT=()=>{let e=(0,_.c)(12),{localeDictionaries:t}=hT(),n=_T(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=Sw(),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=vT(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},bT=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,h.useRef)(null);i.current||=new eT({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,h.useEffect)(()=>(cT(),Mw(a),a.start(),()=>{a.stop(),Mw(null)}),[a]),(0,w.jsx)(yw,{manager:a,children:e})},xT=(0,h.createContext)(void 0),ST=()=>{let e=(0,_.c)(4),t=bw(),n=(0,h.useContext)(xT),[r,i]=(0,h.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,h.useEffect)(a,o),r??n},CT=()=>{let e=(0,_.c)(23),t=bw(),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},wT=()=>{let e=(0,_.c)(6),t=bw(),[n,r]=(0,h.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,h.useEffect)(i,a);let o=CT(),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},TT=()=>{let e=(0,_.c)(5),t=bw(),[n,r]=(0,h.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,h.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},ET=()=>{let e=(0,_.c)(2),t=bw(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},DT=(e,t,n)=>{let r=(0,_.c)(11),i=bw(),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,h.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},OT=()=>{DT(Ew.INTLAYER_IFRAME_CLICKED,Dw)},kT=e=>{let t=(0,_.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Kw(i,n,_T());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,l=s??r,u;t[1]!==n||t[2]!==o?(u=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=u):u=t[3];let d;return t[4]!==n||t[5]!==a?(d=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=d):d=t[6],(0,w.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,w.jsx)(_w,{value:l,onChange:d})})},AT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!$T.includes(e)).map(r=>{let i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(eE,{...e,key:r,keyPath:a,section:o})]})})})},jT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!$T.includes(e)).map(r=>{let i={type:O,key:r},a=[...t,i],o=n[O][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(eE,{...e,key:r,keyPath:a,section:o})]})})})},MT=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,h.useState)(!1),l=(0,h.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,h.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,h.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,w.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,w.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,w.jsx)(nw,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:gf,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,w.jsx)(nw,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Vf,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,w.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,w.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,w.jsx)(nw,{label:`Edit`,Icon:Pf,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},NT=(...e)=>e.filter(Boolean).join(` `),PT=nf([`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`}}),FT=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,w.jsx)(`input`,{className:NT(PT({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),IT=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,w.jsx)(`textarea`,{className:W(`resize-none`,PT({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),LT=24,RT=12,zT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,h.useRef)(null);(0,h.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=LT*r+RT,s=LT+RT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,h.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,w.jsx)(IT,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...a})},BT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(MT,{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,w.jsx)(zT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},VT=e=>{let t=(0,_.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=_T(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??Kw(i,n,l),t[0]=l,t[1]=i,t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=u;if(d&&typeof d!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let f=n.length,p=String(d??r),m;if(t[6]!==p||t[7]!==n||t[8]!==f||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],m=(0,w.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,w.jsx)(BT,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:HT})}),t[6]=p,t[7]=n,t[8]=f,t[9]=o,t[10]=s,t[11]=c,t[12]=m}else m=t[12];return m};function HT(){return null}var UT=e=>{let t=(0,_.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=wT(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=Kw(e.editedContent,n),s=r[j],{content:c}=r,l=[...n,{type:j}],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,w.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,w.jsx)(VT,{...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},WT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:I}],i=n[I];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(eE,{...e,keyPath:r,section:i})})},GT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:A}],i=n[A];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(eE,{...e,keyPath:r,section:i})})},KT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:F}],i=n[F];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(eE,{...e,keyPath:r,section:i})})},qT=(0,h.memo)(e=>{let t=(0,_.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(JT),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:M},o=[...n,i],c=lr(o,s);return(0,w.jsx)(aw,{level:n.length,title:pr(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,w.jsx)(eE,{...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 JT(e){return!$T.includes(e)}var YT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(MT,{value:(0,h.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,w.jsx)(FT,{ref:i,...r})})},XT=e=>{let t=(0,_.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=_T(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=Kw(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let l=c;if(l!==void 0&&typeof l!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let u=n.length,d=String(l??r),f;if(t[5]!==d||t[6]!==n||t[7]!==u||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],f=(0,w.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,w.jsx)(YT,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:ZT})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function ZT(){return null}var QT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:D,key:r},a=[...t,i],o=n[D][r];return(0,w.jsx)(eE,{...e,keyPath:a,section:o})},$T=[`filePath`,`id`,`nodeType`],eE=(0,h.memo)(e=>{let t=_T(),n=(0,h.useMemo)(()=>Kw(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,h.useMemo)(()=>Qw(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,w.jsx)(KT,{...e,section:n}):r===`html`?(0,w.jsx)(WT,{...e,section:n}):r===`translation`?(0,w.jsx)(QT,{...e,section:n}):r===`enumeration`?(0,w.jsx)(jT,{...e,section:n}):r===`condition`?(0,w.jsx)(AT,{...e,section:n}):r===`insertion`?(0,w.jsx)(GT,{...e,section:n}):r===`array`?(0,w.jsx)(ow,{...e,section:n}):r===`file`?(0,w.jsx)(UT,{...e,section:n}):(0,w.jsx)(qT,{...e,section:n});if(typeof n==`string`)return(0,w.jsx)(VT,{...e,section:n});if(typeof n==`number`)return(0,w.jsx)(XT,{...e,section:n});if(typeof n==`boolean`)return(0,w.jsx)(kT,{...e,section:n})}),tE=e=>{let t=(0,_.c)(6),{dictionary:n,...r}=e,i=_T(),{editedContent:a,addEditedContent:o}=wT(),{focusedContent:s,setFocusedContentKeyPath:c}=yT(),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,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,h.createElement)(eE,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},nE={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`]},rE=(e,t)=>{let n=(0,_.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,h.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,h.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},iE=(0,h.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),aE=()=>(0,h.useContext)(iE),oE=e=>{let t=(0,_.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=vr(),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]=rE(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,w.jsx)(iE,{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},sE=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,h.useState)(n),[u,d]=(0,h.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(cE)},t[0]=n,t[1]=p);let m=p,g;t[2]!==c||t[3]!==r?(g=()=>{r(c)},t[2]=c,t[3]=r,t[4]=g):g=t[4];let v=g,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{l(e.currentTarget.value)},t[5]=y):y=t[5];let b=y,x=e=>{e.key===`Enter`&&!i&&T?(e.preventDefault(),v()):e.key===`Escape`&&(e.preventDefault(),m())},S,C;t[6]===n?(S=t[7],C=t[8]):(S=()=>{l(n),d(lE)},C=[n],t[6]=n,t[7]=S,t[8]=C),(0,h.useEffect)(S,C);let T=a?.(c)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,w.jsx)(FT,{onChange:b,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!T,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,w.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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(nw,{Icon:gf,label:`Save changes${T?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!T,onClick:v,"aria-describedby":T?void 0:`validation-error`}),(0,w.jsx)(nw,{Icon:Vf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function cE(e){return e+1}function lE(e){return e+1}var uE={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},dE=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),fE=e=>e.reduce((e,t)=>{let n=e??{},r=dE(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=fE([uE,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=fE([uE.headers,...t.map(e=>e.headers)]),s=fE(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=fE(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()},pE=(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(`
57
- `);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})}},mE=(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(`
58
- `);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`})}},hE=(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}})}},gE=(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`})}},_E=(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})}},vE=(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}})}},yE=(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}}})}},bE=(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`})}},xE=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}})}},SE=(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`})}},CE=(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`})}},wE=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},TE=(e={},t=x)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},EE=(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`})}},DE=(e={},t)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},OE=(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)}`}},kE=(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 AE(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 jE(e,t,n=`.`,r){if(!AE(t))return jE(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]]:AE(a)&&AE(i[t])?i[t]=jE(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function ME(e){return(...t)=>t.reduce((t,n)=>jE(t,n,``,e),{})}var NE=ME(),PE=(e={},t)=>{let n=NE(t??{},x);return{organization:SE(e,n),project:CE(e,n),user:OE(e,n),oAuth:xE(n),dictionary:gE(e,n),stripe:TE(e,n),ai:pE(e,n),audit:mE(e,n),tag:EE(e,n),search:wE(e,n),editor:_E(e,n),newsletter:bE(e,n),github:vE(e,n),gitlab:yE(e,n),bitbucket:hE(e,n),showcaseProject:kE(e,n),translate:DE(e,n)}},FE=e=>{let t=(0,_.c)(7),n=NE(e,ST(),x),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=xE(n),a=!!(n.editor.clientId&&n.editor.clientSecret),o;t[1]!==r||t[2]!==i.getOAuth2AccessToken||t[3]!==a?(o={queryKey:r,queryFn:i.getOAuth2AccessToken,enabled:a,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[1]=r,t[2]=i.getOAuth2AccessToken,t[3]=a,t[4]=o):o=t[4];let{data:s}=Cc(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function IE(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var LE=IE({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`}),RE=`1.6.9`;function zE(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 BE(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 VE(){return HE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var HE={stubThis:e=>e};function UE(e){let{id:t}=e;return{...e,id:BE(t),transports:e.transports}}function WE(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 GE=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 KE({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 GE({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 GE({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 GE({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 GE({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 GE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new GE({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 GE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new GE({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(!WE(t))return new GE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new GE({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 GE({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 GE({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 qE=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}}},JE=[`cross-platform`,`platform`];function YE(e){if(e&&!(JE.indexOf(e)<0))return e}async function XE(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(!VE())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:BE(t.challenge),user:{...t.user,id:BE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(UE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=qE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw KE({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){ZE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=zE(e))}catch(e){ZE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=zE(c.getAuthenticatorData())}catch(e){ZE(`getAuthenticatorData()`,e)}return{id:o,rawId:zE(s),response:{attestationObject:zE(c.attestationObject),clientDataJSON:zE(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:YE(a.authenticatorAttachment)}}function ZE(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 QE(){if(!VE())return $E.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?$E.stubThis(new Promise(e=>e(!1))):$E.stubThis(e.isConditionalMediationAvailable())}var $E={stubThis:e=>e};function eD({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 GE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new GE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!WE(t))return new GE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new GE({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 GE({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 tD(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(!VE())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(UE));let a={...t,challenge:BE(t.challenge),allowCredentials:i},o={};if(n){if(!await QE())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=qE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw eD({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=zE(u.userHandle)),{id:c,rawId:zE(l),response:{authenticatorData:zE(u.authenticatorData),clientDataJSON:zE(u.clientDataJSON),signature:zE(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:YE(s.authenticatorAttachment)}}var nD=`1.6.9`,rD=Symbol.for(`better-auth:broadcast-channel`),iD=()=>Math.floor(Date.now()/1e3),aD=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:iD()}))}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 oD(e=`better-auth.message`){return globalThis[rD]||(globalThis[rD]=new aD(e)),globalThis[rD]}var sD=Symbol.for(`better-auth:focus-manager`),cD=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 lD(){return globalThis[sD]||(globalThis[sD]=new cD),globalThis[sD]}var uD=Symbol.for(`better-auth:online-manager`),dD=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 fD(){return globalThis[uD]||(globalThis[uD]=new dD),globalThis[uD]}var pD={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*:/},mD=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,hD={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},gD=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function _D(e){return e instanceof Date&&!isNaN(e.getTime())}function vD(e){let t=gD.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 _D(f)?f:null}function yD(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 hD)return hD[s];if(!mD.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(pD).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=vD(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function bD(e,t={strict:!0}){return yD(e,t)}var xD=[],SD=0,CD=4,wD=0,TD=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=SD+CD;t<xD.length;)xD[t]===e?xD.splice(t,CD):t+=CD;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){wD++;let i=!xD.length;for(let i of t)xD.push(i,n.value,e,r);if(i){for(SD=0;SD<xD.length;SD+=CD)xD[SD](xD[SD+1],xD[SD+2],xD[SD+3]);xD.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},ED=5,DD=6,OD=10,kD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+OD]||(e.events[n+OD]=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+OD](),delete e.events[n+OD])}),AD=1e3,jD=(e,t)=>kD(e,n=>{let r=t(n);r&&e.events[DD].push(r)},ED,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[DD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[DD])t();e.events[DD]=[]}},AD)},()=>{e.listen=n,e.off=r}}),MD=()=>typeof window>`u`,ND=(e,t,n,r)=>{let i=TD({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()=>{MD()||(o?await a():jD(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},PD=()=>Math.floor(Date.now()/1e3);function FD(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var ID=5;function LD(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||fD().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=PD(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=PD(),r(`/get-session`).then(async e=>{let{data:a,error:o}=FD(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=FD(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=PD(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(PD()-c.lastSessionRequest<ID)return;c.lastSessionRequest=PD()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=PD(),n.set(!n.get()))},d=e=>{oD().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=oD().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=lD().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=fD().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),oD().setup(),lD().setup(),fD().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 RD=Object.create(null),zD=e=>({}),BD=new Proxy(RD,{get(e,t){return zD()[t]??RD[t]},has(e,t){return t in zD()||t in RD},set(e,t,n){let r=zD(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=zD(!0);return delete n[t],!0},ownKeys(){let e=zD(!0);return Object.keys(e)}});function VD(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 VD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return VD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return VD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return VD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return VD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return VD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return VD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function HD(){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 UD(e){let t=e.split(`
56
+ `,oT=typeof HTMLElement<`u`?HTMLElement:class{},sT=class extends oT{_isSelecting=!1;_pressDuration=iT;_isHovered=!1;_isSelectingState=!1;_wrapper;_pressTimer=null;_clickOutsideHandler=null;static get observedAttributes(){return[`is-selecting`,`press-duration`]}get isSelecting(){return this._isSelecting}set isSelecting(e){this._isSelecting=e,this._updateActiveState()}get pressDuration(){return this._pressDuration}set pressDuration(e){this._pressDuration=e}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=aT,e.appendChild(t);let n=document.createElement(`span`);n.className=`wrapper`,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`),n.appendChild(document.createElement(`slot`)),e.appendChild(n),this._wrapper=n,n.addEventListener(`mousedown`,()=>this._handleMouseDown()),n.addEventListener(`mouseup`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseleave`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseenter`,()=>this._handleMouseEnter()),n.addEventListener(`click`,e=>this._handleClick(e)),n.addEventListener(`touchstart`,()=>this._handleMouseDown()),n.addEventListener(`touchend`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`touchcancel`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`blur`,()=>this._handleBlur())}attributeChangedCallback(e,t,n){e===`is-selecting`?(this._isSelecting=n!==null,this._updateActiveState()):e===`press-duration`&&(this._pressDuration=n===null?iT:parseInt(n,10))}connectedCallback(){this._clickOutsideHandler=e=>{e.composedPath().includes(this)||(this._isSelectingState=!1,this._dispatch(`intlayer:click-outside`),this._updateActiveState())},document.addEventListener(`mousedown`,this._clickOutsideHandler)}disconnectedCallback(){this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),null),this._clearPressTimer()}_updateActiveState(){this._isSelecting||this._isSelectingState||this._isHovered?this._wrapper.setAttribute(`data-active`,``):this._wrapper.removeAttribute(`data-active`)}_clearPressTimer(){this._pressTimer!==null&&(clearTimeout(this._pressTimer),this._pressTimer=null)}_dispatch(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>{this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)},this._pressDuration)}_handleMouseEnter(){this._isHovered=!0,this._updateActiveState(),this._dispatch(`intlayer:hover`)}_handleMouseUpOrLeave(){this._isHovered&&(this._isHovered=!1,this._dispatch(`intlayer:unhover`)),this._clearPressTimer(),this._updateActiveState()}_handleClick(e){(this._isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},cT=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,sT),Iw(),zw(),rT())},lT=()=>({allowedOrigins:[b?.editorURL,b?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),uT=0,dT=()=>{uT++;let e=jw();if(e)return e;let t=new eT({mode:`client`,messenger:lT(),configuration:x});return Mw(t),cT(),t.start(),t},fT=()=>{uT=Math.max(0,uT-1),!(uT>0)&&(jw()?.stop(),Mw(null))},pT=(e,t,n)=>{let r=(0,_.c)(16),i=bw(),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,h.useState)(o),l=(0,h.useRef)(o),u=(0,h.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 Hw(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,g;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(g=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=g):g=r[11],(0,h.useEffect)(d,g);let v;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=v):v=r[12];let y=v,b;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{u.current?.postCurrentValue()},r[13]=b):b=r[13];let x=b,S;return r[14]===s?S=r[15]:(S=[s,y,x],r[14]=s,r[15]=S),S},mT=(e,t)=>pT(Ew.INTLAYER_URL_CHANGE,e,t),hT=()=>{let e=(0,_.c)(13),t=bw(),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,h.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,h.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},gT=()=>{let e=(0,_.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=hT(),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},_T=()=>{let e=(0,_.c)(3),t=bw(),[n,r]=(0,h.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,h.useEffect)(i,a),n},vT=(e,t,n)=>{for(let r of t)try{if(Kw(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},yT=()=>{let e=(0,_.c)(12),{localeDictionaries:t}=hT(),n=_T(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=Sw(),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=vT(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},bT=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,h.useRef)(null);i.current||=new eT({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,h.useEffect)(()=>(cT(),Mw(a),a.start(),()=>{a.stop(),Mw(null)}),[a]),(0,w.jsx)(yw,{manager:a,children:e})},xT=(0,h.createContext)(void 0),ST=()=>{let e=(0,_.c)(4),t=bw(),n=(0,h.useContext)(xT),[r,i]=(0,h.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,h.useEffect)(a,o),r??n},CT=()=>{let e=(0,_.c)(23),t=bw(),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},wT=()=>{let e=(0,_.c)(6),t=bw(),[n,r]=(0,h.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,h.useEffect)(i,a);let o=CT(),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},TT=()=>{let e=(0,_.c)(5),t=bw(),[n,r]=(0,h.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,h.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},ET=()=>{let e=(0,_.c)(2),t=bw(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},DT=(e,t,n)=>{let r=(0,_.c)(11),i=bw(),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,h.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},OT=()=>{DT(Ew.INTLAYER_IFRAME_CLICKED,Dw)},kT=e=>{let t=(0,_.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Kw(i,n,_T());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,l=s??r,u;t[1]!==n||t[2]!==o?(u=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=u):u=t[3];let d;return t[4]!==n||t[5]!==a?(d=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=d):d=t[6],(0,w.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,w.jsx)(_w,{value:l,onChange:d})})},AT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!$T.includes(e)).map(r=>{let i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(eE,{...e,key:r,keyPath:a,section:o})]})})})},jT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!$T.includes(e)).map(r=>{let i={type:O,key:r},a=[...t,i],o=n[O][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(eE,{...e,key:r,keyPath:a,section:o})]})})})},MT=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,h.useState)(!1),l=(0,h.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,h.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,h.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,w.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,w.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,w.jsx)(nw,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:gf,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,w.jsx)(nw,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Vf,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,w.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,w.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,w.jsx)(nw,{label:`Edit`,Icon:Pf,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},NT=(...e)=>e.filter(Boolean).join(` `),PT=nf([`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`}}),FT=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,w.jsx)(`input`,{className:NT(PT({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),IT=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,w.jsx)(`textarea`,{className:W(`resize-none`,PT({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),LT=24,RT=12,zT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,h.useRef)(null);(0,h.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=LT*r+RT,s=LT+RT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,h.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,w.jsx)(IT,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...a})},BT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(MT,{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,w.jsx)(zT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},VT=e=>{let t=(0,_.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=_T(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??Kw(i,n,l),t[0]=l,t[1]=i,t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=u;if(d&&typeof d!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let f=n.length,p=String(d??r),m;if(t[6]!==p||t[7]!==n||t[8]!==f||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],m=(0,w.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,w.jsx)(BT,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:HT})}),t[6]=p,t[7]=n,t[8]=f,t[9]=o,t[10]=s,t[11]=c,t[12]=m}else m=t[12];return m};function HT(){return null}var UT=e=>{let t=(0,_.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=wT(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=Kw(e.editedContent,n),s=r[j],{content:c}=r,l=[...n,{type:j}],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,w.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,w.jsx)(VT,{...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},WT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:I}],i=n[I];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(eE,{...e,keyPath:r,section:i})})},GT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:A}],i=n[A];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(eE,{...e,keyPath:r,section:i})})},KT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:F}],i=n[F];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(eE,{...e,keyPath:r,section:i})})},qT=(0,h.memo)(e=>{let t=(0,_.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(JT),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:M},o=[...n,i],c=lr(o,s);return(0,w.jsx)(aw,{level:n.length,title:pr(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,w.jsx)(eE,{...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 JT(e){return!$T.includes(e)}var YT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(MT,{value:(0,h.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,w.jsx)(FT,{ref:i,...r})})},XT=e=>{let t=(0,_.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=_T(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=Kw(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let l=c;if(l!==void 0&&typeof l!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let u=n.length,d=String(l??r),f;if(t[5]!==d||t[6]!==n||t[7]!==u||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],f=(0,w.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,w.jsx)(YT,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:ZT})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function ZT(){return null}var QT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:D,key:r},a=[...t,i],o=n[D][r];return(0,w.jsx)(eE,{...e,keyPath:a,section:o})},$T=[`filePath`,`id`,`nodeType`],eE=(0,h.memo)(e=>{let t=_T(),n=(0,h.useMemo)(()=>Kw(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,h.useMemo)(()=>Qw(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,w.jsx)(KT,{...e,section:n}):r===`html`?(0,w.jsx)(WT,{...e,section:n}):r===`translation`?(0,w.jsx)(QT,{...e,section:n}):r===`enumeration`?(0,w.jsx)(jT,{...e,section:n}):r===`condition`?(0,w.jsx)(AT,{...e,section:n}):r===`insertion`?(0,w.jsx)(GT,{...e,section:n}):r===`array`?(0,w.jsx)(ow,{...e,section:n}):r===`file`?(0,w.jsx)(UT,{...e,section:n}):(0,w.jsx)(qT,{...e,section:n});if(typeof n==`string`)return(0,w.jsx)(VT,{...e,section:n});if(typeof n==`number`)return(0,w.jsx)(XT,{...e,section:n});if(typeof n==`boolean`)return(0,w.jsx)(kT,{...e,section:n})}),tE=e=>{let t=(0,_.c)(6),{dictionary:n,...r}=e,i=_T(),{editedContent:a,addEditedContent:o}=wT(),{focusedContent:s,setFocusedContentKeyPath:c}=yT(),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,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,h.createElement)(eE,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},nE={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`]},rE={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},iE=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),aE=e=>e.reduce((e,t)=>{let n=e??{},r=iE(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=aE([rE,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=aE([rE.headers,...t.map(e=>e.headers)]),s=aE(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=aE(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()},oE=(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(`
57
+ `);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})}},sE=(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(`
58
+ `);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`})}},cE=(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}})}},lE=(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`})}},uE=(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})}},dE=(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}})}},fE=(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}}})}},pE=(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`})}},mE=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}})}},hE=(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`})}},gE=(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`})}},_E=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},vE=(e={},t=x)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},yE=(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`})}},bE=(e={},t)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},xE=(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)}`}},SE=(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 CE(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 wE(e,t,n=`.`,r){if(!CE(t))return wE(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]]:CE(a)&&CE(i[t])?i[t]=wE(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function TE(e){return(...t)=>t.reduce((t,n)=>wE(t,n,``,e),{})}var EE=TE(),DE=(e={},t)=>{let n=EE(t??{},x);return{organization:hE(e,n),project:gE(e,n),user:xE(e,n),oAuth:mE(n),dictionary:lE(e,n),stripe:vE(e,n),ai:oE(e,n),audit:sE(e,n),tag:yE(e,n),search:_E(e,n),editor:uE(e,n),newsletter:pE(e,n),github:dE(e,n),gitlab:fE(e,n),bitbucket:cE(e,n),showcaseProject:SE(e,n),translate:bE(e,n)}},OE=e=>{let t=(0,_.c)(7),n=EE(e,ST(),x),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=mE(n),a=!!(n.editor.clientId&&n.editor.clientSecret),o;t[1]!==r||t[2]!==i.getOAuth2AccessToken||t[3]!==a?(o={queryKey:r,queryFn:i.getOAuth2AccessToken,enabled:a,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[1]=r,t[2]=i.getOAuth2AccessToken,t[3]=a,t[4]=o):o=t[4];let{data:s}=Cc(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function kE(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var AE=kE({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`}),jE=`1.6.9`;function ME(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 NE(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 PE(){return FE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var FE={stubThis:e=>e};function IE(e){let{id:t}=e;return{...e,id:NE(t),transports:e.transports}}function LE(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 RE=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 zE({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 RE({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 RE({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 RE({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 RE({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 RE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new RE({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 RE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new RE({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(!LE(t))return new RE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new RE({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 RE({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 RE({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 BE=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}}},VE=[`cross-platform`,`platform`];function HE(e){if(e&&!(VE.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(!PE())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:NE(t.challenge),user:{...t.user,id:NE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(IE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=BE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw zE({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){WE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=ME(e))}catch(e){WE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=ME(c.getAuthenticatorData())}catch(e){WE(`getAuthenticatorData()`,e)}return{id:o,rawId:ME(s),response:{attestationObject:ME(c.attestationObject),clientDataJSON:ME(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:HE(a.authenticatorAttachment)}}function WE(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 GE(){if(!PE())return KE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?KE.stubThis(new Promise(e=>e(!1))):KE.stubThis(e.isConditionalMediationAvailable())}var KE={stubThis:e=>e};function qE({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 RE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new RE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!LE(t))return new RE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new RE({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 RE({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 JE(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(!PE())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(IE));let a={...t,challenge:NE(t.challenge),allowCredentials:i},o={};if(n){if(!await GE())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=BE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw qE({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=ME(u.userHandle)),{id:c,rawId:ME(l),response:{authenticatorData:ME(u.authenticatorData),clientDataJSON:ME(u.clientDataJSON),signature:ME(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:HE(s.authenticatorAttachment)}}var YE=`1.6.9`,XE=Symbol.for(`better-auth:broadcast-channel`),ZE=()=>Math.floor(Date.now()/1e3),QE=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:ZE()}))}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 $E(e=`better-auth.message`){return globalThis[XE]||(globalThis[XE]=new QE(e)),globalThis[XE]}var eD=Symbol.for(`better-auth:focus-manager`),tD=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 nD(){return globalThis[eD]||(globalThis[eD]=new tD),globalThis[eD]}var rD=Symbol.for(`better-auth:online-manager`),iD=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 aD(){return globalThis[rD]||(globalThis[rD]=new iD),globalThis[rD]}var oD={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*:/},sD=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,cD={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},lD=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function uD(e){return e instanceof Date&&!isNaN(e.getTime())}function dD(e){let t=lD.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 uD(f)?f:null}function fD(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 cD)return cD[s];if(!sD.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(oD).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=dD(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function pD(e,t={strict:!0}){return fD(e,t)}var mD=[],hD=0,gD=4,_D=0,vD=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=hD+gD;t<mD.length;)mD[t]===e?mD.splice(t,gD):t+=gD;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){_D++;let i=!mD.length;for(let i of t)mD.push(i,n.value,e,r);if(i){for(hD=0;hD<mD.length;hD+=gD)mD[hD](mD[hD+1],mD[hD+2],mD[hD+3]);mD.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},yD=5,bD=6,xD=10,SD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+xD]||(e.events[n+xD]=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+xD](),delete e.events[n+xD])}),CD=1e3,wD=(e,t)=>SD(e,n=>{let r=t(n);r&&e.events[bD].push(r)},yD,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[bD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[bD])t();e.events[bD]=[]}},CD)},()=>{e.listen=n,e.off=r}}),TD=()=>typeof window>`u`,ED=(e,t,n,r)=>{let i=vD({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()=>{TD()||(o?await a():wD(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},DD=()=>Math.floor(Date.now()/1e3);function OD(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var kD=5;function AD(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||aD().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=DD(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=DD(),r(`/get-session`).then(async e=>{let{data:a,error:o}=OD(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=OD(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=DD(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(DD()-c.lastSessionRequest<kD)return;c.lastSessionRequest=DD()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=DD(),n.set(!n.get()))},d=e=>{$E().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=$E().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=nD().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=aD().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),$E().setup(),nD().setup(),aD().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 jD=Object.create(null),MD=e=>({}),ND=new Proxy(jD,{get(e,t){return MD()[t]??jD[t]},has(e,t){return t in MD()||t in jD},set(e,t,n){let r=MD(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=MD(!0);return delete n[t],!0},ownKeys(){let e=MD(!0);return Object.keys(e)}});function PD(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 PD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return PD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return PD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return PD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return PD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return PD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return PD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function FD(){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 ID(e){let t=e.split(`
59
59
  at `);return t.length<=1?e:(t.splice(1,1),t.join(`
60
- at `))}function WD(e,t){class n extends e{#e;constructor(...e){if(HD()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=UD(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 GD={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};WD(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:GD[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 KD=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function qD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new KD(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function JD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new KD(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof KD?t:new KD(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function YD(e,t=`/api/auth`){if(JD(e),qD(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function XD(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 ZD(e,t,n,r,i){if(e)return YD(e,t);if(r!==!1){let e=BD.BETTER_AUTH_URL||BD.NEXT_PUBLIC_BETTER_AUTH_URL||BD.PUBLIC_BETTER_AUTH_URL||BD.NUXT_PUBLIC_BETTER_AUTH_URL||BD.NUXT_PUBLIC_AUTH_URL||(BD.BASE_URL===`/`?void 0:BD.BASE_URL);if(e)return YD(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&XD(o,`proto`)&&XD(a,`host`))try{return YD(`${o}://${a}`,t)}catch{}if(n){let e=QD(n.url);if(!e)throw new KD(`Could not get origin from request. Please provide a valid base URL.`);return YD(e,t)}if(typeof window<`u`&&window.location)return YD(window.location.origin,t)}function QD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var $D={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 eO(e,t){let n=TD(!1),r=ND(n,`/get-session`,e,{method:`GET`}),i=()=>{};return jD(r,()=>{let a=LD({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}var tO=Object.defineProperty,nO=Object.defineProperties,rO=Object.getOwnPropertyDescriptors,iO=Object.getOwnPropertySymbols,aO=Object.prototype.hasOwnProperty,oO=Object.prototype.propertyIsEnumerable,sO=(e,t,n)=>t in e?tO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cO=(e,t)=>{for(var n in t||={})aO.call(t,n)&&sO(e,n,t[n]);if(iO)for(var n of iO(t))oO.call(t,n)&&sO(e,n,t[n]);return e},lO=(e,t)=>nO(e,rO(t)),uO=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)}},dO=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}},fO=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}},pO=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 mO(e){if(typeof e==`number`)return new fO({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new fO(e);case`exponential`:return new pO(e);default:throw Error(`Invalid retry strategy`)}}var hO=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},gO=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function _O(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 gO.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function vO(e){try{return JSON.parse(e),!0}catch{return!1}}function yO(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 bO(e){try{return JSON.parse(e)}catch{return e}}function xO(e){return typeof e==`function`}function SO(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&xO(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&xO(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function CO(e){let t=new Headers(e?.headers),n=await hO(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=wO(e?.body);n&&t.set(`content-type`,n)}return t}function wO(e){return yO(e)?`application/json`:null}function TO(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(yO(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`&&yO(e.body)?new URLSearchParams(e.body).toString():e.body}function EO(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return AO.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function DO(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var OO=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function kO(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new OO(n.issues);return n.value}var AO=[`get`,`post`,`put`,`patch`,`delete`],jO=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=lO(cO({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=lO(cO({},e),{body:i.input?await kO(i.input,n?.body):n?.body,params:i.params?await kO(i.params,n?.params):n?.params,query:i.query?await kO(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),MO=e=>{async function t(t,n){let r=lO(cO(cO({},e),n),{plugins:[...e?.plugins||[],jO(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await PO(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 PO(t,r)}return t};function NO(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];AO.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 PO=async(e,t)=>{let{hooks:n,url:r,options:i}=await dO(e,t),a=SO(i),o=new AbortController,s=i.signal??o.signal,c=NO(r,i),l=TO(i),u=await CO(i),d=EO(r,i),f=lO(cO({},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}=DO(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(lO(cO({},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=_O(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??bO)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await kO(f.output,r.data));for(let e of n.onSuccess)e&&await e(lO(cO({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??bO,_=await m.text(),v=vO(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:lO(cO({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(lO(cO({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=mO(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 PO(e,lO(cO({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new uO(m.status,m.statusText,v?y:_);return{data:null,error:lO(cO({},y),{status:m.status,statusText:m.statusText})}},FO=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{}}},IO=(e,t)=>{let n=`credentials`in Request.prototype,r=ZD(e?.baseURL,e?.basePath,void 0,t)??FO(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=MO({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?bD(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[$D],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=eO(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=NE(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function LO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function RO(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 zO(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`||LO(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=RO(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 BO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function VO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=IO(e),s={};for(let[e,t]of Object.entries(r))s[`use${BO(e)}`]=t;return zO({...n,...s,$fetch:i,$store:o},i,t,r,a)}var HO=(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 tD({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:LE.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 XE({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 GE?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:LE.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:LE.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:LE.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),UO=()=>{let e=TD();return{id:`passkey`,version:RE,$InferServerPlugin:{},getActions:(t,n)=>HO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:ND(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:LE}},WO=`1.6.9`,GO=e=>({id:`sso-client`,version:WO,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),KO=()=>({id:`magic-link`,version:nD,$InferServerPlugin:{}}),qO=IE({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`}),JO=e=>({id:`two-factor`,version:nD,$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:qO}),YO=e=>VO({baseURL:e,withCredentials:!0,plugins:[JO({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}}),UO(),KO(),GO()]}),XO=e=>{let t=e?.editor?.backendURL??x?.editor?.backendURL;t||(t=Un,console.dir({intlayerConfig:e,configuration:x},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=YO(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})}},ZO=(e,t)=>{let n=(0,_.c)(14),r=ST(),i=t??r??x,a=sc(),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 XO(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=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 v=g,y;return n[10]!==v||n[11]!==p||n[12]!==h?(y={session:p,fetchSession:v,revalidateSession:v,setSession:h},n[10]=v,n[11]=p,n[12]=h,n[13]=y):y=n[13],y},QO=e=>{let t=(0,_.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}=ZO(r,i),{oAuth2AccessToken:l}=FE(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,_.c)(5),n=ST(),{oAuth2AccessToken:r}=QO(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=PE({...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},ek=e=>{let t=(0,_.c)(2),n=ST(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=XO(r),t[0]=r,t[1]=i),i},tk=e=>{let t=(0,_.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=ST(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=QO(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},nk=e=>{let t=(0,_.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}=tk(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)},rk=()=>{let e=(0,_.c)(6),t=ek(),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),wc(a)},ik=(e,t)=>{let n=(0,_.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],nk(o)},ak=()=>{let e=(0,_.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),wc(a)},ok=()=>{let e=(0,_.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),wc(a)},sk=(e,t)=>{let n=(0,_.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],nk(o)},ck=()=>{let e=(0,_.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),wc(r)},lk=()=>{let e=(0,_.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),wc(r)},uk=()=>{let e=(0,_.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)},dk=()=>{let e=(0,_.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),wc(r)},fk=`​`,pk=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(fk).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===fk?``:t.split(fk).join(``)}).join(`
61
- `)},mk=e=>{let t=e.split(`
62
- `);return t.length===0?[``]:t},hk=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),gk=(e,t)=>{if(t<=0)return 0;if(hk){let n=[...hk.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},_k=(e,t)=>{if(t>=e.length)return e.length;if(hk){let n=[...hk.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},vk=(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},yk=(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},bk=(e,t)=>e.slice(0,t).lastIndexOf(`
63
- `)+1,xk=(e,t)=>{let n=e.indexOf(`
64
- `,t);return n===-1?e.length:n},Sk=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,h.useState)(()=>mk(i)),s=(0,h.useRef)(null),c=(0,h.useRef)(null),l=e!==void 0,u=(0,h.useRef)(a);u.current=a,(0,h.useEffect)(()=>{l&&e!==void 0&&o(mk(e))},[e,l]);let d=()=>u.current.join(`
60
+ at `))}function LD(e,t){class n extends e{#e;constructor(...e){if(FD()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=ID(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 RD={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};LD(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:RD[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 zD=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function BD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new zD(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function VD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new zD(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof zD?t:new zD(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function HD(e,t=`/api/auth`){if(VD(e),BD(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 WD(e,t,n,r,i){if(e)return HD(e,t);if(r!==!1){let e=ND.BETTER_AUTH_URL||ND.NEXT_PUBLIC_BETTER_AUTH_URL||ND.PUBLIC_BETTER_AUTH_URL||ND.NUXT_PUBLIC_BETTER_AUTH_URL||ND.NUXT_PUBLIC_AUTH_URL||(ND.BASE_URL===`/`?void 0:ND.BASE_URL);if(e)return HD(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 HD(`${o}://${a}`,t)}catch{}if(n){let e=GD(n.url);if(!e)throw new zD(`Could not get origin from request. Please provide a valid base URL.`);return HD(e,t)}if(typeof window<`u`&&window.location)return HD(window.location.origin,t)}function GD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var KD={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 qD(e,t){let n=vD(!1),r=ED(n,`/get-session`,e,{method:`GET`}),i=()=>{};return wD(r,()=>{let a=AD({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}var JD=Object.defineProperty,YD=Object.defineProperties,XD=Object.getOwnPropertyDescriptors,ZD=Object.getOwnPropertySymbols,QD=Object.prototype.hasOwnProperty,$D=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||={})QD.call(t,n)&&eO(e,n,t[n]);if(ZD)for(var n of ZD(t))$D.call(t,n)&&eO(e,n,t[n]);return e},nO=(e,t)=>YD(e,XD(t)),rO=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)}},iO=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}},aO=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}},oO=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 sO(e){if(typeof e==`number`)return new aO({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new aO(e);case`exponential`:return new oO(e);default:throw Error(`Invalid retry strategy`)}}var cO=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},lO=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function uO(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 lO.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function dO(e){try{return JSON.parse(e),!0}catch{return!1}}function fO(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 pO(e){try{return JSON.parse(e)}catch{return e}}function mO(e){return typeof e==`function`}function hO(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&mO(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&mO(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function gO(e){let t=new Headers(e?.headers),n=await cO(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=_O(e?.body);n&&t.set(`content-type`,n)}return t}function _O(e){return fO(e)?`application/json`:null}function vO(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(fO(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`&&fO(e.body)?new URLSearchParams(e.body).toString():e.body}function yO(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return CO.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function bO(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var xO=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function SO(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new xO(n.issues);return n.value}var CO=[`get`,`post`,`put`,`patch`,`delete`],wO=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=nO(tO({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=nO(tO({},e),{body:i.input?await SO(i.input,n?.body):n?.body,params:i.params?await SO(i.params,n?.params):n?.params,query:i.query?await SO(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),TO=e=>{async function t(t,n){let r=nO(tO(tO({},e),n),{plugins:[...e?.plugins||[],wO(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await DO(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 DO(t,r)}return t};function EO(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];CO.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 DO=async(e,t)=>{let{hooks:n,url:r,options:i}=await iO(e,t),a=hO(i),o=new AbortController,s=i.signal??o.signal,c=EO(r,i),l=vO(i),u=await gO(i),d=yO(r,i),f=nO(tO({},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}=bO(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(nO(tO({},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=uO(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??pO)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await SO(f.output,r.data));for(let e of n.onSuccess)e&&await e(nO(tO({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??pO,_=await m.text(),v=dO(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:nO(tO({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(nO(tO({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=sO(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 DO(e,nO(tO({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new rO(m.status,m.statusText,v?y:_);return{data:null,error:nO(tO({},y),{status:m.status,statusText:m.statusText})}},OO=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{}}},kO=(e,t)=>{let n=`credentials`in Request.prototype,r=WD(e?.baseURL,e?.basePath,void 0,t)??OO(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=TO({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?pD(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[KD],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=qD(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=EE(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function AO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function jO(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 MO(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`||AO(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=jO(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 NO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function PO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=kO(e),s={};for(let[e,t]of Object.entries(r))s[`use${NO(e)}`]=t;return MO({...n,...s,$fetch:i,$store:o},i,t,r,a)}var FO=(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 JE({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:AE.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 RE?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:AE.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:AE.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:AE.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),IO=()=>{let e=vD();return{id:`passkey`,version:jE,$InferServerPlugin:{},getActions:(t,n)=>FO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:ED(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:AE}},LO=`1.6.9`,RO=e=>({id:`sso-client`,version:LO,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),zO=()=>({id:`magic-link`,version:YE,$InferServerPlugin:{}}),BO=kE({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`}),VO=e=>({id:`two-factor`,version:YE,$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:BO}),HO=e=>PO({baseURL:e,withCredentials:!0,plugins:[VO({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}}),IO(),zO(),RO()]}),UO=e=>{let t=e?.editor?.backendURL??x?.editor?.backendURL;t||(t=Un,console.dir({intlayerConfig:e,configuration:x},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=HO(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})}},WO=(e,t)=>{let n=(0,_.c)(14),r=ST(),i=t??r??x,a=sc(),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 UO(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=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 v=g,y;return n[10]!==v||n[11]!==p||n[12]!==h?(y={session:p,fetchSession:v,revalidateSession:v,setSession:h},n[10]=v,n[11]=p,n[12]=h,n[13]=y):y=n[13],y},GO=e=>{let t=(0,_.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}=WO(r,i),{oAuth2AccessToken:l}=OE(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},KO=e=>{let t=(0,_.c)(5),n=ST(),{oAuth2AccessToken:r}=GO(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=DE({...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},qO=e=>{let t=(0,_.c)(2),n=ST(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=UO(r),t[0]=r,t[1]=i),i},JO=e=>{let t=(0,_.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=ST(),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},YO=e=>{let t=(0,_.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}=JO(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,_.c)(6),t=qO(),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),wc(a)},ZO=(e,t)=>{let n=(0,_.c)(9),r=KO(),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],YO(o)},QO=()=>{let e=(0,_.c)(6),t=KO(),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),wc(a)},$O=()=>{let e=(0,_.c)(6),t=KO(),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),wc(a)},ek=(e,t)=>{let n=(0,_.c)(9),r=KO(),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],YO(o)},tk=()=>{let e=(0,_.c)(3),t=KO(),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),wc(r)},nk=()=>{let e=(0,_.c)(3),t=KO(),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),wc(r)},rk=()=>{let e=(0,_.c)(3),t=KO(),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)},ik=()=>{let e=(0,_.c)(3),t=KO(),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),wc(r)},ak=(e,t)=>{let n=(0,_.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,h.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,h.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},ok=(0,h.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),sk=()=>(0,h.useContext)(ok),ck=e=>{let t=(0,_.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=vr(),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]=ak(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,w.jsx)(ok,{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},lk=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,h.useState)(n),[u,d]=(0,h.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(uk)},t[0]=n,t[1]=p);let m=p,g;t[2]!==c||t[3]!==r?(g=()=>{r(c)},t[2]=c,t[3]=r,t[4]=g):g=t[4];let v=g,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{l(e.currentTarget.value)},t[5]=y):y=t[5];let b=y,x=e=>{e.key===`Enter`&&!i&&T?(e.preventDefault(),v()):e.key===`Escape`&&(e.preventDefault(),m())},S,C;t[6]===n?(S=t[7],C=t[8]):(S=()=>{l(n),d(dk)},C=[n],t[6]=n,t[7]=S,t[8]=C),(0,h.useEffect)(S,C);let T=a?.(c)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,w.jsx)(FT,{onChange:b,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!T,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,w.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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(nw,{Icon:gf,label:`Save changes${T?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!T,onClick:v,"aria-describedby":T?void 0:`validation-error`}),(0,w.jsx)(nw,{Icon:Vf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function uk(e){return e+1}function dk(e){return e+1}var fk=()=>{let e=(0,_.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},pk=`​`,mk=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(pk).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===pk?``:t.split(pk).join(``)}).join(`
61
+ `)},hk=e=>{let t=e.split(`
62
+ `);return t.length===0?[``]:t},gk=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),_k=(e,t)=>{if(t<=0)return 0;if(gk){let n=[...gk.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},vk=(e,t)=>{if(t>=e.length)return e.length;if(gk){let n=[...gk.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},yk=(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},bk=(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},xk=(e,t)=>e.slice(0,t).lastIndexOf(`
63
+ `)+1,Sk=(e,t)=>{let n=e.indexOf(`
64
+ `,t);return n===-1?e.length:n},Ck=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,h.useState)(()=>hk(i)),s=(0,h.useRef)(null),c=(0,h.useRef)(null),l=e!==void 0,u=(0,h.useRef)(a);u.current=a,(0,h.useEffect)(()=>{l&&e!==void 0&&o(hk(e))},[e,l]);let d=()=>u.current.join(`
65
65
  `),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(`
66
- `).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,h.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let g=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},_=(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}},v=()=>{let e=f();return e?g(e):0},y=(e,t)=>{let r=mk(e);c.current=_(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=pk(s.current),i=mk(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(`
67
- `);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=gk(r,t.start);y(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=_k(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(`
66
+ `).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,h.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let g=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},_=(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}},v=()=>{let e=f();return e?g(e):0},y=(e,t)=>{let r=hk(e);c.current=_(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=mk(s.current),i=hk(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(`
67
+ `);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=_k(r,t.start);y(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=vk(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(`
68
68
  `),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(`
69
69
  `),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(`
70
70
  `);if(e.key===`Enter`){e.preventDefault(),y(n.slice(0,t.start)+`
71
- `+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?bk(n,t.start):e.altKey?vk(n,t.start):gk(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?xk(n,t.start):e.altKey?yk(n,t.start):_k(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(`
71
+ `+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?xk(n,t.start):e.altKey?yk(n,t.start):_k(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?Sk(n,t.start):e.altKey?bk(n,t.start):vk(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(`
72
72
  `),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(`
73
- `);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:v,caretFromFlatOffset:_}},Ck=({index:e,text:t,isLast:n,ghostText:r})=>(0,w.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,w.jsx)(`span`,{"data-editable":!0,children:t||`​`}),r&&(0,w.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,w.jsx)(`br`,{})]}),wk=24,Tk=12,Ek=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:l,ghostText:u,ghostLine:d,ghostOffset:f,onClick:p,className:m,dir:g=`auto`,ref:_,...v})=>{let{lines:y,containerRef:b,getText:x,handleInput:S,handleBeforeInput:C,handleKeyDown:T,handleCut:E,handlePaste:D,handleDrop:O,handleDragOver:k,getCursorOffset:A,setCaretPosition:j,caretFromFlatOffset:M}=Sk({value:e,defaultValue:t,onChange:n,disabled:i}),N=(0,h.useRef)(null),P=e=>{N.current=e,b.current=e};(0,h.useImperativeHandle)(_,()=>({getContainer:()=>N.current,getText:x,focus:()=>N.current?.focus(),getCursorOffset:A,setCursorAtOffset:e=>{j(M(e,y))}})),(0,h.useEffect)(()=>{if(!s||!N.current)return;let e=N.current,t=wk*o+Tk,n=wk*a+Tk;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`},[y,s,o,a]);let ee=y.length===1&&y[0]===``,F=u&&d!==void 0&&f!==void 0;return(0,w.jsxs)(`div`,{className:`relative w-full`,children:[ee&&r&&(0,w.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,w.jsx)(`div`,{...v,ref:P,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":F?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:S,onBeforeInput:C,onKeyDown:T,onCut:E,onPaste:D,onDrop:O,onDragOver:k,onClick:p,className:W(`resize-none whitespace-pre-wrap break-words outline-none`,PT({variant:l,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,m),children:y.map((e,t)=>(0,w.jsx)(Ck,{index:t,text:e,isLast:t===y.length-1,ghostText:F&&d===t?u:void 0},t))})]})},Dk=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,h.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,h.useState)(``),s=(0,h.useRef)(null);(0,h.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(`
74
- `);return(0,w.jsx)(Ek,{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`]})},Ok=()=>{let e=(0,_.c)(9),{session:t,revalidateSession:n,setSession:r}=QO(),{mutate:i}=rk(),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},kk=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=Ok(),[l,u]=(0,h.useState)(n),[d,f]=(0,h.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(Ak)},t[0]=n,t[1]=m);let g=m,v;t[2]!==l||t[3]!==r?(v=()=>{r(l)},t[2]=l,t[3]=r,t[4]=v):v=t[4];let y=v,b;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>u(e.currentTarget.value??``),t[5]=b):b=t[5];let x=b,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),y()):e.key===`Escape`&&(e.preventDefault(),g())},C,T;t[6]===n?(C=t[7],T=t[8]):(C=()=>{u(n),f(jk)},T=[n],t[6]=n,t[7]=C,t[8]=T),(0,h.useEffect)(C,T);let E=a?.(l)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,w.jsx)(Dk,{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,w.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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(nw,{Icon:gf,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:y,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,w.jsx)(nw,{Icon:Vf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:g,disabled:i})]}),o]})]},n)};function Ak(e){return e+1}function jk(e){return e+1}var Mk=(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},Nk=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,w.jsxs)(`label`,{className:W(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,w.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),Pk=nf(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-5 hover:bg-current/0 aria-[current]:bg-current/5`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,hoverable:`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`}}),Fk=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},Ik=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(Ik):(0,h.isValidElement)(e)?Ik(e.props.children):!1,Lk=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,...m}=e,h=d??Fk(e),g=f??p?.startsWith(`#`)??!1,_=Ik(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`;return(0,w.jsxs)(`a`,{href:l&&p&&!h&&!g?Yn(p,l):p,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(Pk({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,w.jsx)(`span`,{children:i}):i,h&&_&&(0,w.jsx)(Tf,{className:`ml-2 inline-block size-4`}),g&&(0,w.jsx)(jf,{className:`ml-2 inline-block size-4`})]})},Rk=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,zk=`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`,Bk=({className:e,...t})=>(0,w.jsx)(`h1`,{className:W(`font-bold text-2xl`,e),...t}),Vk=({className:e,...t})=>(0,w.jsx)(`h2`,{className:W(`mb-2 font-bold text-2xl`,Rk,e),...t}),Hk=({className:e,...t})=>(0,w.jsx)(`h3`,{className:W(`mb-2 font-bold text-xl`,Rk,e),...t}),Uk=({className:e,...t})=>(0,w.jsx)(`h4`,{className:W(`font-bold text-lg`,Rk,e),...t}),Wk=({className:e,...t})=>(0,w.jsx)(`h5`,{className:W(`font-bold text-base`,Rk,e),...t}),Gk=({className:e,...t})=>(0,w.jsx)(`h6`,{className:W(`ml-3 font-bold text-base`,Rk,e),...t}),Kk=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),qk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Jk=(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},Yk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Kk(t):void 0;return(0,w.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Jk(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),qk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&zk,n),...i,children:t})},Xk=({isClickable:e,...t})=>(0,w.jsx)(Bk,{...t}),Zk=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Vk,isClickable:e,...t}),Qk=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Hk,isClickable:e,...t}),$k=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Uk,isClickable:e,...t}),eA=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Wk,isClickable:e,...t}),tA=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Gk,isClickable:e,...t}),nA=(0,h.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),rA=()=>(0,h.useContext)(nA),iA=e=>{let t=(0,_.c)(8),{children:n}=e,[r,i]=rE(`packageManager`,`npm`),[a,o]=rE(`codeFormat`,`typescript`),[s,c]=rE(`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,w.jsx)(nA,{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},aA={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`]},oA=700,sA=({isRollable:e=!0,minHeight:t=oA,children:n,className:r})=>{let[i,a]=(0,h.useState)(0),[o,s]=(0,h.useState)(!0),c=(0,h.useRef)(null),{expandCollapseContent:l}=_r(aA),u=i>t;return(0,h.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?u?(0,w.jsxs)(rw,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,w.jsx)(`div`,{className:W(`grid w-full`,r),ref:c,children:n}),(0,w.jsx)(`button`,{className:W(`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:l(o)})]}):(0,w.jsx)(`div`,{className:W(`grid w-full`,r),ref:c,children:n}):n},cA=({children:e})=>(0,w.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,w.jsx)(`code`,{children:typeof e==`string`?e.split(`
75
- `).map((e,t)=>(0,w.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),lA=(0,h.lazy)(()=>jn(()=>import(`./CodeBlockShiki-DZZq_NQS.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1]))),uA=({className:e,onChange:t,isEditable:n,children:r,lang:i,isDarkMode:a,...o})=>(0,w.jsx)(`div`,{className:W(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)(cA,{children:r}),children:(0,w.jsx)(lA,{lang:i,isDarkMode:a,children:r})})}),dA=e=>{switch(e){case`jsx`:return`tsx`;case`mjs`:case`cjs`:return`javascript`;default:return e}},fA=({children:e,originalLang:t,targetFormat:n,isDarkMode:r})=>{let[i,a]=(0,h.useState)(null),o=(0,h.useRef)(null);(0,h.useEffect)(()=>{let i=!1;return(async()=>{try{let s=e,c=dA(t);if(n!==`typescript`){let{transformCode:r,deriveLanguage:a}=await jn(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;s=r(String(e),n),c=dA(a(t,n))}let{codeToHtml:l}=await jn(async()=>{let{codeToHtml:e}=await import(`./bundle-web-CobWMSw6.js`);return{codeToHtml:e}},__vite__mapDeps([2,1]));if(i)return;let u=await l(String(s),{lang:c,theme:r?`github-dark`:`github-light`});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`code`,{children:e})})},pA=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},mA=e=>{let t=(0,_.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=rA(),s=r.packageManager===void 0,c=i===r.packageManager,l=pA(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=pA(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,w.jsx)(w.Fragment,{}),t[0]=h):h=t[0],h},hA={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 gA(e,[t,n]){return Math.min(n,Math.max(t,e))}var _A=h.createContext(void 0);function vA(e){let t=h.useContext(_A);return e||t||`ltr`}var yA=0;function bA(){h.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??xA()),document.body.insertAdjacentElement(`beforeend`,e[1]??xA()),yA++,()=>{yA===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),yA--}},[])}function xA(){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 SA=`focusScope.autoFocusOnMount`,CA=`focusScope.autoFocusOnUnmount`,wA={bubbles:!1,cancelable:!0},TA=`FocusScope`,EA=h.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=h.useState(null),l=Eu(i),u=Eu(a),d=h.useRef(null),f=fu(t,e=>c(e)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:NA(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||NA(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&NA(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]),h.useEffect(()=>{if(s){PA.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(SA,wA);s.addEventListener(SA,l),s.dispatchEvent(t),t.defaultPrevented||(DA(LA(kA(s)),{select:!0}),document.activeElement===e&&NA(s))}return()=>{s.removeEventListener(SA,l),setTimeout(()=>{let t=new CustomEvent(CA,wA);s.addEventListener(CA,u),s.dispatchEvent(t),t.defaultPrevented||NA(e??document.body,{select:!0}),s.removeEventListener(CA,u),PA.remove(p)},0)}}},[s,l,u,p]);let m=h.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]=OA(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&NA(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&NA(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,w.jsx)(wu.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});EA.displayName=TA;function DA(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(NA(r,{select:t}),document.activeElement!==n)return}function OA(e){let t=kA(e);return[AA(t,e),AA(t.reverse(),e)]}function kA(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 AA(e,t){for(let n of e)if(!jA(n,{upTo:t}))return n}function jA(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 MA(e){return e instanceof HTMLInputElement&&`select`in e}function NA(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&MA(e)&&t&&e.select()}}var PA=FA();function FA(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=IA(e,t),e.unshift(t)},remove(t){e=IA(e,t),e[0]?.resume()}}}function IA(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function LA(e){return e.filter(e=>e.tagName!==`A`)}var RA=h.useId||(()=>void 0),zA=0;function BA(e){let[t,n]=h.useState(RA());return Uu(()=>{e||n(e=>e??String(zA++))},[e]),e||(t?`radix-${t}`:``)}var VA=[`top`,`right`,`bottom`,`left`],HA=Math.min,UA=Math.max,WA=Math.round,GA=Math.floor,KA=e=>({x:e,y:e}),qA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function JA(e,t,n){return UA(e,HA(t,n))}function YA(e,t){return typeof e==`function`?e(t):e}function XA(e){return e.split(`-`)[0]}function ZA(e){return e.split(`-`)[1]}function QA(e){return e===`x`?`y`:`x`}function $A(e){return e===`y`?`height`:`width`}function ej(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function tj(e){return QA(ej(e))}function nj(e,t,n){n===void 0&&(n=!1);let r=ZA(e),i=tj(e),a=$A(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=dj(o)),[o,dj(o)]}function rj(e){let t=dj(e);return[ij(e),t,ij(t)]}function ij(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var aj=[`left`,`right`],oj=[`right`,`left`],sj=[`top`,`bottom`],cj=[`bottom`,`top`];function lj(e,t,n){switch(e){case`top`:case`bottom`:return n?t?oj:aj:t?aj:oj;case`left`:case`right`:return t?sj:cj;default:return[]}}function uj(e,t,n,r){let i=ZA(e),a=lj(XA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ij)))),a}function dj(e){let t=XA(e);return qA[t]+e.slice(t.length)}function fj(e){return{top:0,right:0,bottom:0,left:0,...e}}function pj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:fj(e)}function mj(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 hj(e,t,n){let{reference:r,floating:i}=e,a=ej(t),o=tj(t),s=$A(o),c=XA(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(ZA(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 gj(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}=YA(t,e),p=pj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=mj(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=mj(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 _j=50,vj=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:gj},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=hj(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<_j&&(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}=hj(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},yj=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}=YA(e,t)||{};if(l==null)return{};let d=pj(u),f={x:n,y:r},p=tj(i),m=$A(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=HA(d[_],T),D=HA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=JA(O,A,k),M=!c.arrow&&ZA(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}}}),bj=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}=YA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=XA(r),_=ej(o),v=XA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[dj(o)]:rj(o)),x=p!==`none`;!d&&x&&b.push(...uj(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=nj(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`&&_!==ej(t))||T.every(e=>ej(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=ej(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 xj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sj(e){return VA.some(t=>e[t]>=0)}var Cj=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=YA(e,t);switch(i){case`referenceHidden`:{let e=xj(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Sj(e)}}}case`escaped`:{let e=xj(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Sj(e)}}}default:return{}}}}},wj=new Set([`left`,`top`]);async function Tj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=XA(n),s=ZA(n),c=ej(n)===`y`,l=wj.has(o)?-1:1,u=a&&c?-1:1,d=YA(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 Ej=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 Tj(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}}}}},Dj=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}=YA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ej(XA(i)),p=QA(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=JA(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=JA(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}}}}}},Oj=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}=YA(e,t),u={x:n,y:r},d=ej(i),f=QA(d),p=u[f],m=u[d],h=YA(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=wj.has(XA(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}}}},kj=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}=YA(e,t),u=await o.detectOverflow(t,l),d=XA(i),f=ZA(i),p=ej(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=HA(h-u[g],v),x=HA(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=UA(u.left,0),t=UA(u.right,0),n=UA(u.top,0),r=UA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:UA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:UA(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 Aj(){return typeof window<`u`}function jj(e){return Pj(e)?(e.nodeName||``).toLowerCase():`#document`}function Mj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nj(e){return((Pj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Pj(e){return Aj()?e instanceof Node||e instanceof Mj(e).Node:!1}function Fj(e){return Aj()?e instanceof Element||e instanceof Mj(e).Element:!1}function Ij(e){return Aj()?e instanceof HTMLElement||e instanceof Mj(e).HTMLElement:!1}function Lj(e){return!Aj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Mj(e).ShadowRoot}function Rj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Yj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function zj(e){return/^(table|td|th)$/.test(jj(e))}function Bj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Vj=/transform|translate|scale|rotate|perspective|filter/,Hj=/paint|layout|strict|content/,Uj=e=>!!e&&e!==`none`,Wj;function Gj(e){let t=Fj(e)?Yj(e):e;return Uj(t.transform)||Uj(t.translate)||Uj(t.scale)||Uj(t.rotate)||Uj(t.perspective)||!qj()&&(Uj(t.backdropFilter)||Uj(t.filter))||Vj.test(t.willChange||``)||Hj.test(t.contain||``)}function Kj(e){let t=Zj(e);for(;Ij(t)&&!Jj(t);){if(Gj(t))return t;if(Bj(t))return null;t=Zj(t)}return null}function qj(){return Wj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Wj}function Jj(e){return/^(html|body|#document)$/.test(jj(e))}function Yj(e){return Mj(e).getComputedStyle(e)}function Xj(e){return Fj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zj(e){if(jj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Lj(e)&&e.host||Nj(e);return Lj(t)?t.host:t}function Qj(e){let t=Zj(e);return Jj(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ij(t)&&Rj(t)?t:Qj(t)}function $j(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Qj(e),i=r===e.ownerDocument?.body,a=Mj(r);if(i){let e=eM(a);return t.concat(a,a.visualViewport||[],Rj(r)?r:[],e&&n?$j(e):[])}else return t.concat(r,$j(r,[],n))}function eM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tM(e){let t=Yj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ij(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=WA(n)!==a||WA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function nM(e){return Fj(e)?e:e.contextElement}function rM(e){let t=nM(e);if(!Ij(t))return KA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=tM(t),o=(a?WA(n.width):n.width)/r,s=(a?WA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var iM=KA(0);function aM(e){let t=Mj(e);return!qj()||!t.visualViewport?iM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mj(e)?!1:t}function sM(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=nM(e),o=KA(1);t&&(r?Fj(r)&&(o=rM(r)):o=rM(e));let s=oM(a,n,r)?aM(a):KA(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=Mj(a),t=r&&Fj(r)?Mj(r):r,n=e,i=eM(n);for(;i&&r&&t!==n;){let e=rM(i),t=i.getBoundingClientRect(),r=Yj(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=Mj(i),i=eM(n)}}return mj({width:u,height:d,x:c,y:l})}function cM(e,t){let n=Xj(e).scrollLeft;return t?t.left+n:sM(Nj(e)).left+n}function lM(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cM(e,n),y:n.top+t.scrollTop}}function uM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Nj(r),s=t?Bj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=KA(1),u=KA(0),d=Ij(r);if((d||!d&&!a)&&((jj(r)!==`body`||Rj(o))&&(c=Xj(r)),d)){let e=sM(r);l=rM(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lM(o,c):KA(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 dM(e){return Array.from(e.getClientRects())}function fM(e){let t=Nj(e),n=Xj(e),r=e.ownerDocument.body,i=UA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=UA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+cM(e),s=-n.scrollTop;return Yj(r).direction===`rtl`&&(o+=UA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pM=25;function mM(e,t){let n=Mj(e),r=Nj(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=qj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=cM(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<=pM&&(a-=o)}else l<=pM&&(a+=l);return{width:a,height:o,x:s,y:c}}function hM(e,t){let n=sM(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ij(e)?rM(e):KA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gM(e,t,n){let r;if(t===`viewport`)r=mM(e,n);else if(t===`document`)r=fM(Nj(e));else if(Fj(t))r=hM(t,n);else{let n=aM(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return mj(r)}function _M(e,t){let n=Zj(e);return n===t||!Fj(n)||Jj(n)?!1:Yj(n).position===`fixed`||_M(n,t)}function vM(e,t){let n=t.get(e);if(n)return n;let r=$j(e,[],!1).filter(e=>Fj(e)&&jj(e)!==`body`),i=null,a=Yj(e).position===`fixed`,o=a?Zj(e):e;for(;Fj(o)&&!Jj(o);){let t=Yj(o),n=Gj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Rj(o)&&!n&&_M(e,o))?r=r.filter(e=>e!==o):i=t,o=Zj(o)}return t.set(e,r),r}function yM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Bj(t)?[]:vM(t,this._c):[].concat(n),r],o=gM(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=gM(t,a[e],i);s=UA(n.top,s),c=HA(n.right,c),l=HA(n.bottom,l),u=UA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function bM(e){let{width:t,height:n}=tM(e);return{width:t,height:n}}function xM(e,t,n){let r=Ij(t),i=Nj(t),a=n===`fixed`,o=sM(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=KA(0);function l(){c.x=cM(i)}if(r||!r&&!a)if((jj(t)!==`body`||Rj(i))&&(s=Xj(t)),r){let e=sM(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?lM(i,s):KA(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 SM(e){return Yj(e).position===`static`}function CM(e,t){if(!Ij(e)||Yj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Nj(e)===n&&(n=n.ownerDocument.body),n}function wM(e,t){let n=Mj(e);if(Bj(e))return n;if(!Ij(e)){let t=Zj(e);for(;t&&!Jj(t);){if(Fj(t)&&!SM(t))return t;t=Zj(t)}return n}let r=CM(e,t);for(;r&&zj(r)&&SM(r);)r=CM(r,t);return r&&Jj(r)&&SM(r)&&!Gj(r)?n:r||Kj(e)||n}var TM=async function(e){let t=this.getOffsetParent||wM,n=this.getDimensions,r=await n(e.floating);return{reference:xM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function EM(e){return Yj(e).direction===`rtl`}var DM={convertOffsetParentRelativeRectToViewportRelativeRect:uM,getDocumentElement:Nj,getClippingRect:yM,getOffsetParent:wM,getElementRects:TM,getClientRects:dM,getDimensions:bM,getScale:rM,isElement:Fj,isRTL:EM};function OM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kM(e,t){let n=null,r,i=Nj(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=GA(d),h=GA(i.clientWidth-(u+f)),g=GA(i.clientHeight-(d+p)),_=GA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:UA(0,HA(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&&!OM(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 AM(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=nM(e),u=i||a?[...l?$j(l):[],...t?$j(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?kM(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?sM(e):null;c&&g();function g(){let t=sM(e);h&&!OM(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 jM=Ej,MM=Dj,NM=bj,PM=kj,FM=Cj,IM=yj,LM=Oj,RM=(e,t,n)=>{let r=new Map,i={platform:DM,...n},a={...i.platform,_c:r};return vj(e,t,{...i,platform:a})},zM=typeof document<`u`?h.useLayoutEffect:function(){};function BM(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(!BM(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)&&!BM(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function VM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function HM(e,t){let n=VM(e);return Math.round(t*n)/n}function UM(e){let t=h.useRef(e);return zM(()=>{t.current=e}),t}function WM(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]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);BM(f,r)||p(r);let[m,g]=h.useState(null),[_,v]=h.useState(null),y=h.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=h.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=h.useRef(null),w=h.useRef(null),T=h.useRef(u),E=c!=null,D=UM(c),O=UM(i),k=UM(l),A=h.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),RM(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!BM(T.current,t)&&(T.current=t,Cu.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);zM(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=h.useRef(!1);zM(()=>(j.current=!0,()=>{j.current=!1}),[]),zM(()=>{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=h.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=h.useMemo(()=>({reference:x,floating:S}),[x,S]),P=h.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=HM(N.floating,u.x),r=HM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...VM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var GM=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?{}:IM({element:r.current,padding:i}).fn(n):r?IM({element:r,padding:i}).fn(n):{}}}},KM=(e,t)=>{let n=jM(e);return{name:n.name,fn:n.fn,options:[e,t]}},qM=(e,t)=>{let n=MM(e);return{name:n.name,fn:n.fn,options:[e,t]}},JM=(e,t)=>({fn:LM(e).fn,options:[e,t]}),YM=(e,t)=>{let n=NM(e);return{name:n.name,fn:n.fn,options:[e,t]}},XM=(e,t)=>{let n=PM(e);return{name:n.name,fn:n.fn,options:[e,t]}},ZM=(e,t)=>{let n=FM(e);return{name:n.name,fn:n.fn,options:[e,t]}},QM=(e,t)=>{let n=GM(e);return{name:n.name,fn:n.fn,options:[e,t]}},$M=`Arrow`,eN=h.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,w.jsx)(wu.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,w.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});eN.displayName=$M;var tN=eN;function nN(e){let[t,n]=h.useState(void 0);return Uu(()=>{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 rN=`Popper`,[iN,aN]=mu(rN),[oN,sN]=iN(rN),cN=e=>{let{__scopePopper:t,children:n}=e,[r,i]=h.useState(null);return(0,w.jsx)(oN,{scope:t,anchor:r,onAnchorChange:i,children:n})};cN.displayName=rN;var lN=`PopperAnchor`,uN=h.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=sN(lN,n),o=h.useRef(null),s=fu(t,o),c=h.useRef(null);return h.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,w.jsx)(wu.div,{...i,ref:s})});uN.displayName=lN;var dN=`PopperContent`,[fN,pN]=iN(dN),mN=h.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,...g}=e,_=sN(dN,n),[v,y]=h.useState(null),b=fu(t,e=>y(e)),[x,S]=h.useState(null),C=nN(x),T=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(vN),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:ee,middlewareData:F}=WM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>AM(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[KM({mainAxis:i+E,alignmentAxis:o}),c&&qM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?JM():void 0,...j}),c&&YM({...j}),XM({...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&&QM({element:x,padding:s}),yN({arrowWidth:T,arrowHeight:E}),f&&ZM({strategy:`referenceHidden`,...j})]}),[I,te]=bN(P),ne=Eu(m);Uu(()=>{ee&&ne?.()},[ee,ne]);let re=F.arrow?.x,L=F.arrow?.y,R=F.arrow?.centerOffset!==0,[z,ie]=h.useState();return Uu(()=>{v&&ie(window.getComputedStyle(v).zIndex)},[v]),(0,w.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:ee?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(fN,{scope:n,placedSide:I,onArrowChange:S,arrowX:re,arrowY:L,shouldHideArrow:R,children:(0,w.jsx)(wu.div,{"data-side":I,"data-align":te,...g,ref:b,style:{...g.style,animation:ee?void 0:`none`}})})})});mN.displayName=dN;var hN=`PopperArrow`,gN={top:`bottom`,right:`left`,bottom:`top`,left:`right`},_N=h.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=pN(hN,n),a=gN[i.placedSide];return(0,w.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,w.jsx)(tN,{...r,ref:t,style:{...r.style,display:`block`}})})});_N.displayName=hN;function vN(e){return e!==null}var yN=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]=bN(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 bN(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var xN=cN,SN=uN,CN=mN,wN=_N;function TN(e){let t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var EN=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},DN=new WeakMap,ON=new WeakMap,kN={},AN=0,jN=function(e){return e&&(e.host||jN(e.parentNode))},MN=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=jN(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})},NN=function(e,t,n,r){var i=MN(t,Array.isArray(e)?e:[e]);kN[n]||(kN[n]=new WeakMap);var a=kN[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=(DN.get(e)||0)+1,l=(a.get(e)||0)+1;DN.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ON.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(),AN++,function(){o.forEach(function(e){var t=DN.get(e)-1,i=a.get(e)-1;DN.set(e,t),a.set(e,i),t||(ON.has(e)||e.removeAttribute(r),ON.delete(e)),i||e.removeAttribute(n)}),AN--,AN||(DN=new WeakMap,DN=new WeakMap,ON=new WeakMap,kN={})}},PN=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||EN(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),NN(r,i,n,`aria-hidden`)):function(){return null}},FN=function(){return FN=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},FN.apply(this,arguments)};function IN(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 LN(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 RN=`right-scroll-bar-position`,zN=`width-before-scroll-bar`,BN=`with-scroll-bars-hidden`,VN=`--removed-body-scroll-bar-size`;function HN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function UN(e,t){var n=(0,h.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 WN=typeof window<`u`?h.useLayoutEffect:h.useEffect,GN=new WeakMap;function KN(e,t){var n=UN(t||null,function(t){return e.forEach(function(e){return HN(e,t)})});return WN(function(){var t=GN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||HN(e,null)}),i.forEach(function(e){r.has(e)||HN(e,a)})}GN.set(n,e)},[e]),n}function qN(e){return e}function JN(e,t){t===void 0&&(t=qN);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 YN(e){e===void 0&&(e={});var t=JN(null);return t.options=FN({async:!0,ssr:!1},e),t}var XN=function(e){var t=e.sideCar,n=IN(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 h.createElement(r,FN({},n))};XN.isSideCarExport=!0;function ZN(e,t){return e.useMedium(t),XN}var QN=YN(),$N=function(){},eP=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:$N,onWheelCapture:$N,onTouchMoveCapture:$N}),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,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=IN(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=KN([n,t]),w=FN(FN({},x),i);return h.createElement(h.Fragment,null,u&&h.createElement(S,{sideCar:QN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?h.cloneElement(h.Children.only(s),FN(FN({},w),{ref:C})):h.createElement(y,FN({},w,{className:c,ref:C}),s))});eP.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eP.classNames={fullWidth:zN,zeroRight:RN};var tP,nP=function(){if(tP)return tP;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rP(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nP();return t&&e.setAttribute(`nonce`,t),e}function iP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function aP(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var oP=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rP())&&(iP(t,n),aP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sP=function(){var e=oP();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cP=function(){var e=sP();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},lP={left:0,top:0,right:0,gap:0},uP=function(e){return parseInt(e||``,10)||0},dP=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[uP(n),uP(r),uP(i)]},fP=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return lP;var t=dP(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])}},pP=cP(),mP=`data-scroll-locked`,hP=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
73
+ `);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:v,caretFromFlatOffset:_}},wk=({index:e,text:t,isLast:n,ghostText:r})=>(0,w.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,w.jsx)(`span`,{"data-editable":!0,children:t||`​`}),r&&(0,w.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,w.jsx)(`br`,{})]}),Tk=24,Ek=12,Dk=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:l,ghostText:u,ghostLine:d,ghostOffset:f,onClick:p,className:m,dir:g=`auto`,ref:_,...v})=>{let{lines:y,containerRef:b,getText:x,handleInput:S,handleBeforeInput:C,handleKeyDown:T,handleCut:E,handlePaste:D,handleDrop:O,handleDragOver:k,getCursorOffset:A,setCaretPosition:j,caretFromFlatOffset:M}=Ck({value:e,defaultValue:t,onChange:n,disabled:i}),N=(0,h.useRef)(null),P=e=>{N.current=e,b.current=e};(0,h.useImperativeHandle)(_,()=>({getContainer:()=>N.current,getText:x,focus:()=>N.current?.focus(),getCursorOffset:A,setCursorAtOffset:e=>{j(M(e,y))}})),(0,h.useEffect)(()=>{if(!s||!N.current)return;let e=N.current,t=Tk*o+Ek,n=Tk*a+Ek;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`},[y,s,o,a]);let ee=y.length===1&&y[0]===``,F=u&&d!==void 0&&f!==void 0;return(0,w.jsxs)(`div`,{className:`relative w-full`,children:[ee&&r&&(0,w.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,w.jsx)(`div`,{...v,ref:P,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":F?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:S,onBeforeInput:C,onKeyDown:T,onCut:E,onPaste:D,onDrop:O,onDragOver:k,onClick:p,className:W(`resize-none whitespace-pre-wrap break-words outline-none`,PT({variant:l,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,m),children:y.map((e,t)=>(0,w.jsx)(wk,{index:t,text:e,isLast:t===y.length-1,ghostText:F&&d===t?u:void 0},t))})]})},Ok=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,h.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,h.useState)(``),s=(0,h.useRef)(null);(0,h.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(`
74
+ `);return(0,w.jsx)(Dk,{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`]})},kk=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=fk(),[l,u]=(0,h.useState)(n),[d,f]=(0,h.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(Ak)},t[0]=n,t[1]=m);let g=m,v;t[2]!==l||t[3]!==r?(v=()=>{r(l)},t[2]=l,t[3]=r,t[4]=v):v=t[4];let y=v,b;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>u(e.currentTarget.value??``),t[5]=b):b=t[5];let x=b,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),y()):e.key===`Escape`&&(e.preventDefault(),g())},C,T;t[6]===n?(C=t[7],T=t[8]):(C=()=>{u(n),f(jk)},T=[n],t[6]=n,t[7]=C,t[8]=T),(0,h.useEffect)(C,T);let E=a?.(l)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,w.jsx)(Ok,{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,w.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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(nw,{Icon:gf,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:y,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,w.jsx)(nw,{Icon:Vf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:g,disabled:i})]}),o]})]},n)};function Ak(e){return e+1}function jk(e){return e+1}var Mk=(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},Nk=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,w.jsxs)(`label`,{className:W(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,w.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),Pk=nf(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-5 hover:bg-current/0 aria-[current]:bg-current/5`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,hoverable:`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`}}),Fk=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},Ik=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(Ik):(0,h.isValidElement)(e)?Ik(e.props.children):!1,Lk=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,...m}=e,h=d??Fk(e),g=f??p?.startsWith(`#`)??!1,_=Ik(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`;return(0,w.jsxs)(`a`,{href:l&&p&&!h&&!g?Yn(p,l):p,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(Pk({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,w.jsx)(`span`,{children:i}):i,h&&_&&(0,w.jsx)(Tf,{className:`ml-2 inline-block size-4`}),g&&(0,w.jsx)(jf,{className:`ml-2 inline-block size-4`})]})},Rk=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,zk=`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`,Bk=({className:e,...t})=>(0,w.jsx)(`h1`,{className:W(`font-bold text-2xl`,e),...t}),Vk=({className:e,...t})=>(0,w.jsx)(`h2`,{className:W(`mb-2 font-bold text-2xl`,Rk,e),...t}),Hk=({className:e,...t})=>(0,w.jsx)(`h3`,{className:W(`mb-2 font-bold text-xl`,Rk,e),...t}),Uk=({className:e,...t})=>(0,w.jsx)(`h4`,{className:W(`font-bold text-lg`,Rk,e),...t}),Wk=({className:e,...t})=>(0,w.jsx)(`h5`,{className:W(`font-bold text-base`,Rk,e),...t}),Gk=({className:e,...t})=>(0,w.jsx)(`h6`,{className:W(`ml-3 font-bold text-base`,Rk,e),...t}),Kk=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),qk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Jk=(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},Yk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Kk(t):void 0;return(0,w.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Jk(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),qk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&zk,n),...i,children:t})},Xk=({isClickable:e,...t})=>(0,w.jsx)(Bk,{...t}),Zk=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Vk,isClickable:e,...t}),Qk=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Hk,isClickable:e,...t}),$k=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Uk,isClickable:e,...t}),eA=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Wk,isClickable:e,...t}),tA=({isClickable:e=!1,...t})=>(0,w.jsx)(Yk,{H:Gk,isClickable:e,...t}),nA=(0,h.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),rA=()=>(0,h.useContext)(nA),iA=e=>{let t=(0,_.c)(8),{children:n}=e,[r,i]=ak(`packageManager`,`npm`),[a,o]=ak(`codeFormat`,`typescript`),[s,c]=ak(`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,w.jsx)(nA,{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},aA={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`]},oA=700,sA=({isRollable:e=!0,minHeight:t=oA,children:n,className:r})=>{let[i,a]=(0,h.useState)(0),[o,s]=(0,h.useState)(!0),c=(0,h.useRef)(null),{expandCollapseContent:l}=_r(aA),u=i>t;return(0,h.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?u?(0,w.jsxs)(rw,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,w.jsx)(`div`,{className:W(`grid w-full`,r),ref:c,children:n}),(0,w.jsx)(`button`,{className:W(`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:l(o)})]}):(0,w.jsx)(`div`,{className:W(`grid w-full`,r),ref:c,children:n}):n},cA=({children:e})=>(0,w.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,w.jsx)(`code`,{children:typeof e==`string`?e.split(`
75
+ `).map((e,t)=>(0,w.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),lA=(0,h.lazy)(()=>jn(()=>import(`./CodeBlockShiki-qkae3Ky5.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1]))),uA=({className:e,onChange:t,isEditable:n,children:r,lang:i,isDarkMode:a,...o})=>(0,w.jsx)(`div`,{className:W(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)(cA,{children:r}),children:(0,w.jsx)(lA,{lang:i,isDarkMode:a,children:r})})}),dA=e=>{switch(e){case`jsx`:return`tsx`;case`mjs`:case`cjs`:return`javascript`;default:return e}},fA=({children:e,originalLang:t,targetFormat:n,isDarkMode:r})=>{let[i,a]=(0,h.useState)(null),o=(0,h.useRef)(null);(0,h.useEffect)(()=>{let i=!1;return(async()=>{try{let s=e,c=dA(t);if(n!==`typescript`){let{transformCode:r,deriveLanguage:a}=await jn(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;s=r(String(e),n),c=dA(a(t,n))}let{codeToHtml:l}=await jn(async()=>{let{codeToHtml:e}=await import(`./bundle-web-D7Z9ISK8.js`);return{codeToHtml:e}},__vite__mapDeps([2,1]));if(i)return;let u=await l(String(s),{lang:c,theme:r?`github-dark`:`github-light`});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`code`,{children:e})})},pA=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},mA=e=>{let t=(0,_.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=rA(),s=r.packageManager===void 0,c=i===r.packageManager,l=pA(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=pA(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,w.jsx)(w.Fragment,{}),t[0]=h):h=t[0],h},hA={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 gA(e,[t,n]){return Math.min(n,Math.max(t,e))}var _A=h.createContext(void 0);function vA(e){let t=h.useContext(_A);return e||t||`ltr`}var yA=0;function bA(){h.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??xA()),document.body.insertAdjacentElement(`beforeend`,e[1]??xA()),yA++,()=>{yA===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),yA--}},[])}function xA(){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 SA=`focusScope.autoFocusOnMount`,CA=`focusScope.autoFocusOnUnmount`,wA={bubbles:!1,cancelable:!0},TA=`FocusScope`,EA=h.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=h.useState(null),l=Eu(i),u=Eu(a),d=h.useRef(null),f=fu(t,e=>c(e)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:NA(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||NA(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&NA(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]),h.useEffect(()=>{if(s){PA.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(SA,wA);s.addEventListener(SA,l),s.dispatchEvent(t),t.defaultPrevented||(DA(LA(kA(s)),{select:!0}),document.activeElement===e&&NA(s))}return()=>{s.removeEventListener(SA,l),setTimeout(()=>{let t=new CustomEvent(CA,wA);s.addEventListener(CA,u),s.dispatchEvent(t),t.defaultPrevented||NA(e??document.body,{select:!0}),s.removeEventListener(CA,u),PA.remove(p)},0)}}},[s,l,u,p]);let m=h.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]=OA(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&NA(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&NA(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,w.jsx)(wu.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});EA.displayName=TA;function DA(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(NA(r,{select:t}),document.activeElement!==n)return}function OA(e){let t=kA(e);return[AA(t,e),AA(t.reverse(),e)]}function kA(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 AA(e,t){for(let n of e)if(!jA(n,{upTo:t}))return n}function jA(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 MA(e){return e instanceof HTMLInputElement&&`select`in e}function NA(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&MA(e)&&t&&e.select()}}var PA=FA();function FA(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=IA(e,t),e.unshift(t)},remove(t){e=IA(e,t),e[0]?.resume()}}}function IA(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function LA(e){return e.filter(e=>e.tagName!==`A`)}var RA=h.useId||(()=>void 0),zA=0;function BA(e){let[t,n]=h.useState(RA());return Uu(()=>{e||n(e=>e??String(zA++))},[e]),e||(t?`radix-${t}`:``)}var VA=[`top`,`right`,`bottom`,`left`],HA=Math.min,UA=Math.max,WA=Math.round,GA=Math.floor,KA=e=>({x:e,y:e}),qA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function JA(e,t,n){return UA(e,HA(t,n))}function YA(e,t){return typeof e==`function`?e(t):e}function XA(e){return e.split(`-`)[0]}function ZA(e){return e.split(`-`)[1]}function QA(e){return e===`x`?`y`:`x`}function $A(e){return e===`y`?`height`:`width`}function ej(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function tj(e){return QA(ej(e))}function nj(e,t,n){n===void 0&&(n=!1);let r=ZA(e),i=tj(e),a=$A(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=dj(o)),[o,dj(o)]}function rj(e){let t=dj(e);return[ij(e),t,ij(t)]}function ij(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var aj=[`left`,`right`],oj=[`right`,`left`],sj=[`top`,`bottom`],cj=[`bottom`,`top`];function lj(e,t,n){switch(e){case`top`:case`bottom`:return n?t?oj:aj:t?aj:oj;case`left`:case`right`:return t?sj:cj;default:return[]}}function uj(e,t,n,r){let i=ZA(e),a=lj(XA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ij)))),a}function dj(e){let t=XA(e);return qA[t]+e.slice(t.length)}function fj(e){return{top:0,right:0,bottom:0,left:0,...e}}function pj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:fj(e)}function mj(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 hj(e,t,n){let{reference:r,floating:i}=e,a=ej(t),o=tj(t),s=$A(o),c=XA(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(ZA(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 gj(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}=YA(t,e),p=pj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=mj(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=mj(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 _j=50,vj=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:gj},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=hj(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<_j&&(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}=hj(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},yj=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}=YA(e,t)||{};if(l==null)return{};let d=pj(u),f={x:n,y:r},p=tj(i),m=$A(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=HA(d[_],T),D=HA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=JA(O,A,k),M=!c.arrow&&ZA(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}}}),bj=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}=YA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=XA(r),_=ej(o),v=XA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[dj(o)]:rj(o)),x=p!==`none`;!d&&x&&b.push(...uj(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=nj(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`&&_!==ej(t))||T.every(e=>ej(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=ej(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 xj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sj(e){return VA.some(t=>e[t]>=0)}var Cj=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=YA(e,t);switch(i){case`referenceHidden`:{let e=xj(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Sj(e)}}}case`escaped`:{let e=xj(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Sj(e)}}}default:return{}}}}},wj=new Set([`left`,`top`]);async function Tj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=XA(n),s=ZA(n),c=ej(n)===`y`,l=wj.has(o)?-1:1,u=a&&c?-1:1,d=YA(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 Ej=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 Tj(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}}}}},Dj=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}=YA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ej(XA(i)),p=QA(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=JA(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=JA(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}}}}}},Oj=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}=YA(e,t),u={x:n,y:r},d=ej(i),f=QA(d),p=u[f],m=u[d],h=YA(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=wj.has(XA(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}}}},kj=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}=YA(e,t),u=await o.detectOverflow(t,l),d=XA(i),f=ZA(i),p=ej(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=HA(h-u[g],v),x=HA(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=UA(u.left,0),t=UA(u.right,0),n=UA(u.top,0),r=UA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:UA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:UA(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 Aj(){return typeof window<`u`}function jj(e){return Pj(e)?(e.nodeName||``).toLowerCase():`#document`}function Mj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nj(e){return((Pj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Pj(e){return Aj()?e instanceof Node||e instanceof Mj(e).Node:!1}function Fj(e){return Aj()?e instanceof Element||e instanceof Mj(e).Element:!1}function Ij(e){return Aj()?e instanceof HTMLElement||e instanceof Mj(e).HTMLElement:!1}function Lj(e){return!Aj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Mj(e).ShadowRoot}function Rj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Yj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function zj(e){return/^(table|td|th)$/.test(jj(e))}function Bj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Vj=/transform|translate|scale|rotate|perspective|filter/,Hj=/paint|layout|strict|content/,Uj=e=>!!e&&e!==`none`,Wj;function Gj(e){let t=Fj(e)?Yj(e):e;return Uj(t.transform)||Uj(t.translate)||Uj(t.scale)||Uj(t.rotate)||Uj(t.perspective)||!qj()&&(Uj(t.backdropFilter)||Uj(t.filter))||Vj.test(t.willChange||``)||Hj.test(t.contain||``)}function Kj(e){let t=Zj(e);for(;Ij(t)&&!Jj(t);){if(Gj(t))return t;if(Bj(t))return null;t=Zj(t)}return null}function qj(){return Wj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Wj}function Jj(e){return/^(html|body|#document)$/.test(jj(e))}function Yj(e){return Mj(e).getComputedStyle(e)}function Xj(e){return Fj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zj(e){if(jj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Lj(e)&&e.host||Nj(e);return Lj(t)?t.host:t}function Qj(e){let t=Zj(e);return Jj(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ij(t)&&Rj(t)?t:Qj(t)}function $j(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Qj(e),i=r===e.ownerDocument?.body,a=Mj(r);if(i){let e=eM(a);return t.concat(a,a.visualViewport||[],Rj(r)?r:[],e&&n?$j(e):[])}else return t.concat(r,$j(r,[],n))}function eM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tM(e){let t=Yj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ij(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=WA(n)!==a||WA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function nM(e){return Fj(e)?e:e.contextElement}function rM(e){let t=nM(e);if(!Ij(t))return KA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=tM(t),o=(a?WA(n.width):n.width)/r,s=(a?WA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var iM=KA(0);function aM(e){let t=Mj(e);return!qj()||!t.visualViewport?iM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mj(e)?!1:t}function sM(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=nM(e),o=KA(1);t&&(r?Fj(r)&&(o=rM(r)):o=rM(e));let s=oM(a,n,r)?aM(a):KA(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=Mj(a),t=r&&Fj(r)?Mj(r):r,n=e,i=eM(n);for(;i&&r&&t!==n;){let e=rM(i),t=i.getBoundingClientRect(),r=Yj(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=Mj(i),i=eM(n)}}return mj({width:u,height:d,x:c,y:l})}function cM(e,t){let n=Xj(e).scrollLeft;return t?t.left+n:sM(Nj(e)).left+n}function lM(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cM(e,n),y:n.top+t.scrollTop}}function uM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Nj(r),s=t?Bj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=KA(1),u=KA(0),d=Ij(r);if((d||!d&&!a)&&((jj(r)!==`body`||Rj(o))&&(c=Xj(r)),d)){let e=sM(r);l=rM(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lM(o,c):KA(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 dM(e){return Array.from(e.getClientRects())}function fM(e){let t=Nj(e),n=Xj(e),r=e.ownerDocument.body,i=UA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=UA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+cM(e),s=-n.scrollTop;return Yj(r).direction===`rtl`&&(o+=UA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pM=25;function mM(e,t){let n=Mj(e),r=Nj(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=qj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=cM(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<=pM&&(a-=o)}else l<=pM&&(a+=l);return{width:a,height:o,x:s,y:c}}function hM(e,t){let n=sM(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ij(e)?rM(e):KA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gM(e,t,n){let r;if(t===`viewport`)r=mM(e,n);else if(t===`document`)r=fM(Nj(e));else if(Fj(t))r=hM(t,n);else{let n=aM(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return mj(r)}function _M(e,t){let n=Zj(e);return n===t||!Fj(n)||Jj(n)?!1:Yj(n).position===`fixed`||_M(n,t)}function vM(e,t){let n=t.get(e);if(n)return n;let r=$j(e,[],!1).filter(e=>Fj(e)&&jj(e)!==`body`),i=null,a=Yj(e).position===`fixed`,o=a?Zj(e):e;for(;Fj(o)&&!Jj(o);){let t=Yj(o),n=Gj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Rj(o)&&!n&&_M(e,o))?r=r.filter(e=>e!==o):i=t,o=Zj(o)}return t.set(e,r),r}function yM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Bj(t)?[]:vM(t,this._c):[].concat(n),r],o=gM(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=gM(t,a[e],i);s=UA(n.top,s),c=HA(n.right,c),l=HA(n.bottom,l),u=UA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function bM(e){let{width:t,height:n}=tM(e);return{width:t,height:n}}function xM(e,t,n){let r=Ij(t),i=Nj(t),a=n===`fixed`,o=sM(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=KA(0);function l(){c.x=cM(i)}if(r||!r&&!a)if((jj(t)!==`body`||Rj(i))&&(s=Xj(t)),r){let e=sM(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?lM(i,s):KA(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 SM(e){return Yj(e).position===`static`}function CM(e,t){if(!Ij(e)||Yj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Nj(e)===n&&(n=n.ownerDocument.body),n}function wM(e,t){let n=Mj(e);if(Bj(e))return n;if(!Ij(e)){let t=Zj(e);for(;t&&!Jj(t);){if(Fj(t)&&!SM(t))return t;t=Zj(t)}return n}let r=CM(e,t);for(;r&&zj(r)&&SM(r);)r=CM(r,t);return r&&Jj(r)&&SM(r)&&!Gj(r)?n:r||Kj(e)||n}var TM=async function(e){let t=this.getOffsetParent||wM,n=this.getDimensions,r=await n(e.floating);return{reference:xM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function EM(e){return Yj(e).direction===`rtl`}var DM={convertOffsetParentRelativeRectToViewportRelativeRect:uM,getDocumentElement:Nj,getClippingRect:yM,getOffsetParent:wM,getElementRects:TM,getClientRects:dM,getDimensions:bM,getScale:rM,isElement:Fj,isRTL:EM};function OM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kM(e,t){let n=null,r,i=Nj(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=GA(d),h=GA(i.clientWidth-(u+f)),g=GA(i.clientHeight-(d+p)),_=GA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:UA(0,HA(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&&!OM(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 AM(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=nM(e),u=i||a?[...l?$j(l):[],...t?$j(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?kM(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?sM(e):null;c&&g();function g(){let t=sM(e);h&&!OM(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 jM=Ej,MM=Dj,NM=bj,PM=kj,FM=Cj,IM=yj,LM=Oj,RM=(e,t,n)=>{let r=new Map,i={platform:DM,...n},a={...i.platform,_c:r};return vj(e,t,{...i,platform:a})},zM=typeof document<`u`?h.useLayoutEffect:function(){};function BM(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(!BM(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)&&!BM(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function VM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function HM(e,t){let n=VM(e);return Math.round(t*n)/n}function UM(e){let t=h.useRef(e);return zM(()=>{t.current=e}),t}function WM(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]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);BM(f,r)||p(r);let[m,g]=h.useState(null),[_,v]=h.useState(null),y=h.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=h.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=h.useRef(null),w=h.useRef(null),T=h.useRef(u),E=c!=null,D=UM(c),O=UM(i),k=UM(l),A=h.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),RM(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!BM(T.current,t)&&(T.current=t,Cu.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);zM(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=h.useRef(!1);zM(()=>(j.current=!0,()=>{j.current=!1}),[]),zM(()=>{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=h.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=h.useMemo(()=>({reference:x,floating:S}),[x,S]),P=h.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=HM(N.floating,u.x),r=HM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...VM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var GM=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?{}:IM({element:r.current,padding:i}).fn(n):r?IM({element:r,padding:i}).fn(n):{}}}},KM=(e,t)=>{let n=jM(e);return{name:n.name,fn:n.fn,options:[e,t]}},qM=(e,t)=>{let n=MM(e);return{name:n.name,fn:n.fn,options:[e,t]}},JM=(e,t)=>({fn:LM(e).fn,options:[e,t]}),YM=(e,t)=>{let n=NM(e);return{name:n.name,fn:n.fn,options:[e,t]}},XM=(e,t)=>{let n=PM(e);return{name:n.name,fn:n.fn,options:[e,t]}},ZM=(e,t)=>{let n=FM(e);return{name:n.name,fn:n.fn,options:[e,t]}},QM=(e,t)=>{let n=GM(e);return{name:n.name,fn:n.fn,options:[e,t]}},$M=`Arrow`,eN=h.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,w.jsx)(wu.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,w.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});eN.displayName=$M;var tN=eN;function nN(e){let[t,n]=h.useState(void 0);return Uu(()=>{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 rN=`Popper`,[iN,aN]=mu(rN),[oN,sN]=iN(rN),cN=e=>{let{__scopePopper:t,children:n}=e,[r,i]=h.useState(null);return(0,w.jsx)(oN,{scope:t,anchor:r,onAnchorChange:i,children:n})};cN.displayName=rN;var lN=`PopperAnchor`,uN=h.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=sN(lN,n),o=h.useRef(null),s=fu(t,o),c=h.useRef(null);return h.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,w.jsx)(wu.div,{...i,ref:s})});uN.displayName=lN;var dN=`PopperContent`,[fN,pN]=iN(dN),mN=h.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,...g}=e,_=sN(dN,n),[v,y]=h.useState(null),b=fu(t,e=>y(e)),[x,S]=h.useState(null),C=nN(x),T=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(vN),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:ee,middlewareData:F}=WM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>AM(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[KM({mainAxis:i+E,alignmentAxis:o}),c&&qM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?JM():void 0,...j}),c&&YM({...j}),XM({...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&&QM({element:x,padding:s}),yN({arrowWidth:T,arrowHeight:E}),f&&ZM({strategy:`referenceHidden`,...j})]}),[I,te]=bN(P),ne=Eu(m);Uu(()=>{ee&&ne?.()},[ee,ne]);let re=F.arrow?.x,L=F.arrow?.y,R=F.arrow?.centerOffset!==0,[z,ie]=h.useState();return Uu(()=>{v&&ie(window.getComputedStyle(v).zIndex)},[v]),(0,w.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:ee?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(fN,{scope:n,placedSide:I,onArrowChange:S,arrowX:re,arrowY:L,shouldHideArrow:R,children:(0,w.jsx)(wu.div,{"data-side":I,"data-align":te,...g,ref:b,style:{...g.style,animation:ee?void 0:`none`}})})})});mN.displayName=dN;var hN=`PopperArrow`,gN={top:`bottom`,right:`left`,bottom:`top`,left:`right`},_N=h.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=pN(hN,n),a=gN[i.placedSide];return(0,w.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,w.jsx)(tN,{...r,ref:t,style:{...r.style,display:`block`}})})});_N.displayName=hN;function vN(e){return e!==null}var yN=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]=bN(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 bN(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var xN=cN,SN=uN,CN=mN,wN=_N;function TN(e){let t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var EN=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},DN=new WeakMap,ON=new WeakMap,kN={},AN=0,jN=function(e){return e&&(e.host||jN(e.parentNode))},MN=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=jN(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})},NN=function(e,t,n,r){var i=MN(t,Array.isArray(e)?e:[e]);kN[n]||(kN[n]=new WeakMap);var a=kN[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=(DN.get(e)||0)+1,l=(a.get(e)||0)+1;DN.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ON.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(),AN++,function(){o.forEach(function(e){var t=DN.get(e)-1,i=a.get(e)-1;DN.set(e,t),a.set(e,i),t||(ON.has(e)||e.removeAttribute(r),ON.delete(e)),i||e.removeAttribute(n)}),AN--,AN||(DN=new WeakMap,DN=new WeakMap,ON=new WeakMap,kN={})}},PN=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||EN(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),NN(r,i,n,`aria-hidden`)):function(){return null}},FN=function(){return FN=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},FN.apply(this,arguments)};function IN(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 LN(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 RN=`right-scroll-bar-position`,zN=`width-before-scroll-bar`,BN=`with-scroll-bars-hidden`,VN=`--removed-body-scroll-bar-size`;function HN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function UN(e,t){var n=(0,h.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 WN=typeof window<`u`?h.useLayoutEffect:h.useEffect,GN=new WeakMap;function KN(e,t){var n=UN(t||null,function(t){return e.forEach(function(e){return HN(e,t)})});return WN(function(){var t=GN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||HN(e,null)}),i.forEach(function(e){r.has(e)||HN(e,a)})}GN.set(n,e)},[e]),n}function qN(e){return e}function JN(e,t){t===void 0&&(t=qN);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 YN(e){e===void 0&&(e={});var t=JN(null);return t.options=FN({async:!0,ssr:!1},e),t}var XN=function(e){var t=e.sideCar,n=IN(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 h.createElement(r,FN({},n))};XN.isSideCarExport=!0;function ZN(e,t){return e.useMedium(t),XN}var QN=YN(),$N=function(){},eP=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:$N,onWheelCapture:$N,onTouchMoveCapture:$N}),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,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=IN(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=KN([n,t]),w=FN(FN({},x),i);return h.createElement(h.Fragment,null,u&&h.createElement(S,{sideCar:QN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?h.cloneElement(h.Children.only(s),FN(FN({},w),{ref:C})):h.createElement(y,FN({},w,{className:c,ref:C}),s))});eP.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eP.classNames={fullWidth:zN,zeroRight:RN};var tP,nP=function(){if(tP)return tP;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rP(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nP();return t&&e.setAttribute(`nonce`,t),e}function iP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function aP(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var oP=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rP())&&(iP(t,n),aP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sP=function(){var e=oP();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cP=function(){var e=sP();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},lP={left:0,top:0,right:0,gap:0},uP=function(e){return parseInt(e||``,10)||0},dP=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[uP(n),uP(r),uP(i)]},fP=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return lP;var t=dP(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])}},pP=cP(),mP=`data-scroll-locked`,hP=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
76
76
  .${BN} {
77
77
  overflow: hidden ${r};
78
78
  padding-right: ${s}px ${r};
@@ -113,7 +113,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
113
113
  .block-interactivity-${e} {pointer-events: none;}
114
114
  .allow-interactivity-${e} {pointer-events: all;}
115
115
  `},RP=0,zP=[];function BP(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),i=h.useState(RP++)[0],a=h.useState(cP)[0],o=h.useRef(e);h.useEffect(function(){o.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=LN([e.lockRef.current],(e.shards||[]).map(FP),!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=h.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=NP(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=EP(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=EP(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 MP(h,t,e,h===`h`?s:c,!0)},[]),c=h.useCallback(function(e){var n=e;if(!(!zP.length||zP[zP.length-1]!==a)){var r=`deltaY`in n?PP(n):NP(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&IP(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(FP).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=h.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:VP(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=h.useCallback(function(e){n.current=NP(e),r.current=void 0},[]),d=h.useCallback(function(t){l(t.type,PP(t),t.target,s(t,e.lockRef.current))},[]),f=h.useCallback(function(t){l(t.type,NP(t),t.target,s(t,e.lockRef.current))},[]);h.useEffect(function(){return zP.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,xP),document.addEventListener(`touchmove`,c,xP),document.addEventListener(`touchstart`,u,xP),function(){zP=zP.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,xP),document.removeEventListener(`touchmove`,c,xP),document.removeEventListener(`touchstart`,u,xP)}},[]);var p=e.removeScrollBar,m=e.inert;return h.createElement(h.Fragment,null,m?h.createElement(a,{styles:LP(i)}):null,p?h.createElement(vP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function VP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var HP=ZN(QN,BP),UP=h.forwardRef(function(e,t){return h.createElement(eP,FN({},e,{ref:t,sideCar:HP}))});UP.classNames=eP.classNames;var WP=[` `,`Enter`,`ArrowUp`,`ArrowDown`],GP=[` `,`Enter`],KP=`Select`,[qP,JP,YP]=Su(KP),[XP,ZP]=mu(KP,[YP,aN]),QP=aN(),[$P,eF]=XP(KP),[tF,nF]=XP(KP),rF=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,g=QP(t),[_,v]=h.useState(null),[y,b]=h.useState(null),[x,S]=h.useState(!1),C=vA(l),[T,E]=Qu({prop:r,defaultProp:i??!1,onChange:a,caller:KP}),[D,O]=Qu({prop:o,defaultProp:s,onChange:c,caller:KP}),k=h.useRef(null),A=_?m||!!_.closest(`form`):!0,[j,M]=h.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,w.jsx)(xN,{...g,children:(0,w.jsxs)($P,{required:p,scope:t,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:BA(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:C,triggerPointerDownPosRef:k,disabled:f,children:[(0,w.jsx)(qP.Provider,{scope:t,children:(0,w.jsx)(tF,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:h.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,w.jsxs)(QF,{"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,w.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};rF.displayName=KP;var iF=`SelectTrigger`,aF=h.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=QP(n),o=eF(iF,n),s=o.disabled||r,c=fu(t,o.onTriggerChange),l=JP(n),u=h.useRef(`touch`),[d,f,p]=eI(e=>{let t=l().filter(e=>!e.disabled),n=tI(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,w.jsx)(SN,{asChild:!0,...a,children:(0,w.jsx)(wu.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":$F(o.value)?``:void 0,...i,ref:c,onClick:G(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:G(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:G(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&WP.includes(e.key)&&(m(),e.preventDefault())})})})});aF.displayName=iF;var oF=`SelectValue`,sF=h.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=eF(oF,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=fu(t,c.onValueNodeChange);return Uu(()=>{l(u)},[l,u]),(0,w.jsx)(wu.span,{...s,ref:d,style:{pointerEvents:`none`},children:$F(c.value)?(0,w.jsx)(w.Fragment,{children:o}):a})});sF.displayName=oF;var cF=`SelectIcon`,lF=h.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,w.jsx)(wu.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});lF.displayName=cF;var uF=`SelectPortal`,dF=e=>(0,w.jsx)(Gu,{asChild:!0,...e});dF.displayName=uF;var fF=`SelectContent`,pF=h.forwardRef((e,t)=>{let n=eF(fF,e.__scopeSelect),[r,i]=h.useState();if(Uu(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Cu.createPortal((0,w.jsx)(hF,{scope:e.__scopeSelect,children:(0,w.jsx)(qP.Slot,{scope:e.__scopeSelect,children:(0,w.jsx)(`div`,{children:e.children})})}),t):null}return(0,w.jsx)(yF,{...e,ref:t})});pF.displayName=fF;var mF=10,[hF,gF]=XP(fF),_F=`SelectContentImpl`,vF=gu(`SelectContent.RemoveScroll`),yF=h.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:g,avoidCollisions:_,...v}=e,y=eF(fF,n),[b,x]=h.useState(null),[S,C]=h.useState(null),T=fu(t,e=>x(e)),[E,D]=h.useState(null),[O,k]=h.useState(null),A=JP(n),[j,M]=h.useState(!1),N=h.useRef(!1);h.useEffect(()=>{if(b)return PN(b)},[b]),bA();let P=h.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]),ee=h.useCallback(()=>P([E,b]),[P,E,b]);h.useEffect(()=>{j&&ee()},[j,ee]);let{onOpenChange:F,triggerPointerDownPosRef:I}=y;h.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||F(!1),document.removeEventListener(`pointermove`,t),I.current=null};return I.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,F,I]),h.useEffect(()=>{let e=()=>F(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[te,ne]=eI(e=>{let t=A().filter(e=>!e.disabled),n=tI(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),re=h.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]),L=h.useCallback(()=>b?.focus(),[b]),R=h.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&k(e)},[y.value]),z=r===`popper`?CF:xF,ie=z===CF?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:_}:{};return(0,w.jsx)(hF,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:re,selectedItem:E,onItemLeave:L,itemTextRefCallback:R,focusSelectedItem:ee,selectedItemText:O,position:r,isPositioned:j,searchRef:te,children:(0,w.jsx)(UP,{as:vF,allowPinchZoom:!0,children:(0,w.jsx)(EA,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:G(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,w.jsx)(Pu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,w.jsx)(z,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...ie,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:G(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(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()}})})})})})})});yF.displayName=_F;var bF=`SelectItemAlignedPosition`,xF=h.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=eF(fF,n),o=gF(fF,n),[s,c]=h.useState(null),[l,u]=h.useState(null),d=fu(t,e=>u(e)),f=JP(n),p=h.useRef(!1),m=h.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=h.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.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-mF,d=gA(a,[mF,Math.max(mF,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-mF,d=gA(a,[mF,Math.max(mF,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-mF*2,u=g.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+h+u+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-mF,D=c-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=m+h+k,j=x-A;if(A<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+g.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}s.style.margin=`${mF}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,g,_,v,a.dir,r]);Uu(()=>b(),[b]);let[x,S]=h.useState();return Uu(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,w.jsx)(wF,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:h.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,w.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,w.jsx)(wu.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});xF.displayName=bF;var SF=`SelectPopperPosition`,CF=h.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=mF,...a}=e,o=QP(n);return(0,w.jsx)(CN,{...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)`}})});CF.displayName=SF;var[wF,TF]=XP(fF,{}),EF=`SelectViewport`,DF=h.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=gF(EF,n),o=TF(EF,n),s=fu(t,a.onViewportChange),c=h.useRef(0);return(0,w.jsxs)(w.Fragment,{children:[(0,w.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,w.jsx)(qP.Slot,{scope:n,children:(0,w.jsx)(wu.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:G(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-mF*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})})})]})});DF.displayName=EF;var OF=`SelectGroup`,[kF,AF]=XP(OF),jF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=BA();return(0,w.jsx)(kF,{scope:n,id:i,children:(0,w.jsx)(wu.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});jF.displayName=OF;var MF=`SelectLabel`,NF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=AF(MF,n);return(0,w.jsx)(wu.div,{id:i.id,...r,ref:t})});NF.displayName=MF;var PF=`SelectItem`,[FF,IF]=XP(PF),LF=h.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=eF(PF,n),c=gF(PF,n),l=s.value===r,[u,d]=h.useState(a??``),[f,p]=h.useState(!1),m=fu(t,e=>c.itemRefCallback?.(e,r,i)),g=BA(),_=h.useRef(`touch`),v=()=>{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,w.jsx)(FF,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:h.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,w.jsx)(qP.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,w.jsx)(wu.div,{role:`option`,"aria-labelledby":g,"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:G(o.onFocus,()=>p(!0)),onBlur:G(o.onBlur,()=>p(!1)),onClick:G(o.onClick,()=>{_.current!==`mouse`&&v()}),onPointerUp:G(o.onPointerUp,()=>{_.current===`mouse`&&v()}),onPointerDown:G(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:G(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:G(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(GP.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})});LF.displayName=PF;var RF=`SelectItemText`,zF=h.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=eF(RF,n),s=gF(RF,n),c=IF(RF,n),l=nF(RF,n),[u,d]=h.useState(null),f=fu(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=h.useMemo(()=>(0,w.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Uu(()=>(g(m),()=>_(m)),[g,_,m]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(wu.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Cu.createPortal(a.children,o.valueNode):null]})});zF.displayName=RF;var BF=`SelectItemIndicator`,VF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return IF(BF,n).isSelected?(0,w.jsx)(wu.span,{"aria-hidden":!0,...r,ref:t}):null});VF.displayName=BF;var HF=`SelectScrollUpButton`,UF=h.forwardRef((e,t)=>{let n=gF(HF,e.__scopeSelect),r=TF(HF,e.__scopeSelect),[i,a]=h.useState(!1),o=fu(t,r.onScrollButtonChange);return Uu(()=>{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,w.jsx)(KF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});UF.displayName=HF;var WF=`SelectScrollDownButton`,GF=h.forwardRef((e,t)=>{let n=gF(WF,e.__scopeSelect),r=TF(WF,e.__scopeSelect),[i,a]=h.useState(!1),o=fu(t,r.onScrollButtonChange);return Uu(()=>{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,w.jsx)(KF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});GF.displayName=WF;var KF=h.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=gF(`SelectScrollButton`,n),o=h.useRef(null),s=JP(n),c=h.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),Uu(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,w.jsx)(wu.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:G(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:G(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:G(i.onPointerLeave,()=>{c()})})}),qF=`SelectSeparator`,JF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,w.jsx)(wu.div,{"aria-hidden":!0,...r,ref:t})});JF.displayName=qF;var YF=`SelectArrow`,XF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=QP(n),a=eF(YF,n),o=gF(YF,n);return a.open&&o.position===`popper`?(0,w.jsx)(wN,{...i,...r,ref:t}):null});XF.displayName=YF;var ZF=`SelectBubbleInput`,QF=h.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=h.useRef(null),a=fu(r,i),o=TN(t);return h.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,w.jsx)(wu.select,{...n,style:{...td,...n.style},ref:a,defaultValue:t})});QF.displayName=ZF;function $F(e){return e===``||e===void 0}function eI(e){let t=Eu(e),n=h.useRef(``),r=h.useRef(0),i=h.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=h.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function tI(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=nI(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 nI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rI=rF,iI=aF,aI=sF,oI=lF,sI=dF,cI=pF,lI=DF,uI=jF,dI=NF,fI=LF,pI=zF,mI=VF,hI=UF,gI=GF,_I=JF,vI=rI,yI=uI,bI=aI,xI=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,w.jsxs)(iI,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,w.jsx)(oI,{asChild:!0,children:(0,w.jsx)(xf,{className:`size-4 opacity-50`})})]}),SI=({className:e,...t})=>(0,w.jsx)(hI,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,w.jsx)(bf,{})}),CI=({className:e,...t})=>(0,w.jsx)(gI,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,w.jsx)(_f,{})}),wI=({className:e,children:t,position:n=`popper`,...r})=>(0,w.jsx)(sI,{children:(0,w.jsxs)(cI,{className:W(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,w.jsx)(SI,{}),(0,w.jsx)(lI,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,w.jsx)(CI,{})]})}),TI=({className:e,...t})=>(0,w.jsx)(dI,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),EI=({className:e,children:t,...n})=>(0,w.jsxs)(fI,{className:W(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,w.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,w.jsx)(mI,{children:(0,w.jsx)(gf,{className:`size-4`})})}),(0,w.jsx)(pI,{children:t})]}),DI=({className:e,...t})=>(0,w.jsx)(_I,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=vI;J.Group=yI,J.Value=bI,J.Trigger=xI,J.ScrollUpButton=SI,J.ScrollDownButton=CI,J.Content=wI,J.Label=TI,J.Item=EI,J.Separator=DI;var OI=e=>{let t=(0,_.c)(11),{availableFormats:n}=e,{codeFormat:r,setCodeFormat:i,setContentDeclarationFormat:a}=rA(),o=_r(hA),s;t[0]===n?s=t[1]:(s=e=>!n||n.includes(e),t[0]=n,t[1]=s);let c=s,l;t[2]!==i||t[3]!==a?(l=e=>{i(e),a(e)},t[2]=i,t[3]=a,t[4]=l):l=t[4];let u;return t[5]!==r||t[6]!==o.codeFormat.label.value||t[7]!==o.codeFormat.placeholder.value||t[8]!==c||t[9]!==l?(u=(0,w.jsxs)(J,{value:r,onValueChange:l,children:[(0,w.jsx)(J.Trigger,{className:`py-1!`,"aria-label":o.codeFormat.label.value,children:(0,w.jsx)(J.Value,{placeholder:o.codeFormat.placeholder.value})}),(0,w.jsxs)(J.Content,{children:[c(`typescript`)&&(0,w.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),c(`esm`)&&(0,w.jsx)(J.Item,{value:`esm`,children:`ESM`}),c(`commonjs`)&&(0,w.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`})]})]}),t[5]=r,t[6]=o.codeFormat.label.value,t[7]=o.codeFormat.placeholder.value,t[8]=c,t[9]=l,t[10]=u):u=t[10],u},kI=()=>{let e=(0,_.c)(5),{contentDeclarationFormat:t,setContentDeclarationFormat:n}=rA(),r=_r(hA),i;return e[0]!==r.contentDeclarationFormat.label.value||e[1]!==r.contentDeclarationFormat.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,w.jsxs)(J,{value:t,onValueChange:n,children:[(0,w.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.contentDeclarationFormat.label.value,children:(0,w.jsx)(J.Value,{placeholder:r.contentDeclarationFormat.placeholder.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),(0,w.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`}),(0,w.jsx)(J.Item,{value:`esm`,children:`ESM`}),(0,w.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},AI={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`]},jI=({children:e,className:t,identifier:n,...r})=>(0,w.jsx)(`div`,{className:W(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),MI=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`bellow`,identifier:o,className:s,displayArrow:c=!0,...l})=>(0,w.jsx)(ZC,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:W(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,a===`bellow`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:left-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:right-2`,c&&a===`bellow`&&`before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,c&&a===`above`&&`before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...l,children:e});jI.Detail=MI;var NI=e=>(0,w.jsx)(jI,{...e}),PI=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,h.useRef)(null),[i,a]=(0,h.useState)(e),[o,s]=(0,h.useState)(t),[c,l]=(0,h.useState)(void 0);return(0,h.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,w.jsx)(MI,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},FI=NI;FI.Detail=PI;var II={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`]},LI=e=>{let t=(0,_.c)(6),{content:n,...r}=e,[i,a]=(0,h.useState)(!1),[o,s]=(0,h.useState)(!1),{label:c}=_r(II),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,h.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,w.jsx)(nw,{Icon:i?Sf:Cf,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})},RI=e=>{let{code:t,...n}=e,{title:r,description:i}=_r(AI);return(0,w.jsxs)(FI,{identifier:`copy`,children:[(0,w.jsx)(LI,{content:t,...n}),(0,w.jsxs)(FI.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,w.jsx)(`strong`,{children:r}),(0,w.jsx)(`p`,{className:`text-neutral`,children:i})]})]})},zI=()=>{let e=(0,_.c)(5),{packageManager:t,setPackageManager:n}=rA(),r=_r(hA);_r(hA);let i;return e[0]!==r.packageManager.label.value||e[1]!==r.packageManager.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,w.jsxs)(J,{value:t,onValueChange:n,children:[(0,w.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.packageManager.label.value,children:(0,w.jsx)(J.Value,{placeholder:r.packageManager.placeholder.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`npm`,children:`npm`}),(0,w.jsx)(J.Item,{value:`pnpm`,children:`pnpm`}),(0,w.jsx)(J.Item,{value:`yarn`,children:`yarn`}),(0,w.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},BI=700,VI=new Set([`tsx`,`jsx`]),HI=e=>{if(e){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},UI=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:l,isRollable:u=!0,...d})=>{let{codeFormat:f,contentDeclarationFormat:p}=rA(),m=(0,h.useMemo)(()=>HI(c),[c]),g=(0,h.useMemo)(()=>HI(l),[l]),_=m!==void 0&&m.length>1&&m.includes(`typescript`),v=g!==void 0&&g.length>1&&g.includes(`typescript`),y=_||v,b=v?p:f,x=(0,h.useMemo)(()=>{let e=v?g:m;if(!e)return e;let n=e.filter(e=>e!==`json`);return VI.has(t)&&(n=n.filter(e=>e!==`commonjs`)),n},[v,g,m,t]),S=(0,h.useMemo)(()=>!x||x.includes(b)?b:x[x.length-1]??`typescript`,[x,b]),[C,T]=(0,h.useState)(o);(0,h.useEffect)(()=>{if(!y||S===`typescript`){T(o);return}if(!o)return;let e=!1;return(async()=>{let{deriveFileName:t}=await jn(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-C1hlgQJh.js`);return{deriveFileName:e}},[]);e||T(t(o,S))})(),()=>{e=!0}},[o,y,S]);let E=(0,h.useMemo)(()=>{let t=Array.isArray(e)?e.join(``):String(e);return t.endsWith(`
116
- `)?t.slice(0,-1):t},[e]),[D,O]=(0,h.useState)(E);(0,h.useEffect)(()=>{if(!y||S===`typescript`){O(E);return}let e=!1;return(async()=>{let{transformCode:t}=await jn(async()=>{let{transformCode:e}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e}},[]);e||O(t(E,S))})(),()=>{e=!0}},[E,y,S]);let k=s||c||l;return(0,w.jsx)(mA,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,w.jsxs)(ZC,{className:W(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...d,children:[r&&(0,w.jsxs)(w.Fragment,{children:[(0,w.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,w.jsx)(`span`,{className:`truncate`,children:C??t}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,w.jsx)(zI,{}),c&&(0,w.jsx)(OI,{availableFormats:x}),l&&(0,w.jsx)(kI,{})]})]}),(0,w.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,w.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`,k&&`h-11`),children:(0,w.jsx)(RI,{code:D})})})]}),(0,w.jsx)(sA,{minHeight:BI,isRollable:u,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:y?(0,w.jsx)(fA,{originalLang:t,targetFormat:S,isDarkMode:n,children:E}):(0,w.jsx)(uA,{lang:t,isDarkMode:n,children:E})})]})})},WI=(0,h.createContext)({tabsValues:{},setTabsValues:()=>{}}),GI=()=>(0,h.useContext)(WI),KI=e=>{let t=(0,_.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,h.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,w.jsx)(WI,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},qI=e=>{let t=(0,_.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,h.useRef)(null),[g,v]=(0,h.useState)(!1),[y,b]=(0,h.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,h.useRef)(x),C=(0,h.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,v(!1),b(0))},t[5]=u,t[6]=O);let k=O,A;t[7]!==D||t[8]!==p||t[9]!==u||t[10]!==g?(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(),g||v(!0),b(D(n/t*100)),S.current.lastX=e.clientX}},t[7]=D,t[8]=p,t[9]=u,t[10]=g,t[11]=A):A=t[11];let j=A,M;t[12]!==y||t[13]!==r||t[14]!==i||t[15]!==d?(M=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=S.current.isHorizontal,n=y;if(v(!1),b(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]=y,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 ee=P,F;t[20]!==u||t[21]!==N?(F=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[20]=u,t[21]=N,t[22]=F):F=t[22];let I=F,te;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>{b(0),v(!1)},t[23]=te):te=t[23];let ne;t[24]===a?ne=t[25]:(ne=[a],t[24]=a,t[25]=ne),(0,h.useEffect)(te,ne);let re;t[26]===f?re=t[27]:(re={touchAction:f},t[26]=f,t[27]=re);let L;t[28]!==I||t[29]!==k||t[30]!==j||t[31]!==ee||t[32]!==re?(L={ref:m,onPointerDown:k,onPointerMove:j,onPointerUp:ee,onPointerCancel:I,style:re},t[28]=I,t[29]=k,t[30]=j,t[31]=ee,t[32]=re,t[33]=L):L=t[33];let R;return t[34]!==y||t[35]!==g||t[36]!==L?(R={containerRef:m,isDragging:g,dragDeltaPct:y,containerProps:L},t[34]=y,t[35]=g,t[36]=L,t[37]=R):R=t[37],R},JI=nf(`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`}}),YI=nf(`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`}}),XI=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,h.useRef)([]),c=(0,h.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=cw(s,{isHoverable:i,orientation:a});return(0,h.useEffect)(()=>{u()},[t]),(0,w.jsxs)(`div`,{className:W(JI({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,h.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&(0,w.jsx)(`div`,{className:W(YI({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},ZI=(0,h.createContext)(void 0),QI=nf(`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`}}),$I=({children:e,...t})=>(0,w.jsx)(`div`,{...t,children:e});$I.displayName=`TabItem`;var eL=Object.assign(e=>{let t=(0,_.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...l}=e,u=h.Children.toArray(a).filter(tL),d=u[0]?.props?.value,{tabsValues:f,setTabsValues:p}=GI(),[m,g]=(0,h.useState)(n??d??``),v=(r&&typeof f==`object`?f?.[r]:m)??n??d,y;t[0]===v?y=t[1]:(y=e=>e.props.value===v,t[0]=v,t[1]=y);let b=u.findIndex(y),x=u.length,{containerProps:S,dragDeltaPct:C,isDragging:T}=qI({itemIndex:b,itemCount:x,onSwipeLeft:()=>{let e=u[Math.min(x-1,b+1)]?.props?.value;e&&E(e)},onSwipeRight:()=>{let e=u[Math.max(0,b-1)]?.props?.value;e&&E(e)}}),E=e=>{g(e),typeof p==`function`&&p(t=>({...t,[r]:e}))},D={activeTab:m??d??``,setActiveTab:E},O;return t[2]!==b||t[3]!==c?(O=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===b;return(0,w.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:W(`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,w.jsx)(`div`,{className:W(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=b,t[3]=c,t[4]=O):O=t[4],(0,w.jsx)(ZI.Provider,{value:D,children:(0,w.jsxs)(`div`,{className:W(QI({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...l,children:[(0,w.jsx)(`div`,{className:W(`flex shrink-0 gap-3 p-3`,s),children:(0,w.jsx)(XI,{selectedChoice:v,tabs:u.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=v===n;return(0,w.jsx)(`button`,{className:W(`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&&E(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,w.jsx)(`div`,{className:W(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...S,children:(0,w.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:W(`grid w-full min-w-0`,c&&`h-full`,T?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${u.length}, 100%)`,transform:`translateX(-${b*100-(T?C:0)}%)`},children:u.map(O)})})]})})},{Item:$I});function tL(e){return(0,h.isValidElement)(e)&&e.type===$I}var nL=e=>{let t=(0,_.c)(3),[n,r]=(0,h.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,h.useEffect)(i,a),n},rL=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()})}},iL=[],aL=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(rL.subscribe,rL.getSnapshot,oL),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:rL.addBlockage,removeBlockage:rL.removeBlockage,isElementScrollBlocked:rL.isElementScrollBlocked},e[0]=t,e[1]=n),n};function oL(){return iL}var sL=e=>{let t=(0,_.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}=aL(),d=nL(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,h.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 g;return t[12]===m?g=t[13]:(g={isScrollBlocked:m},t[12]=m,t[13]=g),g},cL=nf(`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`}}),lL={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`},uL=WC.create(ZC),dL=e=>{let t=(0,_.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:l,isScrollable:u,disableScroll:d,padding:f,...p}=e,m=o===void 0?!1:o,g=c===void 0?`md`:c,v=u===void 0?!1:u,y=d===void 0?!0:d,b=f===void 0?`none`:f,x=nL(i),S=r&&y,C;t[0]===S?C=t[1]:(C={key:`modal`,disableScroll:S},t[0]=S,t[1]=C),sL(C);let T,E;if(t[2]!==r||t[3]!==a?(T=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},E=[r,a],t[2]=r,t[3]=a,t[4]=T,t[5]=E):(T=t[4],E=t[5]),(0,h.useEffect)(T,E),!x){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[6]=e):e=t[6],e}let D=!!s,O=lL[b||`none`],k;return t[7]===a?k=t[8]:(k=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=k),(0,Cu.createPortal)((0,w.jsx)(WC.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:k,"aria-hidden":!r,children:(0,w.jsxs)(uL,{onClick:fL,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:cL({size:g,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,w.jsxs)(`div`,{className:W(`relative flex-none px-4 pt-4`,m&&D?`flex items-start`:m?`flex justify-end`:D?`items-center`:`hidden`),children:[D&&(0,w.jsx)(Qk,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,w.jsx)(nw,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Vf,size:`icon-md`})]}),(0,w.jsx)(`div`,{className:W(`flex min-h-0 w-full flex-1 flex-col`,v===!0&&`overflow-auto`,v===`y`&&`overflow-y-auto overflow-x-hidden`,v===`x`&&`overflow-x-auto overflow-y-hidden`,!v&&`overflow-visible`),children:(0,w.jsx)(`div`,{className:W(`flex h-full w-full flex-1 flex-col`,O),children:n})})]})}),x)};function fL(e){return e.stopPropagation()}var pL={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`]},mL=e=>{let t=(0,_.c)(6),{setIsModalOpen:n}=e,{modal:r}=_r(pL),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,w.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,w.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,w.jsxs)(FI,{identifier:`expand`,children:[(0,w.jsx)(nw,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:Af}),(0,w.jsxs)(FI.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,w.jsx)(`strong`,{children:r.title}),(0,w.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},hL=(0,h.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,w.jsx)(`table`,{ref:r,className:W(`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})),gL=.55,_L=5,vL=30,yL=(e,t,n)=>{let r=(0,_.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(vL,Math.max(_L,(n[t]??0)*gL));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${vL}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,h.useEffect)(i,n)},bL=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null),u=(0,h.useRef)(null),d=(0,h.useRef)(null);yL(u,d,[a.children,o]),(0,h.useEffect)(()=>{if(o&&c!==null&&d.current){let e=d.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,h.useEffect)(()=>{o||l(null)},[o]);let f=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(l(t.rowIndex),s(!0))}i?.(e)};return(0,w.jsxs)(`div`,{className:`group relative`,children:[n&&(0,w.jsx)(mL,{setIsModalOpen:s}),(0,w.jsx)(sA,{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,w.jsx)(hL,{ref:u,className:e,isInteractive:r??n,onClick:f,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f(e)},...a})}),(0,w.jsx)(dL,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,w.jsx)(`div`,{className:`grid`,children:(0,w.jsx)(hL,{ref:d,className:W(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,w.jsx)(w.Fragment,{})})]})};function xL(e){if(!e)return{href:``,label:``};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}}var SL=e=>{let t=(0,_.c)(2),{src:n,className:r,title:i,...a}=e,[o,s]=(0,h.useState)(!1),{href:c,label:l}=xL(n),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>s(!0),t[0]=u):u=t[0];let d;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>s(!1),t[1]=d):d=t[1],(0,w.jsxs)(ZC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,w.jsx)(`iframe`,{...a,src:n,title:i,className:W(`block max-h-[80vh] min-h-[12rem] w-full border-0`,r)}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-neutral/30 border-t bg-card/40 px-3 py-1`,children:[c?(0,w.jsx)(Lk,{href:c,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-neutral text-xs underline-offset-2 hover:text-text hover:underline`,children:l}):(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,w.jsx)(nw,{variant:`hoverable`,size:`icon-md`,onClick:u,label:`Open embedded page in fullscreen`,Icon:Af})]}),(0,w.jsx)(dL,{isOpen:o,onClose:d,size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&n?(0,w.jsx)(ZC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,w.jsx)(`iframe`,{...a,src:n,title:i??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},CL=e=>(0,w.jsx)(Xk,{isClickable:!0,className:`text-text`,...e}),wL=e=>(0,w.jsx)(Zk,{isClickable:!0,className:`mt-16 text-text`,...e}),TL=e=>(0,w.jsx)(Qk,{isClickable:!0,className:`mt-5 text-text`,...e}),EL=e=>(0,w.jsx)($k,{isClickable:!0,className:`mt-3 text-text`,...e}),DL=e=>(0,w.jsx)(eA,{isClickable:!0,className:`mt-3 text-text`,...e}),OL=e=>(0,w.jsx)(tA,{isClickable:!0,className:`mt-3 text-text`,...e}),kL=e=>(0,w.jsx)(`strong`,{className:`text-text`,...e}),AL=(0,h.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,w.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,w.jsx)(UI,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),jL=e=>function(t){return(0,w.jsx)(AL,{...t,isDarkMode:e})},ML=({className:e,...t})=>(0,w.jsx)(`blockquote`,{className:W(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),NL=({className:e,...t})=>(0,w.jsx)(`ul`,{className:W(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),PL=({className:e,...t})=>(0,w.jsx)(`ol`,{className:W(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),FL=({className:e,alt:t,src:n,...r})=>(0,w.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:W(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),IL=e=>t=>(0,w.jsx)(Lk,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),LL={h1:CL,h2:wL,h3:TL,h4:EL,h5:DL,h6:OL,strong:kL,blockquote:ML,ul:NL,ol:PL,img:FL,pre:e=>(0,w.jsx)(w.Fragment,{children:e.children}),table:e=>(0,w.jsx)(bL,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,w.jsx)(`th`,{className:W(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,w.jsx)(`tr`,{className:W(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,w.jsx)(`td`,{className:W(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,w.jsx)(`hr`,{className:W(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,w.jsx)(eL,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:eL.Item,Columns:({className:e,...t})=>(0,w.jsx)(`div`,{className:W(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,w.jsx)(`div`,{className:W(`flex-1`,e),...t}),iframe:e=>(0,w.jsx)(SL,{...e})},RL=(e,t)=>({...LL,code:jL(e),a:IL(t)}),zL=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,w.jsx)(iA,{children:(0,w.jsx)(KI,{children:xr(e,{components:{...RL(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),BL=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}},VL=e=>{let t=(0,_.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=BL(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,h.useState)(a??null),[l,u]=(0,h.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,h.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,w.jsxs)(`div`,{className:`flex gap-1`,children:[(0,w.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,w.jsx)(J.Trigger,{className:`w-20`,children:(0,w.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`<`,children:`<`}),(0,w.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,w.jsx)(J.Item,{value:`=`,children:`=`}),(0,w.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,w.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,w.jsx)(FT,{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},HL=e=>{let t=(0,_.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=wT(),s=ST(),{mutate:c,isPending:l}=lk(),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,w.jsx)(kk,{variant:`default`,onContentChange:u,additionalButtons:(0,w.jsx)(nw,{Icon:Bf,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},UL=e=>{let t=(0,_.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=wT(),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,w.jsx)(sE,{variant:`default`,onContentChange:o,...i})},WL=[{content:`False`,value:!1},{content:`True`,value:!0}],GL=e=>{let t=(0,_.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=wT(),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,w.jsx)(_w,{choices:WL,value:!0,onChange:o,color:`text`,size:`sm`,...i})},KL=e=>{let t=(0,_.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=vr(),{selectedLocales:c,availableLocales:l}=aE(),u=n[D],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[D],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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:sr(e,o)})}),(0,w.jsx)(`tr`,{className:`flex`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:p[e]??Jw(p[s]),keyPath:[...r,{type:D,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,w.jsx)(`table`,{className:`w-full`,children:(0,w.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},qL=e=>{let t=(0,_.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=wT(),{addNewEnumeration:s,removeEnumeration:c}=_r(nE),l=n[O],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,Jw(l[d])??``,[...r,{type:O,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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[O]).map(e=>{let t=[...r,{type:O,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(`div`,{className:`flex flex-1`,children:(0,w.jsx)(nw,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:zf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,w.jsx)(`tr`,{className:`w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(VL,{value:e,onChange:t=>{let a=n[O],s=Mk(a,e,t),c={...n,[O]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(rR,{section:l[e]??Jw(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,w.jsx)(nw,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Ff,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},JL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[k];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:i[e]??Jw(i.true),keyPath:[...t,{type:k,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},YL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[L];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:i[e]??Jw(i.male),keyPath:[...t,{type:L,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},XL=e=>{let t=(0,_.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=wT(),{addNewElement:s,removeElement:c}=_r(nE),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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,w.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,w.jsx)(nw,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:N,key:t}];o(i.localId,void 0,e)},Icon:zf,children:c.text})]})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:e??Jw(n[0]),keyPath:[...r,{type:N,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:N,key:n.length}];o(i.localId,Jw(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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,w.jsx)(nw,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Ff,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},ZL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:M,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??Jw(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(rR,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),QL=e=>{let t=(0,_.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,h.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:I}],l=n[I];s=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(_w,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(iR,{section:l,keyPath:c,dictionary:i,renderSection:a===1?aR:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},$L=e=>{let t=(0,_.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,h.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:F}],u=n[F],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,w.jsx)(zL,{isDarkMode:a,children:e}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(_w,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(iR,{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},eR=({section:e,keyPath:t,...n})=>{let r=[...t,{type:A}],i=e[A];return(0,w.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,w.jsx)(iR,{section:i,keyPath:r,...n})})},tR=({section:e,keyPath:t,...n})=>{let r=[...t,{type:j}],i=e[j],{content:a}=e;return(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,w.jsx)(iR,{section:a,keyPath:r,...n})]})},nR=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=wT(),s=i[P],c=[...t,{type:P}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,w.jsx)(Nk,{children:`Dictionary key`}),(0,w.jsx)(sE,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,w.jsx)(Nk,{children:`Path (optional)`}),(0,w.jsx)(sE,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},rR=e=>{let t=(0,_.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=_r(nE),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=Qw(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,w.jsx)(`span`,{children:`(React Node)`}),(0,w.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,w.jsx)(nR,{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,w.jsx)(KL,{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,w.jsx)(qL,{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,w.jsx)(JL,{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,w.jsx)(YL,{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,w.jsx)(eR,{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,w.jsx)($L,{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,w.jsx)(QL,{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,w.jsx)(tR,{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,w.jsx)(XL,{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,w.jsx)(ZL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(UL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,w.jsx)(HL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(GL,{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,w.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},iR=e=>(0,w.jsx)(ZC,{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,w.jsx)(rR,{...e})});function aR(e){return(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}var oR={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`]},sR=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]||``,cR=nf(`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`}}),lR=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=ye(oR).linkLabel;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Lk,{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,w.jsx)(`span`,{itemProp:`name`,children:n})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},uR=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=_r(oR);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(nw,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,w.jsx)(`span`,{itemProp:`name`,children:t})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},dR=({children:e,position:t,className:n,...r})=>(0,w.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,w.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,w.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),fR=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,w.jsx)(yf,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,w.jsx)(`nav`,{"aria-label":o,children:(0,w.jsx)(`ol`,{className:W(cR({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,g=sR(n);if(p)return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,w.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:W(g),children:a})})]},`truncated-${m}`);let _=(0,w.jsx)(dR,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?_=(0,w.jsx)(lR,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(_=(0,w.jsx)(uR,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let v=(0,h.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},_);return o?v:(0,w.jsxs)(h.Fragment,{children:[v,(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:W(g),children:a})})]},m)})})})},pR=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,w.jsx)(fR,{links:[...a?[{text:pr(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}),mR={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`]},hR=({children:e,className:t,identifier:n,...r})=>(0,w.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});hR.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,w.jsx)(nw,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),hR.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,w.jsx)(`div`,{className:W(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,w.jsx)(rw,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`),...c,children:e})});function gR(e){return Array.isArray?Array.isArray(e):ER(e)===`[object Array]`}function _R(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 vR(e){return e==null?``:_R(e)}function yR(e){return typeof e==`string`}function bR(e){return typeof e==`number`}function xR(e){return e===!0||e===!1||CR(e)&&ER(e)==`[object Boolean]`}function SR(e){return typeof e==`object`}function CR(e){return SR(e)&&e!==null}function wR(e){return e!=null}function TR(e){return!e.trim().length}function ER(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var DR=`Incorrect 'index' type`,OR=e=>`Invalid value for key ${e}`,kR=e=>`Pattern length exceeds max of ${e}.`,AR=e=>`Missing ${e} property in key`,jR=e=>`Property 'weight' in key '${e}' must be a positive integer`,MR=Object.prototype.hasOwnProperty,NR=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=PR(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 PR(e){let t=null,n=null,r=null,i=1,a=null;if(yR(e)||gR(e))r=e,t=FR(e),n=IR(e);else{if(!MR.call(e,`name`))throw Error(AR(`name`));let o=e.name;if(r=o,MR.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(jR(o));t=FR(o),n=IR(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function FR(e){return gR(e)?e:e.split(`.`)}function IR(e){return gR(e)?e.join(`.`):e}function LR(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(wR(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!wR(s))return;if(a===t.length-1&&(yR(s)||bR(s)||xR(s)||typeof s==`bigint`))n.push(o===void 0?vR(s):{v:vR(s),i:o});else if(gR(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,yR(t)?t.split(`.`):t,0),r?n:n[0]}var RR={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},zR={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},BR={location:0,threshold:.6,distance:100},VR={useExtendedSearch:!1,useTokenSearch:!1,getFn:LR,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...zR,...RR,...BR,...VR}),HR=/[^ ]+/g;function UR(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(HR).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 WR=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=UR(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,yR(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();yR(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(!wR(e)||TR(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(wR(i)){if(gR(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(wR(n)){if(yR(n)){if(!TR(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(wR(n.v)){let t=yR(n.v)?n.v:vR(n.v);if(!TR(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(yR(i)&&!TR(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 GR(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new WR({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(PR)),i.setSources(t),i.create(),i}function KR(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new WR({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function qR(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 JR=32;function YR(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>JR)throw Error(kR(JR));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=qR(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function XR(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 ZR(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 QR={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},$R=RegExp(`[`+Object.keys(QR).join(``)+`]`,`g`),ez=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($R,e=>QR[e]):e=>e,tz=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?ez(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:XR(e),startIndex:t})},d=this.pattern.length;if(d>JR){let e=0,t=d%JR,n=d-t;for(;e<n;)u(this.pattern.substr(e,JR),e),e+=JR;if(t){let e=d-JR;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?ez(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}=YR(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=ZR(u)),p}},nz=class{constructor(e){this.pattern=e}static isMultiMatch(e){return rz(e,this.multiRegex)}static isSingleMatch(e){return rz(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function rz(e,t){let n=e.match(t);return n?n[1]:null}var iz=class extends nz{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]}}},az=class extends nz{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]}}},oz=class extends nz{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]}}},sz=class extends nz{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]}}},cz=class extends nz{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]}}},lz=class extends nz{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]}}},uz=class extends nz{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 tz(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)}},dz=class extends nz{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}}},fz=[iz,dz,oz,sz,lz,cz,az,uz],pz=fz.length,mz=`\0`,hz=`|`;function gz(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 _z(e,t={}){return e.replace(/\\\|/g,mz).split(hz).map(e=>{let n=gz(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<pz;){let e=fz[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<pz;){let e=fz[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var vz=new Set([uz.type,dz.type]),yz=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?ez(e):e,this.pattern=e,this.query=_z(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?ez(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&&(vz.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=ZR(o)),e}}return{isMatch:!1,score:1}}},bz=[];function xz(...e){bz.push(...e)}function Sz(e,t){for(let n=0,r=bz.length;n<r;n+=1){let r=bz[n];if(r.condition(e,t))return new r(e,t)}return new tz(e,t)}var Cz={AND:`$and`,OR:`$or`},wz={PATH:`$path`,PATTERN:`$val`},Tz=e=>!!(e[Cz.AND]||e[Cz.OR]),Ez=e=>!!e[wz.PATH],Dz=e=>!gR(e)&&SR(e)&&!Tz(e),Oz=e=>({[Cz.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function kz(e,t,{auto:n=!0}={}){let r=e=>{if(yR(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=Sz(e,t)),r}let i=Object.keys(e),a=Ez(e);if(!a&&i.length>1&&!Tz(e))return r(Oz(e));if(Dz(e)){let r=a?e[wz.PATH]:i[0],o=a?e[wz.PATTERN]:e[r];if(!yR(o))throw Error(OR(r));let s={keyId:IR(r),pattern:o};return n&&(s.searcher=Sz(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];gR(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Tz(e)||(e=Oz(e)),r(e)}function Az(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 jz(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=Az(e.matches,{ignoreFieldNorm:t})})}var Mz=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 Nz(e,t){let n=e.matches;t.matches=[],wR(n)&&n.forEach(e=>{if(!wR(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 Pz(e,t){t.score=e.score}function Fz(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(Nz),r&&i.push(Pz),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var Iz=/\b\w+\b/g;function Lz({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=ez(n)),n.match(Iz)||[]}}}function Rz(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 zz(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 Bz(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 Vz=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new NR(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=Sz(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 WR))throw Error(DR);if(this._myIndex=t||GR(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Lz({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=Rz(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(wR(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=Lz({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});zz(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)Bz(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&&Bz(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(yR(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return bR(n)&&n>-1&&(e=e.slice(0,n)),e}let c=bR(n)&&n>0&&yR(e),l;if(c){let t=new Mz(n);yR(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=yR(e)?yR(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),jz(l,{ignoreFieldNorm:s}),a&&l.sort(o),bR(n)&&n>-1&&(l=l.slice(0,n));return Fz(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(!wR(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=Az(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=kz(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===Cz.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(wR(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(!wR(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=Az(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!wR(t))return[];let r=[];if(gR(t))t.forEach(({v:t,i,n:a})=>{if(!wR(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}},Hz=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Lz({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 tz(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=ZR(t)),o}};Vz.version=`7.3.0`,Vz.createIndex=GR,Vz.parseIndex=KR,Vz.config=Y,Vz.match=function(e,t,n){return Sz(e,{...Y,...n}).searchIn(t)},Vz.parseQuery=kz,xz(yz),xz(Hz),Vz.use=function(...e){e.forEach(e=>xz(e))};var Uz=`locale-switcher-content`,Wz=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=_r(mR),s=(0,h.useRef)(null),{locale:c}=vr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=aE(),f=(0,h.useMemo)(()=>l.map(e=>({locale:e,englishName:sr(e,`en`),currentLocaleName:sr(e,c),ownLocaleName:sr(e)})),[l,c]),[p,m]=(0,h.useState)(``),[g,_]=rE(`locale-content-selector-see-all-locales`,!1),v=(0,h.useMemo)(()=>new Vz(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),y=(0,h.useMemo)(()=>p?v.search(p).map(e=>e.item):f,[p,f,v]),b=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},x=e=>{_(e),d(e?l:[c])};return(0,w.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,w.jsxs)(hR,{identifier:Uz,children:[(0,w.jsx)(hR.Trigger,{identifier:Uz,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,w.jsx)(`div`,{className:`px-2 py-1`,children:(0,w.jsx)(Of,{size:16})}),(0,w.jsx)(Mf,{className:`self-center`,size:16})]})}),(0,w.jsx)(hR.Panel,{identifier:Uz,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,w.jsxs)(ZC,{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,w.jsx)(`div`,{className:`m-auto p-2`,children:(0,w.jsx)(_w,{defaultValue:g,onChange:x,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&g)&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`p-3`,children:(0,w.jsx)(FT,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,w.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,w.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,w.jsx)(nw,{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,w.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,w.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,w.jsx)(gf,{className:`size-full`})}),(0,w.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,w.jsx)(`span`,{dir:nr(e),lang:e,children:i}),(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},Gz=e=>{let t=Yw(e),n=Qw(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?Gz(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},Kz=e=>{let t=(0,_.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=v,o=Kw(n,r,_T()),{addEditedContent:s}=CT(),{setFocusedContentKeyPath:c,focusedContent:l}=yT(),{addNewElement:u,goToField:d}=_r(nE),f=Qw(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&lr(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=Gz(o);if(!o)return(0,w.jsx)(w.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,w.jsx)(nw,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:yf,children:pr(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,w.jsx)(w.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,w.jsx)(Kz,{keyPath:[...r,{type:D,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`condition`)return(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,w.jsx)(Kz,{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:N,key:t}];return Gz(e)?(0,w.jsxs)(nw,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:yf,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,w.jsx)(iw,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Kz,{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,w.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,w.jsx)(nw,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:N,key:o.length}],t=o,n=Jw(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Ff,children:u.text})]})}return typeof o.nodeType==`string`?(0,w.jsx)(Kz,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,w.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:M,key:e}];return Gz(Kw(n,t))?(0,w.jsx)(nw,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:yf,children:pr(e)},e):(0,w.jsx)(iw,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:pr(e),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Kz,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,w.jsxs)(w.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},qz=e=>{let t=(0,_.c)(3),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=wT(),{focusedContent:c,setFocusedContentKeyPath:l}=yT(),u=c?.keyPath,d=s?.[o]?.content===void 0?i:s?.[o]?.content,f=_T(),p=Kw(d,u??[],f),m;t[0]===d?m=t[1]:(m=Gz(d),t[0]=d,t[1]=m);let g=m,v=Gz(p),y;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[2]=y):y=t[2],(0,h.useEffect)(()=>{p===void 0&&l(c?.keyPath?.slice(0,-1)??[])},y),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,w.jsx)(pR,{dictionaryKey:a,keyPath:u??[],onClickKeyPath:l}),(0,w.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,w.jsx)(Wz,{})})]}),(0,w.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!g&&Object.keys(d).length>0&&(0,w.jsx)(ZC,{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,w.jsx)(Kz,{keyPath:[],section:d,dictionary:n})}),(v||(u??[]).length>0)&&(0,w.jsx)(iR,{keyPath:u??[],section:p,dictionary:n,isDarkMode:r})]})]})},Jz=nf(`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`}}),Yz=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,w.jsxs)(p,{className:W(Jz({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,w.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,w.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,w.jsx)(`title`,{children:`Remove badge`}),(0,w.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`})]})})]})},Xz=`Dialog`,[Zz,Qz]=mu(Xz),[$z,eB]=Zz(Xz),tB=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=h.useRef(null),c=h.useRef(null),[l,u]=Qu({prop:r,defaultProp:i??!1,onChange:a,caller:Xz});return(0,w.jsx)($z,{scope:t,triggerRef:s,contentRef:c,contentId:BA(),titleId:BA(),descriptionId:BA(),open:l,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};tB.displayName=Xz;var nB=`DialogTrigger`,rB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(nB,n),a=fu(t,i.triggerRef);return(0,w.jsx)(wu.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":CB(i.open),...r,ref:a,onClick:G(e.onClick,i.onOpenToggle)})});rB.displayName=nB;var iB=`DialogPortal`,[aB,oB]=Zz(iB,{forceMount:void 0}),sB=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=eB(iB,t);return(0,w.jsx)(aB,{scope:t,forceMount:n,children:h.Children.map(r,e=>(0,w.jsx)(qu,{present:n||a.open,children:(0,w.jsx)(Gu,{asChild:!0,container:i,children:e})}))})};sB.displayName=iB;var cB=`DialogOverlay`,lB=h.forwardRef((e,t)=>{let n=oB(cB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=eB(cB,e.__scopeDialog);return a.modal?(0,w.jsx)(qu,{present:r||a.open,children:(0,w.jsx)(dB,{...i,ref:t})}):null});lB.displayName=cB;var uB=gu(`DialogOverlay.RemoveScroll`),dB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(cB,n);return(0,w.jsx)(UP,{as:uB,allowPinchZoom:!0,shards:[i.contentRef],children:(0,w.jsx)(wu.div,{"data-state":CB(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),fB=`DialogContent`,pB=h.forwardRef((e,t)=>{let n=oB(fB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=eB(fB,e.__scopeDialog);return(0,w.jsx)(qu,{present:r||a.open,children:a.modal?(0,w.jsx)(mB,{...i,ref:t}):(0,w.jsx)(hB,{...i,ref:t})})});pB.displayName=fB;var mB=h.forwardRef((e,t)=>{let n=eB(fB,e.__scopeDialog),r=h.useRef(null),i=fu(t,n.contentRef,r);return h.useEffect(()=>{let e=r.current;if(e)return PN(e)},[]),(0,w.jsx)(gB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault())})}),hB=h.forwardRef((e,t)=>{let n=eB(fB,e.__scopeDialog),r=h.useRef(!1),i=h.useRef(!1);return(0,w.jsx)(gB,{...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()}})}),gB=h.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=eB(fB,n),c=h.useRef(null),l=fu(t,c);return bA(),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(EA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(Pu,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":CB(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(DB,{titleId:s.titleId}),(0,w.jsx)(kB,{contentRef:c,descriptionId:s.descriptionId})]})]})}),_B=`DialogTitle`,vB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(_B,n);return(0,w.jsx)(wu.h2,{id:i.titleId,...r,ref:t})});vB.displayName=_B;var yB=`DialogDescription`,bB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(yB,n);return(0,w.jsx)(wu.p,{id:i.descriptionId,...r,ref:t})});bB.displayName=yB;var xB=`DialogClose`,SB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(xB,n);return(0,w.jsx)(wu.button,{type:`button`,...r,ref:t,onClick:G(e.onClick,()=>i.onOpenChange(!1))})});SB.displayName=xB;function CB(e){return e?`open`:`closed`}var wB=`DialogTitleWarning`,[TB,EB]=pu(wB,{contentName:fB,titleName:_B,docsSlug:`dialog`}),DB=({titleId:e})=>{let t=EB(wB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
116
+ `)?t.slice(0,-1):t},[e]),[D,O]=(0,h.useState)(E);(0,h.useEffect)(()=>{if(!y||S===`typescript`){O(E);return}let e=!1;return(async()=>{let{transformCode:t}=await jn(async()=>{let{transformCode:e}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e}},[]);e||O(t(E,S))})(),()=>{e=!0}},[E,y,S]);let k=s||c||l;return(0,w.jsx)(mA,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,w.jsxs)(ZC,{className:W(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...d,children:[r&&(0,w.jsxs)(w.Fragment,{children:[(0,w.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,w.jsx)(`span`,{className:`truncate`,children:C??t}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,w.jsx)(zI,{}),c&&(0,w.jsx)(OI,{availableFormats:x}),l&&(0,w.jsx)(kI,{})]})]}),(0,w.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,w.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`,k&&`h-11`),children:(0,w.jsx)(RI,{code:D})})})]}),(0,w.jsx)(sA,{minHeight:BI,isRollable:u,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:y?(0,w.jsx)(fA,{originalLang:t,targetFormat:S,isDarkMode:n,children:E}):(0,w.jsx)(uA,{lang:t,isDarkMode:n,children:E})})]})})},WI=(0,h.createContext)({tabsValues:{},setTabsValues:()=>{}}),GI=()=>(0,h.useContext)(WI),KI=e=>{let t=(0,_.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,h.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,w.jsx)(WI,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},qI=e=>{let t=(0,_.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,h.useRef)(null),[g,v]=(0,h.useState)(!1),[y,b]=(0,h.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,h.useRef)(x),C=(0,h.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,v(!1),b(0))},t[5]=u,t[6]=O);let k=O,A;t[7]!==D||t[8]!==p||t[9]!==u||t[10]!==g?(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(),g||v(!0),b(D(n/t*100)),S.current.lastX=e.clientX}},t[7]=D,t[8]=p,t[9]=u,t[10]=g,t[11]=A):A=t[11];let j=A,M;t[12]!==y||t[13]!==r||t[14]!==i||t[15]!==d?(M=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=S.current.isHorizontal,n=y;if(v(!1),b(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]=y,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 ee=P,F;t[20]!==u||t[21]!==N?(F=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[20]=u,t[21]=N,t[22]=F):F=t[22];let I=F,te;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>{b(0),v(!1)},t[23]=te):te=t[23];let ne;t[24]===a?ne=t[25]:(ne=[a],t[24]=a,t[25]=ne),(0,h.useEffect)(te,ne);let re;t[26]===f?re=t[27]:(re={touchAction:f},t[26]=f,t[27]=re);let L;t[28]!==I||t[29]!==k||t[30]!==j||t[31]!==ee||t[32]!==re?(L={ref:m,onPointerDown:k,onPointerMove:j,onPointerUp:ee,onPointerCancel:I,style:re},t[28]=I,t[29]=k,t[30]=j,t[31]=ee,t[32]=re,t[33]=L):L=t[33];let R;return t[34]!==y||t[35]!==g||t[36]!==L?(R={containerRef:m,isDragging:g,dragDeltaPct:y,containerProps:L},t[34]=y,t[35]=g,t[36]=L,t[37]=R):R=t[37],R},JI=nf(`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`}}),YI=nf(`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`}}),XI=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,h.useRef)([]),c=(0,h.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=cw(s,{isHoverable:i,orientation:a});return(0,h.useEffect)(()=>{u()},[t]),(0,w.jsxs)(`div`,{className:W(JI({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,h.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&(0,w.jsx)(`div`,{className:W(YI({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},ZI=(0,h.createContext)(void 0),QI=nf(`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`}}),$I=({children:e,...t})=>(0,w.jsx)(`div`,{...t,children:e});$I.displayName=`TabItem`;var eL=Object.assign(e=>{let t=(0,_.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...l}=e,u=h.Children.toArray(a).filter(tL),d=u[0]?.props?.value,{tabsValues:f,setTabsValues:p}=GI(),[m,g]=(0,h.useState)(n??d??``),v=(r&&typeof f==`object`?f?.[r]:m)??n??d,y;t[0]===v?y=t[1]:(y=e=>e.props.value===v,t[0]=v,t[1]=y);let b=u.findIndex(y),x=u.length,{containerProps:S,dragDeltaPct:C,isDragging:T}=qI({itemIndex:b,itemCount:x,onSwipeLeft:()=>{let e=u[Math.min(x-1,b+1)]?.props?.value;e&&E(e)},onSwipeRight:()=>{let e=u[Math.max(0,b-1)]?.props?.value;e&&E(e)}}),E=e=>{g(e),typeof p==`function`&&p(t=>({...t,[r]:e}))},D={activeTab:m??d??``,setActiveTab:E},O;return t[2]!==b||t[3]!==c?(O=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===b;return(0,w.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:W(`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,w.jsx)(`div`,{className:W(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=b,t[3]=c,t[4]=O):O=t[4],(0,w.jsx)(ZI.Provider,{value:D,children:(0,w.jsxs)(`div`,{className:W(QI({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...l,children:[(0,w.jsx)(`div`,{className:W(`flex shrink-0 gap-3 p-3`,s),children:(0,w.jsx)(XI,{selectedChoice:v,tabs:u.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=v===n;return(0,w.jsx)(`button`,{className:W(`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&&E(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,w.jsx)(`div`,{className:W(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...S,children:(0,w.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:W(`grid w-full min-w-0`,c&&`h-full`,T?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${u.length}, 100%)`,transform:`translateX(-${b*100-(T?C:0)}%)`},children:u.map(O)})})]})})},{Item:$I});function tL(e){return(0,h.isValidElement)(e)&&e.type===$I}var nL=e=>{let t=(0,_.c)(3),[n,r]=(0,h.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,h.useEffect)(i,a),n},rL=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()})}},iL=[],aL=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(rL.subscribe,rL.getSnapshot,oL),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:rL.addBlockage,removeBlockage:rL.removeBlockage,isElementScrollBlocked:rL.isElementScrollBlocked},e[0]=t,e[1]=n),n};function oL(){return iL}var sL=e=>{let t=(0,_.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}=aL(),d=nL(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,h.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 g;return t[12]===m?g=t[13]:(g={isScrollBlocked:m},t[12]=m,t[13]=g),g},cL=nf(`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`}}),lL={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`},uL=WC.create(ZC),dL=e=>{let t=(0,_.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:l,isScrollable:u,disableScroll:d,padding:f,...p}=e,m=o===void 0?!1:o,g=c===void 0?`md`:c,v=u===void 0?!1:u,y=d===void 0?!0:d,b=f===void 0?`none`:f,x=nL(i),S=r&&y,C;t[0]===S?C=t[1]:(C={key:`modal`,disableScroll:S},t[0]=S,t[1]=C),sL(C);let T,E;if(t[2]!==r||t[3]!==a?(T=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},E=[r,a],t[2]=r,t[3]=a,t[4]=T,t[5]=E):(T=t[4],E=t[5]),(0,h.useEffect)(T,E),!x){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[6]=e):e=t[6],e}let D=!!s,O=lL[b||`none`],k;return t[7]===a?k=t[8]:(k=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=k),(0,Cu.createPortal)((0,w.jsx)(WC.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:k,"aria-hidden":!r,children:(0,w.jsxs)(uL,{onClick:fL,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:cL({size:g,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,w.jsxs)(`div`,{className:W(`relative flex-none px-4 pt-4`,m&&D?`flex items-start`:m?`flex justify-end`:D?`items-center`:`hidden`),children:[D&&(0,w.jsx)(Qk,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,w.jsx)(nw,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Vf,size:`icon-md`})]}),(0,w.jsx)(`div`,{className:W(`flex min-h-0 w-full flex-1 flex-col`,v===!0&&`overflow-auto`,v===`y`&&`overflow-y-auto overflow-x-hidden`,v===`x`&&`overflow-x-auto overflow-y-hidden`,!v&&`overflow-visible`),children:(0,w.jsx)(`div`,{className:W(`flex h-full w-full flex-1 flex-col`,O),children:n})})]})}),x)};function fL(e){return e.stopPropagation()}var pL={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`]},mL=e=>{let t=(0,_.c)(6),{setIsModalOpen:n}=e,{modal:r}=_r(pL),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,w.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,w.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,w.jsxs)(FI,{identifier:`expand`,children:[(0,w.jsx)(nw,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:Af}),(0,w.jsxs)(FI.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,w.jsx)(`strong`,{children:r.title}),(0,w.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},hL=(0,h.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,w.jsx)(`table`,{ref:r,className:W(`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})),gL=.55,_L=5,vL=30,yL=(e,t,n)=>{let r=(0,_.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(vL,Math.max(_L,(n[t]??0)*gL));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${vL}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,h.useEffect)(i,n)},bL=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null),u=(0,h.useRef)(null),d=(0,h.useRef)(null);yL(u,d,[a.children,o]),(0,h.useEffect)(()=>{if(o&&c!==null&&d.current){let e=d.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,h.useEffect)(()=>{o||l(null)},[o]);let f=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(l(t.rowIndex),s(!0))}i?.(e)};return(0,w.jsxs)(`div`,{className:`group relative`,children:[n&&(0,w.jsx)(mL,{setIsModalOpen:s}),(0,w.jsx)(sA,{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,w.jsx)(hL,{ref:u,className:e,isInteractive:r??n,onClick:f,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f(e)},...a})}),(0,w.jsx)(dL,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,w.jsx)(`div`,{className:`grid`,children:(0,w.jsx)(hL,{ref:d,className:W(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,w.jsx)(w.Fragment,{})})]})};function xL(e){if(!e)return{href:``,label:``};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}}var SL=e=>{let t=(0,_.c)(2),{src:n,className:r,title:i,...a}=e,[o,s]=(0,h.useState)(!1),{href:c,label:l}=xL(n),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>s(!0),t[0]=u):u=t[0];let d;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>s(!1),t[1]=d):d=t[1],(0,w.jsxs)(ZC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,w.jsx)(`iframe`,{...a,src:n,title:i,className:W(`block max-h-[80vh] min-h-[12rem] w-full border-0`,r)}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-neutral/30 border-t bg-card/40 px-3 py-1`,children:[c?(0,w.jsx)(Lk,{href:c,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-neutral text-xs underline-offset-2 hover:text-text hover:underline`,children:l}):(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,w.jsx)(nw,{variant:`hoverable`,size:`icon-md`,onClick:u,label:`Open embedded page in fullscreen`,Icon:Af})]}),(0,w.jsx)(dL,{isOpen:o,onClose:d,size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&n?(0,w.jsx)(ZC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,w.jsx)(`iframe`,{...a,src:n,title:i??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},CL=e=>(0,w.jsx)(Xk,{isClickable:!0,className:`text-text`,...e}),wL=e=>(0,w.jsx)(Zk,{isClickable:!0,className:`mt-16 text-text`,...e}),TL=e=>(0,w.jsx)(Qk,{isClickable:!0,className:`mt-5 text-text`,...e}),EL=e=>(0,w.jsx)($k,{isClickable:!0,className:`mt-3 text-text`,...e}),DL=e=>(0,w.jsx)(eA,{isClickable:!0,className:`mt-3 text-text`,...e}),OL=e=>(0,w.jsx)(tA,{isClickable:!0,className:`mt-3 text-text`,...e}),kL=e=>(0,w.jsx)(`strong`,{className:`text-text`,...e}),AL=(0,h.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,w.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,w.jsx)(UI,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),jL=e=>function(t){return(0,w.jsx)(AL,{...t,isDarkMode:e})},ML=({className:e,...t})=>(0,w.jsx)(`blockquote`,{className:W(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),NL=({className:e,...t})=>(0,w.jsx)(`ul`,{className:W(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),PL=({className:e,...t})=>(0,w.jsx)(`ol`,{className:W(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),FL=({className:e,alt:t,src:n,...r})=>(0,w.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:W(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),IL=e=>t=>(0,w.jsx)(Lk,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),LL={h1:CL,h2:wL,h3:TL,h4:EL,h5:DL,h6:OL,strong:kL,blockquote:ML,ul:NL,ol:PL,img:FL,pre:e=>(0,w.jsx)(w.Fragment,{children:e.children}),table:e=>(0,w.jsx)(bL,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,w.jsx)(`th`,{className:W(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,w.jsx)(`tr`,{className:W(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,w.jsx)(`td`,{className:W(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,w.jsx)(`hr`,{className:W(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,w.jsx)(eL,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:eL.Item,Columns:({className:e,...t})=>(0,w.jsx)(`div`,{className:W(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,w.jsx)(`div`,{className:W(`flex-1`,e),...t}),iframe:e=>(0,w.jsx)(SL,{...e})},RL=(e,t)=>({...LL,code:jL(e),a:IL(t)}),zL=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,w.jsx)(iA,{children:(0,w.jsx)(KI,{children:xr(e,{components:{...RL(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),BL=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}},VL=e=>{let t=(0,_.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=BL(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,h.useState)(a??null),[l,u]=(0,h.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,h.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,w.jsxs)(`div`,{className:`flex gap-1`,children:[(0,w.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,w.jsx)(J.Trigger,{className:`w-20`,children:(0,w.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`<`,children:`<`}),(0,w.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,w.jsx)(J.Item,{value:`=`,children:`=`}),(0,w.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,w.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,w.jsx)(FT,{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},HL=e=>{let t=(0,_.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=wT(),s=ST(),{mutate:c,isPending:l}=nk(),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,w.jsx)(kk,{variant:`default`,onContentChange:u,additionalButtons:(0,w.jsx)(nw,{Icon:Bf,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},UL=e=>{let t=(0,_.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=wT(),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,w.jsx)(lk,{variant:`default`,onContentChange:o,...i})},WL=[{content:`False`,value:!1},{content:`True`,value:!0}],GL=e=>{let t=(0,_.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=wT(),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,w.jsx)(_w,{choices:WL,value:!0,onChange:o,color:`text`,size:`sm`,...i})},KL=e=>{let t=(0,_.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=vr(),{selectedLocales:c,availableLocales:l}=sk(),u=n[D],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[D],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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:sr(e,o)})}),(0,w.jsx)(`tr`,{className:`flex`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:p[e]??Jw(p[s]),keyPath:[...r,{type:D,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,w.jsx)(`table`,{className:`w-full`,children:(0,w.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},qL=e=>{let t=(0,_.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=wT(),{addNewEnumeration:s,removeEnumeration:c}=_r(nE),l=n[O],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,Jw(l[d])??``,[...r,{type:O,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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[O]).map(e=>{let t=[...r,{type:O,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(`div`,{className:`flex flex-1`,children:(0,w.jsx)(nw,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:zf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,w.jsx)(`tr`,{className:`w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(VL,{value:e,onChange:t=>{let a=n[O],s=Mk(a,e,t),c={...n,[O]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(rR,{section:l[e]??Jw(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,w.jsx)(nw,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Ff,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},JL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[k];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:i[e]??Jw(i.true),keyPath:[...t,{type:k,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},YL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[L];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:i[e]??Jw(i.male),keyPath:[...t,{type:L,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},XL=e=>{let t=(0,_.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=wT(),{addNewElement:s,removeElement:c}=_r(nE),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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,w.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,w.jsx)(nw,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:N,key:t}];o(i.localId,void 0,e)},Icon:zf,children:c.text})]})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(iR,{section:e??Jw(n[0]),keyPath:[...r,{type:N,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:N,key:n.length}];o(i.localId,Jw(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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,w.jsx)(nw,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Ff,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},ZL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:M,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??Jw(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(rR,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),QL=e=>{let t=(0,_.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,h.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:I}],l=n[I];s=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(_w,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(iR,{section:l,keyPath:c,dictionary:i,renderSection:a===1?aR:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},$L=e=>{let t=(0,_.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,h.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:F}],u=n[F],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,w.jsx)(zL,{isDarkMode:a,children:e}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(_w,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(iR,{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},eR=({section:e,keyPath:t,...n})=>{let r=[...t,{type:A}],i=e[A];return(0,w.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,w.jsx)(iR,{section:i,keyPath:r,...n})})},tR=({section:e,keyPath:t,...n})=>{let r=[...t,{type:j}],i=e[j],{content:a}=e;return(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,w.jsx)(iR,{section:a,keyPath:r,...n})]})},nR=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=wT(),s=i[P],c=[...t,{type:P}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,w.jsx)(Nk,{children:`Dictionary key`}),(0,w.jsx)(lk,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,w.jsx)(Nk,{children:`Path (optional)`}),(0,w.jsx)(lk,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},rR=e=>{let t=(0,_.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=_r(nE),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=Qw(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,w.jsx)(`span`,{children:`(React Node)`}),(0,w.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,w.jsx)(nR,{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,w.jsx)(KL,{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,w.jsx)(qL,{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,w.jsx)(JL,{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,w.jsx)(YL,{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,w.jsx)(eR,{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,w.jsx)($L,{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,w.jsx)(QL,{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,w.jsx)(tR,{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,w.jsx)(XL,{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,w.jsx)(ZL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(UL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,w.jsx)(HL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(GL,{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,w.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},iR=e=>(0,w.jsx)(ZC,{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,w.jsx)(rR,{...e})});function aR(e){return(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}var oR={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`]},sR=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]||``,cR=nf(`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`}}),lR=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=ye(oR).linkLabel;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Lk,{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,w.jsx)(`span`,{itemProp:`name`,children:n})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},uR=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=_r(oR);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(nw,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,w.jsx)(`span`,{itemProp:`name`,children:t})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},dR=({children:e,position:t,className:n,...r})=>(0,w.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,w.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,w.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),fR=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,w.jsx)(yf,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,w.jsx)(`nav`,{"aria-label":o,children:(0,w.jsx)(`ol`,{className:W(cR({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,g=sR(n);if(p)return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,w.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:W(g),children:a})})]},`truncated-${m}`);let _=(0,w.jsx)(dR,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?_=(0,w.jsx)(lR,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(_=(0,w.jsx)(uR,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let v=(0,h.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},_);return o?v:(0,w.jsxs)(h.Fragment,{children:[v,(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:W(g),children:a})})]},m)})})})},pR=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,w.jsx)(fR,{links:[...a?[{text:pr(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}),mR={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`]},hR=({children:e,className:t,identifier:n,...r})=>(0,w.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});hR.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,w.jsx)(nw,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),hR.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,w.jsx)(`div`,{className:W(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,w.jsx)(rw,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`),...c,children:e})});function gR(e){return Array.isArray?Array.isArray(e):ER(e)===`[object Array]`}function _R(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 vR(e){return e==null?``:_R(e)}function yR(e){return typeof e==`string`}function bR(e){return typeof e==`number`}function xR(e){return e===!0||e===!1||CR(e)&&ER(e)==`[object Boolean]`}function SR(e){return typeof e==`object`}function CR(e){return SR(e)&&e!==null}function wR(e){return e!=null}function TR(e){return!e.trim().length}function ER(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var DR=`Incorrect 'index' type`,OR=e=>`Invalid value for key ${e}`,kR=e=>`Pattern length exceeds max of ${e}.`,AR=e=>`Missing ${e} property in key`,jR=e=>`Property 'weight' in key '${e}' must be a positive integer`,MR=Object.prototype.hasOwnProperty,NR=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=PR(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 PR(e){let t=null,n=null,r=null,i=1,a=null;if(yR(e)||gR(e))r=e,t=FR(e),n=IR(e);else{if(!MR.call(e,`name`))throw Error(AR(`name`));let o=e.name;if(r=o,MR.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(jR(o));t=FR(o),n=IR(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function FR(e){return gR(e)?e:e.split(`.`)}function IR(e){return gR(e)?e.join(`.`):e}function LR(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(wR(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!wR(s))return;if(a===t.length-1&&(yR(s)||bR(s)||xR(s)||typeof s==`bigint`))n.push(o===void 0?vR(s):{v:vR(s),i:o});else if(gR(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,yR(t)?t.split(`.`):t,0),r?n:n[0]}var RR={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},zR={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},BR={location:0,threshold:.6,distance:100},VR={useExtendedSearch:!1,useTokenSearch:!1,getFn:LR,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...zR,...RR,...BR,...VR}),HR=/[^ ]+/g;function UR(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(HR).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 WR=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=UR(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,yR(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();yR(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(!wR(e)||TR(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(wR(i)){if(gR(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(wR(n)){if(yR(n)){if(!TR(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(wR(n.v)){let t=yR(n.v)?n.v:vR(n.v);if(!TR(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(yR(i)&&!TR(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 GR(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new WR({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(PR)),i.setSources(t),i.create(),i}function KR(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new WR({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function qR(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 JR=32;function YR(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>JR)throw Error(kR(JR));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=qR(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function XR(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 ZR(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 QR={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},$R=RegExp(`[`+Object.keys(QR).join(``)+`]`,`g`),ez=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($R,e=>QR[e]):e=>e,tz=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?ez(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:XR(e),startIndex:t})},d=this.pattern.length;if(d>JR){let e=0,t=d%JR,n=d-t;for(;e<n;)u(this.pattern.substr(e,JR),e),e+=JR;if(t){let e=d-JR;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?ez(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}=YR(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=ZR(u)),p}},nz=class{constructor(e){this.pattern=e}static isMultiMatch(e){return rz(e,this.multiRegex)}static isSingleMatch(e){return rz(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function rz(e,t){let n=e.match(t);return n?n[1]:null}var iz=class extends nz{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]}}},az=class extends nz{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]}}},oz=class extends nz{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]}}},sz=class extends nz{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]}}},cz=class extends nz{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]}}},lz=class extends nz{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]}}},uz=class extends nz{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 tz(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)}},dz=class extends nz{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}}},fz=[iz,dz,oz,sz,lz,cz,az,uz],pz=fz.length,mz=`\0`,hz=`|`;function gz(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 _z(e,t={}){return e.replace(/\\\|/g,mz).split(hz).map(e=>{let n=gz(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<pz;){let e=fz[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<pz;){let e=fz[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var vz=new Set([uz.type,dz.type]),yz=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?ez(e):e,this.pattern=e,this.query=_z(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?ez(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&&(vz.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=ZR(o)),e}}return{isMatch:!1,score:1}}},bz=[];function xz(...e){bz.push(...e)}function Sz(e,t){for(let n=0,r=bz.length;n<r;n+=1){let r=bz[n];if(r.condition(e,t))return new r(e,t)}return new tz(e,t)}var Cz={AND:`$and`,OR:`$or`},wz={PATH:`$path`,PATTERN:`$val`},Tz=e=>!!(e[Cz.AND]||e[Cz.OR]),Ez=e=>!!e[wz.PATH],Dz=e=>!gR(e)&&SR(e)&&!Tz(e),Oz=e=>({[Cz.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function kz(e,t,{auto:n=!0}={}){let r=e=>{if(yR(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=Sz(e,t)),r}let i=Object.keys(e),a=Ez(e);if(!a&&i.length>1&&!Tz(e))return r(Oz(e));if(Dz(e)){let r=a?e[wz.PATH]:i[0],o=a?e[wz.PATTERN]:e[r];if(!yR(o))throw Error(OR(r));let s={keyId:IR(r),pattern:o};return n&&(s.searcher=Sz(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];gR(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Tz(e)||(e=Oz(e)),r(e)}function Az(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 jz(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=Az(e.matches,{ignoreFieldNorm:t})})}var Mz=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 Nz(e,t){let n=e.matches;t.matches=[],wR(n)&&n.forEach(e=>{if(!wR(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 Pz(e,t){t.score=e.score}function Fz(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(Nz),r&&i.push(Pz),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var Iz=/\b\w+\b/g;function Lz({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=ez(n)),n.match(Iz)||[]}}}function Rz(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 zz(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 Bz(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 Vz=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new NR(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=Sz(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 WR))throw Error(DR);if(this._myIndex=t||GR(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Lz({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=Rz(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(wR(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=Lz({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});zz(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)Bz(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&&Bz(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(yR(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return bR(n)&&n>-1&&(e=e.slice(0,n)),e}let c=bR(n)&&n>0&&yR(e),l;if(c){let t=new Mz(n);yR(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=yR(e)?yR(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),jz(l,{ignoreFieldNorm:s}),a&&l.sort(o),bR(n)&&n>-1&&(l=l.slice(0,n));return Fz(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(!wR(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=Az(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=kz(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===Cz.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(wR(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(!wR(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=Az(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!wR(t))return[];let r=[];if(gR(t))t.forEach(({v:t,i,n:a})=>{if(!wR(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}},Hz=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Lz({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 tz(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=ZR(t)),o}};Vz.version=`7.3.0`,Vz.createIndex=GR,Vz.parseIndex=KR,Vz.config=Y,Vz.match=function(e,t,n){return Sz(e,{...Y,...n}).searchIn(t)},Vz.parseQuery=kz,xz(yz),xz(Hz),Vz.use=function(...e){e.forEach(e=>xz(e))};var Uz=`locale-switcher-content`,Wz=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=_r(mR),s=(0,h.useRef)(null),{locale:c}=vr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=sk(),f=(0,h.useMemo)(()=>l.map(e=>({locale:e,englishName:sr(e,`en`),currentLocaleName:sr(e,c),ownLocaleName:sr(e)})),[l,c]),[p,m]=(0,h.useState)(``),[g,_]=ak(`locale-content-selector-see-all-locales`,!1),v=(0,h.useMemo)(()=>new Vz(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),y=(0,h.useMemo)(()=>p?v.search(p).map(e=>e.item):f,[p,f,v]),b=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},x=e=>{_(e),d(e?l:[c])};return(0,w.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,w.jsxs)(hR,{identifier:Uz,children:[(0,w.jsx)(hR.Trigger,{identifier:Uz,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,w.jsx)(`div`,{className:`px-2 py-1`,children:(0,w.jsx)(Of,{size:16})}),(0,w.jsx)(Mf,{className:`self-center`,size:16})]})}),(0,w.jsx)(hR.Panel,{identifier:Uz,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,w.jsxs)(ZC,{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,w.jsx)(`div`,{className:`m-auto p-2`,children:(0,w.jsx)(_w,{defaultValue:g,onChange:x,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&g)&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`p-3`,children:(0,w.jsx)(FT,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,w.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,w.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,w.jsx)(nw,{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,w.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,w.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,w.jsx)(gf,{className:`size-full`})}),(0,w.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,w.jsx)(`span`,{dir:nr(e),lang:e,children:i}),(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},Gz=e=>{let t=Yw(e),n=Qw(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?Gz(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},Kz=e=>{let t=(0,_.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=v,o=Kw(n,r,_T()),{addEditedContent:s}=CT(),{setFocusedContentKeyPath:c,focusedContent:l}=yT(),{addNewElement:u,goToField:d}=_r(nE),f=Qw(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&lr(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=Gz(o);if(!o)return(0,w.jsx)(w.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,w.jsx)(nw,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:yf,children:pr(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,w.jsx)(w.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,w.jsx)(Kz,{keyPath:[...r,{type:D,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`condition`)return(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,w.jsx)(Kz,{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:N,key:t}];return Gz(e)?(0,w.jsxs)(nw,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:yf,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,w.jsx)(iw,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Kz,{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,w.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,w.jsx)(nw,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:N,key:o.length}],t=o,n=Jw(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Ff,children:u.text})]})}return typeof o.nodeType==`string`?(0,w.jsx)(Kz,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,w.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:M,key:e}];return Gz(Kw(n,t))?(0,w.jsx)(nw,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:yf,children:pr(e)},e):(0,w.jsx)(iw,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:pr(e),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Kz,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,w.jsxs)(w.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},qz=e=>{let t=(0,_.c)(3),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=wT(),{focusedContent:c,setFocusedContentKeyPath:l}=yT(),u=c?.keyPath,d=s?.[o]?.content===void 0?i:s?.[o]?.content,f=_T(),p=Kw(d,u??[],f),m;t[0]===d?m=t[1]:(m=Gz(d),t[0]=d,t[1]=m);let g=m,v=Gz(p),y;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[2]=y):y=t[2],(0,h.useEffect)(()=>{p===void 0&&l(c?.keyPath?.slice(0,-1)??[])},y),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,w.jsx)(pR,{dictionaryKey:a,keyPath:u??[],onClickKeyPath:l}),(0,w.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,w.jsx)(Wz,{})})]}),(0,w.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!g&&Object.keys(d).length>0&&(0,w.jsx)(ZC,{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,w.jsx)(Kz,{keyPath:[],section:d,dictionary:n})}),(v||(u??[]).length>0)&&(0,w.jsx)(iR,{keyPath:u??[],section:p,dictionary:n,isDarkMode:r})]})]})},Jz=nf(`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`}}),Yz=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,w.jsxs)(p,{className:W(Jz({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,w.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,w.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,w.jsx)(`title`,{children:`Remove badge`}),(0,w.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`})]})})]})},Xz=`Dialog`,[Zz,Qz]=mu(Xz),[$z,eB]=Zz(Xz),tB=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=h.useRef(null),c=h.useRef(null),[l,u]=Qu({prop:r,defaultProp:i??!1,onChange:a,caller:Xz});return(0,w.jsx)($z,{scope:t,triggerRef:s,contentRef:c,contentId:BA(),titleId:BA(),descriptionId:BA(),open:l,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};tB.displayName=Xz;var nB=`DialogTrigger`,rB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(nB,n),a=fu(t,i.triggerRef);return(0,w.jsx)(wu.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":CB(i.open),...r,ref:a,onClick:G(e.onClick,i.onOpenToggle)})});rB.displayName=nB;var iB=`DialogPortal`,[aB,oB]=Zz(iB,{forceMount:void 0}),sB=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=eB(iB,t);return(0,w.jsx)(aB,{scope:t,forceMount:n,children:h.Children.map(r,e=>(0,w.jsx)(qu,{present:n||a.open,children:(0,w.jsx)(Gu,{asChild:!0,container:i,children:e})}))})};sB.displayName=iB;var cB=`DialogOverlay`,lB=h.forwardRef((e,t)=>{let n=oB(cB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=eB(cB,e.__scopeDialog);return a.modal?(0,w.jsx)(qu,{present:r||a.open,children:(0,w.jsx)(dB,{...i,ref:t})}):null});lB.displayName=cB;var uB=gu(`DialogOverlay.RemoveScroll`),dB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(cB,n);return(0,w.jsx)(UP,{as:uB,allowPinchZoom:!0,shards:[i.contentRef],children:(0,w.jsx)(wu.div,{"data-state":CB(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),fB=`DialogContent`,pB=h.forwardRef((e,t)=>{let n=oB(fB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=eB(fB,e.__scopeDialog);return(0,w.jsx)(qu,{present:r||a.open,children:a.modal?(0,w.jsx)(mB,{...i,ref:t}):(0,w.jsx)(hB,{...i,ref:t})})});pB.displayName=fB;var mB=h.forwardRef((e,t)=>{let n=eB(fB,e.__scopeDialog),r=h.useRef(null),i=fu(t,n.contentRef,r);return h.useEffect(()=>{let e=r.current;if(e)return PN(e)},[]),(0,w.jsx)(gB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault())})}),hB=h.forwardRef((e,t)=>{let n=eB(fB,e.__scopeDialog),r=h.useRef(!1),i=h.useRef(!1);return(0,w.jsx)(gB,{...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()}})}),gB=h.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=eB(fB,n),c=h.useRef(null),l=fu(t,c);return bA(),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(EA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(Pu,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":CB(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(DB,{titleId:s.titleId}),(0,w.jsx)(kB,{contentRef:c,descriptionId:s.descriptionId})]})]})}),_B=`DialogTitle`,vB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(_B,n);return(0,w.jsx)(wu.h2,{id:i.titleId,...r,ref:t})});vB.displayName=_B;var yB=`DialogDescription`,bB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(yB,n);return(0,w.jsx)(wu.p,{id:i.descriptionId,...r,ref:t})});bB.displayName=yB;var xB=`DialogClose`,SB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eB(xB,n);return(0,w.jsx)(wu.button,{type:`button`,...r,ref:t,onClick:G(e.onClick,()=>i.onOpenChange(!1))})});SB.displayName=xB;function CB(e){return e?`open`:`closed`}var wB=`DialogTitleWarning`,[TB,EB]=pu(wB,{contentName:fB,titleName:_B,docsSlug:`dialog`}),DB=({titleId:e})=>{let t=EB(wB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
117
117
 
118
118
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
119
119
 
@@ -199,5 +199,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
199
199
  --nojs-bg: black !important;
200
200
  --nojs-fg: white !important;
201
201
  }
202
- }`,VJ=18,HJ=40,UJ=`${HJ}px`,WJ=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),GJ=e=>{let t=(0,_.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(!1),[u,d]=(0,h.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-VJ,f=c;document.querySelectorAll(WJ).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,g,v;t[5]!==n||t[6]!==i?(g=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=HJ)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},v=[n,i],t[5]=n,t[6]=i,t[7]=g,t[8]=v):(g=t[7],v=t[8]),(0,h.useEffect)(g,v);let y;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(y=()=>{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]=y):y=t[13];let b;t[14]!==r||t[15]!==a||t[16]!==i?(b=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=b):b=t[17],(0,h.useEffect)(y,b);let x;return t[18]!==o||t[19]!==f?(x={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:UJ},t[18]=o,t[19]=f,t[20]=x):x=t[20],x},KJ=e=>{let t=(0,h.useRef)(void 0);return(0,h.useEffect)(()=>{t.current=e}),t.current},qJ=(0,h.createContext)({}),JJ=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:l,containerClassName:u,noScriptCSSFallback:d=BJ,render:f,children:p,...m})=>{let[g,_]=(0,h.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),v=e??g,y=KJ(v),b=e=>{t?.(e),_(e)},x=r===void 0?null:typeof r==`string`?new RegExp(r):r,S=(0,h.useRef)(null),C=(0,h.useRef)(null),T=(0,h.useRef)({value:v,onChange:b,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),E=(0,h.useRef)({prev:[S.current?.selectionStart??null,S.current?.selectionEnd??null,S.current?.selectionDirection??`none`]});(0,h.useEffect)(()=>{let e=S.current,t=C.current;if(!e||!t)return;T.current.value!==e.value&&T.current.onChange(e.value),E.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){M(null),P(null),F(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=E.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&&S.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;F(t!==null&&n!==null?t===n?t:u:null),M(u),P(d),E.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&A(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;zJ(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),zJ(e.sheet,`[data-input-otp]:autofill { ${t} }`),zJ(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),zJ(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; } }`),zJ(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[D,O]=(0,h.useState)(!1),[k,A]=(0,h.useState)(!1),[j,M]=(0,h.useState)(null),[N,P]=(0,h.useState)(null),[ee,F]=(0,h.useState)(null);(0,h.useEffect)(()=>{RJ(()=>{S.current?.dispatchEvent(new Event(`input`));let e=S.current?.selectionStart??null,t=S.current?.selectionEnd??null,n=S.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),F(e),E.current.prev=[e,t,n])})},[v,k]),(0,h.useEffect)(()=>{y!==void 0&&v!==y&&y.length<n&&v.length===n&&o?.(v)},[n,o,y,v]);let I=(0,h.useRef)(null);(0,h.useEffect)(()=>{let e=k&&ee!==null?ee:null;e!==I.current&&(I.current=e,s?.(e))},[k,ee,s]);let te=GJ({containerRef:C,inputRef:S,pushPasswordManagerStrategy:c,isFocused:k}),ne=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&x&&!x.test(t)){e.preventDefault();return}typeof y==`string`&&t.length<y.length&&document.dispatchEvent(new Event(`selectionchange`)),b(t)},re=()=>{if(S.current){let e=Math.min(S.current.value.length,n-1),t=S.current.value.length;S.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},L=e=>{let t=S.current;if(!l&&(!T.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=S.current?.selectionStart,o=S.current?.selectionEnd,s=(a===o?v.slice(0,a??0)+i+v.slice(a??0):v.slice(0,a??0)+i+v.slice(o??0)).slice(0,n);if(!(s.length>0&&x&&!x.test(s))&&t){t.value=s,b(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},R={width:te.willPushPWMBadge?`calc(100% + ${te.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:te.willPushPWMBadge?`inset(0 ${te.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},z=(0,w.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":v.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:x?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:R,maxLength:n,value:v,ref:S,onPaste:e=>{L(e),m.onPaste?.(e)},onChange:ne,onMouseOver:e=>{O(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{O(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=S.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&F(t)}}),m.onKeyDown?.(e)},onFocus:e=>{re(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=k&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=v[t]===void 0?null:v[t];return{char:r,placeholderChar:v[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:k,isHovering:!m.disabled&&D,setSelection:e=>{let t=S.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=v[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},ae=f===void 0?(0,w.jsx)(qJ.Provider,{value:ie,children:p}):f(ie);return(0,w.jsxs)(w.Fragment,{children:[d!==null&&(0,w.jsx)(`noscript`,{children:(0,w.jsx)(`style`,{children:d})}),(0,w.jsxs)(`div`,{ref:C,className:W(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ae,(0,w.jsx)(`div`,{className:`absolute inset-0`,children:z})]})]})},YJ=({className:e,render:t,...n})=>(0,w.jsx)(JJ,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:W(`disabled:cursor-not-allowed`,e),render:t,...n}),XJ=({className:e,...t})=>(0,w.jsx)(`div`,{className:W(`z-10 flex items-center gap-3`,e),...t}),ZJ=e=>{let t=(0,_.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,h.useContext)(qJ),{char:c,isActive:l}=s?.slots[n]??{},u;t[0]===s?u=t[1]:(u=s??{},t[0]=s,t[1]=u);let{setSelection:d}=u,f;t[2]!==n||t[3]!==i||t[4]!==d?(f=e=>{d?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=d,t[5]=f):f=t[5];let p=f,m;t[6]!==n||t[7]!==a||t[8]!==d?(m=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=d,t[9]=m):m=t[9];let g=m;return(0,w.jsx)(nw,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:W(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:g,label:null,...o,children:(0,w.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},QJ=e=>(0,w.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,w.jsx)(kf,{})}),$J=e=>(0,w.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}),eY=e=>e?.getAttribute(`aria-selected`)===`true`,tY=({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}=wJ(),f=(0,h.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=cw(f,{selector:eY,isHoverable:!0});return(0,h.useEffect)(()=>{m()},[]),(0,w.jsx)(kJ,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,w.jsx)(YJ,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(XJ,{children:[(0,w.jsx)(ZJ,{index:0,ref:e=>{f.current[0]=e}}),(0,w.jsx)(ZJ,{index:1,ref:e=>{f.current[1]=e}}),(0,w.jsx)(ZJ,{index:2,ref:e=>{f.current[2]=e}})]}),(0,w.jsx)(QJ,{}),(0,w.jsxs)(XJ,{children:[(0,w.jsx)(ZJ,{index:3,ref:e=>{f.current[3]=e}}),(0,w.jsx)(ZJ,{index:4,ref:e=>{f.current[4]=e}}),(0,w.jsx)(ZJ,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,w.jsx)($J,{style:p})]})})})},nY=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}=HH();return(0,w.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,w.jsx)(tY,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},rY=({className:e,...t})=>(0,w.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,w.jsx)(Rf,{className:`absolute left-2 size-4`}),(0,w.jsx)(FT,{...t,type:`search`,className:W(`pl-8`,e)})]}),iY=e=>(0,w.jsx)(jJ,{id:e.name,"data-testid":e.name,Element:rY,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),aY=e=>(0,w.jsx)(jJ,{Element:IT,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}),oY=e=>(0,w.jsx)(jJ,{Element:zT,id:e.name,"data-testid":e.name,...e}),sY=nf([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:hover:opacity-80`,`ring-offset-background`,`hover:bg-neutral-500/10`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`border-primary/30 text-primary ring-primary/20 checked:border-primary checked:bg-primary`,secondary:`border-secondary/30 text-secondary ring-secondary/20 checked:border-secondary checked:bg-secondary`,destructive:`border-destructive/30 text-destructive ring-destructive/20 checked:border-destructive checked:bg-destructive`,neutral:`border-neutral/30 text-neutral ring-neutral/20 checked:border-neutral checked:bg-neutral`,light:`border-white/30 text-white ring-white/20 checked:border-white checked:bg-white`,text:`border-text/30 text-text ring-text/20 checked:border-text checked:bg-text`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),cY=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,w.jsx)(`input`,{type:`checkbox`,className:W(sY({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),lY=e=>{let{label:t,name:n,id:r}=e;return t?(0,w.jsxs)(`label`,{htmlFor:r??n,className:W(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,w.jsx)(cY,{id:r??n,...e}),t]}):(0,w.jsx)(cY,{id:r??n,...e})},uY=({inputLabel:e,value:t,onChange:n,...r})=>(0,w.jsx)(lY,{...r,label:e,checked:!!t,onChange:n}),dY=({autoComplete:e,...t})=>(0,w.jsx)(jJ,{Element:uY,id:t.name,"data-testid":t.name,autoComplete:e,...t}),fY=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=wJ();return(0,w.jsx)(kJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(aH,{onValueChange:t.onChange,values:t.value,...l,children:c})})},pY=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=HH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(fY,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},mY=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=wJ();return(0,w.jsx)(kJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},hY=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=HH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(mY,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},gY=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=wJ();return(0,w.jsx)(kJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(_w,{...t,...l,children:c})})},_Y=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=HH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(gY,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},vY=e=>{let t=(0,_.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=wJ(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,w.jsx)(eV,{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},yY=e=>{let t=(0,_.c)(3),{formDescriptionId:n}=wJ(),r;return t[0]!==n||t[1]!==e?(r=(0,w.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},bY=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=wJ(),a=r?String(r?.message??``):t;return a?(0,w.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=vJ;$.Description=yY,$.Control=vY,$.Field=CJ,$.Item=bJ,$.Label=OJ,$.Message=bY,$.Element=jJ,$.Input=PJ,$.InputPassword=LJ,$.Checkbox=dY,$.TextArea=aY,$.AutoSizedTextArea=oY,$.Button=nw,$.Select=hY,$.MultiSelect=pY,$.EditableFieldInput=MJ,$.EditableFieldTextArea=NJ,$.SwitchSelector=_Y,$.OTP=nY,$.SearchInput=iY;var xY=Z(`ZodISODateTime`,(e,t)=>{ZG.init(e,t),JY.init(e,t)});function SY(e){return _q(xY,e)}var CY=Z(`ZodISODate`,(e,t)=>{QG.init(e,t),JY.init(e,t)});function wY(e){return vq(CY,e)}var TY=Z(`ZodISOTime`,(e,t)=>{$G.init(e,t),JY.init(e,t)});function EY(e){return yq(TY,e)}var DY=Z(`ZodISODuration`,(e,t)=>{eK.init(e,t),JY.init(e,t)});function OY(e){return bq(DY,e)}var kY=Z(`ZodError`,(e,t)=>{kW.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>MW(e,t)},flatten:{value:t=>jW(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,YU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,YU,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),AY=NW(kY),jY=FW(kY),MY=LW(kY),NY=zW(kY),PY=VW(kY),FY=HW(kY),IY=UW(kY),LY=WW(kY),RY=GW(kY),zY=KW(kY),BY=qW(kY),VY=JW(kY),HY=new WeakMap;function UY(e,t,n){let r=Object.getPrototypeOf(e),i=HY.get(r);if(i||(i=new Set,HY.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var WY=Z(`ZodType`,(e,t)=>(LG.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Jq(e,`input`),output:Jq(e,`output`)}}),e.toJSONSchema=qq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>AY(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>MY(e,t,n),e.parseAsync=async(t,n)=>jY(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>NY(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>PY(e,t,n),e.decode=(t,n)=>FY(e,t,n),e.encodeAsync=async(t,n)=>IY(e,t,n),e.decodeAsync=async(t,n)=>LY(e,t,n),e.safeEncode=(t,n)=>RY(e,t,n),e.safeDecode=(t,n)=>zY(e,t,n),e.safeEncodeAsync=async(t,n)=>BY(e,t,n),e.safeDecodeAsync=async(t,n)=>VY(e,t,n),UY(e,`ZodType`,{check(...e){let t=this.def;return this.clone(nW(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return fW(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(YX(e,t))},superRefine(e,t){return this.check(XX(e,t))},overwrite(e){return this.check(Mq(e))},optional(){return jX(this)},exactOptional(){return NX(this)},nullable(){return FX(this)},nullish(){return jX(FX(this))},nonoptional(e){return VX(this,e)},array(){return yX(this)},or(e){return CX([this,e])},and(e){return TX(this,e)},transform(e){return GX(this,kX(e))},default(e){return LX(this,e)},prefault(e){return zX(this,e)},catch(e){return UX(this,e)},pipe(e){return GX(this,e)},readonly(){return qX(this)},describe(e){let t=this.clone();return qK.add(t,{description:e}),t},meta(...e){if(e.length===0)return qK.get(this);let t=this.clone();return qK.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return qK.get(e)?.description},configurable:!0}),e)),GY=Z(`_ZodString`,(e,t)=>{RG.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,UY(e,`_ZodString`,{regex(...e){return this.check(Eq(...e))},includes(...e){return this.check(kq(...e))},startsWith(...e){return this.check(Aq(...e))},endsWith(...e){return this.check(jq(...e))},min(...e){return this.check(wq(...e))},max(...e){return this.check(Cq(...e))},length(...e){return this.check(Tq(...e))},nonempty(...e){return this.check(wq(1,...e))},lowercase(e){return this.check(Dq(e))},uppercase(e){return this.check(Oq(e))},trim(){return this.check(Pq())},normalize(...e){return this.check(Nq(...e))},toLowerCase(){return this.check(Fq())},toUpperCase(){return this.check(Iq())},slugify(){return this.check(Lq())}})}),KY=Z(`ZodString`,(e,t)=>{RG.init(e,t),GY.init(e,t),e.email=t=>e.check(YK(YY,t)),e.url=t=>e.check(tq(QY,t)),e.jwt=t=>e.check(gq(pX,t)),e.emoji=t=>e.check(nq($Y,t)),e.guid=t=>e.check(XK(XY,t)),e.uuid=t=>e.check(ZK(ZY,t)),e.uuidv4=t=>e.check(QK(ZY,t)),e.uuidv6=t=>e.check($K(ZY,t)),e.uuidv7=t=>e.check(eq(ZY,t)),e.nanoid=t=>e.check(rq(eX,t)),e.guid=t=>e.check(XK(XY,t)),e.cuid=t=>e.check(iq(tX,t)),e.cuid2=t=>e.check(aq(nX,t)),e.ulid=t=>e.check(oq(rX,t)),e.base64=t=>e.check(pq(uX,t)),e.base64url=t=>e.check(mq(dX,t)),e.xid=t=>e.check(sq(iX,t)),e.ksuid=t=>e.check(cq(aX,t)),e.ipv4=t=>e.check(lq(oX,t)),e.ipv6=t=>e.check(uq(sX,t)),e.cidrv4=t=>e.check(dq(cX,t)),e.cidrv6=t=>e.check(fq(lX,t)),e.e164=t=>e.check(hq(fX,t)),e.datetime=t=>e.check(SY(t)),e.date=t=>e.check(wY(t)),e.time=t=>e.check(EY(t)),e.duration=t=>e.check(OY(t))});function qY(e){return JK(KY,e)}var JY=Z(`ZodStringFormat`,(e,t)=>{zG.init(e,t),GY.init(e,t)}),YY=Z(`ZodEmail`,(e,t)=>{HG.init(e,t),JY.init(e,t)}),XY=Z(`ZodGUID`,(e,t)=>{BG.init(e,t),JY.init(e,t)}),ZY=Z(`ZodUUID`,(e,t)=>{VG.init(e,t),JY.init(e,t)}),QY=Z(`ZodURL`,(e,t)=>{UG.init(e,t),JY.init(e,t)}),$Y=Z(`ZodEmoji`,(e,t)=>{WG.init(e,t),JY.init(e,t)}),eX=Z(`ZodNanoID`,(e,t)=>{GG.init(e,t),JY.init(e,t)}),tX=Z(`ZodCUID`,(e,t)=>{KG.init(e,t),JY.init(e,t)}),nX=Z(`ZodCUID2`,(e,t)=>{qG.init(e,t),JY.init(e,t)}),rX=Z(`ZodULID`,(e,t)=>{JG.init(e,t),JY.init(e,t)}),iX=Z(`ZodXID`,(e,t)=>{YG.init(e,t),JY.init(e,t)}),aX=Z(`ZodKSUID`,(e,t)=>{XG.init(e,t),JY.init(e,t)}),oX=Z(`ZodIPv4`,(e,t)=>{tK.init(e,t),JY.init(e,t)}),sX=Z(`ZodIPv6`,(e,t)=>{nK.init(e,t),JY.init(e,t)}),cX=Z(`ZodCIDRv4`,(e,t)=>{rK.init(e,t),JY.init(e,t)}),lX=Z(`ZodCIDRv6`,(e,t)=>{iK.init(e,t),JY.init(e,t)}),uX=Z(`ZodBase64`,(e,t)=>{oK.init(e,t),JY.init(e,t)}),dX=Z(`ZodBase64URL`,(e,t)=>{cK.init(e,t),JY.init(e,t)}),fX=Z(`ZodE164`,(e,t)=>{lK.init(e,t),JY.init(e,t)}),pX=Z(`ZodJWT`,(e,t)=>{dK.init(e,t),JY.init(e,t)}),mX=Z(`ZodUnknown`,(e,t)=>{fK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function hX(){return xq(mX)}var gX=Z(`ZodNever`,(e,t)=>{pK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zq(e,t,n,r)});function _X(e){return Sq(gX,e)}var vX=Z(`ZodArray`,(e,t)=>{hK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tJ(e,t,n,r),e.element=t.element,UY(e,`ZodArray`,{min(e,t){return this.check(wq(e,t))},nonempty(e){return this.check(wq(1,e))},max(e,t){return this.check(Cq(e,t))},length(e,t){return this.check(Tq(e,t))},unwrap(){return this.element}})});function yX(e,t){return Rq(vX,e,t)}var bX=Z(`ZodObject`,(e,t)=>{bK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nJ(e,t,n,r),eW(e,`shape`,()=>t.shape),UY(e,`ZodObject`,{keyof(){return DX(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:hX()})},loose(){return this.clone({...this._zod.def,catchall:hX()})},strict(){return this.clone({...this._zod.def,catchall:_X()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return gW(this,e)},safeExtend(e){return _W(this,e)},merge(e){return vW(this,e)},pick(e){return mW(this,e)},omit(e){return hW(this,e)},partial(...e){return yW(AX,this,e[0])},required(...e){return bW(BX,this,e[0])}})});function xX(e,t){return new bX({type:`object`,shape:e??{},...Q(t)})}var SX=Z(`ZodUnion`,(e,t)=>{SK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rJ(e,t,n,r),e.options=t.options});function CX(e,t){return new SX({type:`union`,options:e,...Q(t)})}var wX=Z(`ZodIntersection`,(e,t)=>{CK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iJ(e,t,n,r)});function TX(e,t){return new wX({type:`intersection`,left:e,right:t})}var EX=Z(`ZodEnum`,(e,t)=>{EK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qq(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 EX({...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 EX({...t,checks:[],...Q(r),entries:i})}});function DX(e,t){return new EX({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var OX=Z(`ZodTransform`,(e,t)=>{DK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eJ(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new GU(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(DW(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(DW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function kX(e){return new OX({type:`transform`,transform:e})}var AX=Z(`ZodOptional`,(e,t)=>{kK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jX(e){return new AX({type:`optional`,innerType:e})}var MX=Z(`ZodExactOptional`,(e,t)=>{AK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function NX(e){return new MX({type:`optional`,innerType:e})}var PX=Z(`ZodNullable`,(e,t)=>{jK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FX(e){return new PX({type:`nullable`,innerType:e})}var IX=Z(`ZodDefault`,(e,t)=>{MK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function LX(e,t){return new IX({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():lW(t)}})}var RX=Z(`ZodPrefault`,(e,t)=>{PK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zX(e,t){return new RX({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():lW(t)}})}var BX=Z(`ZodNonOptional`,(e,t)=>{FK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function VX(e,t){return new BX({type:`nonoptional`,innerType:e,...Q(t)})}var HX=Z(`ZodCatch`,(e,t)=>{LK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function UX(e,t){return new HX({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var WX=Z(`ZodPipe`,(e,t)=>{RK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uJ(e,t,n,r),e.in=t.in,e.out=t.out});function GX(e,t){return new WX({type:`pipe`,in:e,out:t})}var KX=Z(`ZodReadonly`,(e,t)=>{BK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qX(e){return new KX({type:`readonly`,innerType:e})}var JX=Z(`ZodCustom`,(e,t)=>{HK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$q(e,t,n,r)});function YX(e,t={}){return zq(JX,e,t)}function XX(e,t){return Bq(e,t)}var ZX={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`]},QX=e=>{let t=(0,_.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,h.useState)(!1),{setLocaleDictionary:u}=gT(),{mutate:d,isPending:f}=ok(),{mutate:p,isPending:m}=dk(),{mutate:g,isPending:v}=ak(),y=m||v,{editedContent:b,restoreEditedContent:x}=wT(),{deleteButton:S,resetButton:C,saveButton:T,publishButton:E,downloadButton:D,confirmation:O}=_r(ZX),{isAuthenticated:k}=QO(),A=b?.[n.localId],j;t[0]!==n||t[1]!==A?(j=A&&JSON.stringify(A)!==JSON.stringify(n),t[0]=n,t[1]=A,t[2]=j):j=t[2];let M=j,N=n?.id!==void 0,P;t[3]!==n||t[4]!==b||t[5]!==o||t[6]!==x||t[7]!==u||t[8]!==p?(P=async()=>{b?.[n.localId]&&p({dictionary:{...n,...b?.[n.localId]}},{onSuccess:()=>{u(b?.[n.localId]),x(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=b,t[5]=o,t[6]=x,t[7]=u,t[8]=p,t[9]=P):P=t[9];let ee=P,F;t[10]!==n||t[11]!==b||t[12]!==o||t[13]!==g||t[14]!==x||t[15]!==u?(F=()=>{let e={...n,...b?.[n.localId]};g({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),x(n.localId),o?.())}})},t[10]=n,t[11]=b,t[12]=o,t[13]=g,t[14]=x,t[15]=u,t[16]=F):F=t[16];let I=F,te;t[17]!==d||t[18]!==n||t[19]!==a?(te=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=te):te=t[20];let ne=te,re;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(re=()=>l(!1),t[21]=re):re=t[21];let L;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>l(!1),t[22]=L):L=t[22],(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(dL,{isOpen:c,title:O.title.value,size:`md`,onClose:re,padding:`md`,children:(0,w.jsxs)(`form`,{className:`size-full`,children:[(0,w.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:O.message}),(0,w.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,w.jsx)($.Button,{label:O.cancelButton.label.value,disabled:!M||y,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:L,children:O.cancelButton.text}),(0,w.jsx)($.Button,{label:O.confirmButton.label.value,disabled:!M||y,Icon:Lf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:ee,children:O.confirmButton.text})]})]})}),(0,w.jsxs)(`form`,{className:W(`flex justify-end gap-2 max-md:flex-col`,i),...s,children:[r.includes(`remote`)&&N&&a&&k&&(0,w.jsx)($.Button,{label:S.label.value,Icon:zf,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ne,children:S.text}),M&&(0,w.jsx)($.Button,{label:C.label.value,disabled:!M,Icon:If,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>x(n.localId),children:C.text}),r.includes(`local`)&&(0,w.jsx)($.Button,{label:D.label.value,disabled:!M||y,Icon:wf,color:`text`,variant:k?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:D.text}),r.includes(`remote`)&&k&&!N&&(0,w.jsx)($.Button,{label:E.label.value,disabled:y,Icon:hf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:I,children:E.text}),r.includes(`remote`)&&k&&N&&M&&(0,w.jsx)($.Button,{label:T.label.value,disabled:!M||y,Icon:Lf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:I,children:T.text})]})]})},$X={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`]},eZ=(e,t=2e3,n,r)=>{let[i,a]=(0,h.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))}}}},tZ=e=>{let t=(0,_.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:l,disable:u,preventDefault:d,stopPropagation:f,size:p}=e,m=a===void 0?`Copy to clipboard`:a,h=o===void 0?`Copied to clipboard`:o,g=s===void 0?2e3:s,v=d===void 0?!0:d,y=f===void 0?!0:f,b=p===void 0?14:p,{isCopied:x,copy:S}=eZ(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,w.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let C;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==S||t[8]!==x||t[9]!==v||t[10]!==b||t[11]!==y||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{v&&e.preventDefault(),y&&e.stopPropagation(),S()},o=x?h:m,s=x?Sf:Cf;C=(0,w.jsxs)(`span`,{className:W(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":x,"data-testid":`copy-to-clipboard`,children:[(0,w.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,w.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:b,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=S,t[8]=x,t[9]=v,t[10]=b,t[11]=y,t[12]=n,t[13]=C}else C=t[13];return C},nZ={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`]},rZ={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`]},iZ=e=>{let t=(0,_.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:v}=_r(rZ),y;if(t[0]!==u||t[1]!==l||t[2]!==v||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 _;t[18]!==r||t[19]!==n?(_=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=_):_=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]!==v||t[36]!==g?(T=e=>e.input===void 0?g.value:v.value,t[35]=v,t[36]=g,t[37]=T):T=t[37],y=xX({title:qY({error:_}).refine(aZ,{error:i.value}).optional(),key:qY({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:qY({error:x}).optional(),projectIds:yX(qY({error:S})).default([e]),tags:yX(qY({error:C})).default([]),location:DX([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:DX([`static`,`dynamic`,`fetch`]).optional(),filePath:qY({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=v,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]=y}else y=t[17];return y};function aZ(e){return e.length===0||e.length>=4}var oZ=e=>{let t=(0,_.c)(55),{dictionary:n,mode:r}=e,{session:i}=ZO(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=ik(),{data:l}=sk(),u=s?.data??[],d=l?.data??[],f=iZ(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:g,isSubmitting:v}=yJ(f,m),{editedContent:y,setEditedDictionary:b}=wT(),{titleInput:x,keyInput:S,descriptionInput:C,projectInput:T,tagsSelect:E,locationSelect:D,importModeSelect:O,filePathInput:k,auditButton:A}=_r(nZ),{mutate:j,isPending:M}=ck(),N=y?.[n.localId],P;t[5]!==n||t[6]!==g?(P=()=>{g.reset({...n,location:n.location??`remote`})},t[5]=n,t[6]=g,t[7]=P):P=t[7];let ee=g?.reset,F;t[8]!==n||t[9]!==ee?(F=[n,ee],t[8]=n,t[9]=ee,t[10]=F):F=t[10],(0,h.useEffect)(P,F);let I;t[11]!==n||t[12]!==g||t[13]!==N?(I=()=>{N===void 0&&g.reset({...n,location:n.location??`remote`})},t[11]=n,t[12]=g,t[13]=N,t[14]=I):I=t[14];let te;t[15]===N?te=t[16]:(te=[N],t[15]=N,t[16]=te),(0,h.useEffect)(I,te);let ne;t[17]!==j||t[18]!==n||t[19]!==g||t[20]!==b||t[21]!==N?(ne=()=>{let e={...n,...N};j({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(t?.data)try{let n=t.data.fileContent;b(t=>({...t,...e,...n})),g.reset({...e,...n})}catch(e){console.error(e)}}})},t[17]=j,t[18]=n,t[19]=g,t[20]=b,t[21]=N,t[22]=ne):ne=t[22];let re=ne,L;t[23]===g.control?L=t[24]:(L={control:g.control,name:`location`},t[23]=g.control,t[24]=L);let R=RH(L),z=R===`local`||R===`hybrid`,ie;t[25]!==n||t[26]!==g||t[27]!==b?(ie=e=>{g.setValue(`key`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},key:e}))},t[25]=n,t[26]=g,t[27]=b,t[28]=ie):ie=t[28];let ae;t[29]!==n||t[30]!==g||t[31]!==b?(ae=e=>{g.setValue(`title`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},title:e}))},t[29]=n,t[30]=g,t[31]=b,t[32]=ae):ae=t[32];let oe;t[33]!==n||t[34]!==g||t[35]!==b?(oe=e=>{g.setValue(`description`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},description:e}))},t[33]=n,t[34]=g,t[35]=b,t[36]=oe):oe=t[36];let se;t[37]!==n||t[38]!==g||t[39]!==D||t[40]!==r||t[41]!==b?(se=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?g.getValues(`filePath`)??n.filePath:void 0;e||g.setValue(`filePath`,void 0),b(e=>({...n,...e??{},location:r,filePath:i}))},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),b(e=>({...n,...e??{},location:r}))};return(0,w.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,w.jsx)($.Label,{className:`ml-1`,children:D.label}),(0,w.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,w.jsx)(lY,{id:`location-local`,name:`location-local`,label:D.local.value,color:`text`,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,w.jsx)(lY,{id:`location-remote`,name:`location-remote`,label:D.remote.value,color:`text`,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,w.jsx)($.Description,{children:D.testDescription}),(0,w.jsx)($.Message,{})]})},t[37]=n,t[38]=g,t[39]=D,t[40]=r,t[41]=b,t[42]=se):se=t[42];let ce;t[43]!==n||t[44]!==g||t[45]!==b?(ce=e=>{g.setValue(`importMode`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},importMode:e}))},t[43]=n,t[44]=g,t[45]=b,t[46]=ce):ce=t[46];let le;t[47]!==n||t[48]!==g||t[49]!==b?(le=e=>{let t=[e].flat();g.setValue(`projectIds`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},projectIds:t}))},t[47]=n,t[48]=g,t[49]=b,t[50]=le):le=t[50];let ue;return t[51]!==n||t[52]!==g||t[53]!==b?(ue=e=>{let t=[e].flat();g.setValue(`tags`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},tags:t}))},t[51]=n,t[52]=g,t[53]=b,t[54]=ue):ue=t[54],(0,w.jsxs)($,{className:`flex w-full flex-col gap-8`,...g,schema:f,children:[(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsx)($.EditableFieldInput,{name:`key`,label:S.label,placeholder:S.label.value,description:S.description,disabled:v,isRequired:!0,onSave:ie}),(0,w.jsx)($.EditableFieldInput,{name:`title`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:v,onSave:ae})]}),(0,w.jsx)($.EditableFieldTextArea,{name:`description`,label:C.label,placeholder:C.placeholder.value,description:C.description,disabled:v,onSave:oe}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,w.jsx)($.Field,{control:g.control,name:`location`,render:se}),(0,w.jsx)(Kx,{mode:`wait`,children:z&&(0,w.jsx)(WC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,w.jsx)($.Input,{name:`filePath`,label:k.label.value,placeholder:k.placeholder.value,description:k.description.value,disabled:v||!z,onChange:e=>{let t=e.target.value;b(e=>({...n,...e??{},filePath:t}))}})},`filePath-input`)})]}),(0,w.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,w.jsxs)($.Select,{name:`importMode`,label:O.label.value,description:O.description.value,onValueChange:ce,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:O.label.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`static`,children:O.static.value}),(0,w.jsx)(J.Item,{value:`dynamic`,children:O.dynamic.value}),(0,w.jsx)(J.Item,{value:`live`,children:O.live.value})]})]})}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsxs)($.MultiSelect,{name:`projectIds`,label:T.label.value,description:T.description,onValueChange:le,children:[(0,w.jsx)(aH.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,w.jsx)(aH.Input,{placeholder:T.placeholder.value})}),(0,w.jsx)(aH.Content,{children:(0,w.jsx)($C,{isLoading:c,children:(0,w.jsx)(aH.List,{children:u?.map(sZ)})})})]}),(0,w.jsxs)($.MultiSelect,{name:`tags`,label:E.label.value,description:E.description,onValueChange:ue,children:[(0,w.jsx)(aH.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,w.jsx)(aH.Input,{placeholder:E.placeholder.value})}),(0,w.jsx)(aH.Content,{children:(0,w.jsx)($C,{isLoading:c,children:(0,w.jsx)(aH.List,{children:d?.map(cZ)})})})]})]}),(0,w.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,w.jsx)($.Button,{type:`button`,size:`icon-md`,label:A.label.value,Icon:Bf,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:re,disabled:v||M,isLoading:M})})]})};function sZ(e){return(0,w.jsx)(aH.Item,{value:String(e.id),children:e.name},String(e.id))}function cZ(e){return(0,w.jsx)(aH.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var lZ=(0,h.lazy)(()=>jn(()=>import(`./dist-BCfLtl_t.js`).then(e=>({default:e.Editor})),__vite__mapDeps([3,1]))),uZ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,h.useRef)(null),c=(0,h.useRef)(null),[l,u]=(0,h.useState)({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`?e.split(`
203
- `).length>1:!1);return(0,w.jsxs)(`div`,{className:W(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,w.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,w.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,w.jsx)(LI,{content:e})})}),(0,w.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)($C,{}),children:(0,w.jsx)(lZ,{...l,defaultLanguage:`typescript`,language:t,loading:(0,w.jsx)($C,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{contextmenu:!1,readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},dZ=e=>{let t=(0,_.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=wT(),o=fZ,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,w.jsx)(uZ,{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 fZ(e){try{return JSON.parse(e),!0}catch{return!1}}var pZ={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`]},mZ={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`]},hZ=e=>{let t=(0,_.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:g,insertion:v,reactNode:y,file:b}=_r(mZ),x;t[0]===n?x=t[1]:(x=Qw(n),t[0]=n,t[1]=x);let[S,C]=(0,h.useState)(x),T;t[2]===r?T=t[3]:(T=e=>{C(e),r(e)},t[2]=r,t[3]=T);let E=T,I;return t[4]!==l||t[5]!==s||t[6]!==m||t[7]!==u||t[8]!==b||t[9]!==p||t[10]!==v||t[11]!==S||t[12]!==g||t[13]!==i||t[14]!==f||t[15]!==c||t[16]!==o||t[17]!==E||t[18]!==y||t[19]!==a||t[20]!==d?(I=(0,w.jsxs)(J,{value:S,onValueChange:E,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:d})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:D,children:i}),(0,w.jsx)(J.Item,{value:te,children:a}),(0,w.jsx)(J.Item,{value:ne,children:o}),(0,w.jsx)(J.Item,{value:re,children:s}),(0,w.jsx)(J.Item,{value:M,children:c}),(0,w.jsx)(J.Item,{value:N,children:l}),(0,w.jsx)(J.Item,{value:O,children:u}),(0,w.jsx)(J.Item,{value:L,children:p}),(0,w.jsx)(J.Item,{value:A,children:v}),(0,w.jsx)(J.Item,{value:F,children:g}),(0,w.jsx)(J.Item,{value:P,children:f}),(0,w.jsx)(J.Item,{value:k,children:m}),(0,w.jsx)(J.Item,{value:ee,disabled:!0,children:y}),(0,w.jsx)(J.Item,{value:j,children:b})]})]}),t[4]=l,t[5]=s,t[6]=m,t[7]=u,t[8]=b,t[9]=p,t[10]=v,t[11]=S,t[12]=g,t[13]=i,t[14]=f,t[15]=c,t[16]=o,t[17]=E,t[18]=y,t[19]=a,t[20]=d,t[21]=I):I=t[21],I},gZ=e=>{let t=(0,_.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=ST()?.internationalization.locales??[],s=Qw(n),c=Yw(n),l=e=>{a(qw(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,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(hZ,{section:n,onValueChange:e=>a(qw(e,o))}),(0,w.jsx)(gZ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(hZ,{section:n,onValueChange:e=>a(qw(e,o))}),(0,w.jsx)(gZ,{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(qw(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(hZ,{section:n,onValueChange:s}),(0,w.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,w.jsx)(yZ,{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(qw(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,w.jsx)(hZ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},_Z=e=>{let t=(0,_.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=yT(),{renameEditedContent:c,addEditedContent:l}=CT(),{titleInput:u,deleteButton:d}=_r(pZ),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,w.jsx)(ZC,{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":lr(i,o?.keyPath??[]),onClick:e,children:(0,w.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,w.jsxs)(`div`,{className:`w-full`,children:[(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,w.jsx)(YT,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,w.jsx)(nw,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:zf,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,w.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,pr(n),` )`]})]}),(0,w.jsx)(gZ,{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},vZ=e=>{let t=(0,_.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=_r(pZ),{setFocusedContentKeyPath:o}=yT(),{addEditedContent:s}=CT();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.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:M,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,w.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,w.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,w.jsx)(`li`,{className:`flex w-full`,children:(0,w.jsx)(_Z,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:M,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,w.jsx)(nw,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Ff,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},yZ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,w.jsx)(_Z,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,w.jsx)(vZ,{section:e,keyPath:t,dictionaryLocalId:n}),bZ=e=>{let t=(0,_.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=wT(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,w.jsx)(_Z,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},xZ=e=>{let t=(0,_.c)(20),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=ST(),{returnToDictionaryList:d}=_r($X),{focusedContent:f,setFocusedContent:p}=yT(),{setLocaleDictionary:m}=gT(),g;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(g=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=g):g=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,h.useEffect)(g,v);let y;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],y=(0,w.jsx)(oE,{availableLocales:u?.internationalization?.locales??[],children:(0,w.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,w.jsx)(nw,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:mf,label:d.label.value,children:d.text}),(0,w.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,w.jsxs)(eL,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[a.includes(`remote`)&&(0,w.jsx)(eL.Item,{label:`Details`,value:`details`,children:(0,w.jsx)(oZ,{dictionary:n,mode:a})}),(0,w.jsx)(eL.Item,{label:`Structure`,value:`structure`,children:(0,w.jsx)(bZ,{dictionary:n})}),(0,w.jsx)(eL.Item,{label:`Content`,value:`content`,children:(0,w.jsx)(qz,{dictionary:n,isDarkMode:i})}),(0,w.jsx)(eL.Item,{label:`JSON`,value:`json`,children:(0,w.jsx)(dZ,{dictionary:n,isDarkMode:i})})]})}),(0,w.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,w.jsx)(tZ,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,w.jsx)(QX,{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]=y}else y=t[16];return y},SZ=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}},CZ=()=>{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)},wZ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},TZ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},EZ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},DZ=(e=`md`)=>{let t=SZ(e),n=CZ(),r=EZ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:wZ(),isMac:TZ()}},OZ=e=>{let t=(0,_.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=DZ(n),t[0]=n,t[1]=r);let[i,a]=(0,h.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(DZ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,h.useEffect)(o,s),i},kZ=e=>{let t=(0,_.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,h.useRef)(``),p=(0,h.useRef)(null),[m,g]=(0,h.useState)(o??``),v;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=v):v=t[2];let y=v,b;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(b=e=>{f.current=e;let t=d?e.trim():e;if(y(),t.length<l){g(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(g(e),s?.(e)):(g(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=b):b=t[8];let x=b,S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{y()},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,h.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},AZ=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()})}},jZ=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(AZ.subscribe,AZ.getSnapshot,MZ),n;return e[0]===t?n=e[1]:(n={open:AZ.open,close:AZ.close,set:AZ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function MZ(){return{}}var NZ={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`]},PZ=e=>e.split(` + `).map(e=>e.trim()),FZ=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,IZ=(e,t)=>{let n=t.map(FZ),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(FZ(e)));if(!i)return!1;let a=FZ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},LZ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,RZ=(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},zZ=e=>{let t=(0,_.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,l=a===void 0?!1:a,u=s===void 0?`md`:s,{isMac:d}=OZ(),f;t[0]!==d||t[1]!==n?(f=PZ(RZ(n,d??!1)),t[0]=d,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[3]=m):m=t[3];let[g,v]=(0,h.useState)(m),y,b;if(t[4]!==l||t[5]!==d||t[6]!==p||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(d?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(LZ(i))):a.add(i.toUpperCase()),v(a),!l&&r&&IZ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{v(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)}},b=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=y,t[9]=b):(y=t[8],b=t[9]),(0,h.useEffect)(y,b),!c)return null;let x;t[10]===g?x=t[11]:(x=e=>{let t=e.toUpperCase(),n=FZ(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]=x);let S=x,C;if(t[12]!==o||t[13]!==S||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==S||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=LZ(e);return(0,w.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,w.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,w.jsx)(`span`,{className:W(`min-w-4 px-0.5 text-center`,S(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=S,t[19]=n,t[20]=e):e=t[20],C=(0,w.jsx)(`kbd`,{className:W(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=S,t[14]=p,t[15]=n,t[16]=u,t[17]=C}else C=t[17];return C},BZ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,w.jsx)(`div`,{className:W(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,w.jsx)(`div`,{style:{minWidth:`${n}px`},className:W(r===`right`&&`ml-auto`),children:e})}),VZ=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},HZ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=_r(NZ),{isMobile:d}=OZ(`md`),f=(0,h.useRef)(null),p=(0,h.useRef)(null),m=nL(l),{open:g,close:_,isOpen:v}=jZ(),y=v(t),b=y;sL({disableScroll:b,key:t?`right_drawer_${t}`:`right_drawer`}),(0,h.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=b&&a,r=e.target&&!f.current.contains(e.target),i=VZ(f.current);(n&&r&&i||!e.target)&&(_(t),c?.())}catch{_(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[b,_,c,a,t]);let x=(0,h.useRef)(c);return(0,h.useEffect)(()=>{x.current=c},[c]),(0,h.useEffect)(()=>{s!==void 0&&s!==y&&(s?g(t):(_(t),x.current?.()))},[s,y,t,g,_]),m?(0,Cu.createPortal)((0,w.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,w.jsx)(BZ,{isHidden:!b,align:`right`,children:(0,w.jsxs)(ZC,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,w.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,w.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,w.jsx)(`div`,{children:o&&(0,w.jsx)(nw,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:vf,children:o?.text})}),(0,w.jsx)(`div`,{children:(0,w.jsxs)(FI,{identifier:`close-drawer`,children:[(0,w.jsx)(nw,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{_(t),c?.()},Icon:Vf,size:`icon-md`}),(0,w.jsx)(FI.Detail,{identifier:`close-drawer`,children:(0,w.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,w.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,w.jsx)(zZ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{_(t),c?.()}})]})})]})})]}),e&&(0,w.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,w.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,w.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(_(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(_(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,w.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,w.jsx)(w.Fragment,{})},UZ=nf(`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`}}),WZ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,w.jsx)(`div`,{className:UZ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),GZ=`dictionaryList`,KZ=e=>`dictionary_edition_${e}`,qZ=e=>{let t=(0,_.c)(20),n;t[0]===e?n=t[1]:(n=KZ(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=jZ(),{getEditedContentValue:s}=CT(),{focusedContent:c,setFocusedContent:l}=yT(),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,h.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},JZ=e=>{let t=(0,_.c)(73),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=_r(YC),l;t[0]===n?l=t[1]:(l=KZ(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=qZ(n),{setFocusedContent:p}=yT(),{open:m}=jZ(),g;t[2]===m?g=t[3]:(g=()=>m(GZ),t[2]=m,t[3]=g);let v=g,{data:y}=uk(),b;t[4]!==f||t[5]!==v||t[6]!==p?(b=()=>{f(),p(null),v()},t[4]=f,t[5]=v,t[6]=p,t[7]=b):b=t[7];let x=b,[S,C]=(0,h.useState)(!1),T;t[8]===x?T=t[9]:(T=()=>{C(!1),x()},t[8]=x,t[9]=T);let E=T;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,w.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,ee,F;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==x||t[17]!==u||t[18]!==a||t[19]!==y){j=Symbol.for(`react.early_return_sentinel`);bb0:{if(O=y?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!O){let e;t[30]===c?e=t[31]:(e=(0,w.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[30]=c,t[31]=e),j=e;break bb0}D=HZ,F=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,w.jsx)(nw,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Nf,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,w.jsx)(FI.Detail,{identifier:`open-dictionary-editor`,children:(0,w.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,w.jsxs)(FI,{identifier:`open-dictionary-editor`,children:[n,r]}),t[40]=n,t[41]=r,t[42]=o):o=t[42],ee=(0,w.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,w.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,w.jsx)(WZ,{color:`text`,roundedSize:`full`,size:`xs`,children:O.key}),P=O.filePath&&(0,w.jsx)(WZ,{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]=y,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]=ee,t[29]=F}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],ee=t[28],F=t[29];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let I;t[43]===O.id?I=t[44]:(I=O.id&&(0,w.jsx)(WZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[43]=O.id,t[44]=I);let te;t[45]!==I||t[46]!==M||t[47]!==N||t[48]!==P?(te=(0,w.jsxs)(`div`,{className:M,children:[N,P,I]}),t[45]=I,t[46]=M,t[47]=N,t[48]=P,t[49]=te):te=t[49];let ne;t[50]!==te||t[51]!==ee?(ne=(0,w.jsxs)(w.Fragment,{children:[ee,te]}),t[50]=te,t[51]=ee,t[52]=ne):ne=t[52];let re;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(re=[`local`,`remote`],t[53]=re):re=t[53];let L;t[54]!==O||t[55]!==x?(L=(0,w.jsx)(QX,{dictionary:O,mode:re,className:`mb-4 flex-col px-3`,onDelete:x}),t[54]=O,t[55]=x,t[56]=L):L=t[56];let R;t[57]!==O||t[58]!==S||t[59]!==d||t[60]!==x||t[61]!==r||t[62]!==o||t[63]!==E?(R=d&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(dL,{isOpen:S,onClose:()=>C(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,w.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,w.jsx)(xZ,{dictionary:O,onClickDictionaryList:E,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{C(!1),x()},onSave:()=>{C(!1)}})})}),(0,w.jsx)(tE,{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]=R):R=t[64];let z;return t[65]!==D||t[66]!==k||t[67]!==A||t[68]!==ne||t[69]!==L||t[70]!==R||t[71]!==F?(z=(0,w.jsx)(D,{identifier:F,backButton:k,onClose:A,header:ne,footer:L,children:R}),t[65]=D,t[66]=k,t[67]=A,t[68]=ne,t[69]=L,t[70]=R,t[71]=F,t[72]=z):z=t[72],z},YZ=e=>{let t=(0,_.c)(4),{isDarkMode:n}=e,{focusedContent:r}=yT(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,w.jsx)(JZ,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},XZ={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`]},ZZ=()=>{let{drawerTitle:e,buttonLabel:t}=_r(XZ),{set:n}=jZ(),{localeDictionaries:r}=hT(),{editedContent:i}=wT(),{setFocusedContent:a}=yT(),{setSearch:o,search:s}=kZ(),c=(0,h.useMemo)(()=>new Vz(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,h.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({[GZ]:!1,[KZ(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,w.jsxs)(HZ,{title:e.label.value,identifier:GZ,children:[(0,w.jsx)(`div`,{className:`p-3 pb-4`,children:(0,w.jsx)(rY,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,w.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,w.jsx)(`li`,{className:`w-full`,children:(0,w.jsx)(nw,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:yf,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Pf:void 0,children:(0,w.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,w.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,w.jsx)(WZ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,w.jsx)(WZ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,w.jsx)(WZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,w.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},QZ={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`]},$Z=()=>{let e=(0,_.c)(8),{message:t}=_r(QZ),[n]=pT(Ew.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=W(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,w.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},eQ=e=>{let t=(0,_.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,w.jsx)($Z,{})}),i=(0,w.jsx)(YZ,{}),a=(0,w.jsx)(ZZ,{}),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,w.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},tQ=()=>{let e=(0,_.c)(2),[t,n]=(0,h.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(nQ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,h.useEffect)(r,i),t};function nQ(e){return e.json()}var rQ=e=>{let t=(0,_.c)(11),{children:n,iframeRef:r}=e,i=tQ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)($C,{}),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,w.jsx)(bT,{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},iQ={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`]},aQ=()=>{let e=(0,_.c)(9),{editedContent:t,setEditedContentState:n}=wT(),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,h.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,h.useEffect)(s,c),i},oQ={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`]},sQ=()=>{let e=(0,_.c)(11),{title:t,description:n,documentationLink:r}=_r(oQ),i;e[0]===t?i=e[1]:(i=(0,w.jsx)(Qk,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,w.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,w.jsx)(Lk,{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,w.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},cQ=e=>{let t=(0,_.c)(23),{iframeRef:n,applicationPath:r}=e,i=_r(iQ),{editor:a}=ST()??{},{enabled:o}=TT(),s=ET();aQ(),OT();let[c,l]=(0,h.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=mT(void 0,u),f,p;if(t[1]===d?(f=t[2],p=t[3]):(f=()=>{typeof d==`string`&&window.history.replaceState({},``,d)},p=[d],t[1]=d,t[2]=f,t[3]=p),(0,h.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(ZC,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,w.jsx)(sQ,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,w.jsx)($C,{isLoading:c}),t[5]=c,t[6]=m);let g=`${a.applicationURL}${r}`,v=i.intlayerApplication.value,y=c&&`hidden`,b;t[7]===y?b=t[8]:(b=W(`size-full`,y),t[7]=y,t[8]=b);let x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>{l(!1)},t[9]=x):x=t[9];let S;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==g||t[13]!==b?(S=(0,w.jsx)(`iframe`,{src:g,title:v,sandbox:`allow-scripts allow-same-origin`,className:b,ref:n,onLoad:x}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=g,t[13]=b,t[14]=S):S=t[14];let C;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(C=!o&&(0,w.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,w.jsx)(nw,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=C):C=t[18];let T;return t[19]!==S||t[20]!==C||t[21]!==m?(T=(0,w.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,S,C]}),t[19]=S,t[20]=C,t[21]=m,t[22]=T):T=t[22],T},lQ=()=>{let e=(0,_.c)(2),t=(0,h.useRef)(null),n=Ri(),r;return e[0]===n.pathname?r=e[1]:(r=(0,w.jsx)(rQ,{iframeRef:t,children:(0,w.jsx)(hr,{disableEditor:!0,children:(0,w.jsx)(eQ,{children:(0,w.jsx)(cQ,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,g.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(h.StrictMode,{children:(0,w.jsx)(()=>{let e=(0,_.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(JC,{children:(0,w.jsx)(qC,{children:(0,w.jsx)(lQ,{})})}),e[0]=t):t=e[0],t},{})}));export{o as a,m as i,jn as n,C as r,cA as t};
202
+ }`,VJ=18,HJ=40,UJ=`${HJ}px`,WJ=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),GJ=e=>{let t=(0,_.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(!1),[u,d]=(0,h.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-VJ,f=c;document.querySelectorAll(WJ).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,g,v;t[5]!==n||t[6]!==i?(g=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=HJ)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},v=[n,i],t[5]=n,t[6]=i,t[7]=g,t[8]=v):(g=t[7],v=t[8]),(0,h.useEffect)(g,v);let y;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(y=()=>{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]=y):y=t[13];let b;t[14]!==r||t[15]!==a||t[16]!==i?(b=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=b):b=t[17],(0,h.useEffect)(y,b);let x;return t[18]!==o||t[19]!==f?(x={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:UJ},t[18]=o,t[19]=f,t[20]=x):x=t[20],x},KJ=e=>{let t=(0,h.useRef)(void 0);return(0,h.useEffect)(()=>{t.current=e}),t.current},qJ=(0,h.createContext)({}),JJ=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:l,containerClassName:u,noScriptCSSFallback:d=BJ,render:f,children:p,...m})=>{let[g,_]=(0,h.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),v=e??g,y=KJ(v),b=e=>{t?.(e),_(e)},x=r===void 0?null:typeof r==`string`?new RegExp(r):r,S=(0,h.useRef)(null),C=(0,h.useRef)(null),T=(0,h.useRef)({value:v,onChange:b,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),E=(0,h.useRef)({prev:[S.current?.selectionStart??null,S.current?.selectionEnd??null,S.current?.selectionDirection??`none`]});(0,h.useEffect)(()=>{let e=S.current,t=C.current;if(!e||!t)return;T.current.value!==e.value&&T.current.onChange(e.value),E.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){M(null),P(null),F(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=E.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&&S.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;F(t!==null&&n!==null?t===n?t:u:null),M(u),P(d),E.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&A(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;zJ(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),zJ(e.sheet,`[data-input-otp]:autofill { ${t} }`),zJ(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),zJ(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; } }`),zJ(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[D,O]=(0,h.useState)(!1),[k,A]=(0,h.useState)(!1),[j,M]=(0,h.useState)(null),[N,P]=(0,h.useState)(null),[ee,F]=(0,h.useState)(null);(0,h.useEffect)(()=>{RJ(()=>{S.current?.dispatchEvent(new Event(`input`));let e=S.current?.selectionStart??null,t=S.current?.selectionEnd??null,n=S.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),F(e),E.current.prev=[e,t,n])})},[v,k]),(0,h.useEffect)(()=>{y!==void 0&&v!==y&&y.length<n&&v.length===n&&o?.(v)},[n,o,y,v]);let I=(0,h.useRef)(null);(0,h.useEffect)(()=>{let e=k&&ee!==null?ee:null;e!==I.current&&(I.current=e,s?.(e))},[k,ee,s]);let te=GJ({containerRef:C,inputRef:S,pushPasswordManagerStrategy:c,isFocused:k}),ne=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&x&&!x.test(t)){e.preventDefault();return}typeof y==`string`&&t.length<y.length&&document.dispatchEvent(new Event(`selectionchange`)),b(t)},re=()=>{if(S.current){let e=Math.min(S.current.value.length,n-1),t=S.current.value.length;S.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},L=e=>{let t=S.current;if(!l&&(!T.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=S.current?.selectionStart,o=S.current?.selectionEnd,s=(a===o?v.slice(0,a??0)+i+v.slice(a??0):v.slice(0,a??0)+i+v.slice(o??0)).slice(0,n);if(!(s.length>0&&x&&!x.test(s))&&t){t.value=s,b(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},R={width:te.willPushPWMBadge?`calc(100% + ${te.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:te.willPushPWMBadge?`inset(0 ${te.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},z=(0,w.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":v.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:x?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:R,maxLength:n,value:v,ref:S,onPaste:e=>{L(e),m.onPaste?.(e)},onChange:ne,onMouseOver:e=>{O(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{O(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=S.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&F(t)}}),m.onKeyDown?.(e)},onFocus:e=>{re(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=k&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=v[t]===void 0?null:v[t];return{char:r,placeholderChar:v[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:k,isHovering:!m.disabled&&D,setSelection:e=>{let t=S.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=v[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},ae=f===void 0?(0,w.jsx)(qJ.Provider,{value:ie,children:p}):f(ie);return(0,w.jsxs)(w.Fragment,{children:[d!==null&&(0,w.jsx)(`noscript`,{children:(0,w.jsx)(`style`,{children:d})}),(0,w.jsxs)(`div`,{ref:C,className:W(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ae,(0,w.jsx)(`div`,{className:`absolute inset-0`,children:z})]})]})},YJ=({className:e,render:t,...n})=>(0,w.jsx)(JJ,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:W(`disabled:cursor-not-allowed`,e),render:t,...n}),XJ=({className:e,...t})=>(0,w.jsx)(`div`,{className:W(`z-10 flex items-center gap-3`,e),...t}),ZJ=e=>{let t=(0,_.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,h.useContext)(qJ),{char:c,isActive:l}=s?.slots[n]??{},u;t[0]===s?u=t[1]:(u=s??{},t[0]=s,t[1]=u);let{setSelection:d}=u,f;t[2]!==n||t[3]!==i||t[4]!==d?(f=e=>{d?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=d,t[5]=f):f=t[5];let p=f,m;t[6]!==n||t[7]!==a||t[8]!==d?(m=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=d,t[9]=m):m=t[9];let g=m;return(0,w.jsx)(nw,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:W(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:g,label:null,...o,children:(0,w.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},QJ=e=>(0,w.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,w.jsx)(kf,{})}),$J=e=>(0,w.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}),eY=e=>e?.getAttribute(`aria-selected`)===`true`,tY=({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}=wJ(),f=(0,h.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=cw(f,{selector:eY,isHoverable:!0});return(0,h.useEffect)(()=>{m()},[]),(0,w.jsx)(kJ,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,w.jsx)(YJ,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(XJ,{children:[(0,w.jsx)(ZJ,{index:0,ref:e=>{f.current[0]=e}}),(0,w.jsx)(ZJ,{index:1,ref:e=>{f.current[1]=e}}),(0,w.jsx)(ZJ,{index:2,ref:e=>{f.current[2]=e}})]}),(0,w.jsx)(QJ,{}),(0,w.jsxs)(XJ,{children:[(0,w.jsx)(ZJ,{index:3,ref:e=>{f.current[3]=e}}),(0,w.jsx)(ZJ,{index:4,ref:e=>{f.current[4]=e}}),(0,w.jsx)(ZJ,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,w.jsx)($J,{style:p})]})})})},nY=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}=HH();return(0,w.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,w.jsx)(tY,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},rY=({className:e,...t})=>(0,w.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,w.jsx)(Rf,{className:`absolute left-2 size-4`}),(0,w.jsx)(FT,{...t,type:`search`,className:W(`pl-8`,e)})]}),iY=e=>(0,w.jsx)(jJ,{id:e.name,"data-testid":e.name,Element:rY,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),aY=e=>(0,w.jsx)(jJ,{Element:IT,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}),oY=e=>(0,w.jsx)(jJ,{Element:zT,id:e.name,"data-testid":e.name,...e}),sY=nf([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:hover:opacity-80`,`ring-offset-background`,`hover:bg-neutral-500/10`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`border-primary/30 text-primary ring-primary/20 checked:border-primary checked:bg-primary`,secondary:`border-secondary/30 text-secondary ring-secondary/20 checked:border-secondary checked:bg-secondary`,destructive:`border-destructive/30 text-destructive ring-destructive/20 checked:border-destructive checked:bg-destructive`,neutral:`border-neutral/30 text-neutral ring-neutral/20 checked:border-neutral checked:bg-neutral`,light:`border-white/30 text-white ring-white/20 checked:border-white checked:bg-white`,text:`border-text/30 text-text ring-text/20 checked:border-text checked:bg-text`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),cY=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,w.jsx)(`input`,{type:`checkbox`,className:W(sY({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),lY=e=>{let{label:t,name:n,id:r}=e;return t?(0,w.jsxs)(`label`,{htmlFor:r??n,className:W(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,w.jsx)(cY,{id:r??n,...e}),t]}):(0,w.jsx)(cY,{id:r??n,...e})},uY=({inputLabel:e,value:t,onChange:n,...r})=>(0,w.jsx)(lY,{...r,label:e,checked:!!t,onChange:n}),dY=({autoComplete:e,...t})=>(0,w.jsx)(jJ,{Element:uY,id:t.name,"data-testid":t.name,autoComplete:e,...t}),fY=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=wJ();return(0,w.jsx)(kJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(aH,{onValueChange:t.onChange,values:t.value,...l,children:c})})},pY=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=HH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(fY,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},mY=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=wJ();return(0,w.jsx)(kJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},hY=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=HH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(mY,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},gY=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=wJ();return(0,w.jsx)(kJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(_w,{...t,...l,children:c})})},_Y=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=HH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(gY,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},vY=e=>{let t=(0,_.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=wJ(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,w.jsx)(eV,{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},yY=e=>{let t=(0,_.c)(3),{formDescriptionId:n}=wJ(),r;return t[0]!==n||t[1]!==e?(r=(0,w.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},bY=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=wJ(),a=r?String(r?.message??``):t;return a?(0,w.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=vJ;$.Description=yY,$.Control=vY,$.Field=CJ,$.Item=bJ,$.Label=OJ,$.Message=bY,$.Element=jJ,$.Input=PJ,$.InputPassword=LJ,$.Checkbox=dY,$.TextArea=aY,$.AutoSizedTextArea=oY,$.Button=nw,$.Select=hY,$.MultiSelect=pY,$.EditableFieldInput=MJ,$.EditableFieldTextArea=NJ,$.SwitchSelector=_Y,$.OTP=nY,$.SearchInput=iY;var xY=Z(`ZodISODateTime`,(e,t)=>{ZG.init(e,t),JY.init(e,t)});function SY(e){return _q(xY,e)}var CY=Z(`ZodISODate`,(e,t)=>{QG.init(e,t),JY.init(e,t)});function wY(e){return vq(CY,e)}var TY=Z(`ZodISOTime`,(e,t)=>{$G.init(e,t),JY.init(e,t)});function EY(e){return yq(TY,e)}var DY=Z(`ZodISODuration`,(e,t)=>{eK.init(e,t),JY.init(e,t)});function OY(e){return bq(DY,e)}var kY=Z(`ZodError`,(e,t)=>{kW.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>MW(e,t)},flatten:{value:t=>jW(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,YU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,YU,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),AY=NW(kY),jY=FW(kY),MY=LW(kY),NY=zW(kY),PY=VW(kY),FY=HW(kY),IY=UW(kY),LY=WW(kY),RY=GW(kY),zY=KW(kY),BY=qW(kY),VY=JW(kY),HY=new WeakMap;function UY(e,t,n){let r=Object.getPrototypeOf(e),i=HY.get(r);if(i||(i=new Set,HY.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var WY=Z(`ZodType`,(e,t)=>(LG.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Jq(e,`input`),output:Jq(e,`output`)}}),e.toJSONSchema=qq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>AY(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>MY(e,t,n),e.parseAsync=async(t,n)=>jY(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>NY(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>PY(e,t,n),e.decode=(t,n)=>FY(e,t,n),e.encodeAsync=async(t,n)=>IY(e,t,n),e.decodeAsync=async(t,n)=>LY(e,t,n),e.safeEncode=(t,n)=>RY(e,t,n),e.safeDecode=(t,n)=>zY(e,t,n),e.safeEncodeAsync=async(t,n)=>BY(e,t,n),e.safeDecodeAsync=async(t,n)=>VY(e,t,n),UY(e,`ZodType`,{check(...e){let t=this.def;return this.clone(nW(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return fW(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(YX(e,t))},superRefine(e,t){return this.check(XX(e,t))},overwrite(e){return this.check(Mq(e))},optional(){return jX(this)},exactOptional(){return NX(this)},nullable(){return FX(this)},nullish(){return jX(FX(this))},nonoptional(e){return VX(this,e)},array(){return yX(this)},or(e){return CX([this,e])},and(e){return TX(this,e)},transform(e){return GX(this,kX(e))},default(e){return LX(this,e)},prefault(e){return zX(this,e)},catch(e){return UX(this,e)},pipe(e){return GX(this,e)},readonly(){return qX(this)},describe(e){let t=this.clone();return qK.add(t,{description:e}),t},meta(...e){if(e.length===0)return qK.get(this);let t=this.clone();return qK.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return qK.get(e)?.description},configurable:!0}),e)),GY=Z(`_ZodString`,(e,t)=>{RG.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,UY(e,`_ZodString`,{regex(...e){return this.check(Eq(...e))},includes(...e){return this.check(kq(...e))},startsWith(...e){return this.check(Aq(...e))},endsWith(...e){return this.check(jq(...e))},min(...e){return this.check(wq(...e))},max(...e){return this.check(Cq(...e))},length(...e){return this.check(Tq(...e))},nonempty(...e){return this.check(wq(1,...e))},lowercase(e){return this.check(Dq(e))},uppercase(e){return this.check(Oq(e))},trim(){return this.check(Pq())},normalize(...e){return this.check(Nq(...e))},toLowerCase(){return this.check(Fq())},toUpperCase(){return this.check(Iq())},slugify(){return this.check(Lq())}})}),KY=Z(`ZodString`,(e,t)=>{RG.init(e,t),GY.init(e,t),e.email=t=>e.check(YK(YY,t)),e.url=t=>e.check(tq(QY,t)),e.jwt=t=>e.check(gq(pX,t)),e.emoji=t=>e.check(nq($Y,t)),e.guid=t=>e.check(XK(XY,t)),e.uuid=t=>e.check(ZK(ZY,t)),e.uuidv4=t=>e.check(QK(ZY,t)),e.uuidv6=t=>e.check($K(ZY,t)),e.uuidv7=t=>e.check(eq(ZY,t)),e.nanoid=t=>e.check(rq(eX,t)),e.guid=t=>e.check(XK(XY,t)),e.cuid=t=>e.check(iq(tX,t)),e.cuid2=t=>e.check(aq(nX,t)),e.ulid=t=>e.check(oq(rX,t)),e.base64=t=>e.check(pq(uX,t)),e.base64url=t=>e.check(mq(dX,t)),e.xid=t=>e.check(sq(iX,t)),e.ksuid=t=>e.check(cq(aX,t)),e.ipv4=t=>e.check(lq(oX,t)),e.ipv6=t=>e.check(uq(sX,t)),e.cidrv4=t=>e.check(dq(cX,t)),e.cidrv6=t=>e.check(fq(lX,t)),e.e164=t=>e.check(hq(fX,t)),e.datetime=t=>e.check(SY(t)),e.date=t=>e.check(wY(t)),e.time=t=>e.check(EY(t)),e.duration=t=>e.check(OY(t))});function qY(e){return JK(KY,e)}var JY=Z(`ZodStringFormat`,(e,t)=>{zG.init(e,t),GY.init(e,t)}),YY=Z(`ZodEmail`,(e,t)=>{HG.init(e,t),JY.init(e,t)}),XY=Z(`ZodGUID`,(e,t)=>{BG.init(e,t),JY.init(e,t)}),ZY=Z(`ZodUUID`,(e,t)=>{VG.init(e,t),JY.init(e,t)}),QY=Z(`ZodURL`,(e,t)=>{UG.init(e,t),JY.init(e,t)}),$Y=Z(`ZodEmoji`,(e,t)=>{WG.init(e,t),JY.init(e,t)}),eX=Z(`ZodNanoID`,(e,t)=>{GG.init(e,t),JY.init(e,t)}),tX=Z(`ZodCUID`,(e,t)=>{KG.init(e,t),JY.init(e,t)}),nX=Z(`ZodCUID2`,(e,t)=>{qG.init(e,t),JY.init(e,t)}),rX=Z(`ZodULID`,(e,t)=>{JG.init(e,t),JY.init(e,t)}),iX=Z(`ZodXID`,(e,t)=>{YG.init(e,t),JY.init(e,t)}),aX=Z(`ZodKSUID`,(e,t)=>{XG.init(e,t),JY.init(e,t)}),oX=Z(`ZodIPv4`,(e,t)=>{tK.init(e,t),JY.init(e,t)}),sX=Z(`ZodIPv6`,(e,t)=>{nK.init(e,t),JY.init(e,t)}),cX=Z(`ZodCIDRv4`,(e,t)=>{rK.init(e,t),JY.init(e,t)}),lX=Z(`ZodCIDRv6`,(e,t)=>{iK.init(e,t),JY.init(e,t)}),uX=Z(`ZodBase64`,(e,t)=>{oK.init(e,t),JY.init(e,t)}),dX=Z(`ZodBase64URL`,(e,t)=>{cK.init(e,t),JY.init(e,t)}),fX=Z(`ZodE164`,(e,t)=>{lK.init(e,t),JY.init(e,t)}),pX=Z(`ZodJWT`,(e,t)=>{dK.init(e,t),JY.init(e,t)}),mX=Z(`ZodUnknown`,(e,t)=>{fK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function hX(){return xq(mX)}var gX=Z(`ZodNever`,(e,t)=>{pK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zq(e,t,n,r)});function _X(e){return Sq(gX,e)}var vX=Z(`ZodArray`,(e,t)=>{hK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tJ(e,t,n,r),e.element=t.element,UY(e,`ZodArray`,{min(e,t){return this.check(wq(e,t))},nonempty(e){return this.check(wq(1,e))},max(e,t){return this.check(Cq(e,t))},length(e,t){return this.check(Tq(e,t))},unwrap(){return this.element}})});function yX(e,t){return Rq(vX,e,t)}var bX=Z(`ZodObject`,(e,t)=>{bK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nJ(e,t,n,r),eW(e,`shape`,()=>t.shape),UY(e,`ZodObject`,{keyof(){return DX(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:hX()})},loose(){return this.clone({...this._zod.def,catchall:hX()})},strict(){return this.clone({...this._zod.def,catchall:_X()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return gW(this,e)},safeExtend(e){return _W(this,e)},merge(e){return vW(this,e)},pick(e){return mW(this,e)},omit(e){return hW(this,e)},partial(...e){return yW(AX,this,e[0])},required(...e){return bW(BX,this,e[0])}})});function xX(e,t){return new bX({type:`object`,shape:e??{},...Q(t)})}var SX=Z(`ZodUnion`,(e,t)=>{SK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rJ(e,t,n,r),e.options=t.options});function CX(e,t){return new SX({type:`union`,options:e,...Q(t)})}var wX=Z(`ZodIntersection`,(e,t)=>{CK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iJ(e,t,n,r)});function TX(e,t){return new wX({type:`intersection`,left:e,right:t})}var EX=Z(`ZodEnum`,(e,t)=>{EK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qq(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 EX({...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 EX({...t,checks:[],...Q(r),entries:i})}});function DX(e,t){return new EX({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var OX=Z(`ZodTransform`,(e,t)=>{DK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eJ(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new GU(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(DW(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(DW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function kX(e){return new OX({type:`transform`,transform:e})}var AX=Z(`ZodOptional`,(e,t)=>{kK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jX(e){return new AX({type:`optional`,innerType:e})}var MX=Z(`ZodExactOptional`,(e,t)=>{AK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function NX(e){return new MX({type:`optional`,innerType:e})}var PX=Z(`ZodNullable`,(e,t)=>{jK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FX(e){return new PX({type:`nullable`,innerType:e})}var IX=Z(`ZodDefault`,(e,t)=>{MK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function LX(e,t){return new IX({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():lW(t)}})}var RX=Z(`ZodPrefault`,(e,t)=>{PK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zX(e,t){return new RX({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():lW(t)}})}var BX=Z(`ZodNonOptional`,(e,t)=>{FK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function VX(e,t){return new BX({type:`nonoptional`,innerType:e,...Q(t)})}var HX=Z(`ZodCatch`,(e,t)=>{LK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function UX(e,t){return new HX({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var WX=Z(`ZodPipe`,(e,t)=>{RK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uJ(e,t,n,r),e.in=t.in,e.out=t.out});function GX(e,t){return new WX({type:`pipe`,in:e,out:t})}var KX=Z(`ZodReadonly`,(e,t)=>{BK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qX(e){return new KX({type:`readonly`,innerType:e})}var JX=Z(`ZodCustom`,(e,t)=>{HK.init(e,t),WY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$q(e,t,n,r)});function YX(e,t={}){return zq(JX,e,t)}function XX(e,t){return Bq(e,t)}var ZX={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`]},QX=e=>{let t=(0,_.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,h.useState)(!1),{setLocaleDictionary:u}=gT(),{mutate:d,isPending:f}=$O(),{mutate:p,isPending:m}=ik(),{mutate:g,isPending:v}=QO(),y=m||v,{editedContent:b,restoreEditedContent:x}=wT(),{deleteButton:S,resetButton:C,saveButton:T,publishButton:E,downloadButton:D,confirmation:O}=_r(ZX),{isAuthenticated:k}=GO(),A=b?.[n.localId],j;t[0]!==n||t[1]!==A?(j=A&&JSON.stringify(A)!==JSON.stringify(n),t[0]=n,t[1]=A,t[2]=j):j=t[2];let M=j,N=n?.id!==void 0,P;t[3]!==n||t[4]!==b||t[5]!==o||t[6]!==x||t[7]!==u||t[8]!==p?(P=async()=>{b?.[n.localId]&&p({dictionary:{...n,...b?.[n.localId]}},{onSuccess:()=>{u(b?.[n.localId]),x(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=b,t[5]=o,t[6]=x,t[7]=u,t[8]=p,t[9]=P):P=t[9];let ee=P,F;t[10]!==n||t[11]!==b||t[12]!==o||t[13]!==g||t[14]!==x||t[15]!==u?(F=()=>{let e={...n,...b?.[n.localId]};g({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),x(n.localId),o?.())}})},t[10]=n,t[11]=b,t[12]=o,t[13]=g,t[14]=x,t[15]=u,t[16]=F):F=t[16];let I=F,te;t[17]!==d||t[18]!==n||t[19]!==a?(te=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=te):te=t[20];let ne=te,re;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(re=()=>l(!1),t[21]=re):re=t[21];let L;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>l(!1),t[22]=L):L=t[22],(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(dL,{isOpen:c,title:O.title.value,size:`md`,onClose:re,padding:`md`,children:(0,w.jsxs)(`form`,{className:`size-full`,children:[(0,w.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:O.message}),(0,w.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,w.jsx)($.Button,{label:O.cancelButton.label.value,disabled:!M||y,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:L,children:O.cancelButton.text}),(0,w.jsx)($.Button,{label:O.confirmButton.label.value,disabled:!M||y,Icon:Lf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:ee,children:O.confirmButton.text})]})]})}),(0,w.jsxs)(`form`,{className:W(`flex justify-end gap-2 max-md:flex-col`,i),...s,children:[r.includes(`remote`)&&N&&a&&k&&(0,w.jsx)($.Button,{label:S.label.value,Icon:zf,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ne,children:S.text}),M&&(0,w.jsx)($.Button,{label:C.label.value,disabled:!M,Icon:If,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>x(n.localId),children:C.text}),r.includes(`local`)&&(0,w.jsx)($.Button,{label:D.label.value,disabled:!M||y,Icon:wf,color:`text`,variant:k?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:D.text}),r.includes(`remote`)&&k&&!N&&(0,w.jsx)($.Button,{label:E.label.value,disabled:y,Icon:hf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:I,children:E.text}),r.includes(`remote`)&&k&&N&&M&&(0,w.jsx)($.Button,{label:T.label.value,disabled:!M||y,Icon:Lf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:I,children:T.text})]})]})},$X={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`]},eZ=(e,t=2e3,n,r)=>{let[i,a]=(0,h.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))}}}},tZ=e=>{let t=(0,_.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:l,disable:u,preventDefault:d,stopPropagation:f,size:p}=e,m=a===void 0?`Copy to clipboard`:a,h=o===void 0?`Copied to clipboard`:o,g=s===void 0?2e3:s,v=d===void 0?!0:d,y=f===void 0?!0:f,b=p===void 0?14:p,{isCopied:x,copy:S}=eZ(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,w.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let C;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==S||t[8]!==x||t[9]!==v||t[10]!==b||t[11]!==y||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{v&&e.preventDefault(),y&&e.stopPropagation(),S()},o=x?h:m,s=x?Sf:Cf;C=(0,w.jsxs)(`span`,{className:W(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":x,"data-testid":`copy-to-clipboard`,children:[(0,w.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,w.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:b,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=S,t[8]=x,t[9]=v,t[10]=b,t[11]=y,t[12]=n,t[13]=C}else C=t[13];return C},nZ={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`]},rZ={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`]},iZ=e=>{let t=(0,_.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:v}=_r(rZ),y;if(t[0]!==u||t[1]!==l||t[2]!==v||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 _;t[18]!==r||t[19]!==n?(_=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=_):_=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]!==v||t[36]!==g?(T=e=>e.input===void 0?g.value:v.value,t[35]=v,t[36]=g,t[37]=T):T=t[37],y=xX({title:qY({error:_}).refine(aZ,{error:i.value}).optional(),key:qY({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:qY({error:x}).optional(),projectIds:yX(qY({error:S})).default([e]),tags:yX(qY({error:C})).default([]),location:DX([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:DX([`static`,`dynamic`,`fetch`]).optional(),filePath:qY({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=v,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]=y}else y=t[17];return y};function aZ(e){return e.length===0||e.length>=4}var oZ=e=>{let t=(0,_.c)(55),{dictionary:n,mode:r}=e,{session:i}=WO(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=ZO(),{data:l}=ek(),u=s?.data??[],d=l?.data??[],f=iZ(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:g,isSubmitting:v}=yJ(f,m),{editedContent:y,setEditedDictionary:b}=wT(),{titleInput:x,keyInput:S,descriptionInput:C,projectInput:T,tagsSelect:E,locationSelect:D,importModeSelect:O,filePathInput:k,auditButton:A}=_r(nZ),{mutate:j,isPending:M}=tk(),N=y?.[n.localId],P;t[5]!==n||t[6]!==g?(P=()=>{g.reset({...n,location:n.location??`remote`})},t[5]=n,t[6]=g,t[7]=P):P=t[7];let ee=g?.reset,F;t[8]!==n||t[9]!==ee?(F=[n,ee],t[8]=n,t[9]=ee,t[10]=F):F=t[10],(0,h.useEffect)(P,F);let I;t[11]!==n||t[12]!==g||t[13]!==N?(I=()=>{N===void 0&&g.reset({...n,location:n.location??`remote`})},t[11]=n,t[12]=g,t[13]=N,t[14]=I):I=t[14];let te;t[15]===N?te=t[16]:(te=[N],t[15]=N,t[16]=te),(0,h.useEffect)(I,te);let ne;t[17]!==j||t[18]!==n||t[19]!==g||t[20]!==b||t[21]!==N?(ne=()=>{let e={...n,...N};j({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(t?.data)try{let n=t.data.fileContent;b(t=>({...t,...e,...n})),g.reset({...e,...n})}catch(e){console.error(e)}}})},t[17]=j,t[18]=n,t[19]=g,t[20]=b,t[21]=N,t[22]=ne):ne=t[22];let re=ne,L;t[23]===g.control?L=t[24]:(L={control:g.control,name:`location`},t[23]=g.control,t[24]=L);let R=RH(L),z=R===`local`||R===`hybrid`,ie;t[25]!==n||t[26]!==g||t[27]!==b?(ie=e=>{g.setValue(`key`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},key:e}))},t[25]=n,t[26]=g,t[27]=b,t[28]=ie):ie=t[28];let ae;t[29]!==n||t[30]!==g||t[31]!==b?(ae=e=>{g.setValue(`title`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},title:e}))},t[29]=n,t[30]=g,t[31]=b,t[32]=ae):ae=t[32];let oe;t[33]!==n||t[34]!==g||t[35]!==b?(oe=e=>{g.setValue(`description`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},description:e}))},t[33]=n,t[34]=g,t[35]=b,t[36]=oe):oe=t[36];let se;t[37]!==n||t[38]!==g||t[39]!==D||t[40]!==r||t[41]!==b?(se=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?g.getValues(`filePath`)??n.filePath:void 0;e||g.setValue(`filePath`,void 0),b(e=>({...n,...e??{},location:r,filePath:i}))},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),b(e=>({...n,...e??{},location:r}))};return(0,w.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,w.jsx)($.Label,{className:`ml-1`,children:D.label}),(0,w.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,w.jsx)(lY,{id:`location-local`,name:`location-local`,label:D.local.value,color:`text`,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,w.jsx)(lY,{id:`location-remote`,name:`location-remote`,label:D.remote.value,color:`text`,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,w.jsx)($.Description,{children:D.testDescription}),(0,w.jsx)($.Message,{})]})},t[37]=n,t[38]=g,t[39]=D,t[40]=r,t[41]=b,t[42]=se):se=t[42];let ce;t[43]!==n||t[44]!==g||t[45]!==b?(ce=e=>{g.setValue(`importMode`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},importMode:e}))},t[43]=n,t[44]=g,t[45]=b,t[46]=ce):ce=t[46];let le;t[47]!==n||t[48]!==g||t[49]!==b?(le=e=>{let t=[e].flat();g.setValue(`projectIds`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},projectIds:t}))},t[47]=n,t[48]=g,t[49]=b,t[50]=le):le=t[50];let ue;return t[51]!==n||t[52]!==g||t[53]!==b?(ue=e=>{let t=[e].flat();g.setValue(`tags`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},tags:t}))},t[51]=n,t[52]=g,t[53]=b,t[54]=ue):ue=t[54],(0,w.jsxs)($,{className:`flex w-full flex-col gap-8`,...g,schema:f,children:[(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsx)($.EditableFieldInput,{name:`key`,label:S.label,placeholder:S.label.value,description:S.description,disabled:v,isRequired:!0,onSave:ie}),(0,w.jsx)($.EditableFieldInput,{name:`title`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:v,onSave:ae})]}),(0,w.jsx)($.EditableFieldTextArea,{name:`description`,label:C.label,placeholder:C.placeholder.value,description:C.description,disabled:v,onSave:oe}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,w.jsx)($.Field,{control:g.control,name:`location`,render:se}),(0,w.jsx)(Kx,{mode:`wait`,children:z&&(0,w.jsx)(WC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,w.jsx)($.Input,{name:`filePath`,label:k.label.value,placeholder:k.placeholder.value,description:k.description.value,disabled:v||!z,onChange:e=>{let t=e.target.value;b(e=>({...n,...e??{},filePath:t}))}})},`filePath-input`)})]}),(0,w.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,w.jsxs)($.Select,{name:`importMode`,label:O.label.value,description:O.description.value,onValueChange:ce,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:O.label.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`static`,children:O.static.value}),(0,w.jsx)(J.Item,{value:`dynamic`,children:O.dynamic.value}),(0,w.jsx)(J.Item,{value:`live`,children:O.live.value})]})]})}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsxs)($.MultiSelect,{name:`projectIds`,label:T.label.value,description:T.description,onValueChange:le,children:[(0,w.jsx)(aH.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,w.jsx)(aH.Input,{placeholder:T.placeholder.value})}),(0,w.jsx)(aH.Content,{children:(0,w.jsx)($C,{isLoading:c,children:(0,w.jsx)(aH.List,{children:u?.map(sZ)})})})]}),(0,w.jsxs)($.MultiSelect,{name:`tags`,label:E.label.value,description:E.description,onValueChange:ue,children:[(0,w.jsx)(aH.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,w.jsx)(aH.Input,{placeholder:E.placeholder.value})}),(0,w.jsx)(aH.Content,{children:(0,w.jsx)($C,{isLoading:c,children:(0,w.jsx)(aH.List,{children:d?.map(cZ)})})})]})]}),(0,w.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,w.jsx)($.Button,{type:`button`,size:`icon-md`,label:A.label.value,Icon:Bf,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:re,disabled:v||M,isLoading:M})})]})};function sZ(e){return(0,w.jsx)(aH.Item,{value:String(e.id),children:e.name},String(e.id))}function cZ(e){return(0,w.jsx)(aH.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var lZ=(0,h.lazy)(()=>jn(()=>import(`./dist-Bivx-BVy.js`).then(e=>({default:e.Editor})),__vite__mapDeps([3,1]))),uZ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,h.useRef)(null),c=(0,h.useRef)(null),[l,u]=(0,h.useState)({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`?e.split(`
203
+ `).length>1:!1);return(0,w.jsxs)(`div`,{className:W(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,w.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,w.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,w.jsx)(LI,{content:e})})}),(0,w.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)($C,{}),children:(0,w.jsx)(lZ,{...l,defaultLanguage:`typescript`,language:t,loading:(0,w.jsx)($C,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{contextmenu:!1,readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},dZ=e=>{let t=(0,_.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=wT(),o=fZ,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,w.jsx)(uZ,{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 fZ(e){try{return JSON.parse(e),!0}catch{return!1}}var pZ={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`]},mZ={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`]},hZ=e=>{let t=(0,_.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:g,insertion:v,reactNode:y,file:b}=_r(mZ),x;t[0]===n?x=t[1]:(x=Qw(n),t[0]=n,t[1]=x);let[S,C]=(0,h.useState)(x),T;t[2]===r?T=t[3]:(T=e=>{C(e),r(e)},t[2]=r,t[3]=T);let E=T,I;return t[4]!==l||t[5]!==s||t[6]!==m||t[7]!==u||t[8]!==b||t[9]!==p||t[10]!==v||t[11]!==S||t[12]!==g||t[13]!==i||t[14]!==f||t[15]!==c||t[16]!==o||t[17]!==E||t[18]!==y||t[19]!==a||t[20]!==d?(I=(0,w.jsxs)(J,{value:S,onValueChange:E,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:d})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:D,children:i}),(0,w.jsx)(J.Item,{value:te,children:a}),(0,w.jsx)(J.Item,{value:ne,children:o}),(0,w.jsx)(J.Item,{value:re,children:s}),(0,w.jsx)(J.Item,{value:M,children:c}),(0,w.jsx)(J.Item,{value:N,children:l}),(0,w.jsx)(J.Item,{value:O,children:u}),(0,w.jsx)(J.Item,{value:L,children:p}),(0,w.jsx)(J.Item,{value:A,children:v}),(0,w.jsx)(J.Item,{value:F,children:g}),(0,w.jsx)(J.Item,{value:P,children:f}),(0,w.jsx)(J.Item,{value:k,children:m}),(0,w.jsx)(J.Item,{value:ee,disabled:!0,children:y}),(0,w.jsx)(J.Item,{value:j,children:b})]})]}),t[4]=l,t[5]=s,t[6]=m,t[7]=u,t[8]=b,t[9]=p,t[10]=v,t[11]=S,t[12]=g,t[13]=i,t[14]=f,t[15]=c,t[16]=o,t[17]=E,t[18]=y,t[19]=a,t[20]=d,t[21]=I):I=t[21],I},gZ=e=>{let t=(0,_.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=ST()?.internationalization.locales??[],s=Qw(n),c=Yw(n),l=e=>{a(qw(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,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(hZ,{section:n,onValueChange:e=>a(qw(e,o))}),(0,w.jsx)(gZ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(hZ,{section:n,onValueChange:e=>a(qw(e,o))}),(0,w.jsx)(gZ,{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(qw(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(hZ,{section:n,onValueChange:s}),(0,w.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,w.jsx)(yZ,{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(qw(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,w.jsx)(hZ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},_Z=e=>{let t=(0,_.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=yT(),{renameEditedContent:c,addEditedContent:l}=CT(),{titleInput:u,deleteButton:d}=_r(pZ),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,w.jsx)(ZC,{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":lr(i,o?.keyPath??[]),onClick:e,children:(0,w.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,w.jsxs)(`div`,{className:`w-full`,children:[(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,w.jsx)(YT,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,w.jsx)(nw,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:zf,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,w.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,pr(n),` )`]})]}),(0,w.jsx)(gZ,{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},vZ=e=>{let t=(0,_.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=_r(pZ),{setFocusedContentKeyPath:o}=yT(),{addEditedContent:s}=CT();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.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:M,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,w.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,w.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,w.jsx)(`li`,{className:`flex w-full`,children:(0,w.jsx)(_Z,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:M,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,w.jsx)(nw,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Ff,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},yZ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,w.jsx)(_Z,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,w.jsx)(vZ,{section:e,keyPath:t,dictionaryLocalId:n}),bZ=e=>{let t=(0,_.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=wT(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,w.jsx)(_Z,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},xZ=e=>{let t=(0,_.c)(20),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=ST(),{returnToDictionaryList:d}=_r($X),{focusedContent:f,setFocusedContent:p}=yT(),{setLocaleDictionary:m}=gT(),g;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(g=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=g):g=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,h.useEffect)(g,v);let y;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],y=(0,w.jsx)(ck,{availableLocales:u?.internationalization?.locales??[],children:(0,w.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,w.jsx)(nw,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:mf,label:d.label.value,children:d.text}),(0,w.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,w.jsxs)(eL,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[a.includes(`remote`)&&(0,w.jsx)(eL.Item,{label:`Details`,value:`details`,children:(0,w.jsx)(oZ,{dictionary:n,mode:a})}),(0,w.jsx)(eL.Item,{label:`Structure`,value:`structure`,children:(0,w.jsx)(bZ,{dictionary:n})}),(0,w.jsx)(eL.Item,{label:`Content`,value:`content`,children:(0,w.jsx)(qz,{dictionary:n,isDarkMode:i})}),(0,w.jsx)(eL.Item,{label:`JSON`,value:`json`,children:(0,w.jsx)(dZ,{dictionary:n,isDarkMode:i})})]})}),(0,w.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,w.jsx)(tZ,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,w.jsx)(QX,{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]=y}else y=t[16];return y},SZ=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}},CZ=()=>{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)},wZ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},TZ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},EZ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},DZ=(e=`md`)=>{let t=SZ(e),n=CZ(),r=EZ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:wZ(),isMac:TZ()}},OZ=e=>{let t=(0,_.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=DZ(n),t[0]=n,t[1]=r);let[i,a]=(0,h.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(DZ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,h.useEffect)(o,s),i},kZ=e=>{let t=(0,_.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,h.useRef)(``),p=(0,h.useRef)(null),[m,g]=(0,h.useState)(o??``),v;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=v):v=t[2];let y=v,b;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(b=e=>{f.current=e;let t=d?e.trim():e;if(y(),t.length<l){g(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(g(e),s?.(e)):(g(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=b):b=t[8];let x=b,S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{y()},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,h.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},AZ=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()})}},jZ=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(AZ.subscribe,AZ.getSnapshot,MZ),n;return e[0]===t?n=e[1]:(n={open:AZ.open,close:AZ.close,set:AZ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function MZ(){return{}}var NZ={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`]},PZ=e=>e.split(` + `).map(e=>e.trim()),FZ=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,IZ=(e,t)=>{let n=t.map(FZ),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(FZ(e)));if(!i)return!1;let a=FZ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},LZ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,RZ=(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},zZ=e=>{let t=(0,_.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,l=a===void 0?!1:a,u=s===void 0?`md`:s,{isMac:d}=OZ(),f;t[0]!==d||t[1]!==n?(f=PZ(RZ(n,d??!1)),t[0]=d,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[3]=m):m=t[3];let[g,v]=(0,h.useState)(m),y,b;if(t[4]!==l||t[5]!==d||t[6]!==p||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(d?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(LZ(i))):a.add(i.toUpperCase()),v(a),!l&&r&&IZ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{v(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)}},b=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=y,t[9]=b):(y=t[8],b=t[9]),(0,h.useEffect)(y,b),!c)return null;let x;t[10]===g?x=t[11]:(x=e=>{let t=e.toUpperCase(),n=FZ(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]=x);let S=x,C;if(t[12]!==o||t[13]!==S||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==S||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=LZ(e);return(0,w.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,w.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,w.jsx)(`span`,{className:W(`min-w-4 px-0.5 text-center`,S(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=S,t[19]=n,t[20]=e):e=t[20],C=(0,w.jsx)(`kbd`,{className:W(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=S,t[14]=p,t[15]=n,t[16]=u,t[17]=C}else C=t[17];return C},BZ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,w.jsx)(`div`,{className:W(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,w.jsx)(`div`,{style:{minWidth:`${n}px`},className:W(r===`right`&&`ml-auto`),children:e})}),VZ=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},HZ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=_r(NZ),{isMobile:d}=OZ(`md`),f=(0,h.useRef)(null),p=(0,h.useRef)(null),m=nL(l),{open:g,close:_,isOpen:v}=jZ(),y=v(t),b=y;sL({disableScroll:b,key:t?`right_drawer_${t}`:`right_drawer`}),(0,h.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=b&&a,r=e.target&&!f.current.contains(e.target),i=VZ(f.current);(n&&r&&i||!e.target)&&(_(t),c?.())}catch{_(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[b,_,c,a,t]);let x=(0,h.useRef)(c);return(0,h.useEffect)(()=>{x.current=c},[c]),(0,h.useEffect)(()=>{s!==void 0&&s!==y&&(s?g(t):(_(t),x.current?.()))},[s,y,t,g,_]),m?(0,Cu.createPortal)((0,w.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,w.jsx)(BZ,{isHidden:!b,align:`right`,children:(0,w.jsxs)(ZC,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,w.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,w.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,w.jsx)(`div`,{children:o&&(0,w.jsx)(nw,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:vf,children:o?.text})}),(0,w.jsx)(`div`,{children:(0,w.jsxs)(FI,{identifier:`close-drawer`,children:[(0,w.jsx)(nw,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{_(t),c?.()},Icon:Vf,size:`icon-md`}),(0,w.jsx)(FI.Detail,{identifier:`close-drawer`,children:(0,w.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,w.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,w.jsx)(zZ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{_(t),c?.()}})]})})]})})]}),e&&(0,w.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,w.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,w.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(_(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(_(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,w.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,w.jsx)(w.Fragment,{})},UZ=nf(`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`}}),WZ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,w.jsx)(`div`,{className:UZ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),GZ=`dictionaryList`,KZ=e=>`dictionary_edition_${e}`,qZ=e=>{let t=(0,_.c)(20),n;t[0]===e?n=t[1]:(n=KZ(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=jZ(),{getEditedContentValue:s}=CT(),{focusedContent:c,setFocusedContent:l}=yT(),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,h.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},JZ=e=>{let t=(0,_.c)(73),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=_r(YC),l;t[0]===n?l=t[1]:(l=KZ(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=qZ(n),{setFocusedContent:p}=yT(),{open:m}=jZ(),g;t[2]===m?g=t[3]:(g=()=>m(GZ),t[2]=m,t[3]=g);let v=g,{data:y}=rk(),b;t[4]!==f||t[5]!==v||t[6]!==p?(b=()=>{f(),p(null),v()},t[4]=f,t[5]=v,t[6]=p,t[7]=b):b=t[7];let x=b,[S,C]=(0,h.useState)(!1),T;t[8]===x?T=t[9]:(T=()=>{C(!1),x()},t[8]=x,t[9]=T);let E=T;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,w.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,ee,F;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==x||t[17]!==u||t[18]!==a||t[19]!==y){j=Symbol.for(`react.early_return_sentinel`);bb0:{if(O=y?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!O){let e;t[30]===c?e=t[31]:(e=(0,w.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[30]=c,t[31]=e),j=e;break bb0}D=HZ,F=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,w.jsx)(nw,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Nf,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,w.jsx)(FI.Detail,{identifier:`open-dictionary-editor`,children:(0,w.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,w.jsxs)(FI,{identifier:`open-dictionary-editor`,children:[n,r]}),t[40]=n,t[41]=r,t[42]=o):o=t[42],ee=(0,w.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,w.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,w.jsx)(WZ,{color:`text`,roundedSize:`full`,size:`xs`,children:O.key}),P=O.filePath&&(0,w.jsx)(WZ,{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]=y,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]=ee,t[29]=F}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],ee=t[28],F=t[29];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let I;t[43]===O.id?I=t[44]:(I=O.id&&(0,w.jsx)(WZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[43]=O.id,t[44]=I);let te;t[45]!==I||t[46]!==M||t[47]!==N||t[48]!==P?(te=(0,w.jsxs)(`div`,{className:M,children:[N,P,I]}),t[45]=I,t[46]=M,t[47]=N,t[48]=P,t[49]=te):te=t[49];let ne;t[50]!==te||t[51]!==ee?(ne=(0,w.jsxs)(w.Fragment,{children:[ee,te]}),t[50]=te,t[51]=ee,t[52]=ne):ne=t[52];let re;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(re=[`local`,`remote`],t[53]=re):re=t[53];let L;t[54]!==O||t[55]!==x?(L=(0,w.jsx)(QX,{dictionary:O,mode:re,className:`mb-4 flex-col px-3`,onDelete:x}),t[54]=O,t[55]=x,t[56]=L):L=t[56];let R;t[57]!==O||t[58]!==S||t[59]!==d||t[60]!==x||t[61]!==r||t[62]!==o||t[63]!==E?(R=d&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(dL,{isOpen:S,onClose:()=>C(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,w.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,w.jsx)(xZ,{dictionary:O,onClickDictionaryList:E,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{C(!1),x()},onSave:()=>{C(!1)}})})}),(0,w.jsx)(tE,{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]=R):R=t[64];let z;return t[65]!==D||t[66]!==k||t[67]!==A||t[68]!==ne||t[69]!==L||t[70]!==R||t[71]!==F?(z=(0,w.jsx)(D,{identifier:F,backButton:k,onClose:A,header:ne,footer:L,children:R}),t[65]=D,t[66]=k,t[67]=A,t[68]=ne,t[69]=L,t[70]=R,t[71]=F,t[72]=z):z=t[72],z},YZ=e=>{let t=(0,_.c)(4),{isDarkMode:n}=e,{focusedContent:r}=yT(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,w.jsx)(JZ,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},XZ={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`]},ZZ=()=>{let{drawerTitle:e,buttonLabel:t}=_r(XZ),{set:n}=jZ(),{localeDictionaries:r}=hT(),{editedContent:i}=wT(),{setFocusedContent:a}=yT(),{setSearch:o,search:s}=kZ(),c=(0,h.useMemo)(()=>new Vz(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,h.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({[GZ]:!1,[KZ(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,w.jsxs)(HZ,{title:e.label.value,identifier:GZ,children:[(0,w.jsx)(`div`,{className:`p-3 pb-4`,children:(0,w.jsx)(rY,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,w.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,w.jsx)(`li`,{className:`w-full`,children:(0,w.jsx)(nw,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:yf,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Pf:void 0,children:(0,w.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,w.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,w.jsx)(WZ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,w.jsx)(WZ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,w.jsx)(WZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,w.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},QZ={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`]},$Z=()=>{let e=(0,_.c)(8),{message:t}=_r(QZ),[n]=pT(Ew.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=W(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,w.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},eQ=e=>{let t=(0,_.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,w.jsx)($Z,{})}),i=(0,w.jsx)(YZ,{}),a=(0,w.jsx)(ZZ,{}),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,w.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},tQ=()=>{let e=(0,_.c)(2),[t,n]=(0,h.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(nQ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,h.useEffect)(r,i),t};function nQ(e){return e.json()}var rQ=e=>{let t=(0,_.c)(11),{children:n,iframeRef:r}=e,i=tQ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)($C,{}),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,w.jsx)(bT,{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},iQ={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`]},aQ=()=>{let e=(0,_.c)(9),{editedContent:t,setEditedContentState:n}=wT(),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,h.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,h.useEffect)(s,c),i},oQ={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`]},sQ=()=>{let e=(0,_.c)(11),{title:t,description:n,documentationLink:r}=_r(oQ),i;e[0]===t?i=e[1]:(i=(0,w.jsx)(Qk,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,w.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,w.jsx)(Lk,{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,w.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},cQ=e=>{let t=(0,_.c)(23),{iframeRef:n,applicationPath:r}=e,i=_r(iQ),{editor:a}=ST()??{},{enabled:o}=TT(),s=ET();aQ(),OT();let[c,l]=(0,h.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=mT(void 0,u),f,p;if(t[1]===d?(f=t[2],p=t[3]):(f=()=>{typeof d==`string`&&window.history.replaceState({},``,d)},p=[d],t[1]=d,t[2]=f,t[3]=p),(0,h.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(ZC,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,w.jsx)(sQ,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,w.jsx)($C,{isLoading:c}),t[5]=c,t[6]=m);let g=`${a.applicationURL}${r}`,v=i.intlayerApplication.value,y=c&&`hidden`,b;t[7]===y?b=t[8]:(b=W(`size-full`,y),t[7]=y,t[8]=b);let x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>{l(!1)},t[9]=x):x=t[9];let S;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==g||t[13]!==b?(S=(0,w.jsx)(`iframe`,{src:g,title:v,sandbox:`allow-scripts allow-same-origin`,className:b,ref:n,onLoad:x}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=g,t[13]=b,t[14]=S):S=t[14];let C;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(C=!o&&(0,w.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,w.jsx)(nw,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=C):C=t[18];let T;return t[19]!==S||t[20]!==C||t[21]!==m?(T=(0,w.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,S,C]}),t[19]=S,t[20]=C,t[21]=m,t[22]=T):T=t[22],T},lQ=()=>{let e=(0,_.c)(2),t=(0,h.useRef)(null),n=Ri(),r;return e[0]===n.pathname?r=e[1]:(r=(0,w.jsx)(rQ,{iframeRef:t,children:(0,w.jsx)(hr,{disableEditor:!0,children:(0,w.jsx)(eQ,{children:(0,w.jsx)(cQ,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,g.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(h.StrictMode,{children:(0,w.jsx)(()=>{let e=(0,_.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(JC,{children:(0,w.jsx)(qC,{children:(0,w.jsx)(lQ,{})})}),e[0]=t):t=e[0],t},{})}));export{o as a,m as i,jn as n,C as r,cA as t};