intlayer-editor 9.7.0 → 9.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/bin/intlayer-editor.mjs +3 -1
  2. package/client/dist/assets/CodeBlockShiki-BaQlmvsF.js +2 -0
  3. package/client/dist/assets/MarkDownRender-CufSxUcK.js +25 -0
  4. package/client/dist/assets/MarkDownRender-HV9SKc56.js +1 -0
  5. package/client/dist/assets/MarkdownEditor-BSbSD-tQ.js +174 -0
  6. package/client/dist/assets/{codeTransformer-aP9a_qk2.js → codeTransformer-pmm6yJGh.js} +1 -1
  7. package/client/dist/assets/compat-BqYysBkt.js +1 -0
  8. package/client/dist/assets/css-DgaLhXQH.js +1 -0
  9. package/client/dist/assets/{dist-DRjLHkdX.js → dist-VBWB9uC8.js} +1 -1
  10. package/client/dist/assets/html-BCy9P6D2.js +1 -0
  11. package/client/dist/assets/index-65aMFXUF.css +2 -0
  12. package/client/dist/assets/index-MyctEsPU.js +116 -0
  13. package/client/dist/assets/javascript-CpIGwZ_Y.js +1 -0
  14. package/client/dist/assets/json-C3WlssX3.js +1 -0
  15. package/client/dist/assets/purify.es-Dqk5qvad.js +3 -0
  16. package/client/dist/assets/shikiBundle-DbyGgq42.js +12 -0
  17. package/client/dist/assets/tsx-CGosfAUg.js +1 -0
  18. package/client/dist/assets/typescript-Bb1J8qyy.js +1 -0
  19. package/client/dist/assets/{vue-BqdMUtqy.js → vue-jUI-lpPb.js} +1 -1
  20. package/client/dist/assets/wasm-inlined-4KdTHw0F.js +1 -0
  21. package/client/dist/index.html +3 -3
  22. package/package.json +35 -35
  23. package/server/dist/_virtual/_rolldown/runtime.cjs +1 -2
  24. package/server/dist/controllers/auth.controller.cjs +4 -5
  25. package/server/dist/controllers/auth.controller.d.ts +0 -2
  26. package/server/dist/controllers/auth.controller.mjs +1 -2
  27. package/server/dist/controllers/configuration.controller.cjs +6 -5
  28. package/server/dist/controllers/configuration.controller.cjs.map +1 -1
  29. package/server/dist/controllers/configuration.controller.d.ts +8 -3
  30. package/server/dist/controllers/configuration.controller.mjs +6 -5
  31. package/server/dist/controllers/configuration.controller.mjs.map +1 -1
  32. package/server/dist/controllers/dictionary.controller.cjs +2 -3
  33. package/server/dist/controllers/dictionary.controller.d.ts +1 -2
  34. package/server/dist/controllers/dictionary.controller.mjs +1 -2
  35. package/server/dist/export.cjs +2 -2
  36. package/server/dist/export.d.ts +2 -2
  37. package/server/dist/index.cjs +18 -9
  38. package/server/dist/index.cjs.map +1 -1
  39. package/server/dist/index.mjs +14 -5
  40. package/server/dist/index.mjs.map +1 -1
  41. package/server/dist/routes/auth.routes.cjs +2 -3
  42. package/server/dist/routes/auth.routes.d.ts +0 -2
  43. package/server/dist/routes/auth.routes.mjs +1 -2
  44. package/server/dist/routes/config.routes.cjs +2 -3
  45. package/server/dist/routes/config.routes.d.ts +0 -2
  46. package/server/dist/routes/config.routes.mjs +1 -2
  47. package/server/dist/routes/dictionary.routes.cjs +2 -3
  48. package/server/dist/routes/dictionary.routes.d.ts +0 -2
  49. package/server/dist/routes/dictionary.routes.mjs +1 -2
  50. package/server/dist/services/editorAuth.service.cjs +2 -3
  51. package/server/dist/services/editorAuth.service.d.ts +0 -2
  52. package/server/dist/services/editorAuth.service.mjs +1 -2
  53. package/server/dist/types/Routes.d.ts +0 -2
  54. package/server/dist/utils/checkPortAvailability.cjs +2 -3
  55. package/server/dist/utils/checkPortAvailability.d.ts +0 -2
  56. package/server/dist/utils/checkPortAvailability.mjs +1 -2
  57. package/server/dist/utils/httpStatusCodes.cjs +1 -2
  58. package/server/dist/utils/httpStatusCodes.d.ts +9 -20
  59. package/server/dist/utils/httpStatusCodes.mjs +1 -2
  60. package/server/dist/utils/responseData.cjs +2 -3
  61. package/server/dist/utils/responseData.d.ts +1 -2
  62. package/server/dist/utils/responseData.mjs +1 -2
  63. package/client/dist/assets/CodeBlockShiki-B-OcGOY1.js +0 -2
  64. package/client/dist/assets/MarkDownRender-BzY_8i9Z.js +0 -1
  65. package/client/dist/assets/MarkDownRender-CIkPpFUW.js +0 -25
  66. package/client/dist/assets/MarkdownEditor-BpbsoP4E.js +0 -161
  67. package/client/dist/assets/compat-r4Owm_RW.js +0 -1
  68. package/client/dist/assets/css-DUjzNfgv.js +0 -1
  69. package/client/dist/assets/html-WQKKblVZ.js +0 -1
  70. package/client/dist/assets/index-C5SpC4ap.css +0 -2
  71. package/client/dist/assets/index-CmQV7Z_A.js +0 -105
  72. package/client/dist/assets/javascript-Yelw-5ZN.js +0 -1
  73. package/client/dist/assets/json-CaljABEy.js +0 -1
  74. package/client/dist/assets/purify.es-Bvo9QlJ8.js +0 -3
  75. package/client/dist/assets/shikiBundle-BIG1bVgc.js +0 -12
  76. package/client/dist/assets/tsx-5f3ulCja.js +0 -1
  77. package/client/dist/assets/typescript-Utq2Cl8c.js +0 -1
  78. package/client/dist/assets/wasm-BnjxR4X6.js +0 -1
@@ -0,0 +1,116 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-HV9SKc56.js","assets/MarkDownRender-CufSxUcK.js","assets/compat-BqYysBkt.js","assets/MarkdownEditor-BSbSD-tQ.js","assets/shikiBundle-DbyGgq42.js","assets/dist-VBWB9uC8.js"])))=>i.map(i=>d[i]);
2
+ import{A as e,B as t,C as n,D as r,E as i,F as a,I as o,L as s,M as c,O as l,P as u,R as d,S as f,T as p,_ as m,a as h,b as g,c as _,d as v,f as y,g as b,h as x,i as S,j as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,t as j,v as M,w as N,x as P,y as F}from"./compat-BqYysBkt.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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),p(),u();var I=Symbol.for(`pv`),L=0;Array.isArray;function R(e,t,n,r,i,a){t||={};var s,c,l=t;if(`ref`in l&&typeof e!=`function`)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:I,__v:--L,__i:-1,__u:0};return(i||a)&&(u.__source=i,u.__self=a),o.vnode&&o.vnode(u),u}T();var ee=c(!0),te=()=>i(ee);T();var ne=1,z=9e5,re=0,ie=()=>(re=(re+1)%(2**53-1),re.toString()),B=new Map,ae=e=>{if(B.has(e))return;let t=setTimeout(()=>{B.delete(e),le({type:`REMOVE_TOAST`,toastId:e})},z);B.set(e,t)},oe=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,ne)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?ae(n):e.toasts.forEach(e=>{ae(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},se=[],ce={toasts:[]},le=e=>{ce=oe(ce,e),se.forEach(e=>{e(ce)})},ue=({...e})=>{let t=ie(),n=e=>le({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>le({type:`DISMISS_TOAST`,toastId:t});return le({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},de=()=>{let[e,t]=N(ce);return M(()=>(se.push(t),()=>{let e=se.indexOf(t);e>-1&&se.splice(e,1)}),[e]),{...e,toast:ue,dismiss:e=>le({type:`DISMISS_TOAST`,toastId:e})}};T();var fe=c(void 0),pe=e=>{let t=i(fe);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},me=({client:e,children:t})=>(M(()=>(e.mount(),()=>{e.unmount()}),[e]),R(fe.Provider,{value:e,children:t})),he={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ge=new class{#e=he;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function _e(e){setTimeout(e,0)}var ve=typeof window>`u`||`Deno`in globalThis;function ye(){}function be(e,t){return typeof e==`function`?e(t):e}function xe(e){return typeof e==`number`&&e>=0&&e!==1/0}function Se(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ce(e,t){return typeof e==`function`?e(t):e}function we(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ee(o,t.options))return!1}else if(!Oe(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Te(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(De(t.options.mutationKey)!==De(a))return!1}else if(!Oe(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ee(e,t){return(t?.queryKeyHashFn||De)(e)}function De(e){return JSON.stringify(e,(e,t)=>Ne(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Oe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Oe(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Oe(e[r],t[r]))return!1;return!0}return!1}var ke=Object.prototype.hasOwnProperty;function Ae(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Me(e)&&Me(t);if(!r&&!(Ne(e)&&Ne(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ke.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Ae(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function je(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!ke.call(t,n)||e[n]!==t[n])return!1;return!0}function Me(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ne(e){if(!Pe(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!Pe(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Pe(e){return Object.prototype.toString.call(e)===`[object Object]`}function Fe(e){return new Promise(t=>{ge.setTimeout(t,e)})}function Ie(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Ae(e,t)}function Le(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function Re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var ze=Symbol();function Be(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ze?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ve(e,t){return typeof e==`function`?e(...t):!!e}var He=Symbol();function Ue(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[He]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var We=()=>ve,Ge=()=>We(),Ke=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qe=new class extends Ke{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function Je(e){let t;if(e.then(e=>(t=e,e),ye)?.catch?.(ye),t!==void 0)return{data:t}}function Ye(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function Xe(e,t,n){let r=e.promise?.then(t).catch(e=>n?.(e)===!1?Promise.reject(e):Promise.reject(Error(`redacted`)));return r?.catch(ye),r}function Ze(e,t,n){return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t?t(e.state.data):e.state.data}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status===`pending`&&{promise:Xe(e,t,n)},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function Qe(e){return e.state.isPaused}function $e(e){return e.state.status===`success`}function et(e,t={}){let n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??Qe,r=e.getMutationCache().getAll().flatMap(e=>n(e)?[Ye(e)]:[]),i=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??$e,a=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors,o=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData;return{mutations:r,queries:e.getQueryCache().getAll().flatMap(e=>i(e)?[Ze(e,o,a)]:[])}}function tt(e,t,n){let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData;t.mutations?.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),t.queries?.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?Je(c):void 0,f=r.data===void 0?d?.data:r.data,p=f===void 0?f:a?a(f):f,m=i.get(o),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&l>m.state.dataUpdatedAt;if(r.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;m.setState({...t,data:p,...r.status===`pending`&&p!==void 0&&{status:`success`,dataUpdatedAt:l,...!g&&{fetchStatus:`idle`}}})}}else m=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:p,fetchStatus:`idle`,status:r.status===`pending`&&p!==void 0?`success`:r.status,...r.status===`pending`&&p!==void 0&&{dataUpdatedAt:l}});c&&!d&&!h&&!g&&l>m.state.dataUpdatedAt&&m.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(ye)})}var nt=_e;function rt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=nt,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var it=rt(),at=new class extends Ke{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ot(e){return Math.min(1e3*2**e,3e4)}function st(e){return(e??`online`)!==`online`||at.isOnline()}var ct=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function lt(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(ye);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new ct(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>qe.isFocused()&&(e.networkMode===`always`||at.isOnline())&&e.canRun(),p=()=>st(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Ge()?0:3),a=e.retryDelay??ot,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Fe(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var ut=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xe(this.gcTime)&&(this.#e=ge.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ge()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(ge.clearTimeout(this.#e),this.#e=void 0)}};function dt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{Ue(e,()=>t.signal,()=>n=!0,l[He])},d=Be(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?Re:Le;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?pt:ft,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:ft(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function ft(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function pt(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var mt=class extends ut{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=_t(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=_t(this.options);e.data!==void 0&&(this.setState(gt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ie(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ye).catch(ye):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ce(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ze||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>Ce(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Se(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[He]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Be(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?dt(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=lt({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ct&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ct){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ht(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...gt(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),it.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ht(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:st(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function gt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function _t(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var vt=class extends Ke{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),bt(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Ce(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!je(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&St(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Ce(this.options.enabled,this.#t)!==Ce(t.enabled,this.#t)||Ce(this.options.staleTime,this.#t)!==Ce(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Ce(this.options.enabled,this.#t)!==Ce(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return je(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ye)),t}#h(e){return!Ge()&&Ce(this.options.enabled,this.#t)!==!1&&xe(e)}#g(){this.#b();let e=Ce(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Se(this.#r.dataUpdatedAt,e)+1;this.#u=ge.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Ce(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=ge.setInterval(()=>{(this.options.refetchIntervalInBackground||qe.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(ge.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(ge.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&bt(e,t),o=i&&St(e,n,t,r);(a||o)&&(l={...l,...ht(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Ie(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Ie(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Ct(e,t),refetch:this.refetch,isEnabled:Ce(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),je(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();it.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function yt(e,t){return Ce(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Ce(t.retryOnMount,e)!==!1)}function bt(e,t){return yt(e,t)||e.state.data!==void 0&&xt(e,t,t.refetchOnMount)}function xt(e,t,n){if(Ce(t.enabled,e)!==!1&&Ce(t.staleTime,e)!==`static`){let r=Ce(n,e);return r===`always`||r!==!1&&Ct(e,t)}return!1}function St(e,t,n,r){return(e!==t||Ce(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ct(e,n)}function Ct(e,t){return Ce(t.enabled,e)!==!1&&e.isStaleByTime(Ce(t.staleTime,e))}var wt=class extends ut{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Tt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=lt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),it.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Tt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Et=class extends Ke{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new wt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Dt(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Dt(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Dt(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Dt(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){it.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Te(t,e))}findAll(e={}){return this.getAll().filter(t=>Te(e,t))}notify(e){it.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return it.batch(()=>Promise.all(e.map(e=>e.continue().catch(ye))))}};function Dt(e){return e.options.scope?.id}var Ot=class extends Ke{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),je(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&De(t.mutationKey)!==De(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Tt();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){it.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},kt=class extends Ke{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Ee(r,t),a=this.get(i);return a||(a=new mt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){it.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>we(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>we(e,t)):t}notify(e){it.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){it.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},At=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new kt,this.#t=e.mutationCache||new Et,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=qe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=at.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ce(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=be(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return it.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;it.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return it.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=it.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ye).catch(ye)}invalidateQueries(e,t={}){return it.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=it.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(ye)),r?Promise.resolve():t}));return Promise.all(r).then(ye)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Ce(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ce(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ye).catch(ye)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ye).catch(ye)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return at.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(De(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Oe(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(De(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Oe(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ee(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ze&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};T();var jt=c(!1),Mt=()=>i(jt),Nt=jt.Provider;T();function Pt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ft=c(Pt()),It=()=>i(Ft);T();var Lt=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Ve(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Rt=e=>{M(()=>{e.clearReset()},[e])},zt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Ve(n,[e.error,r])),Bt=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Vt=(e,t)=>e?.suspense&&t.isPending,Ht=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});T();function Ut(e,t,r){let i=Mt(),a=It(),o=pe(r),s=o.defaultQueryOptions(e),c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=i?`isRestoring`:l?`optimistic`:void 0,Bt(s),Lt(s,a,c),Rt(a);let[u]=N(()=>new t(o,s)),d=u.getOptimisticResult(s);M(()=>{u.setOptions(s)},[s,u]);let f=!i&&l;if(A(n(e=>{let t=f?u.subscribe(it.batchCalls(e)):ye;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),Vt(s,d))throw Ht(s,u,a);if(zt({result:d,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw d.error;return s.notifyOnChangeProps?d:u.trackResult(d)}function Wt(e,t){return Ut(e,vt,t)}T();function Gt(e,t){let r=pe(t),[i]=N(()=>new Ot(r,e));M(()=>{i.setOptions(e)},[i,e]);let a=A(n(e=>i.subscribe(it.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=n((...e)=>{i.mutate(e[0],e[1]).catch(ye)},[i]);if(a.error&&Ve(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}function Kt(){}function qt(e,{interval:t=1e3,onError:n=Kt}={}){if(typeof e!=`function`)throw Error(`argument is not function.`);let r=0,i=null,a=!1,o=!1;return async(...s)=>{if(i=s,!o){for(o=!0;a;)await new Promise(e=>ge.setTimeout(e,t));for(;Date.now()<r;)await new Promise(e=>ge.setTimeout(e,r-Date.now()));o=!1,a=!0;try{await e(...i)}catch(e){try{n(e)}catch{}}r=Date.now()+t,a=!1}}}var Jt=({storage:e,key:t=`REACT_QUERY_OFFLINE_CACHE`,throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:i=JSON.parse,retry:a})=>{if(e){let o=async n=>{try{let i=await r(n);await e.setItem(t,i);return}catch(e){return e}};return{persistClient:qt(async e=>{let t=e,n=await o(t),r=0;for(;n&&t;)r++,t=await a?.({persistedClient:t,error:n,errorCount:r}),t&&(n=await o(t))},{interval:n}),restoreClient:async()=>{let n=await e.getItem(t);if(n)return await i(n)},removeClient:()=>e.removeItem(t)}}return{persistClient:Kt,restoreClient:()=>Promise.resolve(void 0),removeClient:Kt}},Yt=[`added`,`removed`,`updated`];function Xt(e){return Yt.includes(e)}async function Zt({queryClient:e,persister:t,maxAge:n=864e5,buster:r=``,hydrateOptions:i}){try{let a=await t.restoreClient();if(a){if(a.timestamp){let o=Date.now()-a.timestamp>n,s=a.buster!==r;if(o||s)return t.removeClient();tt(e,a.clientState,i)}else return t.removeClient()}}catch(e){throw await t.removeClient(),e}}async function Qt({queryClient:e,persister:t,buster:n=``,dehydrateOptions:r}){let i={buster:n,timestamp:Date.now(),clientState:et(e,r)};await t.persistClient(i)}function $t(e){let t=()=>{Qt(e).catch(e=>{})},n=e.queryClient.getQueryCache().subscribe(e=>{Xt(e.type)&&t()}),r=e.queryClient.getMutationCache().subscribe(e=>{Xt(e.type)&&t()});return()=>{n(),r()}}T();var en=({children:e,persistOptions:t,onSuccess:n,onError:r,...i})=>{let[a,o]=N(!0),s=P({persistOptions:t,onSuccess:n,onError:r}),c=P(!1);return M(()=>{s.current={persistOptions:t,onSuccess:n,onError:r}}),M(()=>{let e={...s.current.persistOptions,queryClient:i.client};return c.current||(c.current=!0,Zt(e).then(()=>s.current.onSuccess?.()).catch(()=>s.current.onError?.()).finally(()=>{o(!1)})),a?void 0:$t(e)},[i.client,a]),R(me,{...i,children:R(Nt,{value:a,children:e})})};T();var tn=864e5,nn=`v1`;if(typeof window>`u`){let e=e=>{typeof e==`object`&&e&&`unref`in e&&typeof e.unref==`function`&&e.unref()};ge.setTimeoutProvider({setTimeout:(t,n)=>{let r=setTimeout(t,n);return e(r),r},clearTimeout:e=>clearTimeout(e),setInterval:(t,n)=>{let r=setInterval(t,n);return e(r),r},clearInterval:e=>clearInterval(e)})}var rn={queries:{retry:1,staleTime:3e4,gcTime:tn,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1},mutations:{retry:0}},an=Jt({storage:typeof window<`u`?{getItem:e=>Promise.resolve(window.localStorage.getItem(e)),setItem:(e,t)=>Promise.resolve(window.localStorage.setItem(e,t)),removeItem:e=>Promise.resolve(window.localStorage.removeItem(e))}:{getItem:()=>Promise.resolve(null),setItem:()=>Promise.resolve(),removeItem:()=>Promise.resolve()},key:`intlayer-rq-cache`}),on=e=>e.split(`_`).join(` `),sn=e=>{if(!e||typeof e!=`object`)return;let t=Object.values(e).flat().filter(e=>typeof e==`string`);return t.length>0?t.join(` `):void 0},cn=()=>{let{toast:e}=de();return{onError:t=>{[(()=>{try{if(typeof t==`string`)return JSON.parse(t);if(t instanceof Error)return JSON.parse(t.message)}catch{}return t})()].flat().forEach(t=>{let n=t?.error??t;n?.code===`RATE_LIMIT_EXCEEDED_UNAUTHENTICATED`?e({title:n.message,variant:`error`}):e({title:on(n?.title??t?.title??`Error`),description:sn(n?.errors)??n?.message??t?.message??String(n??`An error occurred`),variant:`error`})})},onSuccess:t=>{t?.error&&e({title:on(t.error.title??t.error.code??`Error`),description:sn(t.error.errors)??t.error.message??t.error.code??`An error occurred`,variant:`error`}),t?.message&&e({title:t.message,description:t.description,variant:`success`})}}},ln=({children:e,client:t})=>{let{onError:n,onSuccess:r}=cn(),i=P({onSuccess:r,onError:n});i.current={onSuccess:r,onError:n};let a=P(t??null);a.current||=new At({defaultOptions:rn,mutationCache:new Et});let o=P(!1);if(!o.current){o.current=!0;let e=a.current.getMutationCache(),t=e.config.onSuccess,n=e.config.onError;e.config.onSuccess=(e,n,r,a,o)=>{t?.(e,n,r,a,o),i.current.onSuccess?.(e,n,r,a,o)},e.config.onError=(e,t,r,a,o)=>{n?.(e,t,r,a,o),i.current.onError?.(e,t,r,a,o)},e.config.onSettled=(e,t,n,r,i)=>{i.meta?.invalidateQueries&&i.meta.invalidateQueries.forEach(e=>{a.current?.invalidateQueries({queryKey:e})}),i.meta?.resetQueries&&i.meta.resetQueries.forEach(e=>{a.current?.resetQueries({queryKey:e})})}}return t||typeof window>`u`?R(me,{client:a.current,children:e}):R(en,{client:a.current,persistOptions:{persister:an,maxAge:tn,buster:nn,dehydrateOptions:{shouldDehydrateQuery:e=>e.state.status===`success`}},children:e})};T();var un=`data-theme`,dn=`(prefers-color-scheme: dark)`,fn=typeof window>`u`,pn=`(function (storageKey, themeAttribute, darkMediaQuery) {
3
+ var storedTheme = null;
4
+ try {
5
+ storedTheme = localStorage.getItem(storageKey);
6
+ } catch (error) {
7
+ /* Storage can throw (private mode, blocked cookies) — fall back to the OS. */
8
+ }
9
+ var theme =
10
+ storedTheme === 'light' || storedTheme === 'dark'
11
+ ? storedTheme
12
+ : window.matchMedia(darkMediaQuery).matches
13
+ ? 'dark'
14
+ : 'light';
15
+ var element = document.documentElement;
16
+ element.setAttribute(themeAttribute, theme);
17
+ element.style.colorScheme = theme;
18
+ })`,mn=e=>`${pn}(${JSON.stringify(e)},${JSON.stringify(un)},${JSON.stringify(dn)})`,hn=e=>{try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return`system`},gn=e=>{let t=document.createElement(`style`);return e&&t.setAttribute(`nonce`,e),t.appendChild(document.createTextNode(`*,*::before,*::after{transition:none!important}`)),document.head.appendChild(t),()=>{getComputedStyle(document.body).getPropertyValue(`transition`),t.remove()}},_n=fn?M:F,vn=c(void 0),yn=({storageKey:e=`theme`,nonce:t,hasBootstrapScript:r=!0,forcedTheme:i,children:a})=>{let[o,s]=N(`system`),[c,u]=N(void 0),d=i??(o===`system`?c:o);_n(()=>{let t=window.matchMedia(dn);s(hn(e)),u(t.matches?`dark`:`light`);let n=e=>u(e.matches?`dark`:`light`),r=t=>{t.key===e&&s(hn(e))};return t.addEventListener(`change`,n),window.addEventListener(`storage`,r),()=>{t.removeEventListener(`change`,n),window.removeEventListener(`storage`,r)}},[e]),_n(()=>{if(!d)return;let e=document.documentElement;if(e.getAttribute(un)===d)return;let n=gn(t);e.setAttribute(un,d),e.style.colorScheme=d,n()},[d,t]);let f=n(t=>{s(t);try{localStorage.setItem(e,t)}catch{}},[e]),p=l(()=>({theme:o,resolvedTheme:d,setTheme:f}),[o,d,f]);return R(vn.Provider,{value:p,children:[r&&R(`script`,{suppressHydrationWarning:!0,nonce:fn?t:``,dangerouslySetInnerHTML:{__html:mn(e)}}),a]})},bn=({children:e,...t})=>i(vn)?R(C,{children:e}):R(yn,{...t,children:e}),xn={locales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],requiredLocales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],strictMode:`strict`,defaultLocale:`en`},Sn={mode:`prefix-no-default`,storage:{cookies:[{name:`INTLAYER_LOCALE`,attributes:{path:`/`}}],headers:[{name:`x-intlayer-locale`}]},basePath:``},Cn={editorURL:`http://localhost:8000`,cmsURL:`https://app.intlayer.org`,backendURL:`https://back.intlayer.org`,port:8e3,enabled:!1,dictionaryPriorityStrategy:`local_first`,liveSync:!1,liveSyncPort:4e3,liveSyncURL:`http://localhost:4000`},wn=`modulepreload`,Tn=function(e){return`/`+e},En={},Dn=function(e){return e.pathname.endsWith(`.css`)},On=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},kn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=function(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)},a,o=document.querySelector(`meta[property=csp-nonce]`),s=o?.nonce||o?.getAttribute(`nonce`);r=e(t.map(e=>{e=Tn(e,n);let t=i(e),r=Dn(t);return On(En,t.href,()=>{if(a===void 0){a={all:new Set,styles:new Set};let e=document.getElementsByTagName(`link`);for(let t=e.length-1;t>=0;t--){let n=e[t];a.all.add(n.href),n.rel===`stylesheet`&&a.styles.add(n.href)}}if((r?a.styles:a.all).has(t.href))return;let e=document.createElement(`link`);if(e.rel=r?`stylesheet`:wn,r||(e.as=`script`),e.crossOrigin=``,e.href=t.href,s&&e.setAttribute(`nonce`,s),document.head.appendChild(e),r)return new Promise((n,r)=>{e.addEventListener(`load`,n),e.addEventListener(`error`,()=>r(Error(`Unable to preload CSS for ${t}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},An=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),jn=e=>{if(typeof e==`number`)return Date.now()+e*1e3;if(typeof e==`string`){let t=Date.parse(e);return Number.isNaN(t)?void 0:t}},Mn=(e,t,n)=>{let r=[`${e}=${encodeURIComponent(t)}`];n.path&&r.push(`Path=${n.path}`),n.domain&&r.push(`Domain=${n.domain}`);let i=jn(n.expires);return i!==void 0&&r.push(`Expires=${new Date(i).toUTCString()}`),n.secure&&r.push(`Secure`),n.sameSite&&r.push(`SameSite=${n.sameSite}`),r.join(`; `)},Nn={}.INTLAYER_ROUTING_STORAGE_COOKIES===`false`;({}).INTLAYER_ROUTING_STORAGE_HEADERS;var Pn={getCookie:e=>document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.split(`=`)[1],getLocaleStorage:e=>localStorage.getItem(e),getSessionStorage:e=>sessionStorage.getItem(e),isCookieEnabled:!0,setCookieStore:(e,t,n)=>cookieStore.set({name:e,value:t,path:n.path,domain:n.domain,expires:n.expires,sameSite:n.sameSite}),setCookieString:(e,t)=>{document.cookie=t},setSessionStorage:(e,t)=>sessionStorage.setItem(e,t),setLocaleStorage:(e,t)=>localStorage.setItem(e,t)},Fn=(e=Pn)=>{let{locales:t}=xn;if(e?.isCookieEnabled===!1)return;let n=e=>!!e&&t.includes(e);if(!Nn)for(let t=0;t<(Sn.storage.cookies??[]).length;t++)try{let r=e?.getCookie?.(Sn.storage.cookies[t].name);if(n(r))return r}catch{}},In=!1,Ln,Rn=()=>typeof window>`u`?Fn(Pn):(In||=(Ln=Fn(Pn),!0),Ln),zn=(e,t)=>{if(t?.isCookieEnabled!==!1&&(In=!1,!Nn&&Sn.storage.cookies))for(let n=0;n<Sn.storage.cookies.length;n++){let{name:r,attributes:i}=Sn.storage.cookies[n];try{t?.setCookieStore&&t.setCookieStore(r,e,{...i,expires:jn(i.expires)})}catch{try{t?.setCookieString&&t.setCookieString(r,Mn(r,e,i))}catch{}}}},Bn=e=>{let t=globalThis;return t[e]??=new Set,t[e]},Vn=()=>Bn(Symbol.for(`intlayer.ambientLocaleResolvers`)),Hn=()=>{for(let e of Vn())try{let t=e();if(t)return t}catch{}},Un=e=>e??Hn()??(typeof window>`u`?void 0:Rn())??xn.defaultLocale,Wn=50,Gn=new Map,Kn={DisplayNames:class{of(e){return e}},ListFormat:class{format(e){return Array.from(e).join(`, `)}formatToParts(e){return Array.from(e).flatMap((e,t)=>t===0?[{type:`element`,value:e}]:[{type:`literal`,value:`, `},{type:`element`,value:e}])}},Segmenter:class{segment(e){let t=0;return Array.from(e).map(e=>{let n=t;return t+=e.length,{segment:e,index:n}})}}},qn=e=>{let t=Intl[e];return typeof t==`function`?t:Kn[e]};function Jn(e,t,n){let r=Un(t),i=`${r}|${n?JSON.stringify(n):``}`,a=e,o=Gn.get(a);o||(o=new Map,Gn.set(a,o));let s=o.get(i);if(!s){let t=typeof e==`string`?qn(e):e;if(typeof t!=`function`)throw Error(`[intlayer] \`Intl.${String(e)}\` is not available in this JavaScript engine and has no fallback. Load the matching polyfill before formatting.`);o.size>Wn&&o.clear(),s=new t(r,n),o.set(i,s)}return s}var Yn={Collator:function(e,t){return Jn(`Collator`,e,t)},DateTimeFormat:function(e,t){return Jn(`DateTimeFormat`,e,t)},DisplayNames:function(e,t){return Jn(`DisplayNames`,e,t)},ListFormat:function(e,t){return Jn(`ListFormat`,e,t)},NumberFormat:function(e,t){return Jn(`NumberFormat`,e,t)},PluralRules:function(e,t){return Jn(`PluralRules`,e,t)},RelativeTimeFormat:function(e,t){return Jn(`RelativeTimeFormat`,e,t)},Segmenter:function(e,t){return Jn(`Segmenter`,e,t)}},Xn=new Map,Zn=(e,t)=>Object.create(new Proxy(e,{get:(e,t,n)=>{if(typeof t!=`string`||t===`constructor`||t in e)return Reflect.get(e,t,n);let{value:r}=n;if(r==null)return;let i=Object(r)[t];return typeof i==`function`?i.bind(r):i},has:(e,n)=>n in e||typeof n==`string`&&n!==`constructor`&&t!==null&&n in t}),{toString:{value(){return String(this.value??``)}},valueOf:{value(){return this.value}},[Symbol.toPrimitive]:{value(){return this.value??``}}}),Qn=(e,t=Object.prototype)=>{let n=typeof e,r=e==null?null:n===`object`||n===`function`?Object.getPrototypeOf(e):n,i=Xn.get(t);i||(i=new Map,Xn.set(t,i));let a=i.get(r);return a||(a=Zn(t,r===null?null:Object.getPrototypeOf(Object(e))),i.set(r,a)),a},$n=(e,t)=>e.every((e,n)=>t[n]&&t[n].key===e.key&&t[n].type===e.type),er=e=>typeof e==`object`&&e?.key!==void 0&&e?.props!==void 0,tr=Rn,nr=(e,t)=>zn(e,{...Pn,isCookieEnabled:t}),rr=`https://back.intlayer.org`,ir=[`en`],ar=`x-intlayer-locale`,or=(e,t)=>{if(t<1)return[];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},sr=class{value;next;constructor(e){this.value=e}},cr=class{#e;#t;#n;constructor(){this.clear()}enqueue(e){let t=new sr(e);this.#e?(this.#t.next=t,this.#t=t):(this.#e=t,this.#t=t),this.#n++}dequeue(){let e=this.#e;if(e)return this.#e=e.next,this.#n--,e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}},lr=e=>{ur(e);let t=new cr,n=0,r=[],i=()=>{if(n===0&&t.size===0)for(;r.length;)r.pop()?.()},a=()=>{n<e&&t.size>0&&(n++,t.dequeue()?.())},o=()=>{n--,a()},s=async(e,t,n)=>{let r=(async()=>e(...n))();t(r);try{await r}catch{}o()},c=(r,i,o)=>{new Promise(e=>{t.enqueue(e)}).then(s.bind(void 0,r,i,o)),n<e&&a()},l=(e,...t)=>new Promise(n=>{c(e,n,t)});return Object.defineProperties(l,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value(){t.clear(),i()}},concurrency:{get:()=>e,set(r){ur(r),e=r,queueMicrotask(()=>{for(;n<e&&t.size>0;)a()})}},map:{async value(e,t){let n=e.map((e,n)=>this(t,e,n));return Promise.all(n)}},onIdle:{value(){return n===0&&t.size===0?Promise.resolve():new Promise(e=>r.push(e))}}}),l},ur=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up")},dr=async(e,t=async e=>e,n=10)=>{let r=lr(n);return Promise.all(e.map(e=>r(()=>t(e))))},fr=e=>{if(!e||typeof e!=`string`)return``;let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},pr=()=>{typeof window<`u`&&(window.intlayer={enabled:!0})},mr=(e,t=xn?.locales)=>{let n=An(e),r=e;e?.endsWith(`/`)&&(r=e.slice(0,-1));let i=n?new URL(r):new URL(r,`http://e.com`),a=i.pathname;a.startsWith(`/`)||(i.pathname=`/${a}`);{let e=a.split(`/`),n=e[1];t?.includes(n)&&(e.splice(1,1),i.pathname=e.join(`/`)??`/`)}return n?i.toString():i.toString().replace(`http://e.com`,``)},hr=(e,t,n)=>(n??Sn?.rewrite,e),gr=(e={})=>({...e,defaultLocale:e.defaultLocale??xn?.defaultLocale??`en`,mode:e.mode??Sn?.mode??`prefix-no-default`,locales:e.locales??xn?.locales??ir,rewrite:e.rewrite??Sn?.rewrite,domains:e.domains??Sn?.domains}),_r=(e,t)=>!!e&&(t??xn.locales).includes(e),vr=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i,domains:a}=gr(t);return!e||!_r(e,i)?{prefix:``,localePrefix:void 0}:r===`prefix-all`||r===`prefix-no-default`&&n!==e?{prefix:`${e}/`,localePrefix:e}:{prefix:``,localePrefix:void 0}},yr=(e,t,n)=>({path:e,isRewritten:!1}),br=(e,t=xn?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o,domains:s}=gr(n),c=mr(e,a),l=new URL(c,`http://e.com`),u=yr(hr(l.pathname,void 0,void 0),t,void 0).path,{prefix:d}=vr(t,{defaultLocale:r,mode:i,locales:a,domains:s}),f=`/${d}${u}`.replace(/\/+/g,`/`);return f.length>1&&f.endsWith(`/`)&&(f=f.slice(0,-1)),`${f}${l.search}${l.hash}`},xr=(e,t=xn?.defaultLocale,n={})=>{let{domains:r,currentDomain:i}=gr(n),a=An(e),o=a?new URL(e):new URL(e,`http://e.com`);return`${a?`${o.protocol}//${o.host}`:``}${br(`${o.pathname}${o.search}${o.hash}`,t,n)}`},Sr=(e,t=xn?.locales,n=xn?.defaultLocale)=>{if(t?.includes(e))return e;let r=[e].flat(),i=e=>e.trim().toLowerCase();try{for(let e of r){let n=i(e),r=t.find(e=>i(e)===n);if(r)return r;let[a]=n.split(`-`),o=t.find(e=>i(e).split(`-`)[0]===a);if(o)return o}}catch{}return n},Cr=[`Arab`,`Hebr`,`Thaa`,`Syrc`,`Mand`,`Adlm`,`Rohg`,`Nkoo`],wr=e=>{if(!e)return`ltr`;try{let t=new Intl.Locale(e);if(`getTextInfo`in t)return t.getTextInfo().direction;if(`textInfo`in t)return t.textInfo.direction;let n=t.maximize();return Cr.includes(n.script??``)?`rtl`:`ltr`}catch{return`ltr`}},Tr=(e,t=e)=>new Yn.DisplayNames(t,{type:`language`}).of(e)??`Unknown locale`;p(),u();var Er=c({get locale(){return tr()??xn?.defaultLocale},setLocale:()=>null}),Dr=({locale:e,defaultLocale:t,variant:r,children:i,setLocale:a,isCookieEnabled:o})=>{let{defaultLocale:s,locales:c}=xn??{},[u,d]=N(()=>e??tr()??t??s);M(()=>{pr()},[]);let f=e??u,p=n(e=>{f.toString()!==e.toString()&&(c?.map(String).includes(e)?(d(e),nr(e,o??!0)):console.error(`Locale ${e} is not available`))},[f,c,o]),m=a??p,h=Sr(f),g=l(()=>({locale:h,setLocale:m,variant:r,isCookieEnabled:o}),[h,m,r,o]);return R(Er.Provider,{value:g,children:i})},Or=new WeakMap,kr=0,Ar=e=>{if(!e)return`base`;let t=Or.get(e);if(t)return t;kr+=1;let n=`p${kr}`;return Or.set(e,n),n},jr=256,Mr=new WeakMap,Nr=e=>typeof e==`object`&&!!e,Pr=(e,t,n)=>`${e}_${t}_${Ar(n)}`,Fr=(e,t)=>{if(!Nr(e))return{hit:!1};let n=Mr.get(e);return n?.has(t)?{hit:!0,content:n.get(t)}:{hit:!1}},Ir=(e,t,n)=>{if(!Nr(e))return n;let r=Mr.get(e);return r||(r=new Map,Mr.set(e,r)),r.size>=jr&&r.clear(),r.set(t,n),n},Lr=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},Rr=`translation`,zr=`enumeration`,Br=`plural`,Vr=`condition`,Hr=`insertion`,Ur=`file`,Wr=`object`,Gr=`array`,Kr=`nested`,qr=`reactNode`,Jr=`preactNode`,Yr=`solidNode`,Xr=`markdown`,Zr=`html`,Qr=`text`,$r=`number`,ei=`boolean`,ti=`gender`,ni=`select`,ri=`null`,ii=`unknown`,ai=(e,t,n)=>({...e,children:t,keyPath:[...e.keyPath,n]}),oi=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,oi);if(typeof e!=`object`||!e||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return e;if(Array.isArray(e))return e.map((e,n)=>oi(e,ai(t,e,{type:Gr,key:n})));let n={};for(let r in e){let i={type:Wr,key:r};t.eager?n[r]=oi(e[r],ai(t,e[r],i)):Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:function(){let n=oi(e[r],ai(t,e[r],i));return Object.defineProperty(this,r,{value:n,enumerable:!0,configurable:!0}),n}})}return n},si=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),ci=(e,t,n)=>e[Jn(`PluralRules`,n).select(t)]??e.other,li=e=>{if(typeof e!=`object`||!e||typeof e.then==`function`||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Array.isArray(e)},ui=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e)||!li(e)||!li(t))return e;let n=e;for(let r of Object.keys(t)){let i=t[r];if(r===`__proto__`||r===`constructor`||i===void 0)continue;let a=e[r],o=a===void 0?i:typeof a==`object`?ui(a,i):a;o!==a&&(n===e&&(n={...e}),n[r]=o)}return n},di=(e,t,n)=>{let r=t=>e[t],i=r(t);if(typeof i==`string`)return i;let a=[t,t.split(`-`)[0],n,n?.split(`-`)[0]],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(!t||a.indexOf(t)<e)continue;let n=r(t);if(n!==void 0){if(typeof n==`string`){if(o.length===0)return n}else o.push(n)}}if(o.length!==0)return o.length===1||Array.isArray(o[0])?o[0]:o.reduce((e,t)=>ui(e,t))},fi=e=>{if(typeof e!=`object`||!e||!(`nodeType`in e))return!1;let{nodeType:t}=e;return!1},pi=e=>{if(typeof e==`string`)return e;if(fi(e))return e.nodeType===`html`?e[Zr]:e[Xr]},mi=(e,t)=>{if(typeof e==`string`)return t;if(fi(e)){let n=e.nodeType===`html`?Zr:Xr;return{...e,[n]:t}}return e},hi=(e,t,n,r,i)=>{let a=mi(e,si(pi(e),t));return i(a,{...n,plugins:r,children:a})},gi={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},_i=e=>{if(typeof e!=`function`)return!1;let{value:t}=e;return t===void 0||typeof t==`function`},vi=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?gi:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a=di(n.translation??{},e,t);return i(a,{...r,children:a,keyPath:[...r.keyPath,{type:Rr,key:e}]})}},yi=gi,bi=e=>({}).INTLAYER_NODE_TYPE_PLURAL===`false`?gi:{id:`plural-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`plural`,transform:(t,n,r)=>{let i=t[Br],a={},o=t.variable??`count`,s=(n.plugins??[]).filter(e=>e.id!==`insertion-string-plugin`&&e.id!==`plural-string-plugin`),c={id:`plural-string-plugin`,canHandle:e=>typeof e==`string`||fi(e),transform:(e,t,r)=>{if(t.keyPath.slice(n.keyPath.length).some(e=>e.type===`insertion`))return r(e,{...t,plugins:t.plugins?.filter(e=>e.id!==`plural-string-plugin`)});if(fi(e))return n=>hi(e,n,t,s,r);let i=r(e,{...t,children:e,plugins:[...s.filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let n=si(i,e);return r(n,{...t,plugins:s,children:n})}}};for(let e in i){let t=i[e];a[e]=r(t,{...n,children:t,keyPath:[...n.keyPath,{type:Br,key:e}],plugins:[c,...s]})}let l=String(e??n.locale??`en`);return e=>{let t=typeof e==`number`?{[o]:e}:e,n=Number(t[o]),r=ci(a,n,l);return _i(r)?r(t):r}}},xi={}.INTLAYER_NODE_TYPE_CONDITION===`false`?gi:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r=e[Vr],i={};for(let e in r){let a=r[e];i[e]=n(a,{...t,children:a,keyPath:[...t.keyPath,{type:Vr,key:e}]})}return e=>{let t=typeof e==`boolean`?e:e.value,n=Lr(i,t);return _i(n)&&typeof e==`object`?n(e):n}}},Si={}.INTLAYER_NODE_TYPE_INSERTION===`false`?gi:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:Hr}],i=e[Hr],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||fi(e),transform:(e,n,r)=>{if(fi(e))return i=>hi(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=si(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return Ti(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}},Ci=[zr,Vr,Br,ti,ni],wi=(e,t,n,r=!1)=>{let i=e?.nodeType;if(typeof t!=`function`||!i||!Ci.includes(i))return t;let a=i===`plural`||i===`enumeration`;return e=>{if(typeof e==`object`&&e)return t({...n,...e});if(a)return t({...n,count:e});let i=t(e);return!r&&_i(i)?i(n):i}},Ti=(e,t)=>typeof t==`function`&&Ci.includes(e?.nodeType??``)?n=>wi(e,t,n):t,Ei=gi,Di=gi,Oi=e=>gi,ki=gi,Ai=(e,t=!0)=>[vi(e??xn.defaultLocale,t?xn.defaultLocale:void 0),yi,bi(e??xn.defaultLocale),xi,Si,Oi(e??xn.defaultLocale),ki,Ei,Di].filter(e=>e!==gi),ji=(e,t,n=[])=>oi(e,{...t,plugins:n}),Mi=new WeakSet,Ni=(e,t,n)=>{let{locale:r,selector:i}={locale:t,selector:void 0},a=Un(r),o=Pr(a,``,n),s=Fr(e,o);if(s.hit)return s.content;let c=n??Ai(a),l=e,u=e=>{let t={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:c,nestedDictionaries:e.nestedDictionaries,eager:!Mi.has(e)};Mi.add(e);try{return ji(e.content,t,c)}finally{t.eager&&Mi.delete(e)}};return l===null?Ir(e,o,null):Array.isArray(l)?Ir(e,o,l.map(u)):Ir(e,o,u(l))};u();var Pi=({children:e,value:t,additionalProps:n})=>Object.setPrototypeOf({...s(e)?e:a(C,{},e),value:t,...n},Qn(t));u(),T();var Fi=null,Ii=null,Li={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,t)=>Pi({value:t.children,children:t.children})},Ri=gi,zi=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,Bi=(e,t)=>{if(!Object.values(t).some(zi))return e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString());let n=[],r=0,i=/\{\{\s*(.*?)\s*\}\}/g,o=i.exec(e);for(;o!==null;){o.index>r&&n.push(e.substring(r,o.index));let a=o[1]?.trim(),s=a&&t[a];s!=null&&n.push(typeof s==`number`?String(s):s),r=o.index+o[0].length,o=i.exec(e)}return r<e.length&&n.push(e.substring(r)),a(C,null,...n.map((e,t)=>a(C,{key:t},e)))},Vi={}.INTLAYER_NODE_TYPE_INSERTION===`false`?gi:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:Hr}],i=e[Hr],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||fi(e),transform:(e,n,r)=>{if(fi(e))return i=>hi(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=Bi(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return Ti(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}};w(()=>Fi.then(e=>({default:e.MarkdownRendererPlugin}))),w(()=>Fi.then(e=>({default:e.MarkdownMetadataRenderer})));var Hi=gi;w(()=>Ii.then(e=>({default:e})));var Ui=gi,Wi=new Map,Gi=(e,t=!0)=>{let n=Un(e),r=`${n}_${t}`;if(Wi.has(r))return Wi.get(r);let i=[Li,vi(n,t?xn.defaultLocale:void 0),yi,bi(n),xi,Oi(n),ki,Ei,Di,Ri,Vi,Hi,Ui].filter(e=>e!==gi);return Wi.set(r,i),i},Ki=(e,t)=>Ni(e,t,Gi(typeof t==`object`&&t?t.locale:t)),qi=(e,t,n)=>{let r=e,i=null,a=[];if(t.length===0)return n;try{for(let e=0;e<t.length;e++){let o=t[e];if(i=r,(o?.type===`object`||o?.type===`array`)&&(a=[o.key],r[o.key]&&typeof r[o.key]==`object`||(r[o.key]={}),r=r[o.key]),(o?.type===`translation`||o?.type===`enumeration`||o?.type===`plural`||o?.type===`gender`||o?.type===`select`)&&(a=[o.type,o.key],r[o.type]&&typeof r[o.type]==`object`||(r[o.type]={}),r[o.type][o.key]&&typeof r[o.type][o.key]==`object`||(r[o.type][o.key]={}),r=r[o.type][o.key]),(o?.type===`enumeration`||o?.type===`plural`||o?.type===`condition`)&&o.type!==`enumeration`&&o.type!==`plural`&&(a=[o.type,o.key],r=r[o.type][o.key]),(o?.type===`markdown`||o?.type===`html`||o?.type===`insertion`)&&(a=[o.type],r[o.type]??(r[o.type]=``),r=r[o.type]),o?.type===`file`&&(a=[`content`],r=r.content),e===t.length-1&&i&&a.length>0){let e=i;for(let t of a.slice(0,-1))e=e[t];let t=a[a.length-1];if(n===void 0){if(Array.isArray(e)){let n=Number(t);!Number.isNaN(n)&&n>=0&&n<e.length&&e.splice(n,1)}else delete e[t]}else e[t]=n}}return e}catch(r){return console.error(`Cannot edit dictionary by key path`,{dictionaryContent:e,keyPath:t,newValue:n},r),e}},Ji=(e,t,n)=>{let r=structuredClone(e);for(let e of t){for(;r?.nodeType===`translation`&&e.type!==`translation`;){let e=r[Rr];if(!e)break;r=(n&&e[n])??Object.values(e)[0]}(e.type===`object`||e.type===`array`)&&(r=r?.[e.key]),(e.type===`translation`||e.type===`condition`||e.type===`enumeration`||e.type===`plural`||e.type===`gender`||e.type===`select`)&&(r=r?.[e.type]?.[e.key]),(e.type===`markdown`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(r=r?.[e.type])}return r},Yi=(e,t,n)=>{let r=structuredClone(n);switch(e){case Rr:return{nodeType:Rr,[Rr]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case zr:return{nodeType:zr,[zr]:{1:r??``}};case Br:return{nodeType:Br,[Br]:{one:r??``,other:r??``}};case Vr:return{nodeType:Vr,[Vr]:{true:r??``,false:r??``}};case ti:return{nodeType:ti,[ti]:{male:r??``,female:r??``,fallback:r??``}};case ni:return{nodeType:ni,[ni]:{case1:r??``,fallback:r??``}};case Hr:return{nodeType:Hr,[Hr]:{insertion:r??``}};case Kr:return{nodeType:Kr,[Kr]:{dictionaryKey:``}};case Xr:return{nodeType:Xr,[Xr]:r??``};case Zr:return{nodeType:Zr,[Zr]:r??``,customComponents:[]};case Ur:return{nodeType:Ur,[Ur]:r??``};case Wr:return{newKey:r??``};case Gr:return[r??``];case Qr:return r??``;case $r:return r??0;case ei:return r??!0;default:return r??``}},Xi=e=>{if(typeof e==`string`)return``;if(typeof e==`number`)return 0;if(typeof e==`boolean`)return!0;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`select`||t.nodeType===`html`?Xi(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?Xi(n):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(Xi);let t=Object.entries(e).map(([e,t])=>[e,Xi(t)]);return Object.fromEntries(t)},Zi=e=>{if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`markdown`||t.nodeType===`html`?n:t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`select`||t.nodeType===`file`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},Qi=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,$i={[Rr]:!0,[zr]:!0,[Br]:!0,[Vr]:!0,[Hr]:!0,[Ur]:!0,[Wr]:!0,[Gr]:!0,[Kr]:!0,[qr]:!0,[Jr]:!0,[Yr]:!0,[Xr]:!0,[Zr]:!0,[Qr]:!0,[$r]:!0,[ei]:!0,[ti]:!0,[ni]:!0,[ri]:!0,[ii]:!0},ea=e=>Object.hasOwn($i,e),ta=e=>{if(typeof e==`string`)return Qr;if(Qi(e)){let t=e.nodeType;return ea(t)?t:ii}return Array.isArray(e)?Gr:er(e)?qr:typeof e==`number`?$r:typeof e==`boolean`?ei:e&&typeof e==`object`?Wr:e===null?ri:ii},na=(e,t,n)=>{let r=e,i=null,a=null;for(let e of n)i=r,(e.type===`object`||e.type===`array`)&&(a=e.key,r=r[e.key]),(e.type===`translation`||e.type===`enumeration`||e.type===`plural`||e.type===`condition`||e.type===`gender`||e.type===`select`)&&(a=e.type,r=r[e.type][e.key]),(e.type===`markdown`||e.type===`reactNode`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(a=e.type,r=r[e.type]);if(i&&a!==null){if(Array.isArray(i))i[a]=r;else{let e={};for(let n of Object.keys(i))n===a&&t!==void 0?e[t]=r:e[n]=i[n];Object.keys(i).forEach(e=>{delete i[e]}),Object.assign(i,e)}}return e};p();var V=(e,t)=>{let{locale:n,variant:r}=i(Er)??{},a=t??n,o=a;return l(()=>Ki(e,a),[e.key,o])};p();var{defaultLocale:ra,locales:ia}=xn??{},aa=({isCookieEnabled:e,onLocaleChange:t}={})=>{let{locale:n,setLocale:r,isCookieEnabled:a}=i(Er)??{};return{locale:n,defaultLocale:ra,availableLocales:ia,setLocale:n=>{ia?.map(String).includes(n)?(r(n),nr(n,e??a??!0),t?.(n)):console.error(`Locale ${n} is not available`)}}},oa=2048,sa=8192,ca=2048,la=1024,ua=2048,da=-2128831035,fa=16777619,pa=Array.isArray,ma=e=>{if(!e)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return``+e;let t=``;if(pa(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!n)continue;let i=typeof n==`string`?n:ma(n);i&&(t&&(t+=` `),t+=i)}return t}if(typeof e==`object`)for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t},ha=(e,t)=>{let n=[];for(let r=0;r<e;r++)n.push(t);return n},ga=`line`in Error(),_a=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,va=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ya=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ba=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ca=Number,wa=Number.isNaN,Ta=Number.isInteger,Ea=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Da=(e,t,n)=>{let r=e.length;if(r<3||e.charCodeAt(0)!==t||e.charCodeAt(r-1)!==n)return-1;let i=0;if(Ea(e.charCodeAt(1))){let t=2;for(;t<r-1;){let n=e.charCodeAt(t);if(Ea(n)||n===45)t++;else break}t<r-2&&e.charCodeAt(t)===58&&(i=t)}for(let t=1;t<r-1;t++){let n=e.charCodeAt(t);if(n===10||n===13||n===8232||n===8233)return-1}return i},Oa=null,ka=-1,Aa=``,ja=``,Ma=e=>{if(e===Oa)return;Oa=e;let t=Da(e,91,93);ka=t,t>0?(Aa=e.slice(1,t),ja=e.slice(t+1,e.length-1)):t===0&&(ja=e.slice(1,-1))},Na=null,Pa=-1,Fa=``,Ia=e=>{if(e===Na)return;Na=e;let t=Da(e,40,41);Pa=t,t>0&&(Fa=e.slice(1,t))},La=e=>_a.test(e),H=e=>!!e&&!wa(Ca(e)),Ra=e=>!!e&&Ta(Ca(e)),za=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),Ba=e=>va.test(e),Va=()=>!0,Ha=e=>ya.test(e)&&!ba.test(e),Ua=()=>!1,Wa=e=>xa.test(e),Ga=e=>Sa.test(e),Ka=e=>!U(e)&&!W(e),qa=e=>{let t=e.length;return e.startsWith(`@container`)&&(t>11&&e.charCodeAt(10)===47||t>16&&e.charCodeAt(11)===115&&e.startsWith(`-size/`,10)||t>18&&e.charCodeAt(11)===110&&e.startsWith(`-normal/`,10))},Ja=e=>lo(e,mo,Ua),U=e=>(Ma(e),ka>=0),Ya=e=>lo(e,ho,Ha),Xa=e=>lo(e,go,H),Za=e=>lo(e,vo,Va),Qa=e=>lo(e,_o,Ua),$a=e=>lo(e,fo,Ua),eo=e=>lo(e,po,Ga),to=e=>lo(e,yo,Wa),W=e=>(Ia(e),Pa>=0),no=e=>uo(e,ho),ro=e=>uo(e,_o),io=e=>uo(e,fo),ao=e=>uo(e,mo),oo=e=>uo(e,po),so=e=>uo(e,yo,!0),co=e=>uo(e,vo,!0),lo=(e,t,n)=>(Ma(e),ka<0?!1:ka>0?t(Aa):n(ja)),uo=(e,t,n=!1)=>(Ia(e),Pa<0?!1:Pa>0?t(Fa):n),fo=e=>e===`position`||e===`percentage`,po=e=>e===`image`||e===`url`,mo=e=>e===`length`||e===`size`||e===`bg-size`,ho=e=>e===`length`,go=e=>e===`number`,_o=e=>e===`family-name`,vo=e=>e===`number`||e===`weight`,yo=e=>e===`shadow`,bo=new Map([[U,1],[Ja,1],[Ya,1],[Xa,1],[Za,1],[Qa,1],[$a,1],[eo,1],[to,1],[W,2],[no,2],[ro,2],[io,2],[ao,2],[oo,2],[so,2],[co,2],[La,4],[H,4],[Ra,4],[za,4],[Ba,4],[qa,4],[Va,7],[Ka,7]]),xo=(e,t)=>({classGroupId:e,validator:t,shapeMask:bo.get(t)??7}),So=()=>({nextPart:new Map,validators:null,classGroupId:void 0}),Co=[],wo=e=>{let{theme:t,classGroups:n}=e,r=So();for(let e in n)To(n[e],r,e,t);return r},To=(e,t,n,r)=>{for(let i=0;i<e.length;i++)Eo(e[i],t,n,r)},Eo=(e,t,n,r)=>{typeof e==`string`?Do(e,t,n):typeof e==`function`?Oo(e,t,n):jo(e)?To(r[e.themeGroupId]||Co,t,n,r):ko(e,t,n,r)},Do=(e,t,n)=>{let r=e===``?t:Ao(t,e);r.classGroupId=n},Oo=(e,t,n)=>{t.validators===null&&(t.validators=[]),t.validators.push(xo(n,e))},ko=(e,t,n,r)=>{let i=Object.entries(e);for(let e=0;e<i.length;e++){let[a,o]=i[e];To(o,Ao(t,a),n,r)}},Ao=(e,t)=>{let n=e,r=t.split(`-`);for(let e=0;e<r.length;e++){let t=r[e],i=n.nextPart.get(t);i||(i=So(),n.nextPart.set(t,i)),n=i}return n},jo=e=>`themeGroupId`in e&&typeof e.themeGroupId==`string`,Mo=(e,t)=>{let n=e.length,r=t.length,i=Array(n+r);for(let t=0;t<n;t++)i[t]=e[t];for(let e=0;e<r;e++)i[n+e]=t[e];return i},No=[],Po=e=>{let t=wo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e,i=e=>{let n=e.length;if(n!==0&&e.charCodeAt(0)===91&&e.charCodeAt(n-1)===93)return Lo(e);let r=e.split(`-`);return Io(r,+(r.length>1&&e.charCodeAt(0)===45),t)},a=(e,t)=>{let i=n[e];if(t){let t=r[e];if(t)return i?Mo(i,t):t}return i||Fo},o=new Map,s=e=>{o.has(e)||o.set(e,o.size)};for(let t in e.classGroups)s(t);for(let e in n){s(e);for(let t of n[e])s(t)}for(let e in r){s(e);for(let t of r[e])s(t)}let c=o.size,l=e=>{if(e.length===0)return No;let t=[];for(let n=0;n<e.length;n++)t.push(o.get(e[n]));return t},u=ha(c,No),d=ha(c,No),f=ha(c,``);for(let[e,t]of o)f[t]=e,u[t]=l(a(e,!1)),d[t]=l(a(e,!0));return{getClassGroupId:i,groupIndexes:o,groupCount:c,groupNames:f,conflictRowsBase:u,conflictRowsPostfix:d}},Fo=[],Io=(e,t,n)=>{if(t===e.length)return n.classGroupId;let r=n.nextPart.get(e[t]);if(r){let n=Io(e,t+1,r);if(n)return n}let i=n.validators;if(i===null)return;let a=t===0?e.join(`-`):e.slice(t).join(`-`),o=4,s=a.length;if(s>2){let e=a.charCodeAt(0);e===91&&a.charCodeAt(s-1)===93?o=1:e===40&&a.charCodeAt(s-1)===41&&(o=2)}for(let e=0;e<i.length;e++){let t=i[e];if((t.shapeMask&o)!==0&&t.validator(a))return t.classGroupId}},Lo=e=>{let t=e.slice(1,-1),n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n);return r?`arbitrary..`+r:void 0},Ro=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),zo=[];Object.freeze(zo);var Bo=e=>{let t=null,n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e.charCodeAt(s);if(n===0&&r===0){if(o===58){(t??=[]).push(e.slice(i,s)),i=s+1;continue}if(o===47){a=s;continue}}o===91?n++:o===93?n--:o===40?r++:o===41&&r--}let s=t===null?e:e.slice(i),c=s,l=!1,u=s.length;u!==0&&(s.charCodeAt(u-1)===33?(c=s.slice(0,-1),l=!0):s.charCodeAt(0)===33&&(c=s.slice(1),l=!0));let d=a&&a>i?a-i:void 0;return Ro(t===null?zo:t,l,c,d)},Vo=e=>{let t=new Set(e.orderSensitiveModifiers),n=(e,t)=>{e.sort();for(let n=0;n<e.length;n++)t.push(e[n])};return e=>{let r=[],i=[];for(let a=0;a<e.length;a++){let o=e[a],s=o.length!==0&&o.charCodeAt(0)===91,c=t.has(o);s||c?(i.length>0&&(n(i,r),i=[]),r.push(o)):i.push(o)}return i.length>0&&n(i,r),r}},Ho=(e,t,n)=>{if(n-t<13)return e.slice(t,n);let r=``;for(let i=t;i<n;i++)r+=e[i];return r},Uo={classId:-1,conflictStart:0,conflictEnd:0},Wo=e=>{let t=Vo(e),n=Go(e),{getClassGroupId:r,groupIndexes:i,groupCount:a,groupNames:o,conflictRowsBase:s,conflictRowsPostfix:c}=Po(e),l=new Int32Array(256),u=0,d=new Int32Array(64),f=new Int32Array(64),p=new Int32Array(64),m=ca,h=m-1,g=h,_=ha(ca,null),v=ha(ca,null),y=new Int32Array(ca*4),b=new Int32Array(ca*4),x=0,S=0,C=()=>{let e=_,t=y,n=m;m=n*2,h=m-1,_=ha(m,null),y=new Int32Array(m*4);for(let r=0;r<n;r++){let n=e[r];if(n===null)continue;let i=r<<2,a=t[i],o=a&h;for(;_[o]!==null;)o=o+1&h;_[o]=n;let s=o<<2;y[s]=a,y[s+1]=t[i+1],y[s+2]=t[i+2],y[s+3]=t[i+3]}},w=()=>{if(m<16384||m<32768&&S>m>>2){S=0,C();return}S=0;let e=v,t=b;v=_,b=y,g=h,e.length===m?(e.fill(null),_=e,y=t):(_=ha(m,null),y=new Int32Array(m*4)),x=0},T=()=>{m=ca,h=m-1,g=h,_=ha(ca,null),v=ha(ca,null),y=new Int32Array(ca*4),b=new Int32Array(ca*4),x=0,S=0},E=(e,t,n,r)=>{let i=n-t,a=r&h,o;for(;(o=_[a])!==null;){if(y[a<<2]===r&&o.length===i){let n=0;for(;n<i&&o.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===i)return o}a=a+1&h}let s=r&g;for(;(o=v[s])!==null;){if(b[s<<2]===r&&o.length===i){let n=0;for(;n<i&&o.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===i)return o}s=s+1&g}return null},D=!1,O=0,k=e=>{let t=e.length,n=-1,r=0,i=0,a=0;D=!1;for(let o=0;o<=t;o++){let s=o<t?e.charCodeAt(o):32;if(s===32||s>=9&&s<=13){if(s!==32&&(D=!0),n!==-1){if(r===d.length){let e=r*2,t=new Int32Array(e);t.set(d),d=t;let n=new Int32Array(e);n.set(f),f=n;let i=new Int32Array(e);i.set(p),p=i}d[r]=n,f[r]=o,p[r]=i,r++,a+=o-n,n=-1}}else n===-1&&(n=o,i=da),i=Math.imul(i^s,fa)}return O=a,r},A=new Map,j=new Map,M=new Map,N=0,P=e=>{let t=A.get(e);if(t===void 0&&(t=N++,A.set(e,t),t>=l.length)){let e=new Int32Array(l.length*2);e.set(l),l=e}return t},F=e=>{let t=j.get(e);return t===void 0&&(t=j.size,j.set(e,t)),t},I=new Int32Array(1024),L=0,R=new Map,ee=(e,t,n)=>{let r=i.get(e);if(r===void 0)return{classId:P(t+e),conflictStart:0,conflictEnd:0};let l=F(t)*a,u=M.get(l+r);u===void 0&&(u=P(t+e),M.set(l+r,u));let d=n?c[r]:s[r],f=d.length;if(f===0)return{classId:u,conflictStart:0,conflictEnd:0};let p=(l+r)*2+ +!!n,m=R.get(p);if(m===void 0){if(L+f>I.length){let e=I.length*2;for(;e<L+f;)e*=2;let t=new Int32Array(e);t.set(I),I=t}m=L;for(let e=0;e<f;e++){let n=d[e],r=M.get(l+n);r===void 0&&(r=P(t+o[n]),M.set(l+n,r)),I[m+e]=r}L=m+f,R.set(p,m)}return{classId:u,conflictStart:m,conflictEnd:m+f}},te=e=>{let i=e.length,a=!0;for(let t=0;t<i;t++){let n=e.charCodeAt(t);if(n===58||n===47||n===91||n===40||n===33){a=!1;break}}if(a){let t=r(e);return t?ee(t,``,!1):Uo}let{isExternal:o,modifiers:s,hasImportantModifier:c,baseClassName:l,maybePostfixModifierPosition:u}=Bo(e);if(o)return Uo;let d=!!u,f;if(d){f=r(l.substring(0,u));let e=f&&n[f]?r(l):void 0;e&&e!==f&&(f=e,d=!1)}else f=r(l);if(!f){if(!d||(f=r(l),!f))return Uo;d=!1}let p=s.length===0?``:s.length===1?s[0]:t(s).join(`:`),m=c?p+`!`:p;return ee(f,m,d)},ne=ha(la,null),z=new Int32Array(la),re=0,ie=0,B=0,ae=0,oe=(e,t)=>{let n=0,r=0,i=0,a=da;for(let e=0;e<t;e++){let t=f[e];t<0||(n++,r+=t-d[e],i=e,a=Math.imul(a^p[e],fa))}if(B=n,ae=i,n===1||(re=a&1023,ie=a,z[re]!==a))return null;let o=ne[re];if(o===null||o.length!==r+n-1)return null;let s=0;for(let n=0;n<t;n++){let t=f[n];if(t<0)continue;s!==0&&s++;let r=d[n];for(let n=r;n<t;n++)if(o.charCodeAt(s++)!==e.charCodeAt(n))return null}return o},se=e=>{ne[re]=e,z[re]=ie},ce=new Int32Array,le=new Map,ue=new Map,de=0,fe=new Set,pe=new Set,me=e=>e.indexOf(`[`)===-1||fe.has(e)||pe.has(e)?!0:(fe.add(e),fe.size>2048&&(pe=fe,fe=new Set),!1),he=e=>{let t=k(e);if(D)return ce;let n=new Int32Array(2+t*6);n[0]=t,n[1]=+(O+t-1===e.length);for(let r=0;r<t;r++){let t=d[r],i=f[r],a=i-t,o=p[r],s=0,c=0,l=0,u=!1,C=o&h,T;for(;(T=_[C])!==null;){if(y[C<<2]===o&&T.length===a){let n=0;for(;n<a&&T.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===a){let e=C<<2;s=y[e+1],c=y[e+2],l=y[e+3],u=!0;break}}C=C+1&h}if(!u){let n=o&g,r;for(;(r=v[n])!==null;){if(b[n<<2]===o&&r.length===a){let i=0;for(;i<a&&r.charCodeAt(i)===e.charCodeAt(t+i);)i++;if(i===a){let e=n<<2;s=b[e+1],c=b[e+2],l=b[e+3],_[C]=r;let t=C<<2;y[t]=o,y[t+1]=s,y[t+2]=c,y[t+3]=l,S++,++x>m>>1&&w(),u=!0;break}}n=n+1&g}}if(!u){let n=Ho(e,t,i),r=te(n);s=r.classId,c=r.conflictStart,l=r.conflictEnd,_[C]=n;let a=C<<2;y[a]=o,y[a+1]=s,y[a+2]=c,y[a+3]=l,++x>m>>1&&w()}let E=2+r*6;n[E]=t,n[E+1]=i,n[E+2]=o,n[E+3]=s,n[E+4]=c,n[E+5]=l}return n},ge=ha(16,ce),_e=new Int32Array(16),ve=()=>{A.clear(),j.clear(),M.clear(),R.clear(),L=0,N=0,le=new Map,ue=new Map,de=0,T()},ye=e=>{let t=k(e);if(t===1){let t=d[0],n=f[0];return t===0&&n===e.length?e:e.slice(t,n)}if(t===0)return``;N>16384&&ve(),u=u+1|0,u===0&&(u=1);let n=u,r=!1;for(let i=t-1;i>=0;--i){let t=d[i],a=f[i],o=a-t,s=p[i],c=ga&&o>=12,u=s&h,C;for(;(C=_[u])!==null;){if(y[u<<2]===s&&C.length===o){if(c){if(e.startsWith(C,t))break}else{let n=0;for(;n<o&&C.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===o)break}}u=u+1&h}if(C!==null){let e=u<<2,t=y[e+1];if(t===-1)continue;if(l[t]===n){f[i]=-a,r=!0;continue}l[t]=n;let o=y[e+3];for(let t=y[e+2];t<o;t++)l[I[t]]=n;continue}let T,E,D;{let n=s&g,r;for(;(r=v[n])!==null;){if(b[n<<2]===s&&r.length===o){if(c){if(e.startsWith(r,t))break}else{let n=0;for(;n<o&&r.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===o)break}}n=n+1&g}if(r!==null){C=r;let e=n<<2;T=b[e+1],E=b[e+2],D=b[e+3],S++}else{C=Ho(e,t,a);let n=te(C);T=n.classId,E=n.conflictStart,D=n.conflictEnd}_[u]=C;let i=u<<2;y[i]=s,y[i+1]=T,y[i+2]=E,y[i+3]=D,++x>m>>1&&w()}if(T!==-1){if(l[T]===n){f[i]=-a,r=!0;continue}l[T]=n;for(let e=E;e<D;e++)l[I[e]]=n}}if(!r&&!D&&e.length===O+t-1)return e;let i=oe(e,t);if(i!==null)return i;if(B===1){let t=d[ae],n=f[ae],r=E(e,t,n,p[ae]);return r===null?e.slice(t,n):r}let a=``;if(!D){let n=-1,r=0;for(let i=0;i<t;i++){let t=f[i];if(t<0)continue;let o=d[i];n===-1?n=o:o!==r+1&&(a&&(a+=` `),a+=e.slice(n,r),n=o),r=t}return n!==-1&&(a&&(a+=` `),a+=e.slice(n,r)),se(a),a}for(let n=0;n<t;n++){let t=f[n];t<0||(a&&(a+=` `),a+=e.slice(d[n],t))}return se(a),a};return{mergeClassList:ye,mergePreparedParts:(e,t,n)=>{if(N>16384&&ve(),t>_e.length){let e=_e.length;for(;e<t;)e*=2;_e=new Int32Array(e),ge=ha(e,ce)}let r=0,i=!0;for(let a=0;a<t;a++){let t=e[a],o=le.get(t);if(o===void 0&&(o=ue.get(t),o===void 0?(o=he(t),me(t)&&(le.set(t,o),++de>2048&&(de=0,ue=le,le=new Map))):le.set(t,o)),o===ce)return ye(n);ge[a]=o,r+=o[0],o[1]===0&&(i=!1)}let a=0;for(let n=0;n<t;n++)_e[n]=a,a+=e[n].length+1;if(r===0)return``;if(r===1)for(let e=0;e<t;e++){let t=ge[e];if(t[0]===1){let r=_e[e]+t[2],i=_e[e]+t[3];return r===0&&i===n.length?n:n.slice(r,i)}}if(r>d.length){let e=d.length;for(;e<r;)e*=2;let t=new Int32Array(e);t.set(d),d=t;let n=new Int32Array(e);n.set(f),f=n;let i=new Int32Array(e);i.set(p),p=i}u=u+1|0,u===0&&(u=1);let o=u,s=!1,c=r-1;for(let e=t-1;e>=0;e--){let t=ge[e],n=_e[e];for(let e=t[0]-1;e>=0;e--){let r=2+e*6;d[c]=n+t[r];let i=n+t[r+1];p[c]=t[r+2];let a=t[r+3];if(a===-1)f[c]=i;else if(l[a]===o)f[c]=-i,s=!0;else{l[a]=o;let e=t[r+5];for(let n=t[r+4];n<e;n++)l[I[n]]=o;f[c]=i}c--}}if(!s&&i)return n;let m=oe(n,r);if(m!==null)return m;if(B===1)return n.slice(d[ae],f[ae]);let h=``,g=-1,_=0;for(let e=0;e<r;e++){let t=f[e];if(t<0)continue;let r=d[e];g===-1?g=r:r!==_+1&&(h&&(h+=` `),h+=n.slice(g,_),g=r),_=t}return g!==-1&&(h&&(h+=` `),h+=n.slice(g,_)),se(h),h}}},Go=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Ko=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=qo(n))&&(i&&(i+=` `),i+=r);return i},qo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++){let i=e[r];i&&(t=qo(i))&&(n&&(n+=` `),n+=t)}return n},Jo=e=>{let t=e=>(_(),t(e)),n=(e,t,r)=>(_(),n(e,t,r)),r=Object.create(null),i=Object.create(null),a=0,o=0,s=oa,c=oa*2,l=8191,u=4096,d=new Uint8Array(sa),f=new Uint8Array(sa),p=0,m=()=>{a=0,o=0,i=r,r=Object.create(null)},h=()=>{s*=2,c=s*2;let e=(l+1)*2;l=e-1,u=e>>1,d=new Uint8Array(e),f=new Uint8Array(e),p=0},g=[],_=()=>{let r=Wo(e());t=r.mergeClassList,n=r.mergePreparedParts},v=(e,t)=>{let n=e.length;if(n>0){let r=n*61+e.charCodeAt(0)*131+e.charCodeAt(n-1)*31+e.charCodeAt(n>>1)*7&l;if(d[r]===0&&f[r]===0){if(d[r]=1,++p>=u){p=0;let e=f;f=d,e.fill(0),d=e}return t}}return r[e]=t,++a>s?s<8192?h():m():a+o>c&&m(),t},y=(e,t)=>(r[e]=t,++o+a>c&&m(),t),b=e=>{let n=i[e];return n===void 0?v(e,t(e)):y(e,n)},x=e=>{let t=r[e];return t===void 0?b(e):t},S=(e,t,a)=>{let o=r[e];return o===void 0?(o=i[e],o===void 0?(g[0]=t,g[1]=a,v(e,n(g,2,e))):y(e,o)):o},C=(e,t,a,o)=>{let s=r[e];return s===void 0?(s=i[e],s===void 0?(g[0]=t,g[1]=a,g[2]=o,v(e,n(g,3,e))):y(e,s)):s},w=e=>{let t=r[e];if(t!==void 0)return t;let n=i[e];if(n!==void 0)return y(e,n)},T=(e,t,r)=>v(e,n(t,r,e)),E=(...e)=>x(Ko(...e));return E.mergeString=x,E.peekString=w,E.mergeParts2=S,E.mergeParts3=C,E.mergeParts=T,E},Yo=e=>({themeGroupId:e}),Xo=Jo(()=>{let e=Yo(`color`),t=Yo(`font`),n=Yo(`text`),r=Yo(`font-weight`),i=Yo(`tracking`),a=Yo(`leading`),o=Yo(`breakpoint`),s=Yo(`container`),c=Yo(`spacing`),l=Yo(`radius`),u=Yo(`shadow`),d=Yo(`inset-shadow`),f=Yo(`text-shadow`),p=Yo(`drop-shadow`),m=Yo(`blur`),h=Yo(`perspective`),g=Yo(`aspect`),_=Yo(`ease`),v=Yo(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[La,`full`,`auto`,...w()],E=()=>[Ra,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,Ra,W,U]},Ra,W,U],O=()=>[Ra,`auto`,W,U],k=()=>[`auto`,`min`,`max`,`fr`,W,U],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[La,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,La,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[La,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,W,U],L=()=>[...b(),io,$a,{position:[W,U]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ee=()=>[`auto`,`cover`,`contain`,ao,Ja,{size:[W,U]}],te=()=>[za,no,Ya],ne=()=>[``,`none`,`full`,l,W,U],z=()=>[``,H,no,Ya],re=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],B=()=>[H,za,io,$a],ae=()=>[``,`none`,m,W,U],oe=()=>[`none`,H,W,U],se=()=>[`none`,H,W,U],ce=()=>[H,W,U],le=()=>[La,`full`,...w()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ba],breakpoint:[Ba],color:[Va],container:[Ba],"drop-shadow":[Ba],ease:[`in`,`out`,`in-out`],font:[Ka],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ba],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ba],shadow:[Ba],spacing:[`px`,H],text:[Ba],"text-shadow":[Ba],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,La,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[qa],columns:[{columns:[H,`auto`,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ra,`auto`,W,U]}],basis:[{basis:[La,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,La,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Ra,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,no,Ya]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,co,Za]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,za,U]}],"font-family":[{font:[ro,Qa,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[H,`none`,W,Xa]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...re(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,Ya]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[H,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Ra,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ra,W,U],radial:[``,W,U],conic:[``,Ra,W,U]},oo,eo]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...re(),`hidden`,`none`]}],"divide-style":[{divide:[...re(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...re(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,no,Ya]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,so,to]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,so,to]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[H,Ya]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,so,to]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":B()}],"mask-image-linear-to-pos":[{"mask-linear-to":B()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":B()}],"mask-image-t-to-pos":[{"mask-t-to":B()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":B()}],"mask-image-r-to-pos":[{"mask-r-to":B()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":B()}],"mask-image-b-to-pos":[{"mask-b-to":B()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":B()}],"mask-image-l-to-pos":[{"mask-l-to":B()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":B()}],"mask-image-x-to-pos":[{"mask-x-to":B()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":B()}],"mask-image-y-to-pos":[{"mask-y-to":B()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":B()}],"mask-image-radial-to-pos":[{"mask-radial-to":B()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":B()}],"mask-image-conic-to-pos":[{"mask-conic-to":B()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:ae()}],brightness:[{brightness:[H,W,U]}],contrast:[{contrast:[H,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,so,to]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,H,W,U]}],"hue-rotate":[{"hue-rotate":[H,W,U]}],invert:[{invert:[``,H,W,U]}],saturate:[{saturate:[H,W,U]}],sepia:[{sepia:[``,H,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[H,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[H,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,H,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[H,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[H,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,W,U]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[H,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[Ra,W,U]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,W,U]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[H,no,Ya,Xa]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Zo=e=>{let t=e[0],n=t>>1,r=1;for(let t=0;t<n;t++)r+=e[r]+3;e.copyWithin(1,r),e.length-=r-1,e[0]=t-n},Qo=[0],G=(e=>{let t=e.mergeString,n=e.mergeParts2,r=e.mergeParts3,i=e.mergeParts,a=e.peekString,o=new Map,s=new Map,c=0,l=new Int32Array(ua).fill(-1),u=ha(ua,``),d=ha(ua,Qo),f=new Int32Array(ua),p=0,m=0,h=(e,t,n,r)=>{u[r]=e,d[r]=t,f[r]=n,l[p]=r,p=r},g=(e,t,n)=>{let r=m;return m=r+1&2047,l[r]=-1,h(e,t,n,r),r},_=new Set,v=new Set,y=[],b=e=>e.indexOf(`[`)===-1||_.has(e)||v.has(e)?!0:(_.add(e),_.size>500&&(v=_,_=new Set),!1),x=e=>{let t=o.get(e);if(t!==void 0)return t;let n=s.get(e);return n!==void 0&&o.set(e,n),n},S=e=>{c+=e,c>2048&&(c=0,s=o,o=new Map)},C=(e,t)=>(t===void 0?(t=[0],o.set(e,t)):t[0]>=96&&Zo(t),t),w=e=>{for(let t=0,n=e.length;t<n;t++){let n=e[t];n&&typeof n!=`string`&&(e[t]=ma(n))}return I(e,!0)},T=(e,t,n)=>{let r=0;for(let e=n,i=t.length;e<i;e++){let n=t[e];n&&(y[r++]=n)}return i(e,y,r)},E=(e,t,r)=>{let i=e+` `+t,a=n(i,e,t);if(b(i)){let n=C(t,r);n.push(1,e,a,g(t,n,n.length)),n[0]+=1,S(3)}return a},D=(e,n)=>typeof e==`string`&&e!==``?n?A(e,ma(n)):t(e):e?A(ma(e),n):n?t(typeof n==`string`?n:ma(n)):``,O=(e,t)=>{if(t){let n=l[p];if(n!==-1&&u[n]===t){let t=d[n],r=f[n];if(t[r]===1&&t[r+1]===e&&typeof e==`string`&&e!==``)return p=n,t[r+2]}}if(typeof e==`string`&&e!==``&&typeof t==`string`&&t!==``){let n=x(t);if(n!==void 0)for(let r=1,i=n.length;r<i;){let i=n[r];if(i===1&&n[r+1]===e)return h(t,n,r,n[r+3]),n[r+2];r+=i+3}return E(e,t,n)}return D(e,t)},k=(e,n)=>!n&&typeof e==`string`&&e!==``?t(e):O(e,n),A=ga?k:O,j=(e,t,n,i)=>{let a=e+` `+t+` `+n,o=r(a,e,t,n);if(b(a)){let r=C(n,i);r.push(2,e,t,o,g(n,r,r.length)),r[0]+=1,S(4)}return o},M=(e,n,r)=>typeof e==`string`&&e!==``?typeof n==`string`&&n!==``?r?P(e,n,ma(r)):A(e,n):n?P(e,ma(n),r):r?typeof r==`string`?A(e,r):A(e,ma(r)):t(e):e?P(ma(e),n,r):A(n,r),N=(e,n,r)=>{if(r){let t=l[p];if(t!==-1&&u[t]===r){let r=d[t],i=f[t];if(r[i]===2&&r[i+2]===n&&r[i+1]===e&&typeof e==`string`&&e!==``&&typeof n==`string`&&n!==``)return p=t,r[i+3]}}else if(!n&&typeof e==`string`&&e!==``)return t(e);if(typeof e==`string`&&e!==``&&typeof n==`string`&&n!==``&&typeof r==`string`&&r!==``){let t=x(r);if(t!==void 0)for(let i=1,a=t.length;i<a;){let a=t[i];if(a===2&&t[i+2]===n&&t[i+1]===e)return h(r,t,i,t[i+4]),t[i+3];i+=a+3}return j(e,n,r,t)}return M(e,n,r)},P=ga?(e,n,r)=>{if(typeof e==`string`&&e!==``){if(!r){if(!n)return t(e);if(typeof n==`string`)return k(e,n)}else if(!n&&typeof r==`string`)return k(e,r)}return N(e,n,r)}:N,F=(e,t,n,r,i,o,s)=>{let c=e.length,l=t;for(let t=n+1;t<c;t++){let n=e[t];n&&(l+=` `+n)}let u=a(l);if(u===void 0&&(u=T(l,e,n)),b(l)){let t=C(r,s),a=t.length;t.push(o);for(let r=n;r<i;r++){let n=e[r];n&&t.push(n)}t.push(u,g(r,t,a)),t[0]+=1,S(o+2)}return u},I=(e,n)=>{let r=e.length,i=``,a=``,o=-1,s=-1,c=0,m=!0;for(let t=0;t<r;t++){let n=e[t];if(n){if(typeof n!=`string`){m=!1;break}o===-1&&(i=n,o=t),a=n,s=t,c++}}if(m){if(c===0)return``;if(c===1)return t(i);let r=c-1;if(n){let t=l[p];if(t!==-1&&u[t]===a){let n=d[t],i=f[t];if(n[i]===r){let a=i+r,c=!0;for(let t=s-1;t>=o;t--){let r=e[t];if(r&&r!==n[a--]){c=!1;break}}if(c)return p=t,n[i+r+1]}}}let m=x(a);if(m!==void 0)for(let t=1,n=m.length;t<n;){let n=m[t];if(n===r){let r=t+n,i=!0;for(let t=s-1;t>=o;t--){let n=e[t];if(n&&n!==m[r--]){i=!1;break}}if(i)return h(a,m,t,m[t+n+2]),m[t+n+1]}t+=n+3}return F(e,i,o,a,s,r,m)}return w(e)};return function(){let e=arguments[0],n=arguments.length;if(n===1)return t(typeof e==`string`?e:ma(e));if(n===2)return A(e,arguments[1]);if(n===3)return P(e,arguments[1],arguments[2]);let r=n-1,i=arguments[r];for(;!i&&r>0;)i=arguments[--r];let a=l[p];if(a!==-1&&u[a]===i){let e=d[a],t=f[a],i=e[t];if(typeof i==`number`&&i!==0&&i<n){let n=t+i,o=!0;for(let i=r-1;i>=0;i--){let r=arguments[i];if(r){if(n===t||r!==e[n]||typeof r!=`string`){o=!1;break}n--}}if(o&&n===t)return p=a,e[t+i+1]}}let o=Array(n);for(let e=0;e<n;e++)o[e]=arguments[e];return I(o,!1)}})(Xo),$o=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function es(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:$o(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ts=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},ns=e=>{let t=ts(e);return t.charAt(0).toUpperCase()+t.slice(1)},rs=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),is={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function as(e){return e!=null}function os(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??is.width,a=e.size??e.height??is.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?rs(...c):rs(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??is[`stroke-width`])*Number(e.size??e.width??is.width)/Number(t.size??t.width??is.width):t.strokeWidth??is[`stroke-width`];return[`svg`,{...Object.entries(is).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&as(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&as(t.width)&&{[r(`width`)]:t.width},...`height`in t&&as(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function ss(e,t={}){return os(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var cs=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1};T();var ls=c({}),us=()=>i(ls);T();var ds=x(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=us()??{},b=!!l||cs(f),[x,S,C=[]]=ss(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:rs(y,c),hasA11yProp:b,attributes:f});return a(x,{ref:p,...S},[...C.map(([e,t])=>a(e,t)),...Array.isArray(l)?l:[l]])});T();function K(e,t=[],n=[]){let r=typeof e==`string`?es(e,t,n):e,i=x(({className:e,...t},n)=>a(ds,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=ns(r.name)),i}var fs={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};fs.node;var ps=K(fs),ms={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};ms.node;var hs=K(ms),gs={name:`arrow-up-from-line`,size:24,node:[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]};gs.node;var _s=K(gs),vs={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};vs.node;var ys=K(vs),bs={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};bs.node;var xs=K(bs),Ss={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Ss.node;var Cs=K(Ss),ws={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};ws.node;var Ts=K(ws),Es={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Es.node;var Ds=K(Es),Os={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};Os.node;var ks=K(Os),As={name:`columns-2`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]],aliases:[`columns`]};As.node;var js=K(As),Ms={name:`copy-check`,size:24,node:[[`path`,{d:`m12 15 2 2 4-4`,key:`2c609p`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Ms.node;var Ns=K(Ms),Ps={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Ps.node;var Fs=K(Ps),Is={name:`corner-down-right`,size:24,node:[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]};Is.node;var Ls=K(Is),Rs={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Rs.node;var zs=K(Rs),Bs={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Bs.node;var Vs=K(Bs),Hs={name:`file-down`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]};Hs.node;var Us=K(Hs),Ws={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Ws.node;var Gs=K(Ws),Ks={name:`grip-vertical`,size:24,node:[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]};Ks.node;var qs=K(Ks),Js={name:`languages`,size:24,node:[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]};Js.node;var Ys=K(Js),Xs={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};Xs.node;var Zs=K(Xs),Qs={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};Qs.node;var $s=K(Qs),ec={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};ec.node;var tc=K(ec),nc={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};nc.node;var rc=K(nc),ic={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};ic.node;var ac=K(ic),oc={name:`move-vertical`,size:24,node:[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m8 18 4 4 4-4`,key:`bh5tu3`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}]]};oc.node;var sc=K(oc),cc={name:`pencil-ruler`,size:24,node:[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};cc.node;var lc=K(cc),uc={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};uc.node;var dc=K(uc),fc={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};fc.node;var pc=K(fc),mc={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};mc.node;var hc=K(mc),gc={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};gc.node;var _c=K(gc),vc={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};vc.node;var yc=K(vc),bc={name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]};bc.node;var xc=K(bc),Sc={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Sc.node;var Cc=K(Sc),wc={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};wc.node;var Tc=K(wc),Ec={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Ec.node;var Dc=K(Ec),Oc={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Oc.node;var kc=K(Oc),Ac={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};Ac.node;var jc=K(Ac),Mc={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};Mc.node;var Nc=K(Mc),Pc={name:`wand-sparkles`,size:24,node:[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]],aliases:[`wand-2`]};Pc.node;var Fc=K(Pc),Ic={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ic.node;var Lc=K(Ic);function Rc(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rc(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function zc(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rc(e))&&(r&&(r+=` `),r+=t);return r}var Bc=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Vc=zc,Hc=(e,t)=>n=>{if(t?.variants==null)return Vc(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Bc(t)||Bc(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Vc(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Uc=Object.defineProperty,Wc=(e,t)=>Uc(e,`name`,{value:t,configurable:!0}),Gc=!!(typeof window<`u`&&window.document&&window.document.createElement);function Kc(e,t,{checkForDefaultPrevented:n=!0}={}){return Wc(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Wc(Kc,`composeEventHandlers`);function qc(e){if(!Gc)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Wc(qc,`getOwnerWindow`);function Jc(e){if(!Gc)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Wc(Jc,`getOwnerDocument`);function Yc(e,t=!1){let{activeElement:n}=Jc(e);if(!n?.nodeName)return null;if(Xc(n)&&n.contentDocument)return Yc(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Jc(n).getElementById(e);if(t)return t}}return n}Wc(Yc,`getActiveElement`);function Xc(e){return e.tagName===`IFRAME`}Wc(Xc,`isFrame`),T();var Zc=Object.defineProperty,Qc=(e,t)=>Zc(e,`name`,{value:t,configurable:!0});function $c(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Qc($c,`setRef`);function el(...e){return t=>{let n=!1,r=e.map(e=>{let r=$c(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():$c(e[t],null)}}}}Qc(el,`composeRefs`);function tl(...e){return n(el(...e),e)}Qc(tl,`useComposedRefs`),T();var nl=Object.defineProperty,rl=(e,t)=>nl(e,`name`,{value:t,configurable:!0});function il(e,t){let n=c(t);n.displayName=e+`Context`;let r=rl(e=>{let{children:t,...r}=e,i=l(()=>r,Object.values(r));return R(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function a(r,a={}){let{optional:o=!1}=a,s=i(n);if(s)return s;if(t!==void 0)return t;if(!o)throw Error(`\`${r}\` must be used within \`${e}\``)}return rl(a,`useContext`),[r,a]}rl(il,`createContext`);function al(e,t=[]){let n=[];function r(t,r){let a=c(r);a.displayName=t+`Context`;let o=n.length;n=[...n,r];let s=rl(t=>{let{scope:n,children:r,...i}=t,s=n?.[e]?.[o]||a,c=l(()=>i,Object.values(i));return R(s.Provider,{value:c,children:r})},`Provider`);s.displayName=t+`Provider`;function u(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[o]||a,d=i(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return rl(u,`useContext`),[s,u]}rl(r,`createContext`);let a=rl(()=>{let t=n.map(e=>c(e));return rl(function(n){let r=n?.[e]||t;return l(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return a.scopeName=e,[r,ol(a,...t)]}rl(al,`createContextScope`);function ol(...e){let t=e[0];if(e.length===1)return t;let n=rl(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return rl(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return l(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}rl(ol,`composeContextScopes`),T();var sl=Object.defineProperty,cl=(e,t)=>sl(e,`name`,{value:t,configurable:!0});function ll(e){let t=x((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=bl(r),E.forEach(r,e=>{if(gl(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;vl(n)&&typeof wl==`function`;)n=wl(n._payload);a=pl(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=y(a,void 0,s):!o&&E.count(r)===1&&b(r)&&(a=r);let c=a?hl(a):void 0,l=tl(n,c);if(!a){if(r||r===0)throw Error(o?Cl(e):Sl(e));return r}let u=ml(i,a.props??{});return a.type!==C&&(u.ref=n?l:c),y(a,u)});return t.displayName=`${e}.Slot`,t}cl(ll,`createSlot`);var ul=ll(`Slot`),dl=Symbol.for(`radix.slottable`);function fl(e){let t=cl(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=dl,t}cl(fl,`createSlottable`);var pl=cl((e,t)=>`child`in e.props?b(t)?y(t,void 0,e.props.children(t.props.children)):null:b(t)?t:null,`getSlottableElementFromSlottable`);function ml(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=xl(a,i))}return{...e,...n}}cl(ml,`mergeProps`);function hl(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}cl(hl,`getElementRef`);function gl(e){return b(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===dl}cl(gl,`isSlottable`);var _l=Symbol.for(`react.lazy`);function vl(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===_l&&`_payload`in e&&yl(e._payload)}cl(vl,`isLazyComponent`);function yl(e){return typeof e==`object`&&!!e&&`then`in e}cl(yl,`isPromiseLike`);function bl(e){let t=e;for(;vl(t)&&typeof wl==`function`;)t=wl(t._payload);return t}cl(bl,`useUnwrappedLazy`);function xl(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}cl(xl,`concatAriaDescribedby`);var Sl=cl(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Cl=cl(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),wl=v.use;T();var Tl=globalThis?.document?F:()=>{};T();var El=Object.defineProperty,Dl=(e,t)=>El(e,`name`,{value:t,configurable:!0});function Ol(e){let t=e+`CollectionProvider`,[r,i]=al(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=Dl(e=>{let{scope:t,children:n}=e,r=P(null),i=P(new Map).current;return R(a,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);s.displayName=t;let c=e+`CollectionSlot`,l=ll(c),u=x((e,t)=>{let{scope:n,children:r}=e,i=tl(t,o(c,n).collectionRef);return R(l,{ref:i,children:r})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=ll(d),m=x((e,t)=>{let{scope:n,children:r,...i}=e,a=P(null),s=tl(t,a),c=o(d,n);return M(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),R(p,{[f]:``,ref:s,children:r})});m.displayName=d;function h(t){let r=o(e+`CollectionConsumer`,t);return n(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])}return Dl(h,`useCollection`),[{Provider:s,Slot:u,ItemSlot:m},h,i]}Dl(Ol,`createCollection`);var kl=new WeakMap,Al=class e extends Map{static{Dl(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],kl.set(this,!0)}set(e,t){return kl.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=Nl(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=jl(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=jl(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return jl(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function jl(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Ml(e,t);return n===-1?void 0:e[n]}Dl(jl,`at`);function Ml(e,t){let n=e.length,r=Nl(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Dl(Ml,`toSafeIndex`);function Nl(e){return e!==e||e===0?0:Math.trunc(e)}Dl(Nl,`toSafeInteger`);function Pl(e){let t=e+`CollectionProvider`,[r,i]=al(t),[a,o]=r(t);a.displayName=e+`CollectionStableContextProvider`;let[s,c]=r(t);s.displayName=e+`CollectionStatefulContextProvider`;let l=Dl(({state:e,...t})=>e?R(d,{...t,state:e}):R(u,{...t}),`CollectionProvider`);l.displayName=t;let u=Dl(e=>{let t=v();return R(d,{...e,state:t})},`CollectionInit`);u.displayName=e+`CollectionInit`;let d=Dl(e=>{let{scope:t,children:r,state:i}=e,o=P(null),[c,l]=N(null),u=tl(o,l),[d,f]=i,p=P(new Al),m=n(()=>{let e=p.current;return Ll(e)||e.sort(Rl),e},[]);return M(()=>{if(!c)return;let e=zl(()=>{f(e=>{let t=e.toSorted(Rl);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(c,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[c,f]),R(a,{scope:t,collectionElementRef:u,collectionElementRefObject:o,getCollection:m,setCollection:f,registryRef:p,children:R(s,{scope:t,collectionElement:c,collection:d,children:r})})},`CollectionProviderImpl`);d.displayName=e+`CollectionProviderImpl`;let f=e+`CollectionSlot`,p=ll(f),m=x((e,t)=>{let{scope:n,children:r}=e,i=tl(t,o(f,n).collectionElementRef);return R(p,{ref:i,children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=ll(h),_=x((e,t)=>{let{scope:r,children:i,...a}=e,s=P(null),{setCollection:c,registryRef:l}=o(h,r),u=P(a);Fl(u.current,a)||(u.current=a);let d=u.current,f=tl(t,n(e=>{let t=l.current;e?t.set(e,{...u.current,element:e}):s.current&&t.delete(s.current)},[l]),s);Tl(()=>{let e=s.current,t=l.current;e&&t.has(e)&&t.set(e,{...d,element:e})},[d,l]);let p=P(null);return M(()=>{let e=s.current,t=p.current;((t?.element??null)!==e||e&&t?.itemData!==d)&&(p.current=e?{element:e,itemData:d}:null,c(n=>{let r=new Al(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...d,element:e}),r.sort(Rl)}))}),M(()=>()=>{let e=p.current;p.current=null,e&&c(t=>{if(!t.has(e.element))return t;let n=new Al(t);return n.delete(e.element),n})},[c]),R(g,{"data-radix-collection-item":``,ref:f,children:i})});_.displayName=h;function v(){return N(new Al)}Dl(v,`useInitCollection`);function y(t){let{collection:n}=c(e+`CollectionConsumer`,t);return n}Dl(y,`useCollection`);function b(t){let{getCollection:n}=o(e+`CollectionConsumer`,t);return n}return Dl(b,`useGetCollection`),[{Provider:l,Slot:m,ItemSlot:_},{createCollectionScope:i,useCollection:y,useGetCollection:b,useInitCollection:v}]}Dl(Pl,`createCollection`);function Fl(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Dl(Fl,`shallowEqual`);function Il(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Dl(Il,`isElementPreceding`);function Ll(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Dl(Ll,`isInDocumentOrder`);function Rl(e,t){return!e[1].element||!t[1].element?0:Il(e[1].element,t[1].element)?-1:1}Dl(Rl,`sortByDocumentPosition`);function zl(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Dl(zl,`getChildListObserver`),T();var Bl=Object.defineProperty,Vl=(e,t)=>Bl(e,`name`,{value:t,configurable:!0}),Hl=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=ll(`Primitive.${t}`),r=x((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),R(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ul(e,t){e&&m(()=>e.dispatchEvent(t))}Vl(Ul,`dispatchDiscreteCustomEvent`),T();var Wl=Object.defineProperty,Gl=(e,t)=>Wl(e,`name`,{value:t,configurable:!0}),Kl=v.useInsertionEffect;function ql(e){let t=P(e);return typeof Kl==`function`?Kl(()=>{t.current=e}):Tl(()=>{t.current=e}),l(()=>((...e)=>t.current?.(...e)),[])}Gl(ql,`useCallbackRef`),T();var Jl=Object.defineProperty,Yl=(e,t)=>Jl(e,`name`,{value:t,configurable:!0}),Xl=`dismissableLayer.update`,Zl=`dismissableLayer.pointerDownOutside`,Ql=`dismissableLayer.focusOutside`,$l,eu=c({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),tu=x(Yl(function(e,t){let{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,onDismiss:u,...d}=e,f=i(eu),[p,m]=N(null),h=p?.ownerDocument??globalThis?.document,[,g]=N({}),_=tl(t,m),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=P(!1),T=au(e=>{s?.(e),l?.(e),e.defaultPrevented||u?.()},{ownerDocument:h,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:n(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),E=ou(e=>{if(a&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(c?.(e),l?.(e),e.defaultPrevented||u?.())},h),D=p?x===v.length-1:!1,O=ql(e=>{e.key===`Escape`&&(o?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return M(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),M(()=>{if(p)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&($l=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),su(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=$l))}},[p,h,r,f]),M(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),su())},[p,f]),M(()=>{let e=Yl(()=>g({}),`handleUpdate`);return document.addEventListener(Xl,e),()=>document.removeEventListener(Xl,e)},[]),R(Hl.div,{...d,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:Kc(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Kc(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Kc(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`)),nu=x(Yl(function(e,t){let n=i(eu),r=P(null),a=tl(t,r);return M(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),R(Hl.div,{...e,ref:a})},`DismissableLayerBranch`));function ru(){let e=i(eu),[t,n]=N(null);return M(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Yl(ru,`useDismissableLayerSurface`);var iu=Yl(()=>!0,`IS_TRUE`);function au(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=iu}=t,s=ql(e),c=P(!1),l=P(!1),u=P(new Map),d=P(()=>{});return M(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Yl(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Yl(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Yl(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Yl(p,`handleInteractionBubble`);let m=Yl(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||cu(Zl,s,p,{discrete:!0})};if(Yl(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Yl(()=>c.current=!0,`onPointerDownCapture`)}}Yl(au,`usePointerDownOutside`);function ou(e,t=globalThis?.document){let n=ql(e),r=P(!1);return M(()=>{let e=Yl(e=>{e.target&&!r.current&&cu(Ql,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Yl(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Yl(()=>r.current=!1,`onBlurCapture`)}}Yl(ou,`useFocusOutside`);function su(){let e=new CustomEvent(Xl);document.dispatchEvent(e)}Yl(su,`dispatchUpdate`);function cu(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ul(i,a):i.dispatchEvent(a)}Yl(cu,`handleAndDispatchCustomEvent`),T();var lu=Object.defineProperty,uu=x(((e,t)=>lu(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=N(!1);Tl(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?D(R(Hl.div,{...r,ref:t}),o):null},`Portal`));T();var du=Object.defineProperty,fu=(e,t)=>du(e,`name`,{value:t,configurable:!0});function pu(e,t){return f((e,n)=>t[e][n]??e,e)}fu(pu,`useStateMachine`);var mu=fu(e=>{let{present:t,children:n}=e,r=hu(t),i=typeof n==`function`?n({present:r.isPresent}):E.only(n),a=_u(r.ref,yu(i));return typeof n==`function`||r.isPresent?y(i,{ref:a}):null},`Presence`);function hu(e){let[t,r]=N(),i=P(null),a=P(e),o=P(`none`),s=P(void 0),[c,l]=pu(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return M(()=>{c===`mounted`?(o.current=s.current??vu(i.current),s.current=void 0):o.current=`none`},[c]),Tl(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=vu(t);e?(s.current=i,l(`MOUNT`)):i===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,l]),Tl(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=fu(r=>{let o=vu(i.current).includes(CSS.escape(r.animationName));if(r.target===t&&o&&(l(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=fu(e=>{e.target===t&&(o.current=vu(i.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:n(e=>{if(e){let t=getComputedStyle(e);i.current=t,s.current=vu(t)}else i.current=null;r(e)},[])}}fu(hu,`usePresence`);function gu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}fu(gu,`setRef`);function _u(...e){let t=P(e);return t.current=e,n(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=gu(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():gu(n[e],null)}}},[])}fu(_u,`useStableComposedRefs`);function vu(e){return e?.animationName||`none`}fu(vu,`getAnimationName`);function yu(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}fu(yu,`getElementRef`),T();var bu=Object.defineProperty,xu=(e,t)=>bu(e,`name`,{value:t,configurable:!0}),Su=v.useEffectEvent,Cu=v.useInsertionEffect;function wu(e){if(typeof Su==`function`)return Su(e);let t=P(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Cu==`function`?Cu(()=>{t.current=e}):Tl(()=>{t.current=e}),l(()=>((...e)=>t.current?.(...e)),[])}xu(wu,`useEffectEvent`),T();var Tu=Object.defineProperty,Eu=(e,t)=>Tu(e,`name`,{value:t,configurable:!0}),Du=v.useInsertionEffect||Tl;function Ou({prop:e,defaultProp:t,onChange:r=Eu(()=>{},`onChange`),caller:i}){let[a,o,s]=ku({defaultProp:t,onChange:r}),c=e!==void 0;return[c?e:a,n(t=>{if(c){let n=Au(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}Eu(Ou,`useControllableState`);function ku({defaultProp:e,onChange:t}){let[n,r]=N(e),i=P(n),a=P(t);return Du(()=>{a.current=t},[t]),M(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Eu(ku,`useUncontrolledState`);function Au(e){return typeof e==`function`}Eu(Au,`isFunction`);var ju=Symbol(`RADIX:SYNC_STATE`);function Mu(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,u=wu(o),d=[{...n,state:a}];r&&d.push(r);let[p,m]=f((t,n)=>{if(n.type===ju)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&u(r.state),r},...d),h=p.state,g=P(h);M(()=>{g.current!==h&&(g.current=h,c||u(h))},[h,g,c]);let _=l(()=>i===void 0?p:{...p,state:i},[p,i]);return M(()=>{c&&!Object.is(i,p.state)&&m({type:ju,state:i})},[i,p.state,c]),[_,m]}Eu(Mu,`useControllableStateReducer`),T();var Nu=Object.defineProperty,Pu=(e,t)=>Nu(e,`name`,{value:t,configurable:!0}),Fu=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Iu=x(Pu(function(e,t){return R(Hl.span,{...e,ref:t,style:{...Fu,...e.style}})},`VisuallyHidden`)),Lu=t({Action:()=>yd,Close:()=>xd,Description:()=>_d,Provider:()=>Qu,Root:()=>dd,Title:()=>gd,Toast:()=>dd,ToastAction:()=>yd,ToastClose:()=>xd,ToastDescription:()=>_d,ToastProvider:()=>Qu,ToastTitle:()=>gd,ToastViewport:()=>rd,Viewport:()=>rd,createToastScope:()=>Ju});T();var Ru=Object.defineProperty,zu=(e,t)=>Ru(e,`name`,{value:t,configurable:!0}),Bu=v.startTransition||(()=>void 0),Vu=`ToastProvider`,[Hu,Uu,Wu]=Ol(`Toast`),Gu={Up:`up`,Down:`down`,Left:`left`,Right:`right`},Ku={Foreground:`foreground`,Background:`background`},[qu,Ju]=al(`Toast`,[Wu]),[Yu,Xu]=qu(Vu);function Zu(e){typeof Bu==`function`?Bu(e):e()}zu(Zu,`scheduleUpdate`);var Qu=zu(e=>{let{__scopeToast:t,label:r=`Notification`,duration:i=5e3,swipeDirection:a=Gu.Right,swipeThreshold:o=50,announcerContainer:s,children:c}=e,[l,u]=N(null),[d,f]=N(0),p=P(!1),m=n(e=>{Zu(()=>u(e))},[]),h=n(()=>{Zu(()=>f(e=>e+1))},[]),g=n(()=>{Zu(()=>f(e=>e-1))},[]);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Vu}\`. Expected non-empty \`string\`.`),R(Hu.Provider,{scope:t,children:R(Yu,{scope:t,label:r,duration:i,swipeDirection:a,swipeThreshold:o,toastCount:d,viewport:l,onViewportChange:m,onToastAdd:h,onToastRemove:g,isClosePausedRef:p,announcerContainer:s,children:c})})},`ToastProvider`),$u=`ToastViewport`,ed=[`F8`],td=`toast.viewportPause`,nd=`toast.viewportResume`,rd=x(zu(function(e,t){let{__scopeToast:r,hotkey:i=ed,label:a=`Notifications ({hotkey})`,...o}=e,s=Xu($u,r),c=Uu(r),l=P(null),u=P(null),d=P(null),f=P(null),p=tl(t,f,s.onViewportChange),m=i.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),h=s.toastCount>0;M(()=>{let e=zu(e=>{i.length!==0&&i.every(t=>e[t]||e.code===t)&&f.current?.focus()},`handleKeyDown`);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),M(()=>{let e=l.current,t=f.current;if(h&&e&&t){let n=zu(()=>{if(!s.isClosePausedRef.current){let e=new CustomEvent(td);t.dispatchEvent(e),s.isClosePausedRef.current=!0}},`handlePause`),r=zu(()=>{if(s.isClosePausedRef.current){let e=new CustomEvent(nd);t.dispatchEvent(e),s.isClosePausedRef.current=!1}},`handleResume`),i=zu(t=>{e.contains(t.relatedTarget)||r()},`handleFocusOutResume`),a=zu(()=>{e.contains(document.activeElement)||r()},`handlePointerLeaveResume`);return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[h,s.isClosePausedRef]);let g=n(({tabbingDirection:e})=>{let t=c().map(t=>{let n=t.ref.current,r=[n,...Od(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[c]);return M(()=>{let e=f.current;if(e){let t=zu(t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){u.current?.focus();return}let i=g({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);kd(i.slice(a+1))?t.preventDefault():r?u.current?.focus():d.current?.focus()}},`handleKeyDown`);return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[c,g]),R(nu,{ref:l,role:`region`,"aria-label":a.replace(`{hotkey}`,m),tabIndex:-1,style:{pointerEvents:h?void 0:`none`},children:[h&&R(ad,{ref:u,onFocusFromOutsideViewport:()=>{kd(g({tabbingDirection:`forwards`}))}}),R(Hu.Slot,{scope:r,children:R(Hl.ol,{tabIndex:-1,...o,ref:p})}),h&&R(ad,{ref:d,onFocusFromOutsideViewport:()=>{kd(g({tabbingDirection:`backwards`}))}})]})},`ToastViewport`)),id=`ToastFocusProxy`,ad=x(zu(function(e,t){let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=Xu(id,n);return R(Iu,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})},`ToastFocusProxy`)),od=`Toast`,sd=`toast.swipeStart`,cd=`toast.swipeMove`,ld=`toast.swipeCancel`,ud=`toast.swipeEnd`,dd=x(zu(function(e,t){let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Ou({prop:r,defaultProp:i??!0,onChange:a,caller:od});return R(mu,{present:n||s,children:R(md,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:ql(e.onPause),onResume:ql(e.onResume),onSwipeStart:Kc(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:Kc(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:Kc(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:Kc(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})},`Toast`)),[fd,pd]=qu(od,{onClose(){}}),md=x(zu(function(e,t){let{__scopeToast:r,type:i=Ku.Foreground,duration:a,open:o,onClose:s,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:h,...g}=e,_=Xu(od,r),v=Uu(r),[y,b]=N(null),x=tl(t,b),S=P(null),w=P(null),T=a||_.duration,E=P(0),O=P(T),k=P(0),{onToastAdd:A,onToastRemove:j}=_,F=ql(()=>{y?.contains(document.activeElement)&&_.viewport?.focus(),s()}),I=n(e=>{e&&e!==1/0&&(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout(F,e))},[F]);M(()=>{let e=_.viewport;if(e){let t=zu(()=>{I(O.current),d?.()},`handleResume`),n=zu(()=>{let e=new Date().getTime()-E.current;O.current-=e,window.clearTimeout(k.current),u?.()},`handlePause`);return e.addEventListener(td,n),e.addEventListener(nd,t),()=>{e.removeEventListener(td,n),e.removeEventListener(nd,t)}}},[_.viewport,T,u,d,I]),M(()=>{O.current=T,o&&!_.isClosePausedRef.current&&I(T)},[o,T,_.isClosePausedRef,I]),M(()=>()=>{window.clearTimeout(k.current)},[]),M(()=>(A(),()=>j()),[A,j]);let L=l(()=>y?Cd(y):null,[y]);return _.viewport?R(C,{children:[L&&R(hd,{__scopeToast:r,role:`status`,"aria-live":i===Ku.Foreground?`assertive`:`polite`,children:L}),R(fd,{scope:r,onClose:F,children:D(R(Hu.ItemSlot,{scope:r,children:R(tu,{asChild:!0,onEscapeKeyDown:Kc(c,e=>{v().some(t=>t.ref.current?.contains(e.target))||F()}),children:R(Hl.li,{tabIndex:0,"data-state":o?`open`:`closed`,"data-swipe-direction":_.swipeDirection,...g,ref:x,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:Kc(e.onKeyDown,e=>{e.key===`Escape`&&(c?.(e.nativeEvent),e.nativeEvent.defaultPrevented||F())}),onPointerDown:Kc(e.onPointerDown,e=>{e.button===0&&(S.current={x:e.clientX,y:e.clientY})}),onPointerMove:Kc(e.onPointerMove,e=>{if(!S.current)return;let t=e.clientX-S.current.x,n=e.clientY-S.current.y,r=!!w.current,i=[`left`,`right`].includes(_.swipeDirection),a=[`left`,`up`].includes(_.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(w.current=l,wd(cd,p,u,{discrete:!1})):Td(l,_.swipeDirection,c)?(w.current=l,wd(sd,f,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(S.current=null)}),onPointerUp:Kc(e.onPointerUp,e=>{let t=w.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),w.current=null,S.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Td(t,_.swipeDirection,_.swipeThreshold)?wd(ud,h,r,{discrete:!0}):wd(ld,m,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null},`ToastImpl`)),hd=zu(e=>{let{__scopeToast:t,children:n,...r}=e,i=Xu(od,t),[a,o]=N(!1),[s,c]=N(!1);return Ed(()=>o(!0)),M(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:R(uu,{asChild:!0,container:i.announcerContainer||void 0,children:R(Iu,{...r,children:a&&R(C,{children:[i.label,` `,n]})})})},`ToastAnnounce`),gd=x(zu(function(e,t){let{__scopeToast:n,...r}=e;return R(Hl.div,{...r,ref:t})},`ToastTitle`)),_d=x(zu(function(e,t){let{__scopeToast:n,...r}=e;return R(Hl.div,{...r,ref:t})},`ToastDescription`)),vd=`ToastAction`,yd=x(zu(function(e,t){let{altText:n,...r}=e;return n.trim()?R(Sd,{altText:n,asChild:!0,children:R(xd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${vd}\`. Expected non-empty \`string\`.`),null)},`ToastAction`)),bd=`ToastClose`,xd=x(zu(function(e,t){let{__scopeToast:n,...r}=e,i=pd(bd,n);return R(Sd,{asChild:!0,children:R(Hl.button,{type:`button`,...r,ref:t,onClick:Kc(e.onClick,i.onClose)})})},`ToastClose`)),Sd=x(zu(function(e,t){let{__scopeToast:n,altText:r,...i}=e;return R(Hl.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})},`ToastAnnounceExclude`));function Cd(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Dd(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n){if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Cd(e))}}}),t}zu(Cd,`getAnnounceTextContent`);function wd(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ul(i,a):i.dispatchEvent(a)}zu(wd,`handleAndDispatchCustomEvent`);var Td=zu((e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===Gu.Left||t===Gu.Right?a&&r>n:!a&&i>n},`isDeltaInDirection`);function Ed(e=()=>{}){let t=ql(e);Tl(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}zu(Ed,`useNextFrame`);function Dd(e){return e.nodeType===e.ELEMENT_NODE}zu(Dd,`isHTMLElement`);function Od(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:zu(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}zu(Od,`getTabbableCandidates`);function kd(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}zu(kd,`focusFirst`);var Ad=Lu,jd=({className:e,...t})=>R(rd,{className:G(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:inset-e-0 sm:top-auto sm:bottom-0 sm:flex-col md:max-w-105`,e),...t}),Md=Hc(`group data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-xl p-4 pe-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all [corner-shape:squircle] data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none supports-[corner-shape:squircle]:rounded-3xl`,{variants:{variant:{error:`bg-error/40 text-foreground`,success:`bg-success/30 text-foreground`,default:`bg-card/80 text-foreground`}},defaultVariants:{variant:`default`}}),Nd=({className:e,variant:t,...n})=>R(dd,{className:G(Md({variant:t}),e),...n}),Pd=({className:e,...t})=>R(xd,{className:G(`absolute inset-e-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground/80 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.error]:text-red-300 group-[.error]:focus:ring-red-400 group-[.error]:focus:ring-offset-red-600 group-[.error]:hover:text-red-50`,e),"toast-close":``,...t,children:R(Lc,{className:`size-5`})}),Fd=({className:e,...t})=>R(gd,{className:G(`font-semibold text-sm [&+div]:text-xs`,e),...t}),Id=({className:e,...t})=>R(_d,{className:G(`overflow-scroll text-sm opacity-90`,e),...t}),Ld=()=>{let{toasts:e}=de();return R(Ad.Provider,{children:[e.map(({id:e,title:t,description:n,action:r,...i})=>R(Nd,{...i,children:[R(`div`,{className:`grid gap-1`,children:[t&&R(Fd,{children:t}),n&&R(Id,{children:n})]}),r,R(Pd,{})]},e)),R(jd,{})]})};T();var Rd=c({});T();function zd(e){let t=P(null);return t.current===null&&(t.current=e()),t.current}var Bd=typeof window<`u`;T();var Vd=Bd?F:M;T();var Hd=c(null);function Ud(e,t){e.indexOf(t)===-1&&e.push(t)}function Wd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Gd=(e,t,n)=>n>t?t:n<e?e:n,Kd={},qd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Jd=e=>typeof e==`object`&&!!e,Yd=e=>/^0[^.\s]+$/u.test(e);function Xd(e){let t;return()=>(t===void 0&&(t=e()),t)}var Zd=e=>e,Qd=(...e)=>e.reduce((e,t)=>n=>t(e(n))),$d=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ef=class{constructor(){this.subscriptions=[]}add(e){return Ud(this.subscriptions,e),()=>this.remove(e)}remove(e){Wd(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},tf=e=>e*1e3,nf=e=>e/1e3,rf=(e,t)=>t?1e3/t*e:0,af=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function of(e,t,n,r){return e===t&&n===r?Zd:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=af(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(af(s+1e-7,e,n)-i-r)}return af(s,t,r)}}var sf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cf=e=>t=>1-e(1-t),lf=of(.33,1.53,.69,.99),uf=cf(lf),df=sf(uf),ff=e=>e>=1?1:(e*=2)<1?.5*uf(e):.5*(2-2**(-10*(e-1))),pf=e=>1-Math.sin(Math.acos(e)),mf=cf(pf),hf=sf(pf),gf=of(.42,0,1,1),_f=of(0,0,.58,1),vf=of(.42,0,.58,1),yf=e=>Array.isArray(e)&&typeof e[0]!=`number`,bf=e=>Array.isArray(e)&&typeof e[0]==`number`,xf={linear:Zd,easeIn:gf,easeInOut:vf,easeOut:_f,circIn:pf,circInOut:hf,circOut:mf,backIn:uf,backInOut:df,backOut:lf,anticipate:ff},Sf=e=>typeof e==`string`,Cf=e=>{if(bf(e)){let[t,n,r,i]=e;return of(t,n,r,i)}return Sf(e)?xf[e]:e},wf={delta:0,timestamp:0,isProcessing:!1},Tf;function Ef(){Tf=void 0}var Df={now:()=>(Tf===void 0&&Df.set(wf.isProcessing||Kd.useManualTiming?wf.timestamp:performance.now()),Tf),set:e=>{Tf=e,queueMicrotask(Ef)}},Of=e=>Math.round(e*1e5)/1e5,kf=e=>t=>typeof t==`string`&&t.startsWith(e),Af=kf(`--`),jf=kf(`var(--`),Mf=e=>jf(e)?Nf.test(e.split(`/*`)[0].trim()):!1,Nf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pf(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Ff={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},If={...Ff,transform:e=>Gd(0,1,e)},Lf={...Ff,default:1},Rf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zf(e){return e==null}var Bf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vf=(e,t)=>n=>!!(typeof n==`string`&&Bf.test(n)&&n.startsWith(e)||t&&!zf(n)&&Object.prototype.hasOwnProperty.call(n,t)),Hf=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Rf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Uf=e=>Gd(0,255,e),Wf={...Ff,transform:e=>Math.round(Uf(e))},Gf={test:Vf(`rgb`,`red`),parse:Hf(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Wf.transform(e)+`, `+Wf.transform(t)+`, `+Wf.transform(n)+`, `+Of(If.transform(r))+`)`},Kf=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function qf(e){let t=e.length>5?2:1,n=Kf(e,3,t);return{red:parseInt(Kf(e,0,t),16),green:parseInt(Kf(e,1,t),16),blue:parseInt(Kf(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var Jf={test:Vf(`#`),parse:qf,transform:Gf.transform},Yf=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xf=Yf(`deg`),Zf=Yf(`%`),q=Yf(`px`),Qf=Yf(`vh`),$f=Yf(`vw`),ep={...Zf,parse:e=>Zf.parse(e)/100,transform:e=>Zf.transform(e*100)},tp={test:Vf(`hsl`,`hue`),parse:Hf(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Zf.transform(Of(t))+`, `+Zf.transform(Of(n))+`, `+Of(If.transform(r))+`)`},np={test:e=>Gf.test(e)||Jf.test(e)||tp.test(e),parse:e=>Gf.test(e)?Gf.parse(e):tp.test(e)?tp.parse(e):Jf.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Gf.transform(e):tp.transform(e),getAnimatableNone:e=>{let t=np.parse(e);return t.alpha=0,np.transform(t)}},rp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,ip=new RegExp(Rf.source),ap=new RegExp(rp.source,`i`);function op(e){return isNaN(e)&&typeof e==`string`&&(ip.test(e)||ap.test(e))}var sp=`number`,cp=`color`,lp=`var`,up=`var(`,dp="${}",fp=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function pp(e){let t=e.toString();return ip.test(t)||ap.test(t)}function mp(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(fp,e=>(np.test(e)?(r.color.push(a),i.push(cp),n.push(np.parse(e))):e.startsWith(up)?(r.var.push(a),i.push(lp),n.push(e)):(r.number.push(a),i.push(sp),n.push(parseFloat(e))),++a,dp)).split(dp),indexes:r,types:i}}function hp(e){return mp(e).values}function gp({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===sp?Of(r[a]):e===cp?np.transform(r[a]):r[a]}return i}}function _p(e){return gp(mp(e))}var vp=e=>typeof e==`number`?0:np.test(e)?np.getAnimatableNone(e):e,yp=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:vp(e);function bp(e){let t=mp(e);return gp(t)(t.values.map((e,n)=>yp(e,t.split[n])))}var xp={test:op,parse:hp,createTransformer:_p,getAnimatableNone:bp};function Sp(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Cp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Sp(s,r,e+1/3),a=Sp(s,r,e),o=Sp(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function wp(e,t){return n=>n>0?t:e}var Tp=(e,t,n)=>e+(t-e)*n,Ep=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Dp=[Jf,Gf,tp],Op=e=>Dp.find(t=>t.test(e));function kp(e){let t=Op(e);if(!t)return!1;let n=t.parse(e);return t===tp&&(n=Cp(n)),n}var Ap=(e,t)=>{let n=kp(e),r=kp(t);if(!n||!r)return wp(e,t);let i={...n};return e=>(i.red=Ep(n.red,r.red,e),i.green=Ep(n.green,r.green,e),i.blue=Ep(n.blue,r.blue,e),i.alpha=Tp(n.alpha,r.alpha,e),Gf.transform(i))},jp=new Set([`none`,`hidden`]);function Mp(e,t){return jp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Np(e,t){return n=>Tp(e,t,n)}function Pp(e){return typeof e==`number`?Np:typeof e==`string`?Mf(e)?wp:np.test(e)?Ap:Rp:Array.isArray(e)?Fp:typeof e==`object`?np.test(e)?Ap:Ip:wp}function Fp(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Pp(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ip(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Pp(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Lp(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Rp=(e,t)=>{let n=mp(e),r=mp(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?jp.has(e)&&!r.values.length||jp.has(t)&&!n.values.length?Mp(e,t):Qd(Fp(Lp(n,r),r.values),gp(r)):wp(e,t)},zp=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Bp(e,t){let n=zp.exec(e);if(!n)return;let r=zp.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Of(Tp(a,o,e))+i}function Vp(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Tp(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Bp(e,t);if(n)return n}return Pp(e)(e,t)}var Hp=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Up(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var Wp=40;function Gp(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Hp.reduce((e,t)=>(e[t]=Up(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Kd.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Wp),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Hp.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Hp.length;t++)o[Hp[t]].cancel(e)},state:n,steps:o}}var{schedule:Kp,cancel:qp,steps:Jp}=Gp(typeof requestAnimationFrame<`u`?requestAnimationFrame:Zd,!0,wf),Yp=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Kp.update(t,e),stop:()=>qp(t),now:()=>wf.isProcessing?wf.timestamp:Df.now()}},Xp=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Zp=2e4;function Qp(e,t=50,n=Zp,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function $p(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(Qp(o),Zp);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:nf(s)}}var em=100,tm=10,nm=1,rm=800,im=.3,am=.3,om=.01,sm=2,cm=.005,lm=.5,um=.01,dm=10,fm=.05,pm=e=>e<0?1/Math.max(1+e,fm):Math.max(1-e,fm);function mm(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return _m(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function hm(e,t){return e*Math.sqrt(1-t*t)}var gm=12;function _m(e,t,n){let r=n;for(let n=1;n<gm;n++)r-=e(r)/t(r);return r}var vm=.001;function ym({duration:e=rm,bounce:t=im}){let n,r,i=pm(t);e=Gd(um,dm,nf(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=hm(t,i),o=Math.exp(-r);return vm-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=hm(t*t,i);return(-n(t)+vm>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=_m(n,r,a),s=o*mm(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:tf(e)}}var bm=(e,t)=>(t?e>=0:e>0)&&e<1/0;function xm(e,t){if(bm(e,t))return e}function Sm(e){let t=xm(e.stiffness),n=xm(e.damping,!0),r=xm(e.mass),i={...e,stiffness:t??em,damping:n??tm,mass:r??nm,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=pm(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*mm(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,ym(i)),i.isResolvedFromDuration=!0;bm(i.stiffness)&&bm(i.damping,!0)||(i.stiffness=em,i.damping=tm)}return i}function Cm(e=am,t=im){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Sm({...n}),f=e=>d?0:-nf(e),p=s/(2*Math.sqrt(o*c)),m=nf(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?om:sm),g.restDelta=n.restDelta||(e?cm:lm)};_();let v,y,b;if(p<1){let e=hm(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>tf(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=tf(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(Qp(S),Zp),t=Xp(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var wm=Object.assign(Cm,{applyToOptions:e=>{let t=$p(e,100,Cm);return e.ease=t.ease,e.duration=tf(t.duration),e.type=`keyframes`,e}});function Tm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=wm({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Em(e,t,n){let r=[],i=Kd.mix||Vp,a=e.length-1;for(let o=0;o<a;o++){let a=n?.(e[o],e[o+1])||i(e[o],e[o+1]);t&&(a=Qd(Array.isArray(t)?t[o]||Zd:t,a)),r.push(a)}return r}function Dm(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Em(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=$d(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Gd(e[0],e[a-1],t)):l}function Om(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=$d(0,t,r);e.push(Tp(n,1,i))}}function km(e){let t=[0];return Om(t,e.length-1),t}function Am(e,t){return e.map(e=>e*t)}function jm(e,t){return e.map(()=>t||vf).splice(0,e.length-1)}function Mm({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=yf(r)?r.map(Cf):Cf(r)||vf,s={done:!1,value:t[0]};if(!a&&t.length===2&&!Array.isArray(o)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,i=n===r?void 0:(Kd.mix||Vp)(n,r);return{calculatedDuration:e,next:t=>(s.value=i?i(o(e>0?Gd(0,1,t/e):1)):r,s.done=t>=e,s)}}let c=Dm(Am(n&&n.length===t.length?n:km(t),e),t,{ease:Array.isArray(o)?o:jm(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=c(t),s.done=t>=e,s)}}var Nm=5;function Pm(e,t,n){let r=Math.max(t-Nm,0);return rf(n-e(r),t-r)}function Fm(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Pm(t=>e.next(t).value,t,e.next(t).value)}var Im=e=>e!==null;function Lm(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Im),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Rm={decay:Tm,inertia:Tm,tween:Mm,keyframes:Mm,spring:wm};function zm(e){typeof e.type==`string`&&(e.type=Rm[e.type])}var Bm=40,Vm=(e,t)=>t-e>Bm&&!Kd.useManualTiming?t:e;function Hm(e,t){return{kind:e,animation:t,timestamp:Df.now(),frameTimestamp:wf.timestamp,frameIsProcessing:wf.isProcessing}}function Um(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Hm(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Wm(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Hm(`layout-animation-start`,e),node:t})}catch{}}var Gm=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Km=e=>e/100,qm=e=>Math.round(e*1e4)/1e4,Jm=class extends Gm{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Df.now()&&this.tick(Df.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Um(this,this.options)}initAnimation(){let{options:e}=this;zm(e);let{type:t=Mm,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Mm;this.mixKeyframes=void 0,s!==Mm&&typeof o[0]!=`number`&&(this.mixKeyframes=Qd(Km,e.mixer?.(o[0],o[1])||Vp(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Qp(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Vm(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==Tm&&(f.value=Lm(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??qm((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==Tm?Lm(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=Gd(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return nf(this.calculatedDuration)}get iterationDuration(){return this.duration+nf(this.options.delay??0)}get time(){return nf(this.currentTime)}set time(e){e=tf(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Fm(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Df.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=nf(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Yp,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Df.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Ym=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Xm(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Rf)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Ym.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Zm=/\b([a-z-]*)\(.*?\)/gu,Qm={...xp,getAnimatableNone:e=>{let t=e.match(Zm);return t?t.map(Xm).join(` `):e}},$m={...xp,getAnimatableNone:e=>{let t=xp.parse(e);return xp.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},eh={...Ff,transform:Math.round},th={rotate:Xf,pathRotation:Xf,rotateX:Xf,rotateY:Xf,rotateZ:Xf,scale:Lf,scaleX:Lf,scaleY:Lf,scaleZ:Lf,skew:Xf,skewX:Xf,skewY:Xf,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:If,originX:ep,originY:ep,originZ:q},nh={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...th,zIndex:eh,fillOpacity:If,strokeOpacity:If,numOctaves:eh},rh={...nh,color:np,backgroundColor:np,outlineColor:np,fill:np,stroke:np,borderColor:np,borderTopColor:np,borderRightColor:np,borderBottomColor:np,borderLeftColor:np,filter:Qm,WebkitFilter:Qm,mask:$m,WebkitMask:$m},ih=e=>rh[e],ah=new Set([Qm,$m]);function oh(e,t){let n=ih(e);return ah.has(n)||(n=xp),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function sh(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ch=e=>e*180/Math.PI,lh=e=>dh(ch(Math.atan2(e[1],e[0]))),uh={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:lh,rotateZ:lh,skewX:e=>ch(Math.atan(e[1])),skewY:e=>ch(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dh=e=>(e%=360,e<0&&(e+=360),e),fh=lh,ph=e=>Math.hypot(e[0],e[1]),mh=e=>Math.hypot(e[4],e[5]),hh={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ph,scaleY:mh,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(ph(e)+mh(e))/2,rotateX:e=>dh(ch(Math.atan2(e[6],e[5]))),rotateY:e=>dh(ch(Math.atan2(-e[2],e[0]))),rotateZ:fh,rotate:fh,skewX:e=>ch(Math.atan(e[4])),skewY:e=>ch(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gh(e){return+!!e.includes(`scale`)}function _h(e,t){if(!e||e===`none`)return gh(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return gh(t);let r=(n[1]?hh:uh)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var vh=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return _h(n,t)},yh=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],bh=new Set([...yh,`pathRotation`]),xh=e=>e===Ff||e===q,Sh=new Set([`x`,`y`,`z`]),Ch=yh.filter(e=>!Sh.has(e));function wh(e){let t=[];return Ch.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Th=new Set([`bottom`,`right`]);function Eh(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Dh=({transform:e})=>_h(e,`x`),Oh=({transform:e})=>_h(e,`y`),kh={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Eh(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Eh(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:Dh,y:Oh,translateX:Dh,translateY:Oh},Ah=new Set,jh=!1,Mh=!1,Nh=!1;function Ph(){if(Mh){let e=[],t=new Set,n=new Set;Ah.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Th.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=wh(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Mh=!1,jh=!1,Ah.forEach(e=>e.complete(Nh)),Ah.clear()}function Fh(){Ah.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mh=!0)})}function Ih(){Nh=!0,Fh(),Ph(),Nh=!1}function Lh(e,t,n){if(typeof e==`string`){if(qd(e)||Yd(e))return parseFloat(e);if(!xp.test(e)&&xp.test(n))return oh(t,n)}return e??void 0}var Rh=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Ah.add(this),jh||(jh=!0,Kp.read(Fh),Kp.resolveKeyframes(Ph))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Lh(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}sh(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ah.delete(this)}cancel(){this.state===`scheduled`&&(Ah.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},zh=e=>e.startsWith(`--`);function Bh(e,t,n){zh(t)?e.style.setProperty(t,n):e.style[t]=n}var Vh={};function Hh(e,t){let n=Xd(e);return()=>Vh[t]??n()}var Uh=Hh(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Wh=Hh(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Gh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kh={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Gh([0,.65,.55,1]),circOut:Gh([.55,0,1,.45]),backIn:Gh([.31,.01,.66,-.59]),backOut:Gh([.33,1.53,.69,.99])};function qh(e,t){if(e)return typeof e==`function`?Wh()?Xp(e,t):`ease-out`:bf(e)?Gh(e):Array.isArray(e)?e.map(e=>qh(e,t)||Kh.easeOut):Kh[e]}function Jh(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=qh(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Yh(e){return typeof e==`function`&&`applyToOptions`in e}function Xh({type:e,...t}){return Yh(e)&&Wh()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Zh=class extends Gm{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=Xh(e);this.animation=Jh(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Lm(r,this.options,o,this.speed);this.updateMotionValue?.(e),Bh(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Um(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return nf(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+nf(e)}get time(){return nf(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tf(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Uh()?(this.animation.timeline=e,t?.(this.animation),Zd):n(this)}},Qh={anticipate:ff,backInOut:df,circInOut:hf};function $h(e){return e in Qh}function eg(e){typeof e.ease==`string`&&$h(e.ease)&&(e.ease=Qh[e.ease])}var tg=class extends Zh{constructor(e){eg(e),zm(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Df.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new Jm({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?Gd(0,10,a):0,s=this.sample(a);n&&r&&Bh(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},ng=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(xp.test(e)||e===`0`)&&!e.startsWith(`url(`));function rg(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ig(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ng(i,t),s=ng(a,t);return!o||!s?!1:rg(e)||(n===`spring`||Yh(n))&&r}function ag(e){e.duration=0,e.type=`keyframes`}var og=new Set([`opacity`,`clipPath`,`filter`,`transform`]),sg=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function cg(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&sg.test(e[t]))return!0;return!1}var lg=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),ug=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),dg=()=>!Kd.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function fg(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(og.has(n)||ug.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return dg()&&(og.has(n)||ug.has(n)&&cg(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!lg(e)}var pg=(e,t)=>t&&typeof e==`number`?t.transform(e):e,mg={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},hg=yh.length,gg={},_g=(e,t,n=pg(t,th[e]))=>(gg[e]||(gg[e]=(mg[e]||e)+`(`))+n+`)`,vg=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function yg(e,t,n){let r=``;for(let i=0;i<hg;i++){let a=yh[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=pg(o,nh[a]));vg(a,o)||(r+=_g(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=_g(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var bg=new WeakMap,xg=200,Sg=.001,Cg=.1,wg=.001,Tg=100,Eg=e=>/^(linear|ease(In|Out|InOut))$/.test(e),Dg=(e,t)=>Math.abs(e-t)<=Sg,Og=(e,t)=>e-t,kg=(e,t,n)=>km(Array(n+1)).map(n=>Tp(e,t,n)),Ag=e=>e.motionValue.owner,jg=e=>bg.get(e),Mg=({state:e})=>e===`idle`||e===`finished`,Ng=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),Pg=({name:e,motionValue:t})=>e&&yh.includes(e)&&t?.owner?.current instanceof HTMLElement&&dg()&&Wh();function Fg(e){let t=Ag(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(Ng(t,`transform`)||`none`)===`none`&&!Ng(t,`pathRotation`)&&!t.projection?.isProjecting()&&!lg(e)}var Ig=class extends Jm{constructor(e){let t=Ag(e).current,{driver:n=Yp}=e,r,i=Fg(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=jg(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=jg(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;let{stop:a}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),a()}}get group(){return jg(Ag(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(Df.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=bf(n)?Gh(n):Eg(n)&&Kh[n];if(o&&!i&&!r&&e.length===2&&t===Mm&&this.holdTime===null){let e=this.startTime+a/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,times:u,keyframes:d,type:f}=a,p=(f||Mm)===Mm?u||km(d):[0,1],m=n+o/r,h=[];if(this.holdTime!==null||!(i>0))return h;for(let n=Math.max(0,Math.floor((e-m)*r/i));n<=s;n++){let a=m+n*i/r;if(a>t)break;for(let o of p){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&h.push(s)}}return h}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=Df.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||Lg(Ag(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(Df.now())}get time(){return this.isAccelerated()?nf(Gd(0,this.totalDuration,this.at(Df.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}};function Lg(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p=e=>{for(let t of n)if(t.name===e)return!0},m=(t,n)=>{let o={};for(let s of t===void 0?yh:a){let a=r.get(s),c=t===void 0?Ng(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},h=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&vg(r,i)||(n+=_g(r,i)+` `)}return(t?n.trim():n)||`none`},g=(e,t)=>h(m(e,t)),_=(e=m())=>{t.style.transform=h(e,!0)},v=(e=!0)=>{e&&_(),s.forEach(({animation:e})=>e.cancel()),s=[]},y=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),b=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=Df.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(e.cancel(),s=s.filter(e=>e!==r)),A.schedule(!1)}),e.oncancel=()=>s.includes(r)&&A.demote(),s.push(r)},x=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},S=(e,t,n,r)=>{let i=Math.min(xg,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=kg(t,n,i).concat(r).sort(Og),o=e=>$d(t,n,e),s,c;for(let n of e){let e=n.numberAt(t),r=a.map(t=>n.numberAt(t)-e),i=r[r.length-1],o=r.some(e=>Math.abs(e)*Sg>Math.abs(i))?0:i,l=r.map(e=>o?e/o:e);if(o&&!s)s=l,c=t=>(n.numberAt(t)-e)/o;else if(l.some((e,t)=>!Dg(e,o&&s[t])))return}if(!s||s.every((e,t)=>Dg(e,o(a[t]))))return`linear`;let l=[],u=(e,t=c(e))=>l.push(qm(t)+` `+qm(o(e)*100)+`%`);return s.forEach((e,t)=>{t&&Math.abs(e-s[t-1])>.2&&x(c,a[t-1],a[t]).forEach(e=>u(e)),u(a[t],e)}),`linear(`+l+`)`},C=(e,t,n,r)=>{let i=[t],a=(t,n)=>e.every(e=>!(Math.abs(e.numberAt((t+n)/2)-(e.numberAt(t)+e.numberAt(n))/2)>(e.name.startsWith(`scale`)?wg:Cg))),o=(t,n,r)=>{if(n-t<1||a(t,n))i.push(n);else if(r<4)o(t,(t+n)/2,r+1),o((t+n)/2,n,r+1);else{for(let r of e)i.push(...x(e=>r.numberAt(e),t,n));i.push(n)}},s=kg(t,n,Math.ceil((n-t)/100));for(let e of r)s.push(e,Math.min(e+.01,n));let c=t;for(let e of s.sort(Og))e>c&&o(c,e,0),c=e;return i.sort(Og)},w=e=>{let t;for(let n of e){let e=n.tween();if(!e||t?.some((t,n)=>n<2?Math.abs(e[n]-t)>1:e[n]!==t))return;t=e}return t},T=(e,t,n,r,i={fill:`both`},a)=>{let o=e.flatMap(e=>e.boundaries(t,n)),s=r||S(e,t,n,o),c=s?[t,n]:C(e,t,n,o),l=c.map(e=>g(e,a)),u={transform:l};return s||(u.offset=c.map(e=>$d(t,n,e))),l.every(e=>e===l[0])&&(_(m(t,a)),u=null),y(u,{...i,duration:n-t,easing:s||`linear`})},E=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),a)e.sync();else{if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=yh.filter(t=>{if(r.has(t))return!0;let n=i[t]=Ng(e,t);return n!==void 0&&!vg(t,n)}),v(!1);let m=!l&&w(d);try{if(m&&m[1]>t){let[e,n,r]=m;b(T(d,e,n,r),e-t,n-e)}else c>t&&(b(T(d,t,c),0,c-t),p.forEach(e=>e<c-1&&b(y(null,{duration:e-t}),0,e-t)));if(l){let e=u+Math.floor((c-u)/l)*l;b(T(f,e,e+l,void 0,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||v(),!0},D=e=>{let t,r=0;for(let i of n){let n=o.get(i);if(!n)return!1;let[a,s,c]=n,l=i.at(e),u=i.timing()[0]===1/0;if(c){if(u&&l===a)continue;return!1}let d=(l-a)/s,f=u?0:i.speed/s;if(t===void 0)t=d,r=f;else if(Math.abs(d-t)>1||f!==r)return!1}if(t===void 0)return!0;if(!s.length)return!1;for(let{offset:e,end:n,isDone:r}of s){let i=t-e;if(n<1/0&&(r?i<n-1:i<0||i>=n))return!1}for(let{animation:n,offset:i,isDone:a}of s){if(a)continue;let o=t-i;r&&n.updatePlaybackRate&&n.playState===`running`&&Math.abs(Number(n.currentTime)-o)<20?n.playbackRate!==r&&n.updatePlaybackRate(r):r?(n.playbackRate=r,n.startTime=e-o/r):(n.startTime=null,n.currentTime=o)}return!0},O=()=>!n.size&&(u=!0,jg(t)===A&&bg.delete(t),A.isJS||v(),!0),k=()=>{let t=Df.now();if(A.isJS||(A.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=Ng(e,n.name),o.has(n)||(c=!0))}),A.isFinishing=!1),l=!1,u||(n.forEach(e=>Mg(e)&&n.delete(e)),O()))return;for(let e of n)if(!e.canAccelerate)return A.demote(!0);A.isJS&&(A.isJS=!1,c=!0,n.forEach(e=>e.js?.stop()));let r=c,a=d;if(c=d=!1,r||!D(t)){if(a){if(t-f<Tg)return A.demote();f=t}if(!E(t))return A.demote()}},A={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,wf.isProcessing?Kp.render(k,!1,!0):queueMicrotask(k)))},release(e){Mg(e)&&n.delete(e),O()||A.schedule(!0)},check(){if(!A.isJS){for(let t in i)if(Ng(e,t)!==i[t]&&!p(t))return A.schedule(!0,!0)}},demote(e){if(!(A.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),A.isJS=!0,o=new Map,v(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return bg.set(t,A),A}var Rg=class extends Gm{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Df.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||Rh;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Df.now();let u=ig(e,i,a,o);u||((Kd.instantAnimations||!s)&&l?.(Lm(e,n,t)),e[0]=e[e.length-1],ag(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&fg(n),p=!f&&Pg(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=Vm(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new tg(n)}catch{m=new Jm(n)}}else m=p?new Ig(n):new Jm(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ih()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}};function zg(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Bg=30,Vg=e=>!isNaN(parseFloat(e)),Hg={current:void 0},Ug=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Df.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Df.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Vg(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new ef)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new ef,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){Kp.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){t&&(this.updatedAt=Df.now(),this.stop()),this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){Hg.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=Df.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bg)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Bg);return rf(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function Wg(e,t){return new Ug(e,t)}function Gg(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Kg(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Gg(n,e)}var qg={type:`spring`,stiffness:500,damping:25,restSpeed:10},Jg=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Yg={type:`keyframes`,duration:.8},Xg={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Zg=(e,{keyframes:t})=>t.length>2?Yg:bh.has(e)?e.startsWith(`scale`)?Jg(t[1]):qg:Xg,Qg=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function $g(e){for(let t in e)if(!Qg.has(t))return!0;return!1}var e_=(e,t,n,r={},i,a)=>o=>{let s=Kg(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=tf(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};$g(s)||Object.assign(u,Zg(e,u)),u.duration&&=tf(u.duration),u.repeatDelay&&=tf(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ag(u),u.delay===0&&(d=!0)),(Kd.instantAnimations||Kd.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,ag(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Lm(u.keyframes,s);if(e!==void 0){Kp.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Jm(u):new Rg(u)},t_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function n_(e){let t=t_.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function r_(e,t,n=1){let[r,i]=n_(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return qd(e)?parseFloat(e):e}return Mf(i)?r_(i,t,n+1):i}function i_(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function a_(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...i_(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function o_(e,t,n){return a_(e.getProps(),t,n,e)}var s_=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,c_=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...yh]),l_=e=>Array.isArray(e);function u_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Wg(n))}function d_(e){return l_(e)?e[e.length-1]||0:e}function f_(e,t){let{transitionEnd:n={},transition:r={},...i}=o_(e,t)||{};i={...i,...n};for(let t in i)u_(e,t,d_(i[t]))}var p_=e=>!!(e&&e.getVelocity);function m_(e){return!!(p_(e)&&e.add)}function h_(e,t){let n=e.getValue(`willChange`);if(m_(n))return n.add(t);if(!n&&Kd.WillChange){let n=new Kd.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var g_=`data-framer-appear-id`;function __(e){return e.props[g_]}var v_=typeof window<`u`;function y_({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function b_(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Gg(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&y_(f,t))continue;let o={delay:n,...Kg(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Kp.update(()=>r.set(i));continue}let p=!1;if(v_&&window.MotionHandoffAnimation){let n=__(e);if(n){let e=window.MotionHandoffAnimation(n,t,Kp);e!==null&&(o.startTime=e,p=!0)}}h_(e,t);let m=l??e.shouldReduceMotion;r.start(e_(t,r,i,m&&c_.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Kp.update(()=>{o&&f_(e,o)});d.length?Promise.all(d).then(t):t()}return d}function x_(e,t,n={}){let r=o_(e,t,s_(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?b_(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(x_(e,t,{...n,delay:r+(typeof o==`function`?0:o)+zg(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function S_(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>x_(e,t,n))):typeof t==`string`?x_(e,t,n):Promise.all(b_(e,o_(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var C_={test:e=>e===`auto`,parse:e=>e},w_=e=>t=>t.test(e),T_=[Ff,q,Zf,Xf,$f,Qf,C_],E_=e=>T_.find(w_(e));function D_(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||Yd(e)}var O_=new Set([`auto`,`none`,`0`]);function k_(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!O_.has(t)&&pp(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=oh(n,i))}var A_=class extends Rh{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(Pf(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Mf(r))){let i=r_(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!c_.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=E_(r),o=E_(i);if(Pf(r)!==Pf(i)&&kh[n])this.needsMeasurement=!0;else if(a!==o){if(xh(a)&&xh(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else kh[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||D_(e[t]))&&n.push(t);n.length&&k_(e,n,t)}measure(){let{element:e,name:t}=this;return kh[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},j_=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function M_(e){return Jd(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function N_(e){return Jd(e)&&`ownerSVGElement`in e}var P_={};function F_(e){return P_.current?.add(e),e}var I_=e=>P_.current?P_.current.bind(e):e;function L_(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:P_.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function R_(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function z_(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(bh.has(e))o=!0;else if(Af(e))i[e]=n;else{let t=pg(n,nh[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=yg(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var B_={offset:`stroke-dashoffset`,array:`stroke-dasharray`},V_={offset:`strokeDashoffset`,array:`strokeDasharray`};function H_(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?B_:V_;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var U_=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function W_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(z_(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of U_)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&H_(d,i,a,o,!1)}function G_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function K_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function q_(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function J_(e){return e===void 0||e===1}function Y_({scale:e,scaleX:t,scaleY:n}){return!J_(e)||!J_(t)||!J_(n)}var X_=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function Z_(e){return Y_(e)||$_(e)||Q_(e)}function Q_(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function $_(e){return ev(e.x)||ev(e.y)}function ev(e){return e&&e!==`0%`}function tv(e,t,n){return n+t*(e-n)}function nv(e,t,n,r,i){return i!==void 0&&(e=tv(e,i,r)),tv(e,n,r)+t}function rv(e,t=0,n=1,r,i){e.min=nv(e.min,t,n,r,i),e.max=nv(e.max,t,n,r,i)}function iv(e,{x:t,y:n}){rv(e.x,t.translate,t.scale,t.originPoint),rv(e.y,n.translate,n.scale,n.originPoint)}var av=.999999999999,ov=1.0000000000001;function sv(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(cv(e.x,-a.scroll.offset.x),cv(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,iv(e,o)),r&&(r.path?.[s]||r)!==a&&Z_(a.latestValues)&&dv(e,a.latestValues,a.layout?.layoutBox));t.x<ov&&t.x>av&&(t.x=1),t.y<ov&&t.y>av&&(t.y=1)}function cv(e,t){e.min+=t,e.max+=t}function lv(e,t,n,r,i=.5){rv(e,t,n,Tp(e.min,e.max,i),r)}function uv(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function dv(e,t,n){let r=n??e;lv(e.x,uv(t.x,r.x),t.scaleX,t.scale,t.originX),lv(e.y,uv(t.y,r.y),t.scaleY,t.scale,t.originY)}function fv(e,t){return G_(q_(e.getBoundingClientRect(),t))}function pv(e,t,n){let r=fv(e,n),{scroll:i}=t;return i&&(cv(r.x,i.offset.x),cv(r.y,i.offset.y)),r}var mv=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:hv,cancel:gv}=Gp(queueMicrotask,!1);function _v(e,t,n){let r=p_(e)?e:Wg(e);return r.start(e_(``,r,t,n)),r.animation}var vv={},yv={value:null,addProjectionMetrics:null,countProjection:void 0};function bv(e,t){let n=Df.now();e=I_(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(qp(r),e(a-t))};return Kp.setup(r,!0),F_(()=>qp(r))}function xv(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Sv(e){return N_(e)&&e.tagName===`svg`}function Cv(e){return p_(e)?e.get():e}var wv=e=>typeof e==`number`?e:parseFloat(e),Tv=j_.length,Ev=e=>typeof e==`number`||q.test(e);function Dv(e,t,n,r,i,a){i?(e.opacity=Tp(0,n.opacity??1,kv(r)),e.opacityExit=Tp(t.opacity??1,0,Av(r))):a&&(e.opacity=Tp(t.opacity??1,n.opacity??1,r));for(let i=0;i<Tv;i++){let a=j_[i],o=Ov(t,a),s=Ov(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Ev(o)===Ev(s)?(e[a]=Math.max(Tp(wv(o),wv(s),r),0),(Zf.test(s)||Zf.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<X_.length;i++){let a=X_[i];(t[a]||n[a])&&(e[a]=Tp(t[a]||0,n[a]||0,r))}}function Ov(e,t){return e[t]===void 0?e.borderRadius:e[t]}var kv=jv(0,.5,mf),Av=jv(.5,.95,Zd);function jv(e,t,n){return r=>r<e?0:r>t?1:n($d(e,t,r))}function Mv(e,t){e.min=t.min,e.max=t.max}function Nv(e,t){Mv(e.x,t.x),Mv(e.y,t.y)}function Pv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Fv=.9999,Iv=1.0001,Lv=-.01,Rv=.01;function zv(e){return e.max-e.min}function Bv(e,t,n){return Math.abs(e-t)<=n}function Vv(e,t,n,r=.5){e.origin=r,e.originPoint=Tp(t.min,t.max,e.origin),e.scale=zv(n)/zv(t),e.translate=Tp(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Fv&&e.scale<=Iv||isNaN(e.scale))&&(e.scale=1),(e.translate>=Lv&&e.translate<=Rv||isNaN(e.translate))&&(e.translate=0)}function Hv(e,t,n,r){Vv(e.x,t.x,n.x,r?.originX),Vv(e.y,t.y,n.y,r?.originY)}function Uv(e,t,n,r=0){e.min=(r?Tp(n.min,n.max,r):n.min)+t.min,e.max=e.min+zv(t)}function Wv(e,t,n,r){Uv(e.x,t.x,n.x,r?.x),Uv(e.y,t.y,n.y,r?.y)}function Gv(e,t,n,r=0){let i=r?Tp(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+zv(t)}function Kv(e,t,n,r){Gv(e.x,t.x,n.x,r?.x),Gv(e.y,t.y,n.y,r?.y)}function qv(e,t,n,r,i){return e-=t,e=tv(e,1/n,r),i!==void 0&&(e=tv(e,1/i,r)),e}function Jv(e,t=0,n=1,r=.5,i,a=e,o=e){if(Zf.test(t)&&(t=parseFloat(t),t=Tp(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Tp(a.min,a.max,r);e===a&&(s-=t),e.min=qv(e.min,t,n,s,i),e.max=qv(e.max,t,n,s,i)}function Yv(e,t,[n,r,i],a,o){Jv(e,t[n],t[r],t[i],t.scale,a,o)}var Xv=[`x`,`scaleX`,`originX`],Zv=[`y`,`scaleY`,`originY`];function Qv(e,t,n,r){Yv(e.x,t,Xv,n?.x,r?.x),Yv(e.y,t,Zv,n?.y,r?.y)}var $v=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ey=$v(`applewebkit/`)&&!$v(`chrome/`)?Math.round:Zd;function ty(e){e.min=ey(e.min),e.max=ey(e.max)}function ny(e){ty(e.x),ty(e.y)}var ry=()=>({translate:0,scale:1,origin:0,originPoint:0}),iy=()=>({x:ry(),y:ry()}),ay=()=>({min:0,max:0}),oy=()=>({x:ay(),y:ay()});function sy(e){return e.translate===0&&e.scale===1}function cy(e){return sy(e.x)&&sy(e.y)}function ly(e,t){return e.min===t.min&&e.max===t.max}function uy(e,t){return ly(e.x,t.x)&&ly(e.y,t.y)}function dy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fy(e,t){return dy(e.x,t.x)&&dy(e.y,t.y)}function py(e){return zv(e.x)/zv(e.y)}function my(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var hy=class{constructor(){this.members=[]}add(e){Ud(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(Wd(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Wd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function gy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var _y={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(q.test(e))e=parseFloat(e);else return e}return`${gy(e,t.target.x)}% ${gy(e,t.target.y)}%`}},vy={borderRadius:Object.assign({},_y,{applyTo:j_.slice()}),borderTopLeftRadius:_y,borderTopRightRadius:_y,borderBottomLeftRadius:_y,borderBottomRightRadius:_y,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=xp.parse(e);if(i.length>5)return r;let a=xp.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Tp(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function yy(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<X_.length;e++){let t=X_[e],i=n[t];i&&(r+=`${t}(${i}deg) `),!e&&n.pathRotation&&(r+=`rotate(${n.pathRotation}deg) `)}}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function by(e){return[e(`x`),e(`y`)]}var xy=(e,t)=>e.depth-t.depth,Sy=class{constructor(){this.children=[],this.isDirty=!1}add(e){Ud(this.children,e),this.isDirty=!0}remove(e){Wd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(xy),this.isDirty=!1,this.children.forEach(e)}},Cy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},wy=[`z`,`skew`,`skewZ`],Ty=1e3,Ey=0;function Dy(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Oy=e=>e.instance&&bg.get(e.instance)?.demote()&&e.resetSkewAndRotation();function ky(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=__(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Kp,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ky(r)}function Ay(e){if(e)return e.options.allowProjection===!1?Ay(e.parent):e.projection}function jy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(vv,{...vy,...vv}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:Ay(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&xv(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=Ey++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Py),this.nodes.forEach(Gy),this.nodes.forEach(Ky),this.nodes.forEach(Fy),yv.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Sy)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ef),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=N_(t)&&!Sv(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Kp.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=bv(i,250),Cy.hasAnimatedSinceResize&&(Cy.hasAnimatedSinceResize=!1,this.nodes.forEach(Wy)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||Qy,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!fy(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Kg(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Wy(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,qp(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(qy),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ky(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Oy(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Oy(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Ry),this.nodes.forEach(Ly);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zy);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Vy),this.nodes.forEach(Hy),this.nodes.forEach(Uy),this.nodes.forEach(My),this.nodes.forEach(Ny)):this.nodes.forEach(zy),this.clearAllSnapshots();let e=Df.now();wf.delta=Gd(0,1e3/60,e-wf.timestamp),wf.timestamp=e,wf.isProcessing=!0,Jp.update.process(wf),Jp.preRender.process(wf),Jp.render.process(wf),wf.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hv.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Iy),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kp.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kp.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!zv(this.snapshot.measuredBox.x)&&!zv(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=oy(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Oy(this);let t=this.projectionDelta&&!cy(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Z_(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ny(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return oy();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(tb))){let{scroll:e}=this.root;e&&(cv(t.x,e.offset.x),cv(t.y,e.offset.y))}return t}removeElementScroll(e){let t=oy();if(Nv(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Nv(t,e),cv(t.x,i.offset.x),cv(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||oy();Nv(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(cv(a.x,-n.scroll.offset.x),cv(a.y,-n.scroll.offset.y)),Z_(n.latestValues)&&dv(a,n.latestValues,n.layout?.layoutBox)}return!r&&Z_(this.latestValues)&&dv(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=oy();Nv(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Z_(n.latestValues))continue;let r;n.instance&&(Y_(n.latestValues)&&n.updateSnapshot(),r=oy(),Nv(r,n.measurePageBox())),Qv(t,n.latestValues,n.snapshot?.layoutBox,r)}return Z_(this.latestValues)&&Qv(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==wf.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=wf.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=oy(),this.targetWithTransforms=oy()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wv(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Nv(this.target,this.layout.layoutBox),iv(this.target,this.targetDelta)):Nv(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),yv.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||Y_(this.parent.latestValues)||$_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=oy(),this.relativeTargetOrigin=oy(),Kv(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Nv(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===wf.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Nv(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;sv(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=oy());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Pv(this.prevProjectionDelta.x,this.projectionDelta.x),Pv(this.prevProjectionDelta.y,this.projectionDelta.y)),Hv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&my(this.projectionDelta.x,this.prevProjectionDelta.x)&&my(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),yv.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=iy(),this.projectionDelta=iy(),this.projectionDeltaWithTransform=iy()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=iy();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=oy(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Zy));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);Jy(o.x,e.x,n),Jy(o.y,e.y,n),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kv(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Xy(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&uy(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=oy(),Nv(f,this.relativeTarget)),c&&(this.animationValues=a,Dv(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(qp(this.pendingAnimation),void 0),this.pendingAnimation=Kp.update(()=>{Cy.hasAnimatedSinceResize=!0,this.motionValue||=Wg(0),this.motionValue.jump(0,!1),this.currentAnimation=_v(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),Wm(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(Ty),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&eb(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||oy(),$y(i.x,t.x,e.x),$y(i.y,t.y,e.y)}Nv(t,i),dv(t,r),Hv(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hy),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!Q_(t))return;let n={};for(let t=0;t<wy.length;t++)Dy(wy[t],e,n,this.animationValues);for(let t=0;t<X_.length;t++)Dy(X_[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Cv(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Cv(t?.pointerEvents)||``),this.hasProjected&&!Z_(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=yy(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in vv){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=vv[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?Cv(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Ly),this.root.sharedNodes.clear()}}}function My(e){e.updateLayout(),By(e)}function Ny(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)by(e=>{let t=zv(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Mv(r[e],a[e])}else eb(i,t.layoutBox,n)&&by(t=>{let n=zv(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=iy();Hv(c,n,t.layoutBox);let l=iy();Hv(l,a?e.applyTransform(r,!0):n,s);let u=!cy(c),d=!1,f=e.getClosestProjectingParent();if((!e.resumeFrom||f?.options.layoutRoot&&e.resumeFrom.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=oy();Kv(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=oy();Kv(l,n,i.layoutBox,s),a&&o(c,l),fy(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function Py(e){yv.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Fy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Iy(e){e.clearSnapshot()}function Ly(e){e.clearMeasurements()}function Ry(e){e.isLayoutDirty=!0,e.updateLayout()}function zy(e){e.isLayoutDirty=!1}function By(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;by(e=>cv(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Vy(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Hy(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Uy(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Wy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gy(e){e.resolveTargetDelta()}function Ky(e){e.calcProjection()}function qy(e){e.resetSkewAndRotation()}function Jy(e,t,n){e.translate=Tp(t.translate,0,n),e.scale=Tp(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Yy(e,t,n,r){e.min=Tp(t.min,n.min,r),e.max=Tp(t.max,n.max,r)}function Xy(e,t,n,r){Yy(e.x,t.x,n.x,r),Yy(e.y,t.y,n.y,r)}function Zy(e){return e.animationValues?.opacityExit!==void 0}var Qy={duration:.45,ease:[.4,0,.1,1]};function $y(e,t,n){e.max=zv(n)+(e.min=t.min)}function eb(e,t,n){return e===`position`||e===`preserve-aspect`&&!Bv(py(t),py(n),.2)}function tb(e){return e!==e.root&&e.scroll?.wasRoot}function nb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var rb=jy({attachResizeListener:(e,t)=>nb(e,`resize`,t),measureScroll:mv,checkIsScrollRoot:()=>!0}),ib={current:void 0},ab=jy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ib.current){let e=new rb({});e.mount(window),e.setOptions({layoutScroll:!0}),ib.current=e}return ib.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),ob=new WeakMap;function sb(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function cb(e){return typeof e==`string`||Array.isArray(e)}var lb=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ub=[`initial`].concat(lb);function db(e){if(sb(e.animate))return!0;for(let t=0;t<ub.length;t++)if(cb(e[ub[t]]))return!0;return!1}function fb(e){return!!(db(e)||e.variants)}function pb(e,t,n){for(let r in t){let i=t[r],a=n[r];if(p_(i))e.addValue(r,i);else if(p_(a))e.addValue(r,Wg(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Wg(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var mb={current:null},hb={current:!1},gb=typeof window<`u`;function _b(){if(hb.current=!0,gb){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>mb.current=e.matches;e.addEventListener(`change`,t),t()}else mb.current=!1}}var vb=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],yb={};function bb(e){yb=e}function xb(){return yb}var Sb=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Rh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Df.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Kp.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=db(t),this.isVariantNode=fb(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&p_(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted&&!this.presenceContext?.keepValuesOnRemount)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,ob.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(hb.current||_b(),this.shouldReduceMotion=mb.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),qp(this.notifyUpdate),qp(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&og.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Zh({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:tf(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=bh.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Kp.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),bg.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in yb){let t=yb[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):oy()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&bg.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<vb.length;t++){let n=vb[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=pb(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=Wg(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(qd(n)||Yd(n))?n=parseFloat(n):typeof n!=`number`&&!xp.test(n)&&xp.test(t)&&(n=oh(e,t)),this.setBaseTarget(e,p_(n)?n.get():n)),p_(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new ef)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){hv.render(this.render)}},Cb=class extends Sb{constructor(){super(...arguments),this.KeyframeResolver=A_}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;p_(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function wb(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Tb(e,{layout:t,layoutId:n}){return bh.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!vv[e]||e===`opacity`)}function Eb(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(p_(r[t])||i&&p_(i[t])||Tb(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Db(e){return window.getComputedStyle(e)}var Ob=class extends Cb{constructor(){super(...arguments),this.type=`html`,this.renderInstance=wb}mount(e){super.mount(e)}readValueFromInstance(e,t){if(bh.has(t))return this.projection?.isProjecting?gh(t):vh(e,t);{let n=Db(e),r=(Af(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return fv(e,t)}build(e,t,n){z_(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Eb(e,t,n)}},kb=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Ab(e){return{point:{x:e.pageX,y:e.pageY}}}var jb=e=>t=>kb(t)&&e(t,Ab(t));function Mb(e,t,n,r){return nb(e,t,jb(n),r)}var Nb=new WeakMap,Pb,Fb=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:N_(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ib=Fb(`inline`,`width`,`offsetWidth`),Lb=Fb(`block`,`height`,`offsetHeight`);function Rb({target:e,borderBoxSize:t}){Nb.get(e)?.forEach(n=>{n(e,{get width(){return Ib(e,t)},get height(){return Lb(e,t)}})})}function zb(e){e.forEach(Rb)}function Bb(){typeof ResizeObserver<`u`&&(Pb=new ResizeObserver(zb))}function Vb(e,t){Pb||Bb();let n=L_(e);return n.forEach(e=>{let n=Nb.get(e);n||(n=new Set,Nb.set(e,n)),n.add(t),Pb?.observe(e)}),()=>{n.forEach(e=>{let n=Nb.get(e);n?.delete(t),n?.size||Pb?.unobserve(e)})}}var Hb=new Set,Ub;function Wb(){Ub=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Hb.forEach(t=>t(e))},window.addEventListener(`resize`,Ub)}function Gb(e){return Hb.add(e),Ub||Wb(),()=>{Hb.delete(e),!Hb.size&&typeof Ub==`function`&&(window.removeEventListener(`resize`,Ub),Ub=void 0)}}function Kb(e,t){return F_(typeof e==`function`?Gb(e):Vb(e,t))}var qb=(e,t)=>Math.abs(e-t);function Jb(e,t){let n=qb(e.x,t.x),r=qb(e.y,t.y);return Math.sqrt(n**2+r**2)}var Yb=new Set([`auto`,`scroll`]),Xb=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Qb(this.lastRawMoveEventInfo,this.transformPagePoint));let e=ex(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Jb(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Df.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Qb(t,this.transformPagePoint),this.hasPendingMove=!0,Kp.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=ex(e.type===`pointercancel`?this.lastMoveEventInfo:Qb(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!kb(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Qb(Ab(e),this.transformPagePoint),{point:c}=s;this.history=[{...c,timestamp:Df.now()}];let{onSessionStart:l}=t;l&&l(e,ex(s,this.history));let u={passive:!0,capture:!0};this.removeListeners=Qd(Mb(this.contextWindow,`pointermove`,this.handlePointerMove,u),Mb(this.contextWindow,`pointerup`,this.handlePointerUp,u),Mb(this.contextWindow,`pointercancel`,this.handlePointerUp,u)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Yb.has(e.overflowX)||Yb.has(e.overflowY))&&this.scrollPositions.set(t,Zb(t)),t=t.parentElement}this.scrollPositions.set(window,Zb(window)),this.removeScrollListeners=Qd(nb(window,`scroll`,this.onElementScroll,{capture:!0}),nb(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=Zb(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Kp.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),qp(this.updatePoint)}},Zb=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Qb(e,t){return t?{point:t(e.point)}:e}function $b(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ex({point:e},t){return{point:e,delta:$b(e,nx(t)),offset:$b(e,tx(t)),velocity:rx(t,.1)}}function tx(e){return e[0]}function nx(e){return e[e.length-1]}function rx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=nx(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>tf(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>tf(t)*2&&(r=e[1]);let a=nf(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var ix=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ax(e){return ix.has(e.tagName)||e.isContentEditable===!0}var ox=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function sx(e){return ox.has(e.tagName)||e.isContentEditable===!0}var cx={x:!1,y:!1};function lx(){return cx.x||cx.y}function ux(e){return e===`x`||e===`y`?cx[e]?null:(cx[e]=!0,()=>{cx[e]=!1}):cx.x||cx.y?null:(cx.x=cx.y=!0,()=>{cx.x=cx.y=!1})}function dx(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Tp(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Tp(n,e,r.max):Math.min(e,n)),e}function fx(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function px(e,{top:t,left:n,bottom:r,right:i}){return{x:fx(e.x,n,i),y:fx(e.y,t,r)}}function mx(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function hx(e,t){return{x:mx(e.x,t.x),y:mx(e.y,t.y)}}function gx(e,t){let n=.5,r=zv(e),i=zv(t);return i>r?n=$d(t.min,t.max-r,e.min):r>i&&(n=$d(e.min,e.max-i,t.min)),Gd(0,1,n)}function _x(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var vx=.35;function yx(e=vx){return e===!1?e=0:e===!0&&(e=vx),{x:bx(e,`left`,`right`),y:bx(e,`top`,`bottom`)}}function bx(e,t,n){return{min:xx(e,t),max:xx(e,n)}}function xx(e,t){return typeof e==`number`?e:e[t]||0}function Sx(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var Cx=new WeakMap,wx=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=oy(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let r=e=>{t&&this.snapToCursor(e),this.stopAnimation()},i=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=ux(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),by(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Mf(t)&&(t=r_(t,this.visualElement.current)||0),q.test(t))t=parseFloat(t);else if(Zf.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=zv(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&Kp.update(()=>a(e,t),!1,!0),h_(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=Ax(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&Kp.update(()=>a(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xb(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&Kp.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!kx(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=dx(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;Tx(e)?this.constraints&&this.scroll===Sx(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?px(r.layoutBox,e):!1,this.elastic=yx(t),i!==this.constraints&&!Tx(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&by(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=_x(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!Tx(e))return!1;let n=Ex(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=Sx(r);let i=pv(n,r.root,this.visualElement.getTransformPagePoint()),a=hx(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(K_(a));this.hasMutatedConstraints=!!e,e&&(a=G_(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&kx(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=by(e=>{if(!kx(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return h_(this.visualElement,e),n.start(e_(e,n,0,t,this.visualElement,!1))}stopAnimation(){by(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();by(e=>{if(!kx(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Tp(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Tx(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};by(e=>{let t=this.getAxisMotionValue(e).get();i[e]=gx({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),by(t=>{let n=this.getAxisMotionValue(t);if(!kx(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Tp(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Cx.set(this.visualElement,this);let e=this.visualElement.current,t=Mb(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&sx(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=Tx(t)&&Ex(t);r&&(this.constraints=this.resolveRefConstraints(),n||=Ox(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),Kp.read(r);let o=nb(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(by(t=>{if(!kx(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=vx,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function Tx(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var Ex=e=>`current`in e?e.current:e;function Dx(e){let t=!0;return()=>{t?t=!1:e()}}function Ox(e,t,n){let r=Kb(e,Dx(n)),i=Kb(t,Dx(n));return()=>{r(),i()}}function kx(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ax(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function jx(e,t){let n=L_(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},F_(()=>r.abort())]}function Mx(e){return!(e.pointerType===`touch`||lx())}function Nx(e,t,n={}){t=I_(t);let[r,i,a]=jx(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!Mx(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Px=(e,t)=>t?e===t||Px(e,t.parentElement):!1,Fx=new WeakSet;function Ix(e){return t=>{t.key===`Enter`&&e(t)}}function Lx(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Rx=(e,t)=>{let n=!1,r=Ix(()=>{Fx.has(e)||(n=!0,Lx(e,`down`))}),i=Ix(()=>{n&&(n=!1,Lx(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&Lx(e,`cancel`)},{...t,once:!0})};function zx(e){return kb(e)&&!lx()}var Bx=new WeakSet;function Vx(e,t,n={}){t=I_(t);let[r,i,a]=jx(e,n),o=e=>{let r=e.currentTarget;if(!zx(e)||Bx.has(e))return;Fx.add(r),n.stopPropagation&&Bx.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Fx.has(r)&&Fx.delete(r),zx(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Px(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),M_(e)&&(e.addEventListener(`focus`,()=>Rx(e,i),i),!ax(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var Hx=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Ux=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Wx=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Gx(e,t,n,r){wb(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Ux.has(n)?n:R_(n),t.attrs[n])}function Kx(e,t,n){let r=Eb(e,t,n);for(let n in e)if(n!==`children`&&(p_(e[n])||p_(t[n]))){let t=yh.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var qx=class extends Cb{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=oy}getBaseTargetFromProps(e,t){return bh.has(t)?super.getBaseTargetFromProps(e,t)??gh(t):e[t]}getDefaultValue(e){return bh.has(e)?this.latestValues[e]??gh(e):void 0}readValueFromInstance(e,t){if(bh.has(t)){let e=ih(t);return e&&e.default||0}if(U_.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Ux.has(t)?t:R_(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Kx(e,t,n)}build(e,t,n){W_(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Gx(e,t,n,r)}mount(e){this.isSVGTag=Wx(e.tagName),super.mount(e)}};function Jx(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Yx=[...lb].reverse(),Xx=e=>e?.out===!0?e:e?.out;function Zx(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>S_(e,t,n))),n=$x(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&o_(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&Xx(f(l??(g&&g.props.initial))?.transition);if(Yx.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?cb(f)||f===!1?f:void 0:l,y=cb(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||sb(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=Qx(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=o_(e,n,s_(e,t))||{};E={...E,...a,...i},D=Xx(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!Jx(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=o_(s,n)?.transition?.delayChildren;r.delay=zg(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!p_(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=$x(),i=!0}}}function Qx(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Jx(t,e):!1}function $x(){let e={};for(let t of lb)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}T();var eS=c({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});T();function tS(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function nS(...e){return t=>{let n=!1,r=e.map(e=>{let r=tS(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():tS(e[t],null)}}}}function rS(...e){return n(nS(...e),e)}T();var iS=e=>{let{width:t,height:n}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,n/e?.offsetHeight||1]},aS=e=>{let{left:t,top:n}=e.getBoundingClientRect(),r=e;for(;r=r.parentElement||r.parentNode?.host;){let{scrollLeft:e,scrollTop:i}=r;if(e||i){let[a,o]=iS(r);t+=e*a,n+=i*o}if(getComputedStyle(r).position===`fixed`)break}let[i,a]=iS(e.offsetParent);return[t/i,n/a]},oS=class extends d{getSnapshotBeforeUpdate(e){let t=this.props.getElement();if(M_(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=M_(e)&&e.offsetWidth||0,r=M_(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction,a.point=aS(t)}return null}componentDidUpdate(){}render(){return this.props.children}};function sS({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:o,popNode:s}){let c=g(),l=P(null),u=P({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:d}=i(eS),f=rS(l,o===!1?void 0:e.props?.ref??e?.ref),p=()=>l.current||s?.current?.current,m=e=>{let{width:t,height:i,top:a,left:o,right:s,bottom:l,direction:d}=u.current,f=d===`rtl`,p=n===`left`?f?`right:${s}`:`left:${o}`:f?`left:${o}`:`right:${s}`,m=r===`bottom`?`bottom:${l}`:`top:${a}`;e?.insertRule(`[data-motion-pop-id="${c}"]{position:absolute!important;width:${t}px!important;height:${i}px!important;${p}px!important;${m}px!important}`)};return h(()=>{let{width:e,height:n}=u.current,r=p();if(t||o===!1||!r||!e||!n)return;r.dataset.motionPopId=c;let i=r.ownerDocument,s=i.createElement(`style`);d&&(s.nonce=d);let l=a??i.head;l.appendChild(s),m(s.sheet);let f=0,h=0;return hv.setup(()=>{let[e,t]=aS(r);f=u.current.point[0]-e,h=u.current.point[1]-t}),hv.read(()=>{let{sheet:e}=s;if(!e||!f&&!h)return;let t=u.current;t.left+=f,t.right-=f,t.top+=h,t.bottom-=h,e.deleteRule(0),m(e)}),()=>{r.removeAttribute(`data-motion-pop-id`),l.contains(s)&&l.removeChild(s)}},[t]),R(oS,{isPresent:t,getElement:p,sizeRef:u,pop:o,children:o===!1?e:y(e,{ref:f})})}T();var cS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:u})=>{let d=zd(lS),f=g(),p=P(),m=P(n),h=P(r);Vd(()=>{m.current=n,h.current=r});let _=!0,v=l(()=>(_=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;r&&r()},register:(e,t)=>(d.set(e,!1),t&&t.parent?.presenceContext?.id!==f&&(p.current=t),()=>{d.delete(e),!m.current&&!d.size&&h.current?.()})}),[n,d,r]);return a&&_&&(v={...v}),l(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),M(()=>{!n&&!d.size&&r&&r()},[n]),e=R(sS,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:u,popNode:p,children:e}),R(Hd.Provider,{value:v,children:e})};function lS(){return new Map}T();function uS(e=!0){let t=i(Hd);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:a,register:o}=t,s=g();M(()=>{if(e)return o(s)},[e]);let c=n(()=>e&&a&&a(s),[s,a,e]);return!r&&a?[!1,c]:[!0]}T();var dS=e=>e.key||``;function fS(e){let t=[];return E.forEach(e,e=>{b(e)&&t.push(e)}),t}T();var pS=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:o=`sync`,propagate:s=!1,anchorX:c=`left`,anchorY:u=`top`,root:d})=>{let[f,p]=uS(s),m=l(()=>fS(e),[e]),h=s&&!f?[]:m.map(dS),g=P(!0),_=zd(()=>new Map),v=P(new Set),[y,b]=N(m),[x,S]=N(m);Vd(()=>{s&&!f&&!x.length&&p?.()},[f,s,x.length,p]);let w=P();M(()=>()=>{let e=w.current;w.current=void 0,e?.()},[x]),Vd(()=>{g.current=!1;for(let e=0;e<x.length;e++){let t=dS(x[e]);h.includes(t)?(_.delete(t),v.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[x,h.length,h.join(`-`)]);let T=[];if(m!==y){let e=[...m],t=0;for(let n of x){let r=h.indexOf(dS(n));r===-1?(e.splice(t++,0,n),T.push(n)):t=r+T.length+1}return T.every(e=>_.get(dS(e)))?e=m:o===`wait`&&(e=T),S(fS(e)),b(m),null}let{forceRender:E}=i(Rd);return R(C,{children:x.map(e=>{let i=dS(e),l=s&&!f?!1:m===x||h.includes(i);return R(cS,{isPresent:l,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:o,root:d,onExitComplete:l?void 0:()=>{if(v.current.has(i))return;if(_.has(i))v.current.add(i),_.set(i,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(E?.(),b([]),s&&p?.(),w.current=r)},anchorX:c,anchorY:u,children:e},i)})})};T();var mS=c({strict:!1}),hS={animation:[`variants`,...lb],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},gS=!1;function _S(){if(gS)return;let e={};for(let t in hS)e[t]={isEnabled:e=>hS[t].some(t=>!!e[t])};bb(e),gS=!0}function vS(){return _S(),xb()}function yS(e){let t=vS();for(let n in e)t[n]={...t[n],...e[n]};bb(t)}T();function bS({children:e,features:t,strict:n=!1}){let[,r]=N(!xS(t)),i=P(void 0);if(!xS(t)){let{renderer:e,...n}=t;i.current=e,yS(n)}return M(()=>{xS(t)&&t().then(({renderer:e,...t})=>{yS(t),i.current=e,r(!0)})},[]),R(mS.Provider,{value:{renderer:i.current,strict:n},children:e})}function xS(e){return typeof e==`function`}T();var SS=c({});function CS(e,t){if(db(e)){let{initial:t,animate:n}=e;return{initial:t===!1||cb(t)?t:void 0,animate:cb(n)?n:void 0}}return e.inherit===!1?{}:t}T();function wS(e){let{initial:t,animate:n}=CS(e,i(SS));return l(()=>({initial:t,animate:n}),[TS(t),TS(n)])}function TS(e){return Array.isArray(e)?e.join(` `):e}var ES=()=>({style:{},transform:{},transformOrigin:{},vars:{}});T();function DS(e,t,n){for(let r in t)!p_(t[r])&&!Tb(r,n)&&(e[r]=t[r])}function OS({transformTemplate:e},t){return l(()=>{let n=ES();return z_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function kS(e,t){let n=e.style||{},r={};return DS(r,n,e),Object.assign(r,OS(e,t)),r}function AS(e,t){let n={},r=kS(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var jS=()=>({...ES(),attrs:{}});T();function MS(e,t,n,r){let i=l(()=>{let n=jS();return W_(n,t,Wx(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return DS(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var NS=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function PS(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||NS.has(e)}function FS(e,t){return e.startsWith(`on`)?!PS(e):t?.(e)??!PS(e)}function IS(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||p_(e[a])||(FS(a,r)||n===!0&&PS(a)||!t&&!PS(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var LS=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function RS(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(LS.indexOf(e)>-1||/[A-Z]/u.test(e))}T();function zS(e,t,n,{latestValues:r},i,o=!1,s,c){let u=(s??RS(e)?MS:AS)(t,r,i,e),d=IS(t,typeof e==`string`,o,c),f=e===C?{}:{...d,...u,ref:n},{children:p}=t,m=l(()=>p_(p)?p.get():p,[p]);return a(e,{...f,children:m})}T();function BS({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:VS(n,r,i,e),renderState:t()}}function VS(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Cv(a[e]);let{initial:o,animate:s}=e,c=db(e),l=fb(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!sb(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=a_(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var HS=e=>(t,n)=>{let r=i(SS),a=i(Hd),o=()=>BS(e,t,r,a);return n?o():zd(o)},US=HS({scrapeMotionValuesFromProps:Eb,createRenderState:ES}),WS=HS({scrapeMotionValuesFromProps:Kx,createRenderState:jS}),GS=Symbol.for(`motionComponentSymbol`);T();function KS(e,t,r){let i=P(r);h(()=>{i.current=r});let a=P(null);return n(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let r=i.current;if(typeof r==`function`){if(n){let e=r(n);typeof e==`function`&&(a.current=e)}else a.current?(a.current(),a.current=null):r(n)}else r&&(r.current=n)},[t])}T();var qS=c({});T();function JS(e,t,n,r,a,o){let{visualElement:s}=i(SS),c=i(mS),l=i(Hd),u=i(eS),d=u.reducedMotion,f=u.skipAnimations,p=P(null),m=P(!1);r||=c.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let g=p.current,_=i(qS);g&&!g.projection&&a&&(g.type===`html`||g.type===`svg`)&&a.create(g,n,_),h(()=>{g&&g.props!==n&&g.update(n,l)});let v=n[g_],y=P(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Vd(()=>{m.current&&g&&(g.animationState?.animateChanges(),g.enteringChildren=void 0)},[]),Vd(()=>{m.current=!0,g&&(window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),y.current&&g.animationState&&g.animationState.animateChanges())}),M(()=>{g&&(!y.current&&g.animationState&&g.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),g.enteringChildren=void 0)}),g}T();function YS(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&yS(r);let o=n?n===`svg`:RS(e),s=o?WS:US;function c(n,c){let l,u=XS(n);zd(()=>!!ib.current?.sharedNodes.get(u)?.lead&&n.initial)&&(n={...n,initial:!1});let d={...i(eS),...n,layoutId:u},{isStatic:f,isValidProp:p}=d,m=wS(n),h=s(n,f);if(!f&&typeof window<`u`){ZS(d,r);let t=QS(d);m.visualElement=JS(e,h,d,a,t.ProjectionNode,o),(t.isEnabled||m.visualElement?.projection?.options.layoutId)&&(l=t.MeasureLayout)}return R(SS.Provider,{value:m,children:[l&&m.visualElement?R(l,{visualElement:m.visualElement,...d}):null,zS(e,n,KS(h,m.visualElement,c),h,f,t,o,p)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=x(c);return l[GS]=e,l}function XS({layoutId:e}){let t=i(Rd).id;return t&&e!==void 0?t+`-`+e:e}function ZS(e,t){i(mS).strict}function QS(e){let{drag:t,layout:n}=vS();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function $S(e,t){if(typeof Proxy>`u`)return YS;let n=new Map,r=(n,r)=>YS(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,YS(a,void 0,e,t)),n.get(a))})}var eC=$S();T();var tC=(e,t)=>t.isSVG??RS(e)?new qx(t):new Ob(t,{allowProjection:e!==C}),nC=class extends Hx{constructor(e){super(e),e.animationState||=Zx(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();sb(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},rC=0,iC={animation:{Feature:nC},exit:{Feature:class extends Hx{constructor(){super(...arguments),this.id=rC++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=o_(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},aC=class extends Hx{constructor(e){super(e),this.removeGroupControls=Zd,this.removeListeners=Zd,this.controls=new wx(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zd}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},oC=e=>(t,n)=>{e&&Kp.update(()=>e(t,n),!1,!0)},sC=class extends Hx{constructor(){super(...arguments),this.removePointerDownListener=Zd}onPointerDown(e){this.session=new Xb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:oC(e),onStart:oC(t),onMove:oC(n),onEnd:(e,t)=>{delete this.session,r&&Kp.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Mb(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}};T();var cC=!1,lC=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),uC=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},dC=class extends d{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),cC&&i.root.didUpdate(),i.options.layoutId!==r&&uC(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...lC(this.props),onExitComplete:()=>this.safeToRemove()})),Cy.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),uC(o,n)),o.setOptions({...o.options,...lC(this.props)}),cC=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Kp.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),hv.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;cC=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function fC(e){let[t,n]=uS(),r=i(Rd);return R(dC,{...e,layoutGroup:r,switchLayoutGroup:i(qS),isPresent:t,safeToRemove:n})}var pC={pan:{Feature:sC},drag:{Feature:aC,ProjectionNode:ab,MeasureLayout:fC}};function mC(e,t,n,r){let{props:i}=e,a=`while`+n;e.animationState&&i[a]&&e.animationState.setActive(a,r===`Start`);let o=i[`on`+n+r];o&&Kp.postRender(()=>o(t,Ab(t)))}var hC=class extends Hx{mount(){let{current:e}=this.node;e&&(this.unmount=Nx(e,(e,t)=>(mC(this.node,t,`Hover`,`Start`),e=>mC(this.node,e,`Hover`,`End`))))}unmount(){}},gC=class extends Hx{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Qd(nb(this.node.current,`focus`,()=>this.onFocus()),nb(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function _C(e,t,n){e.current instanceof HTMLButtonElement&&e.current.disabled||mC(e,t,`Tap`,n)}var vC=class extends Hx{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Vx(e,(e,t)=>(_C(this.node,t,`Start`),(e,{success:t})=>_C(this.node,e,t?``:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},yC=new WeakMap,bC=new WeakMap,xC=e=>{let t=yC.get(e.target);t&&t(e)},SC=e=>{e.forEach(xC)};function CC({root:e,...t}){let n=e||document;bC.has(n)||bC.set(n,{});let r=bC.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(SC,{root:e,...t})),r[i]}function wC(e,t,n){let r=CC(t);return yC.set(e,n),r.observe(e),()=>{yC.delete(e),r.unobserve(e)}}var TC={some:0,all:1},EC=class extends Hx{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:TC[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=wC(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(DC(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function DC({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var OC={inView:{Feature:EC},tap:{Feature:vC},focus:{Feature:gC},hover:{Feature:hC}},kC=$S(Object.assign({},iC,OC,pC,{layout:{ProjectionNode:ab,MeasureLayout:fC}}),tC),AC=Object.assign({renderer:tC},iC,OC),jC=({children:e})=>R(bS,{features:AC,children:e});T();var MC=c(null),NC=({value:e,children:t})=>R(MC.Provider,{value:e,children:t}),PC=()=>i(MC),FC=(e,t=`local`)=>e.filter(e=>(e.location??t)!==`local`),IC=()=>typeof process>`u`?void 0:{}.INTLAYER_BACKEND_INTERNAL_URL?.trim()||void 0,LC=(e,t=Cn.backendURL)=>{let n=IC();if(!n||!t)return e;try{let r=new URL(e),i=new URL(t).origin;if(r.origin!==i)return e;let a=new URL(n);return r.protocol=a.protocol,r.host=a.host,r.toString()}catch{return e}},RC=class extends Error{status;code;data;constructor(e,t){super(e),this.name=`FetcherError`,this.status=t.status,this.code=t.code,this.data=t.data}},zC={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},BC=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),VC=e=>e.reduce((e,t)=>{let n=e??{},r=BC(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),J=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=VC([zC,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=VC([zC.headers,...t.map(e=>e.headers)]),s=VC(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=VC(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=LC(`${e}${r}`),d=await fetch(u,l);if(!d.ok){let e=await d.json().catch(()=>void 0);throw new RC(JSON.stringify(e?.error)??`An error occurred`,{status:d.status,code:e?.error?.code,data:e?.error})}return await d.json()},HC=(e,t,n,r)=>{let i=n.replace(/:([A-Za-z0-9_]+)/g,(e,t)=>{let i=r?.[t];if(i===void 0)throw Error(`Missing route param "${t}" for ${n}`);return encodeURIComponent(i)});return`${e}${t}${i===`/`?``:i}`},Y=(e,t,n,...[r])=>HC(e,t.prefix,n.path,r),UC={prefix:`/oauth2`},WC={getOAuth2AccessToken:{method:`POST`,path:`/token`},extendOAuth2Token:{method:`POST`,path:`/token/extend`}},GC={prefix:`/api/cli-session`},KC={createCliSessionToken:{method:`POST`,path:`/`},getCliSessionMe:{method:`GET`,path:`/me`}},qC=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`,{clientId:r,clientSecret:i}=t?.editor??{};return{getOAuth2AccessToken:async(e={})=>await J(Y(n,UC,WC.getOAuth2AccessToken),{},e,{method:WC.getOAuth2AccessToken.method,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:r,client_secret:i}}),createCliSessionToken:async(t={})=>await J(Y(n,GC,KC.createCliSessionToken),e,t,{method:KC.createCliSessionToken.method}),getCliSessionMe:async(t={})=>await J(Y(n,GC,KC.getCliSessionMe),e,t,{method:KC.getCliSessionMe.method})}};function JC(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 YC(e,t,n=`.`,r){if(!JC(t))return YC(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)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:JC(a)&&JC(i[t])?YC(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function XC(e){return(...t)=>t.reduce((t,n)=>YC(t,n,``,e),{})}var ZC=XC(),QC={prefix:`/api/ai`},$C={customQuery:{method:`POST`,path:`/`},translateJSON:{method:`POST`,path:`/translate/json`},auditContentDeclaration:{method:`POST`,path:`/audit/dictionary`},auditContentDeclarationField:{method:`POST`,path:`/audit/dictionary/field`},auditContentDeclarationMetadata:{method:`POST`,path:`/audit/dictionary/metadata`},auditTag:{method:`POST`,path:`/audit/tag`},ask:{method:`POST`,path:`/ask`},chat:{method:`POST`,path:`/chat`},autocomplete:{method:`POST`,path:`/autocomplete`},getDiscussions:{method:`GET`,path:`/discussions`},getAIStats:{method:`GET`,path:`/stats`}},ew=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{customQuery:async(t,r={})=>await J(Y(n,QC,$C.customQuery),e,r,{method:$C.customQuery.method,body:t}),translateJSON:async(t,r={})=>await J(Y(n,QC,$C.translateJSON),e,r,{method:$C.translateJSON.method,body:t}),auditContentDeclaration:async(t,r={})=>await J(Y(n,QC,$C.auditContentDeclaration),e,r,{method:$C.auditContentDeclaration.method,body:t}),auditContentDeclarationField:async(t,r={})=>await J(Y(n,QC,$C.auditContentDeclarationField),e,r,{method:$C.auditContentDeclarationField.method,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await J(Y(n,QC,$C.auditContentDeclarationMetadata),e,r,{method:$C.auditContentDeclarationMetadata.method,body:t}),auditTag:async(t,r={})=>await J(Y(n,QC,$C.auditTag),e,r,{method:$C.auditTag.method,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(Y(n,QC,$C.ask),{method:$C.ask.method,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(`
19
+ `);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},chat:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,onAction:o,...s}=t,c=new AbortController;try{let t=await fetch(Y(n,QC,$C.chat),{method:$C.chat.method,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...s,...e.body,...r.body}),signal:c.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let l=t.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
20
+ `);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.action&&o?.(t.action),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in chat:`,e),e}},autocomplete:async(t,r={})=>await J(Y(n,QC,$C.autocomplete),e,r,{method:$C.autocomplete.method,body:t}),getDiscussions:async(t,r={})=>await J(Y(n,QC,$C.getDiscussions),e,r,{method:$C.getDiscussions.method,params:t}),getAIStats:async(t={})=>await J(Y(n,QC,$C.getAIStats),e,t,{method:$C.getAIStats.method})}},tw={prefix:`/api/assets`},nw={getAssets:{method:`GET`,path:`/`},getAssetById:{method:`GET`,path:`/:assetId`},uploadAsset:{method:`POST`,path:`/`},updateAsset:{method:`PATCH`,path:`/:assetId`},deleteAsset:{method:`DELETE`,path:`/:assetId`}},rw=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getAssets:async(t,r,i={})=>await J(Y(n,tw,nw.getAssets),e,i,{cache:`no-store`,params:{...t!==void 0&&{page:String(t)},...r!==void 0&&{pageSize:String(r)}}}),getAssetById:async(t,r={})=>await J(Y(n,tw,nw.getAssetById,{assetId:String(t)}),e,r,{cache:`no-store`}),uploadAsset:async(t,r,i,a={})=>{let o=await t.arrayBuffer(),s={"Content-Type":t.type||`image/jpeg`,"X-File-Name":t.name};r&&(s[`X-Alt-Text`]=r),i&&(s[`X-Caption`]=i);let c=e.headers??{},l=await fetch(Y(n,tw,nw.uploadAsset),{method:nw.uploadAsset.method,credentials:`include`,headers:{...c,...s},body:o,signal:a.signal});if(!l.ok){let e=await l.json();throw Error(JSON.stringify(e.error)??`Asset upload failed`)}return await l.json()},updateAsset:async(t,r,i={})=>await J(Y(n,tw,nw.updateAsset,{assetId:String(t)}),e,i,{method:nw.updateAsset.method,body:r}),deleteAsset:async(t,r={})=>await J(Y(n,tw,nw.deleteAsset,{assetId:String(t)}),e,r,{method:nw.deleteAsset.method})}},iw={prefix:`/api/dictionary`},aw={getDictionaries:{method:`GET`,path:`/`},getDictionariesKeys:{method:`GET`,path:`/keys`},getDictionariesUpdateTimestamp:{method:`GET`,path:`/update`},getDictionariesByKeys:{method:`GET`,path:`/by-keys`},getDictionary:{method:`GET`,path:`/:dictionaryKey`},addDictionary:{method:`POST`,path:`/`},pushDictionaries:{method:`PATCH`,path:`/`},updateDictionary:{method:`PUT`,path:`/:dictionaryId`},deleteDictionary:{method:`DELETE`,path:`/:dictionaryId`}},ow=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getDictionaries:async(t,r={})=>await J(Y(n,iw,aw.getDictionaries),e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await J(Y(n,iw,aw.getDictionariesKeys),e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await J(Y(n,iw,aw.getDictionariesUpdateTimestamp),e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await J(Y(n,iw,aw.getDictionary,{dictionaryKey:t}),e,i,{params:r?{version:r.toString()}:void 0}),getDictionariesByKeys:async(t,r,i={})=>await J(Y(n,iw,aw.getDictionariesByKeys),e,i,{cache:`no-store`,params:{keys:t.join(`,`),version:r?.toString()}}),pushDictionaries:async(t,r={})=>await J(Y(n,iw,aw.pushDictionaries),e,r,{method:aw.pushDictionaries.method,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await J(Y(n,iw,aw.addDictionary),e,r,{method:aw.addDictionary.method,body:t}),updateDictionary:async(t,r={})=>await J(Y(n,iw,aw.updateDictionary,{dictionaryId:String(t.id)}),e,r,{method:aw.updateDictionary.method,body:t}),deleteDictionary:async(t,r={})=>await J(Y(n,iw,aw.deleteDictionary,{dictionaryId:String(t)}),e,r,{method:aw.deleteDictionary.method})}},sw=(e={},t)=>{let n=`${t?.editor?.editorURL??Cn.editorURL}/api`;return{getDictionaries:async(t={})=>(await J(`${n}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await J(`${n}/config`,e,t)).data,writeDictionary:async(t,r={})=>await J(`${n}/dictionary`,e,r,{method:`POST`,body:t})}},cw={prefix:`/api/project`},lw={getProjects:{method:`GET`,path:`/`},getProjectInsights:{method:`GET`,path:`/insights`},addProject:{method:`POST`,path:`/`},updateProject:{method:`PUT`,path:`/`},updateProjectMembers:{method:`PUT`,path:`/members`},pushProjectConfiguration:{method:`PUT`,path:`/configuration`},deleteProject:{method:`DELETE`,path:`/`},selectProject:{method:`PUT`,path:`/:projectId`},unselectProject:{method:`POST`,path:`/logout`},addNewAccessKey:{method:`POST`,path:`/access_key`},refreshAccessKey:{method:`PATCH`,path:`/access_key`},deleteAccessKey:{method:`DELETE`,path:`/access_key`},triggerBuild:{method:`POST`,path:`/build`},triggerWebhook:{method:`POST`,path:`/webhook`},getCIConfiguration:{method:`GET`,path:`/ci`},pushCIConfiguration:{method:`POST`,path:`/ci`},deleteProjectByIdAdmin:{method:`DELETE`,path:`/:projectId/admin`},updateMemberAccess:{method:`PUT`,path:`/member/:userId/access`}},uw=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getProjects:async(t,r={})=>await J(Y(n,cw,lw.getProjects),e,r,{cache:`no-store`,method:lw.getProjects.method,params:t}),getProjectInsights:async(t={})=>await J(Y(n,cw,lw.getProjectInsights),e,t,{cache:`no-store`,method:lw.getProjectInsights.method}),addProject:async(t,r={})=>await J(Y(n,cw,lw.addProject),e,r,{method:lw.addProject.method,body:t}),updateProject:async(t,r={})=>await J(Y(n,cw,lw.updateProject),e,r,{method:lw.updateProject.method,body:t}),updateProjectMembers:async(t,r={})=>await J(Y(n,cw,lw.updateProjectMembers),e,r,{method:lw.updateProjectMembers.method,body:t}),pushProjectConfiguration:async(t,r={})=>await J(Y(n,cw,lw.pushProjectConfiguration),e,r,{method:lw.pushProjectConfiguration.method,body:t}),deleteProject:async(t={})=>await J(Y(n,cw,lw.deleteProject),e,t,{method:lw.deleteProject.method}),deleteProjectByIdAdmin:async(t,r={})=>J(Y(n,cw,lw.deleteProjectByIdAdmin,{projectId:t}),e,r,{method:lw.deleteProjectByIdAdmin.method}),selectProject:async(t,r={})=>await J(Y(n,cw,lw.selectProject,{projectId:String(t)}),e,r,{method:lw.selectProject.method}),unselectProject:async(t={})=>await J(Y(n,cw,lw.unselectProject),e,t,{method:lw.unselectProject.method}),addNewAccessKey:async(t,r={})=>await J(Y(n,cw,lw.addNewAccessKey),e,r,{method:lw.addNewAccessKey.method,body:t}),deleteAccessKey:async(t,r={})=>await J(Y(n,cw,lw.deleteAccessKey),e,r,{method:lw.deleteAccessKey.method,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await J(Y(n,cw,lw.refreshAccessKey),e,r,{method:lw.refreshAccessKey.method,body:{clientId:t}}),triggerBuild:async(t={})=>await J(Y(n,cw,lw.triggerBuild),e,t,{method:lw.triggerBuild.method}),triggerWebhook:async(t,r={})=>await J(Y(n,cw,lw.triggerWebhook),e,r,{method:lw.triggerWebhook.method,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await J(Y(n,cw,lw.getCIConfiguration),e,t,{method:lw.getCIConfiguration.method}),pushCIConfig:async(t={})=>await J(Y(n,cw,lw.pushCIConfiguration),e,t,{method:lw.pushCIConfiguration.method}),updateMemberAccess:async(t,r,i={})=>await J(Y(n,cw,lw.updateMemberAccess,{userId:t}),e,i,{method:lw.updateMemberAccess.method,body:r})}},dw={prefix:`/api/tag`},fw={getTags:{method:`GET`,path:`/`},addTag:{method:`POST`,path:`/`},updateTag:{method:`PUT`,path:`/:tagId`},deleteTag:{method:`DELETE`,path:`/:tagId`}},pw=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getTags:async(t,r={})=>await J(Y(n,dw,fw.getTags),e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await J(Y(n,dw,fw.addTag),e,r,{method:fw.addTag.method,body:t}),updateTag:async(t,r,i={})=>await J(Y(n,dw,fw.updateTag,{tagId:String(t)}),e,i,{method:fw.updateTag.method,body:r}),deleteTag:async(t,r={})=>await J(Y(n,dw,fw.deleteTag,{tagId:String(t)}),e,r,{method:fw.deleteTag.method})}};function mw(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var hw=mw({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`,USER_NOT_FOUND:`User not found`,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`}),gw=`1.7.15`;function _w(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 vw(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 yw(){return bw.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var bw={stubThis:e=>e};function xw(e){let{id:t}=e;return{...e,id:vw(t),transports:e.transports}}function Sw(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 Cw=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 ww({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 Cw({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 Cw({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 Cw({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 Cw({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 Cw({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Cw({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 Cw({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Cw({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(!Sw(t))return new Cw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Cw({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 Cw({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 Cw({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 Tw=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}}},Ew=[`cross-platform`,`platform`];function Dw(e){if(e&&!(Ew.indexOf(e)<0))return e}async function Ow(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(!yw())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:vw(t.challenge),user:{...t.user,id:vw(t.user.id)},excludeCredentials:t.excludeCredentials?.map(xw)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=Tw.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw ww({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){kw(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=_w(e))}catch(e){kw(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=_w(c.getAuthenticatorData())}catch(e){kw(`getAuthenticatorData()`,e)}return{id:o,rawId:_w(s),response:{attestationObject:_w(c.attestationObject),clientDataJSON:_w(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:Dw(a.authenticatorAttachment)}}function kw(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 Aw(){if(!yw())return jw.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?jw.stubThis(new Promise(e=>e(!1))):jw.stubThis(e.isConditionalMediationAvailable())}var jw={stubThis:e=>e};function Mw({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 Cw({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Cw({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Sw(t))return new Cw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Cw({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 Cw({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 Nw(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(!yw())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(xw));let a={...t,challenge:vw(t.challenge),allowCredentials:i},o={};if(n){if(!await Aw())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=Tw.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw Mw({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=_w(u.userHandle)),{id:c,rawId:_w(l),response:{authenticatorData:_w(u.authenticatorData),clientDataJSON:_w(u.clientDataJSON),signature:_w(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:Dw(s.authenticatorAttachment)}}var Pw=`1.7.15`,Fw=Symbol.for(`better-auth:broadcast-channel`),Iw=()=>Math.floor(Date.now()/1e3),Lw=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:Iw()}))}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 Rw(e=`better-auth.message`){return globalThis[Fw]||(globalThis[Fw]=new Lw(e)),globalThis[Fw]}var zw=[],Bw=0,Vw=null,Hw=4,Uw=globalThis.nanostoresGlobal||={epoch:0},Ww=()=>{let e;for(Bw=0;Bw<zw.length;Bw+=Hw)try{zw[Bw](zw[Bw+1].value,zw[Bw+2],zw[Bw+3])}catch(t){e=t}if(zw.length=0,e)throw e},Gw=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=Bw+Hw;t<zw.length;)zw[t]===e?zw.splice(t,Hw):t+=Hw;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){Uw.epoch++;let i=!zw.length&&!0;for(let i of t)Vw?.has(i)||(Vw?.add(i),zw.push(i,n,e,r));i&&Ww()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},Kw=2,qw=5,Jw=6,Yw=10,Xw=(e,t,n,r)=>(e.events=e.events||{},e.events[n+Yw]||(e.events[n+Yw]=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+Yw](),delete e.events[n+Yw])}),Zw=(e,t)=>Xw(e,t,Kw,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),Qw=1e3,$w=(e,t)=>Xw(e,n=>{let r=t(n);r&&e.events[Jw].push(r)},qw,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[Jw]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[Jw])t();e.events[Jw]=[]}},Qw)},()=>{e.listen=n,e.off=r}});function eT(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function tT(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!tT(e[n],t[n]))return!1;return!0}if(eT(e)&&eT(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!tT(e[r],t[r]))return!1;return!0}return!1}function nT(e,t){return Zw(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var rT=Symbol.for(`better-auth:focus-manager`),iT=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 aT(){return globalThis[rT]||(globalThis[rT]=new iT),globalThis[rT]}var oT=Symbol.for(`better-auth:online-manager`),sT=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 cT(){return globalThis[oT]||(globalThis[oT]=new sT),globalThis[oT]}var lT=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,uT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},dT=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function fT(e){return e instanceof Date&&!isNaN(e.getTime())}function pT(e){let t=dT.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 fT(f)?f:null}function mT(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(),s=o.toLowerCase();if(s.length<=9&&s in uT)return uT[s];if(!lT.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){if(n)throw Error(`[better-json] Potential prototype pollution attempt detected`);r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`)}else{if(a&&typeof t==`string`){let e=pT(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function hT(e,t={strict:!0}){return mT(e,t)}var gT=Symbol.for(`better-auth:auth-query`);function _T(e){let t=Gw(e);return Object.defineProperty(t,gT,{value:!0}),t}var vT=()=>typeof window>`u`;function yT(e,t){return tT(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}var bT=(e,t,n,r)=>{let i=_T({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>o(e)});$w(i,()=>nT(i,yT));let a=0,o=async e=>{let o=++a;return new Promise(s=>{let c=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...c,query:{...c?.query,...e?.query},async onSuccess(e){if(o===a){let t=i.get(),n=t.data!=null&&e.data!=null&&tT(t.data,e.data)?t.data:e.data;i.set({data:n,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}await c?.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)){if(o===a){let t=e.error.status===401;i.set({error:e.error,data:t?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}await c?.onError?.(e)}},async onRequest(e){if(o===a){let e=i.get();i.set({isPending:e.data===null,data:e.data,error:null,isRefetching:!0,refetch:i.value.refetch})}await c?.onRequest?.(e)}}).catch(e=>{o===a&&i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{s(void 0)})})};e=Array.isArray(e)?e:[e];let s=!1,c=!1,l=!1,u=()=>{s?l=!0:(s=!0,o().finally(()=>{s=!1;let e=l&&c;l=!1,e&&u()}))};return $w(i,()=>{if(vT())return;c=!0;let t=!1,n,r=e.map(e=>e.listen(()=>{t?o():(t=!0,clearTimeout(n),u())}));return n=setTimeout(()=>{t=!0,u()},0),()=>{c=!1;for(let e of r)e();clearTimeout(n)}}),i},xT=()=>Math.floor(Date.now()/1e3),ST=5;function CT(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||cT().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=xT(),t();else if(e?.event===`visibilitychange`){if(xT()-c.lastSessionRequest<ST)return;c.lastSessionRequest=xT(),t()}else t()}},d=e=>{Rw().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=Rw().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=aT().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=cT().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=Rw().setup(),c.cleanupFocusSetup=aT().setup(),c.cleanupOnlineSetup=cT().setup())},cleanup:()=>{c.isInitialized&&(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.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var wT=Object.create(null),TT=e=>({}),ET=new Proxy(wT,{get(e,t){return TT()[t]??wT[t]},has(e,t){return t in TT()||t in wT},set(e,t,n){let r=TT(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=TT(!0);return delete n[t],!0},ownKeys(){let e=TT(!0);return Object.keys(e)}});ET.NODE_ENV;function DT(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 DT(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return DT(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return DT(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return DT(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return DT(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return DT(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return DT(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function OT(){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 kT(e){let t=e.split(`
21
+ at `);return t.length<=1?e:(t.splice(1,1),t.join(`
22
+ at `))}function AT(e,t){class n extends e{#e;constructor(...e){if(OT()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=kT(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 jT={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};AT(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:jT[e]){if(super(t?.message,t&&`cause`in t?{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,t&&`cause`in t){let{cause:e,...n}=t;this.body=Object.defineProperty(n,"cause",{value:e,writable:!0,configurable:!0})}else this.body=t}},Error);var MT=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},NT=47;function PT(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===NT;)t--;return t===e.length?e:e.slice(0,t)}function FT(e){try{return(PT(new URL(e).pathname)||`/`)!==`/`}catch{throw new MT(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function IT(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new MT(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof MT?t:new MT(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function LT(e,t=`/api/auth`){if(IT(e),FT(e))return e;let n=PT(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function RT(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 zT(e,t,n,r,i){if(e)return LT(e,t);if(r!==!1){let e=ET.BETTER_AUTH_URL||ET.NEXT_PUBLIC_BETTER_AUTH_URL||ET.PUBLIC_BETTER_AUTH_URL||ET.NUXT_PUBLIC_BETTER_AUTH_URL||ET.NUXT_PUBLIC_AUTH_URL||(ET.BASE_URL===`/`?void 0:ET.BASE_URL);if(e)return LT(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&RT(o,`proto`)&&RT(a,`host`))try{return LT(`${o}://${a}`,t)}catch{}if(n){let e=BT(n.url);if(!e)throw new MT(`Could not get origin from request. Please provide a valid base URL.`);return LT(e,t)}if(typeof window<`u`&&window.location)return LT(window.location.origin,t)}function BT(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var VT=[`javascript:`,`data:`,`vbscript:`];function HT(e){let t;try{t=new URL(e)}catch{return!0}return!VT.includes(t.protocol)}var UT={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&HT(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},WT=()=>typeof window>`u`,GT=Qw;function KT(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function qT(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function JT(e){return!e||e.session===null&&e.user===null?null:e}function YT(e,t){return tT(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function XT(e,t){let n=Gw(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=_T({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});nT(s,YT);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=qT(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=qT(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=JT(i),u=s.value,d=u.data!=null&&l!=null&&tT(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+GT,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return $w(s,()=>{let e;WT()||(e=setTimeout(()=>{d()},0));let r=CT({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}var ZT=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)}},QT=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 t=await i.init?.call(i,e.toString(),n);n=t.options||n,e=t.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}},$T=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}},eE=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 tE(e){if(typeof e==`number`)return new $T({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new $T(e);case`exponential`:return new eE(e);default:throw Error(`Invalid retry strategy`)}}var nE=[`get`,`post`,`put`,`patch`,`delete`];function rE(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return nE.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var iE=/^[a-z][a-z\d+.-]*:\/\/[^/?#]+/i,aE=/^\/+/;function oE(e){let t=e.length;for(;t>0&&e[t-1]===`/`;)t--;return e.slice(0,t)}function sE(e,t){let n=e.indexOf(t);return n===-1?[e,void 0]:[e.slice(0,n),e.slice(n+1)]}var cE=e=>e===`.`||e===`..`,lE=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function uE(e,t){let n=t.get(e);if(n===void 0)return lE(e);if(cE(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function dE(e,t){let n=new Map;if(t){if(Array.isArray(t)){let r=e.split(`/`).filter(e=>e.startsWith(`:`));for(let[e,i]of r.entries()){let r=t[e];n.set(i,String(r))}}else for(let[e,r]of Object.entries(t))n.set(`:${e}`,String(r))}return n}function fE(e,t){let n=dE(e,t);return e.split(`/`).map(e=>uE(e,n)).join(`/`)}function pE(e,t){let n=new URLSearchParams(e);for(let[e,r]of Object.entries(t||{})){if(r==null)continue;let t;if(typeof r==`string`)t=r;else if(Array.isArray(r)){for(let t of r)n.append(e,t);continue}else t=JSON.stringify(r);n.set(e,t)}let r=n.toString();return r.length>0?`?${r}`.replace(/\+/g,`%20`):``}function mE(e,t){if(!t)return e;let n=`${oE(t)}/`;return e.startsWith(n)?e.slice(n.length):e}function hE(e,t,n,r){let[i]=sE(e,`#`),[a,o=``]=sE(i,`?`),s=t.replace(aE,``),c=pE(`${o}&${n??``}`,r),l=`${oE(a)}/${s}${c}`;return iE.test(l)?new URL(l):l}function gE(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},{path:a}=rE(e),o=a===e?e:`/${a}`,s=o.match(iE)?.[0],[c,l]=sE(s?o.slice(s.length):mE(o,n),`?`),u=fE(c,r);return hE(s??n??``,u,l,i)}var _E=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},vE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function yE(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 vE.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function bE(e){try{return JSON.parse(e),!0}catch{return!1}}function xE(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 SE(e){try{return JSON.parse(e)}catch{return e}}function CE(e){return typeof e==`function`}function wE(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&CE(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&CE(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function TE(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function EE(e){let t=new Headers(TE(e?.headers,await _E(e)));if(!t.has(`content-type`)){let n=DE(e?.body);n&&t.set(`content-type`,n)}return t}function DE(e){return xE(e)?`application/json`:null}function OE(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function kE(e,t){let{body:n}=e;return n?!xE(n)||typeof n==`string`?n:OE(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function AE(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=rE(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function jE(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var ME=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function NE(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new ME(n.issues);return n.value}function PE(e){"@babel/helpers - typeof";return PE=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PE(e)}function FE(e,t){if(PE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(PE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function IE(e){var t=FE(e,`string`);return PE(t)==`symbol`?t:t+``}function LE(e,t,n){return(t=IE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RE(Object(n),!0).forEach(function(t){LE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var BE=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await QT(e,t),o=wE(a),s=new AbortController,c=a.signal??s.signal,l=gE(i,a),u=await EE(a),d=kE(a,u),f=AE(i,a),p=zE(zE({},a),{},{url:l,headers:u,body:d,method:f,signal:c});for(let e of r.onRequest)if(e){let t=await e(p);typeof t==`object`&&t&&Object.assign(p,t)}(`pipeTo`in p&&typeof p.pipeTo==`function`||typeof(t==null||(n=t.body)==null?void 0:n.pipe)==`function`)&&(`duplex`in p||(p.duplex=`half`));let{clearTimeout:m}=jE(a,s),h=await o(p.url,p);m();let g={response:h,request:p};for(let e of r.onResponse)if(e){var _;let n=await e(zE(zE({},g),{},{response:t!=null&&(_=t.hookOptions)!=null&&_.cloneResponse?h.clone():h}));n instanceof Response?h=n:typeof n==`object`&&n&&(h=n.response)}if(h.ok){if(p.method===`HEAD`)return{data:``,error:null};let e=yE(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??SE)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await NE(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e(zE(zE({},n),{},{response:t!=null&&(v=t.hookOptions)!=null&&v.cloneResponse?h.clone():h}))}return t?.throw?n.data:{data:n.data,error:null}}let y=t?.jsonParser??SE,b=await h.text(),x=bE(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:zE(zE({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e(zE(zE({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=tE(t.retry),i=t.retryAttempt??0;if(await n.shouldAttemptRetry(i,h)){for(let e of r.onRetry)e&&await e(g);let a=n.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await BE(e,zE(zE({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new ZT(h.status,h.statusText,x?S:b);return{data:null,error:zE(zE({},S),{},{status:h.status,statusText:h.statusText})}},VE=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=zE(zE({},n),e.query!==void 0&&{query:zE(zE({},e.query),n?.query)}),a=((r=e.plugins)==null||(r=r.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1))==null?void 0:r.schema)||e.schema;if(a){let r=t;a.config?.prefix&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,``),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),a.config?.baseURL&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,``)),r.startsWith(`/`)&&r.charAt(1)===`@`&&(r=r.substring(1));let o=a.schema[r];if(o){let{method:a,path:s}=rE(r);a&&(t=t.slice(0,t.length-r.length)+s);let c=n?.headers;if(o.headers&&!n?.disableValidation){let e={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((t,n)=>{e[n.toLowerCase()]=t});else if(typeof n.headers==`object`)for(let[t,r]of Object.entries(n.headers))r!=null&&(e[t.toLowerCase()]=r)}let t=await NE(o.headers,e),r={};for(let[e,n]of Object.entries(t))r[e.toLowerCase()]=n;c=r}let l=o.method??a;if(i=zE(zE(zE(zE({},i),l!==void 0&&{method:l}),o.output!==void 0&&{output:o.output}),c!==void 0&&{headers:c}),!n?.disableValidation){if(o.query&&(i.query=await NE(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=zE({},e.query);for(let e of Object.keys(t))n?.query&&Object.prototype.hasOwnProperty.call(n.query,e)&&(t[e]=n.query[e]);i.query=zE(zE({},t),i.query)}i=zE(zE({},i),{},{body:o.input?await NE(o.input,n?.body):n?.body,params:o.params?await NE(o.params,n?.params):n?.params})}return{url:t,options:i}}}return zE({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),HE=e=>{async function t(t,n){let r=zE(zE(zE({},e),n),{},{headers:TE(e?.headers,n?.headers),plugins:[...e?.plugins||[],VE(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await BE(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 BE(t,r)}return t},UE=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{}}},WE=e=>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`,GE=(e,t)=>{let n=`credentials`in Request.prototype,r=zT(e?.baseURL,e?.basePath,void 0,t)??UE(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=HE({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?hT(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[UT],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=XT(d,e),h=!1,g=e=>{h||e===null||(h=!0,KT(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher:WE,callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let S={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=ZC(t.getActions?.(d,S,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$sessionSignal:f,$fetch:d,$store:S}};function KE(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function qE(e){return e.charAt(0).toUpperCase()+e.slice(1)}var JE=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,YE=/['\u2019]/g;function XE(e){return e.replace(YE,``).match(JE)??[]}function ZE(e){return XE(e).map(e=>e.toLowerCase()).join(`-`)}function QE(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 $E(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`||KE(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(ZE).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=QE(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 eD(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,atomListeners:o,$store:s}=GE(e),c={};for(let[e,t]of Object.entries(r))c[`use${qE(e)}`]=t;return $E({...n,...c,hydrateSession:i,$fetch:a,$store:s},a,t,r,o)}var tD=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s;try{s=await Nw({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof Cw?e.code:`AUTH_CANCELLED`,message:hw.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}try{let{clientExtensionResults:a,...o}=s,c=await e(`/passkey/verify-authentication`,{body:{response:o},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...c,webauthn:{response:s,clientExtensionResults:a}}:c}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:hw.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(r,i)=>{let a=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...r?.authenticatorAttachment&&{authenticatorAttachment:r.authenticatorAttachment},...r?.name&&{name:r.name},...r?.context&&{context:r.context}},throw:!1});if(!a.data)return a;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await Ow({optionsJSON:{...a.data,extensions:o},useAutoRegister:r?.useAutoRegister}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-registration`,{...r?.fetchOptions,...i,body:{response:l,name:r?.name,...r?.createSession&&{createSession:!0}},method:`POST`,throw:!1});return u.data?(t.set(Math.random()),u.data.session&&n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u):u}catch(e){return e instanceof Cw?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:hw.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:hw.REGISTRATION_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:e.code,message:e.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:`UNKNOWN_ERROR`,message:e instanceof Error?e.message:hw.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),nD=()=>{let e=Gw();return{id:`passkey`,version:gw,$InferServerPlugin:{},getActions:(t,n)=>tD(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:bT(e,`/passkey/list-user-passkeys`,t,{method:`GET`}),$listPasskeys:e}},pathMethods:{"/passkey/register":`POST`,"/passkey/authenticate":`POST`},atomListeners:[{matcher(e){return e===`/passkey/verify-registration`||e===`/passkey/delete-passkey`||e===`/passkey/update-passkey`||e===`/sign-out`},signal:`$listPasskeys`},{matcher:e=>e===`/passkey/verify-authentication`,signal:`$sessionSignal`}],$ERROR_CODES:hw}},rD=`1.7.15`,iD=e=>({id:`sso-client`,version:rD,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}});function aD(e){if(e.indexOf(`%`)===-1)return e;try{return decodeURIComponent(e)}catch{return e}}var oD=/^[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E\x5F\x60\x61-\x7A\x7C\x7E]+$/,sD=/^[\x20\x21\x23-\x3A\x3C-\x5B\x5D-\x7E]*$/;function cD(e){return e.length<2||!e.startsWith(`"`)||!e.endsWith(`"`)?e:e.slice(1,-1)}function lD(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==32&&n!==9)break;t++}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==32&&t!==9)break;n--}return t===0&&n===e.length?e:e.slice(t,n)}function uD(e){let t=new Map;if(e.length<2)return t;for(let n of e.split(`;`)){let e=n.indexOf(`=`);if(e===-1)continue;let r=lD(n.slice(0,e)),i=cD(lD(n.slice(e+1)));oD.test(r)&&sD.test(i)&&t.set(r,aD(i))}return t}function dD(e){return typeof document>`u`?null:uD(document.cookie).get(e)??null}var fD=(e={})=>{let t=e.cookieName||`better-auth.last_used_login_method`;return{id:`last-login-method-client`,version:Pw,getActions(){return{getLastUsedLoginMethod:()=>dD(t),clearLastUsedLoginMethod:()=>{if(typeof document<`u`){let n=e.domain?` domain=${e.domain};`:``;document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;${n}`}},isLastUsedLoginMethod:e=>dD(t)===e}}}},pD=()=>({id:`magic-link`,version:Pw,$InferServerPlugin:{}}),mD=mw({INVALID_SESSION_TOKEN:`Invalid session token`}),hD=()=>({id:`multi-session`,version:Pw,$InferServerPlugin:{},atomListeners:[{matcher(e){return e===`/multi-session/set-active`},signal:`$sessionSignal`}],$ERROR_CODES:mD}),gD=mw({OTP_NOT_ENABLED:`OTP not enabled`,OTP_NOT_CONFIGURED:`OTP is not available`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,TOTP_ALREADY_ENABLED:`TOTP is already enabled`,TOTP_NOT_CONFIGURED:`TOTP is not available`,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.`,ACCOUNT_TEMPORARILY_LOCKED:`Too many failed verification attempts. Your account is temporarily locked. Please try again later.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),_D=e=>({id:`two-factor`,version:Pw,$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`&&HT(e.twoFactorPage)&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:gD}),vD=e=>eD({baseURL:LC(e,e),withCredentials:!0,plugins:[_D({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}}),nD(),pD(),iD(),hD(),fD()]}),yD=e=>{let t=e?.editor?.backendURL??Cn?.backendURL;t||(t=rr,console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=vD(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()=>({data:(await n.sso.providers())?.data?.providers??[]}),deleteSSOProvider:async e=>n.sso.deleteProvider({providerId:e.providerId}),listDeviceSessions:async(...e)=>n.multiSession.listDeviceSessions(...e),revokeDeviceSession:async(...e)=>n.multiSession.revoke(...e),setActiveSession:async(...e)=>n.multiSession.setActive(...e)}};T();var bD=c(null),xD=({children:e,manager:t})=>R(bD.Provider,{value:t,children:e}),SD=()=>i(bD);T();var CD=()=>{let e=SD(),[t,n]=N(e?.configuration.value);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.configuration.addEventListener(`change`,t),()=>e.configuration.removeEventListener(`change`,t)},[e]),t};T();var wD=()=>{let e=SD(),[t,r]=N(e?.localeDictionaries.value??{});return M(()=>{if(!e)return;let t=e=>r(e.detail??{});return e.localeDictionaries.addEventListener(`change`,t),()=>e.localeDictionaries.removeEventListener(`change`,t)},[e]),{localeDictionaries:t,setLocaleDictionaries:n(t=>e?.localeDictionaries.set(t),[e]),setLocaleDictionary:n(t=>e?.setLocaleDictionary(t),[e])}},TD=()=>{let{setLocaleDictionaries:e,setLocaleDictionary:t}=wD();return{setLocaleDictionaries:e,setLocaleDictionary:t}};T();var ED=()=>{let e=SD();return l(()=>({setEditedContentState:t=>e?.editedContent.set(t),setEditedDictionary:t=>e?.setEditedDictionary(t),setEditedContent:(t,n)=>e?.setEditedContent(t,n),addEditedContent:(t,n,r,i)=>e?.addContent(t,n,r,i),renameEditedContent:(t,n,r)=>e?.renameContent(t,n,r),removeEditedContent:(t,n)=>e?.removeContent(t,n),restoreEditedContent:t=>e?.restoreContent(t),getEditedContentValue:(t,n)=>e?.getContentValue(t,n)}),[e])},DD=()=>{let e=SD(),[t,n]=N(e?.editedContent.value);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.editedContent.addEventListener(`change`,t),()=>e.editedContent.removeEventListener(`change`,t)},[e]),{editedContent:t,...ED()}};T();var OD=()=>{let e=SD(),[t,n]=N(e?.editorEnabled.value??!1);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.editorEnabled.addEventListener(`change`,t),()=>e.editorEnabled.removeEventListener(`change`,t)},[e]),{enabled:t}},kD=()=>{let e=SD();return n(()=>e?.pingClient(),[e])},AD=`__intlayer_editor_manager__`,jD=`__intlayer_editor_manager_events__`,MD=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[jD]||(e[jD]=new EventTarget),e[jD]},ND=()=>typeof window>`u`?null:window[AD]??null,PD=e=>{if(typeof window<`u`){let t=window;t[AD]=e}MD().dispatchEvent(new CustomEvent(`change`,{detail:e}))},FD=e=>{let t=MD(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},ID=function(e){return e.INTLAYER_CLIENT_READY=`INTLAYER_CLIENT_READY`,e.INTLAYER_ARE_YOU_THERE=`INTLAYER_ARE_YOU_THERE`,e.INTLAYER_EDITOR_ACTIVATE=`INTLAYER_EDITOR_ACTIVATE`,e.INTLAYER_EDITOR_ENABLED=`INTLAYER_EDITOR_ENABLED`,e.INTLAYER_CONFIGURATION=`INTLAYER_CONFIGURATION`,e.INTLAYER_CURRENT_LOCALE=`INTLAYER_CURRENT_LOCALE`,e.INTLAYER_URL_CHANGE=`INTLAYER_URL_CHANGE`,e.INTLAYER_LOCALE_CHANGE_REQUESTED=`INTLAYER_LOCALE_CHANGE_REQUESTED`,e.INTLAYER_LOCALE_DICTIONARIES_CHANGED=`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,e.INTLAYER_DISTANT_DICTIONARIES_CHANGED=`INTLAYER_DISTANT_DICTIONARIES_CHANGED`,e.INTLAYER_HOVERED_CONTENT_CHANGED=`INTLAYER_HOVERED_CONTENT_CHANGED`,e.INTLAYER_FOCUSED_CONTENT_CHANGED=`INTLAYER_FOCUSED_CONTENT_CHANGED`,e.INTLAYER_EDITED_CONTENT_CHANGED=`INTLAYER_EDITED_CONTENT_CHANGED`,e.INTLAYER_IFRAME_CLICKED=`INTLAYER_IFRAME_CLICKED`,e.INTLAYER_DISPLAYED_DICTIONARY_KEYS=`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,e.INTLAYER_HOST_THEME_CHANGED=`INTLAYER_HOST_THEME_CHANGED`,e}({}),LD=.3,RD=e=>e.parentElement??e.getRootNode().host??null,zD=e=>{let t=e.transform&&e.transform!==`none`?new DOMMatrixReadOnly(e.transform).m42:0,n=Number.parseFloat(e.translate?.split(` `)[1]??``);return t+(Number.isNaN(n)?0:n)},BD=e=>{let t=0;for(let n=e;n;n=RD(n)){let e=getComputedStyle(n);Number.parseFloat(e.opacity)<1&&(t+=zD(e))}return t},VD=new Map,HD=(e,t)=>{let n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_DISCONNECTED?!0:!!(n&Node.DOCUMENT_POSITION_FOLLOWING)},UD=()=>{let e=null;for(let t of VD.keys())t.isConnected&&(e&&HD(t,e)||(e=t));let t=e?VD.get(e):void 0;VD.clear(),t?.()},WD=(e,t)=>{VD.size===0&&queueMicrotask(UD),VD.set(e,t)},GD=typeof HTMLElement<`u`?HTMLElement:class{},KD=class extends GD{_keyPathJson=`[]`;_dictionaryKey=``;_editorEnabled=!1;_isInIframe=!1;_isSelected=!1;_editedValue=void 0;_renderState=null;_selector=null;_unsubManager=null;_unsubManagerState=null;static get observedAttributes(){return[`key-path`,`dictionary-key`]}get dictionaryKey(){return this._dictionaryKey}get filteredKeyPath(){return this._getFilteredKeyPath()}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=`:host { display: contents; }`,e.appendChild(t)}attributeChangedCallback(e,t,n){e===`key-path`?this._keyPathJson=n??`[]`:this._dictionaryKey=n??``;let r=ND();r&&this._updateEditedValue(r)}connectedCallback(){typeof window<`u`&&(this._isInIframe=window.self!==window.top),this._subscribeToManager(),this._render()}disconnectedCallback(){this._unsubManager?.(),this._unsubManager=null,this._unsubManagerState?.(),this._unsubManagerState=null}_getRawKeyPath(){try{return JSON.parse(this._keyPathJson)}catch{return[]}}_getFilteredKeyPath(){return this._getRawKeyPath().filter(e=>e.type!==Rr)}_updateEditedValue(e){let t=this._getFilteredKeyPath();if(!this._dictionaryKey||t.length===0){this._editedValue=void 0,this._render();return}let n=this._getRawKeyPath(),r=n[n.length-1]?.type;if(r===`markdown`||r===`html`||r===`insertion`||r===`file`){this._editedValue=void 0,this._render();return}let i=e.getContentValue(this._dictionaryKey,t);if(typeof i==`object`&&i&&i.nodeType===`translation`){let t=e.currentLocale.value;i=t?i[Rr][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,VD.delete(this),this._updateSelectorAttr();return}let t=this._getFilteredKeyPath(),n=this._isSelected;this._isSelected=e.dictionaryKey===this._dictionaryKey&&(e.keyPath?.length??0)>0&&$n(e.keyPath??[],t),this._updateSelectorAttr(),this._isSelected&&!n?WD(this,()=>this._scrollIntoViewIfNeeded()):this._isSelected||VD.delete(this)}_scrollIntoViewIfNeeded(){let e=this._selector?.shadowRoot?.querySelector(`.wrapper`);if(!e)return;let t=e.getBoundingClientRect(),n=t.top-BD(e),r=n+t.height;n>=0&&r<=window.innerHeight&&!this._isCoveredAt((t.left+t.right)/2,n+1)||window.scrollBy({top:n-window.innerHeight*LD,behavior:`smooth`})}_isCoveredAt(e,t){let n=this.getRootNode();if(typeof n.elementFromPoint!=`function`)return!1;let r=n.elementFromPoint(e,t);return!!r&&!this.contains(r)}_updateSelectorAttr(){this._selector&&(this._isSelected?this._selector.setAttribute(`is-selecting`,``):this._selector.removeAttribute(`is-selecting`))}_subscribeToManager(){let e=ND();e&&this._setupManagerSubscriptions(e),this._unsubManager=FD(e=>{this._unsubManagerState?.(),this._unsubManagerState=null,e?this._setupManagerSubscriptions(e):(this._editorEnabled=!1,this._isSelected=!1,this._editedValue=void 0,this._render())})}_setupManagerSubscriptions(e){this._editorEnabled=e.editorEnabled.value??!1,this._updateIsSelected(e.focusedContent.value),this._updateEditedValue(e);let t=e=>{this._editorEnabled=e.detail,this._render()},n=e=>{this._updateIsSelected(e.detail)},r=()=>{this._updateEditedValue(e)};e.editorEnabled.addEventListener(`change`,t),e.focusedContent.addEventListener(`change`,n),e.editedContent.addEventListener(`change`,r),this._unsubManagerState=()=>{e.editorEnabled.removeEventListener(`change`,t),e.focusedContent.removeEventListener(`change`,n),e.editedContent.removeEventListener(`change`,r)}}_handlePress(e){e.stopPropagation();let t=ND();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),ND()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),ND()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,null)}_handleClickOutside(e){if(e.stopPropagation(),e.target!==this._selector||!this._isSelected)return;let t=e.detail?.originalEvent;if(t&&t.composedPath().some(e=>{if(e instanceof HTMLElement&&e.tagName===`INTLAYER-CONTENT-SELECTOR-WRAPPER`){let t=e;return t.dictionaryKey===this._dictionaryKey&&$n(t.filteredKeyPath,this._getFilteredKeyPath())}return!1})){this._selector?.setAttribute(`is-selecting`,``);return}let n=ND();n&&n.focusedContent.set(null)}_render(){let e=this._isInIframe&&this._editorEnabled,t=this._editedValue,n=e?typeof t==`string`||typeof t==`number`||typeof t==`boolean`?`wrapped-text`:`wrapped-slot`:`simple`;this._renderState===n?n!==`simple`&&this._selector&&(this._updateSelectorAttr(),n===`wrapped-text`&&this._selector.firstChild?.nodeType===Node.TEXT_NODE&&(this._selector.firstChild.data=String(t))):this._rebuildContent(n)}_rebuildContent(e){let t=this.shadowRoot;for(;t.childNodes.length>1;)t.removeChild(t.lastChild);if(this._selector=null,e===`simple`)t.appendChild(document.createElement(`slot`));else{let n=document.createElement(`intlayer-content-selector`);this._selector=n,this._isSelected&&n.setAttribute(`is-selecting`,``),n.addEventListener(`intlayer:press`,e=>this._handlePress(e)),n.addEventListener(`intlayer:hover`,e=>this._handleHover(e)),n.addEventListener(`intlayer:unhover`,e=>this._handleUnhover(e)),n.addEventListener(`intlayer:click-outside`,e=>this._handleClickOutside(e)),e===`wrapped-text`?n.appendChild(document.createTextNode(String(this._editedValue))):n.appendChild(document.createElement(`slot`)),t.appendChild(n)}this._renderState=e}},qD=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,KD))},JD=new WeakSet,YD=e=>{JD.add(e)},XD=e=>JD.has(e),ZD=[`a[href]`,`button`,`input`,`select`,`textarea`,`label`,`summary`,`option`,`video[controls]`,`audio[controls]`,`[contenteditable=""]`,`[contenteditable="true"]`,`[onclick]`,...[`button`,`link`,`checkbox`,`radio`,`switch`,`tab`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`combobox`,`slider`,`spinbutton`,`textbox`].map(e=>`[role="${e}"]`)].join(`,`),QD=`intlayer-`,$D=e=>{if(e.localName.startsWith(QD))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host.localName.startsWith(QD)},eO=e=>{let t=e.composedPath().filter(e=>e instanceof Element),n=t.findLastIndex($D);return t.some((e,t)=>$D(e)?!1:e.matches(ZD)?!0:t>n&&getComputedStyle(e).cursor===`pointer`)},tO=250,nO=`
23
+ :host {
24
+ display: contents;
25
+ }
26
+
27
+ .wrapper {
28
+ display: inline-block;
29
+ cursor: pointer;
30
+ user-select: none;
31
+ border-radius: 0.375rem;
32
+ outline-width: 2px;
33
+ outline-offset: 4px;
34
+ outline-style: solid;
35
+ outline-color: transparent;
36
+ transition: all 100ms 50ms ease-in-out;
37
+ }
38
+
39
+ .wrapper[data-active] {
40
+ outline-color: inherit;
41
+ }
42
+
43
+ /*
44
+ * Text content wraps over several lines: an outline would frame the whole
45
+ * block, so each line fragment gets its own ring instead. The padding keeps
46
+ * the ring 4px away from the text, the negative margin cancels its layout.
47
+ */
48
+ .wrapper[data-text] {
49
+ display: inline;
50
+ outline: none;
51
+ padding: 4px;
52
+ margin: -4px;
53
+ box-shadow: 0 0 0 2px transparent;
54
+ -webkit-box-decoration-break: clone;
55
+ box-decoration-break: clone;
56
+ }
57
+
58
+ .wrapper[data-text][data-active] {
59
+ box-shadow: 0 0 0 2px currentColor;
60
+ }
61
+ `,rO=e=>{let t=e.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>e.nodeType===Node.TEXT_NODE)},iO=typeof HTMLElement<`u`?HTMLElement:class{},aO=class extends iO{_isSelecting=!1;_pressDuration=tO;_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=nO,e.appendChild(t);let n=document.createElement(`span`);n.className=`wrapper`,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`);let r=document.createElement(`slot`);n.appendChild(r),e.appendChild(n),this._wrapper=n,r.addEventListener(`slotchange`,()=>n.toggleAttribute(`data-text`,rO(r))),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?tO:parseInt(n,10))}connectedCallback(){this._clickOutsideHandler=e=>{(this._isSelecting||this._isSelectingState)&&(e.composedPath().includes(this)||(this._clearPressTimer(),this._isSelectingState=!1,this._isSelecting=!1,this.removeAttribute(`is-selecting`),this._dispatch(`intlayer:click-outside`,{originalEvent:e}),this._updateActiveState()))},document.addEventListener(`mousedown`,this._clickOutsideHandler),document.addEventListener(`touchstart`,this._clickOutsideHandler)}disconnectedCallback(){this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),document.removeEventListener(`touchstart`,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,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}_select(){this._clearPressTimer(),this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>this._select(),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){if(XD(e))return;let t=e.metaKey||e.ctrlKey;this._isSelecting||this._isSelectingState||t?(e.preventDefault(),e.stopPropagation(),t&&this._select()):eO(e)||(YD(e),this._select())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},oO=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,aO),qD())},sO=(e,t)=>{try{let n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;let i=n.pathname.replace(/\/$/,``),a=r.pathname.replace(/\/$/,``);return i===``||a===``||i===a}catch(n){return console.error(`Invalid URL(s)`,n,{url1:e,url2:t}),!1}},cO=()=>Math.random().toString(36).slice(2),lO=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;_warnedRejectedOrigins=new Set;constructor(e){this._config=e,this.senderId=cO()}start(){typeof window<`u`&&(this._windowHandler||(this._windowHandler=e=>{this._handleMessage(e)},window.addEventListener(`message`,this._windowHandler)))}stop(){this._windowHandler&&=(window.removeEventListener(`message`,this._windowHandler),null)}send(e,t){let n={type:e,data:t,senderId:this.senderId,messageId:cO()};for(let e of this._config.allowedOrigins)e&&this._config.postMessageFn(n,e)}subscribe(e,t){return this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(t),()=>{this._subscribers.get(e)?.delete(t)}}_handleMessage(e){let t=e.data;if(!t||typeof t!=`object`)return;let{type:n,data:r,senderId:i,messageId:a}=t;if(!n||typeof n!=`string`||i===this.senderId)return;if(a){if(this._seenMessageIds.has(a))return;this._seenMessageIds.add(a),this._seenMessageIds.size>200&&this._seenMessageIds.clear()}let{allowedOrigins:o}=this._config;if(!(!o||o.length===0||o.includes(`*`)||o.filter(e=>!!e&&e!==``).some(t=>sO(t,e.origin)))){n.startsWith(`INTLAYER`)&&!this._warnedRejectedOrigins.has(e.origin)&&(this._warnedRejectedOrigins.add(e.origin),console.warn(`[intlayer] Ignored editor message "${n}" from origin "${e.origin}" — not in allowed origins [${o.join(`, `)}]. Check the editor.editorURL / editor.cmsURL configuration.`));return}let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},uO=class extends EventTarget{_value;_key;_messenger;_options;_unsubscribers=[];constructor(e,t,n={}){super(),this._key=e,this._messenger=t,this._options={emit:n.emit??!0,receive:n.receive??!0},n.initialValue!==void 0&&(this._value=n.initialValue)}get value(){return this._value}set(e){let t=typeof e==`function`?e(this._value):e;this._value=t,this.dispatchEvent(new CustomEvent(`change`,{detail:t})),this._options.emit&&this._messenger.send(`${this._key}/post`,t)}start(){if(this._options.receive){let e=this._messenger.subscribe(`${this._key}/post`,e=>{this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e}))});this._unsubscribers.push(e)}if(this._options.emit){let e=this._messenger.subscribe(`${this._key}/get`,(e,t)=>{t!==this._messenger.senderId&&this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)});this._unsubscribers.push(e)}this._options.receive&&this._value===void 0&&this._messenger.send(`${this._key}/get`)}stop(){for(let e of this._unsubscribers)e();this._unsubscribers.length=0}postCurrentValue(){this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)}},dO=()=>{for(let e of[`mousedown`,`click`])window.dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window}))},fO=class{_messenger;_clickHandler=null;_unsubscribeMerge=null;constructor(e){this._messenger=e}startInterceptor(){typeof window<`u`&&(this._clickHandler=e=>{XD(e)||this._messenger.send(`INTLAYER_IFRAME_CLICKED`)},window.addEventListener(`click`,this._clickHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(`INTLAYER_IFRAME_CLICKED`,dO)}stopInterceptor(){this._clickHandler&&=(window.removeEventListener(`click`,this._clickHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},pO=e=>{let t=`__intlayer_shared_${e}__`,n=()=>{let e={isSet:!1,value:void 0,eventTarget:new EventTarget};if(typeof window>`u`)return e;let n=window;return n[t]??=e,n[t]};return{get:()=>{let e=n();return e.isSet?e.value:void 0},set:(e,t)=>{let r=n();r.isSet=!0,r.value=e,r.eventTarget.dispatchEvent(new CustomEvent(`change`,{detail:{value:e,sourceId:t}}))},subscribe:e=>{let{eventTarget:t}=n(),r=t=>{let{value:n,sourceId:r}=t.detail;e(n,r)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)}}},mO=class{_messenger;_originalPushState=null;_originalReplaceState=null;_listeners=[];constructor(e){this._messenger=e}start(){if(typeof window>`u`)return;let e=()=>{this._messenger.send(`INTLAYER_URL_CHANGE/post`,window.location.pathname)};this._originalPushState=history.pushState,this._originalReplaceState=history.replaceState;let t=e=>function(...t){e.apply(this,t),window.dispatchEvent(new Event(`locationchange`))};history.pushState=t(this._originalPushState),history.replaceState=t(this._originalReplaceState);for(let t of[`locationchange`,`popstate`,`hashchange`,`load`]){let n=e;window.addEventListener(t,n),this._listeners.push([t,n])}e()}stop(){if(typeof window<`u`){for(let[e,t]of this._listeners)window.removeEventListener(e,t);this._listeners=[],this._originalPushState&&=(history.pushState=this._originalPushState,null),this._originalReplaceState&&=(history.replaceState=this._originalReplaceState,null)}}},hO=3e3,gO=1e4,_O=e=>typeof e==`object`&&!!e&&typeof e.isActivated==`boolean`,vO=pO(`edited_content`),yO=pO(`focused_content`),bO=class{messenger;editorEnabled;focusedContent;localeDictionaries;editedContent;configuration;currentLocale;displayedDictionaryKeys;_urlManager;_iframeInterceptor;_mode;_configuration;_unsubAreYouThere=null;_unsubActivate=null;_unsubClientReady=null;_clientHeartbeatTimer=null;_lastClientReadyAt=0;_displayedKeysObserver=null;_displayedKeysTimer=null;_displayedKeysListeners=[];_unsubDisplayedKeysGet=null;_stopSharedStateSyncs=[];constructor(e){this._mode=e.mode,this._configuration=e.configuration,this.messenger=new lO(e.messenger),this.editorEnabled=new uO(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new uO(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new uO(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new uO(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new uO(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new uO(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this.displayedDictionaryKeys=new uO(`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`,initialValue:e.mode===`client`?[]:void 0}),this._urlManager=new mO(this.messenger),this._iframeInterceptor=new fO(this.messenger)}start(){this.messenger.start(),this.editorEnabled.start(),this.focusedContent.start(),this.localeDictionaries.start(),this.editedContent.start(),this.configuration.start(),this.currentLocale.start(),this.displayedDictionaryKeys.start(),this._stopSharedStateSyncs=[this._syncWithSharedState(this.editedContent,vO,e=>Object.keys(e).length>0),this._syncWithSharedState(this.focusedContent,yO)],this._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),this._startDisplayedDictionariesTracking(),this.messenger.send(`INTLAYER_EDITED_CONTENT_CHANGED/get`),this._configuration?.editor?.enabled!==!1&&this._setupActivationHandshake()):(this._iframeInterceptor.startMerger(),this._setupEditorHandshake())}stop(){this._unsubAreYouThere?.(),this._unsubActivate?.(),this._unsubClientReady?.(),this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this._stopClientHeartbeat(),this.messenger.stop(),this.editorEnabled.stop(),this.focusedContent.stop(),this.localeDictionaries.stop(),this.editedContent.stop(),this.configuration.stop(),this.currentLocale.stop(),this.displayedDictionaryKeys.stop(),this._stopDisplayedDictionariesTracking();for(let e of this._stopSharedStateSyncs)e();this._stopSharedStateSyncs=[],this._urlManager.stop(),this._iframeInterceptor.stopInterceptor(),this._iframeInterceptor.stopMerger()}pingClient(){this._mode===`editor`&&(this.messenger.send(`INTLAYER_ARE_YOU_THERE`),this.messenger.send(`INTLAYER_EDITOR_ENABLED/post`,!0))}requestLocaleChange(e){this._mode===`editor`&&this.messenger.send(`INTLAYER_LOCALE_CHANGE_REQUESTED`,e)}onLocaleChangeRequested(e){return this._mode===`client`?this.messenger.subscribe(`INTLAYER_LOCALE_CHANGE_REQUESTED`,e):()=>{}}setFocusedContentKeyPath(e){let t=this.focusedContent.value;t&&this.focusedContent.set({...t,keyPath:e})}setLocaleDictionary(e){if(!e.localId)return;let t=this.localeDictionaries.value??{};this.localeDictionaries.set({...t,[e.localId]:e})}setEditedDictionary(e){if(!e.localId){console.error(`setEditedDictionary: missing localId`,e);return}let t=this.editedContent.value??{};this.editedContent.set({...t,[e.localId]:e})}setEditedContent(e,t){let n=this.editedContent.value??{};this.editedContent.set({...n,[e]:{...n[e],content:t}})}addContent(e,t,n=[],r=!0){let i=this.editedContent.value??{},a=(this.localeDictionaries.value??{})[e]?.content,o=structuredClone(i[e]?.content??a),s=n;if(!r){let e=0,t=n.slice(0,-1),r=n[n.length-1],i=r.key;for(;Ji(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=qi(o,s,t);this.editedContent.set({...i,[e]:{...i[e],content:c}})}renameContent(e,t,n=[]){let r=this.editedContent.value??{},i=(this.localeDictionaries.value??{})[e]?.content,a=na(structuredClone(r[e]?.content??i),t,n);this.editedContent.set({...r,[e]:{...r[e],content:a}})}removeContent(e,t){let n=this.editedContent.value??{},r=(this.localeDictionaries.value??{})[e]?.content,i=qi(structuredClone(n[e]?.content??r),t,Ji(r,t));this.editedContent.set({...n,[e]:{...n[e],content:i}})}restoreContent(e){let{[e]:t,...n}=this.editedContent.value??{};this.editedContent.set(n)}getContentValue(e,t){let n=this.editedContent.value;if(!n)return;let r=t.filter(e=>e.type!==Rr),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:Ji(n[e]?.content??{},r,this.currentLocale.value);let a=Object.keys(n).filter(t=>t.startsWith(`${e}:`)&&(!i||t in i));for(let e of a){let t=Ji(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_syncWithSharedState(e,t,n=()=>!0){let r=!1,i=t=>{r=!0,e.set(t),r=!1},a=e=>{r||t.set(e.detail,this.messenger.senderId)};e.addEventListener(`change`,a);let o=t.subscribe((e,t)=>{t!==this.messenger.senderId&&i(e)}),s=t.get();return s!==void 0&&n(s)&&i(s),()=>{e.removeEventListener(`change`,a),o()}}_scanDisplayedDictionaryKeys(){if(typeof document>`u`)return;let e=document.querySelectorAll(`intlayer-content-selector-wrapper[dictionary-key]`),t=Array.from(new Set(Array.from(e).map(e=>e.getAttribute(`dictionary-key`)??``).filter(Boolean)));this.displayedDictionaryKeys.set(t)}_startDisplayedDictionariesTracking(){if(typeof document>`u`||typeof MutationObserver>`u`)return;let e=()=>{this._displayedKeysTimer&&clearTimeout(this._displayedKeysTimer),this._displayedKeysTimer=setTimeout(()=>this._scanDisplayedDictionaryKeys(),100)};this._displayedKeysObserver=new MutationObserver(e),this._displayedKeysObserver.observe(document.body,{childList:!0,subtree:!0});for(let t of[`locationchange`,`popstate`]){let n=e;window.addEventListener(t,n),this._displayedKeysListeners.push([t,n])}this._unsubDisplayedKeysGet=this.messenger.subscribe(`INTLAYER_DISPLAYED_DICTIONARY_KEYS/get`,()=>{this._scanDisplayedDictionaryKeys()}),this._scanDisplayedDictionaryKeys()}_stopDisplayedDictionariesTracking(){this._displayedKeysObserver?.disconnect(),this._displayedKeysObserver=null,this._displayedKeysTimer&&=(clearTimeout(this._displayedKeysTimer),null);for(let[e,t]of this._displayedKeysListeners)window.removeEventListener(e,t);this._displayedKeysListeners=[],this._unsubDisplayedKeysGet?.(),this._unsubDisplayedKeysGet=null}_setupEditorHandshake(){this._unsubClientReady=this.messenger.subscribe(`INTLAYER_CLIENT_READY`,e=>{if(!_O(e)){this.editorEnabled.set(!0),this.messenger.send(`INTLAYER_EDITOR_ACTIVATE`);return}let t=e.isActivated&&this.editorEnabled.value;this._lastClientReadyAt=Date.now(),this._startClientHeartbeat(),this.editorEnabled.set(!0),t||this.messenger.send(`INTLAYER_EDITOR_ACTIVATE`)}),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}_startClientHeartbeat(){this._clientHeartbeatTimer||=setInterval(()=>{let e=Date.now()-this._lastClientReadyAt>gO;this.editorEnabled.value&&e&&this.editorEnabled.set(!1),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)},hO)}_stopClientHeartbeat(){this._clientHeartbeatTimer&&clearInterval(this._clientHeartbeatTimer),this._clientHeartbeatTimer=null}_setupActivationHandshake(){let e=()=>this.messenger.send(`INTLAYER_CLIENT_READY`,{isActivated:this.editorEnabled.value===!0});e(),this._unsubAreYouThere=this.messenger.subscribe(`INTLAYER_ARE_YOU_THERE`,e),this._unsubActivate=this.messenger.subscribe(`INTLAYER_EDITOR_ACTIVATE`,()=>{this.editorEnabled.set(!0),this._scanDisplayedDictionaryKeys(),this._broadcastData()})}_broadcastData(){let e=this.configuration.value;e&&this.messenger.send(`INTLAYER_CONFIGURATION/post`,e);let t=this.currentLocale.value;t&&this.messenger.send(`INTLAYER_CURRENT_LOCALE/post`,t);let n=this.localeDictionaries.value;n&&this.messenger.send(`INTLAYER_LOCALE_DICTIONARIES_CHANGED/post`,n);let r=this.displayedDictionaryKeys.value;r&&this.messenger.send(`INTLAYER_DISPLAYED_DICTIONARY_KEYS/post`,r)}async _loadDictionaries(){try{let e=(await kn(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-DWe4YFkq.js`);return{getUnmergedDictionaries:e}},[])).getUnmergedDictionaries(),t=Object.fromEntries(Object.values(e).flat().map(e=>[e.localId,e]));this.localeDictionaries.set(t),this.editorEnabled.value&&this._broadcastData()}catch(e){console.warn(`[intlayer] Failed to load unmerged dictionaries:`,e)}}};T();var xO=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=P(null);i.current||=new bO({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return M(()=>(oO(),PD(a),a.start(),()=>{a.stop(),PD(null)}),[a]),M(()=>{a&&t&&Object.keys(t).length!==0&&a.configuration.set(t)},[a,t]),R(xD,{manager:a,children:e})};T();var SO=()=>{let e=SD(),[t,r]=N(e?.focusedContent.value??null);return M(()=>{if(!e)return;let t=e=>r(e.detail);return e.focusedContent.addEventListener(`change`,t),()=>e.focusedContent.removeEventListener(`change`,t)},[e]),{focusedContent:t,setFocusedContent:n(t=>e?.focusedContent.set(t),[e]),setFocusedContentKeyPath:n(t=>e?.setFocusedContentKeyPath(t),[e])}};T();var CO=(e,t)=>{let n=SD(),[r,i]=N(t);return M(()=>n?.messenger.subscribe(`${e}/post`,e=>i(()=>e)),[n,e]),r},wO=()=>CO(ID.INTLAYER_URL_CHANGE,void 0);T();var TO=`INTLAYER_EDITED_CONTENT_CHANGED`,EO=()=>{let{editedContent:e,setEditedContentState:t}=DD();M(()=>{if(e!==void 0)return;let n=localStorage.getItem(TO);if(n)try{t(JSON.parse(n))}catch(e){console.error(e)}},[]),M(()=>{e!==void 0&&localStorage.setItem(TO,JSON.stringify(e))},[e])};T();var DO=()=>{let e=SD(),[t,n]=N(e?.currentLocale.value);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.currentLocale.addEventListener(`change`,t),()=>e.currentLocale.removeEventListener(`change`,t)},[e]),t};T();var OO=(e,t,n)=>{for(let r of t)try{if(Ji(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},kO=()=>{let{localeDictionaries:e}=wD(),t=DO(),{setFocusedContent:n,setFocusedContentKeyPath:r,focusedContent:i}=SO();return{focusedContent:l(()=>{if(!i||!e||i.dictionaryLocalId)return i;let n=Object.values(e).filter(e=>e.key===i.dictionaryKey),r=OO(i.keyPath??[],n,t);return{...i,...r}},[i,e,t]),setFocusedContent:n,setFocusedContentKeyPath:r}};T();var AO=5e3,jO=(e=AO)=>{let{enabled:t}=OD(),[r,i]=N(0),[a,o]=N(!1);M(()=>{if(t||r===0)return;let n=setTimeout(()=>o(!0),e);return()=>clearTimeout(n)},[t,r,e]);let s=n(()=>{o(!1),i(e=>e+1)},[]),c=n(()=>o(!1),[]);return{isConnectionFailed:a&&!t,handleFrameLoad:s,dismiss:c}};T();var MO=3e3,NO=e=>fetch(e,{method:`HEAD`,mode:`no-cors`,cache:`no-store`}).then(()=>!0).catch(()=>!1),PO=({applicationURL:e,isDisconnected:t,reloadFrame:n,intervalMs:r=MO})=>{let i=P(!1),a=P(n);a.current=n,M(()=>{if(!t){i.current=!1;return}if(!e)return;let n=!1,o=async()=>{let t=await NO(e);n||(t?i.current||(i.current=!0,a.current()):i.current=!1)};o();let s=setInterval(()=>void o(),r);return()=>{n=!0,clearInterval(s)}},[e,t,r])},FO=e=>{let t=CD(),{locale:n}=aa(),r=PC(),i=e?.sessionToken??r?.accessToken,a={headers:{[ar]:n,...i&&{Authorization:`Bearer ${i}`}},...e?.options??{}},o=e?.intlayerConfiguration??t;return{options:a,resolvedConfig:o?.editor?o:void 0}},IO=e=>{let t=CD();return yD(e?.intlayerConfiguration??t)},LO=e=>{let{options:t,resolvedConfig:n}=FO(e);return uw(t,n)},RO=e=>{let{options:t,resolvedConfig:n}=FO(e);return ow(t,n)},zO=e=>{let{options:t,resolvedConfig:n}=FO(e);return ew(t,n)},BO=e=>{let{options:t,resolvedConfig:n}=FO(e);return pw(t,n)},VO=e=>{let{options:t,resolvedConfig:n}=FO(e);return sw(t,n)},HO=e=>{let{options:t,resolvedConfig:n}=FO(e);return rw(t,n)},UO=e=>{let t=ZC(e,CD(),{editor:Cn}),n=qC(void 0,t),r=te(),{data:i}=Wt({queryKey:[`oAuth2AccessToken`],queryFn:n.getOAuth2AccessToken,enabled:!!(t.editor.clientId&&t.editor.clientSecret)&&r,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1});return{oAuth2AccessToken:i?.data}},WO=(e,t)=>{let n=CD(),r=t??n??{editor:Cn},i=pe(),a=te(),{data:o,isFetched:s,refetch:c}=Wt({queryKey:[`session`],queryFn:async()=>(await yD(r).getSession({query:{}})).data,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:!e&&a}),l=o??(s?null:void 0),u=e=>{i.setQueryData([`session`],e)},d=async()=>(await c()).data;return{session:l,fetchSession:d,revalidateSession:d,setSession:u}},GO=({session:e,intlayerConfiguration:t}={})=>{let{session:n,fetchSession:r,revalidateSession:i,setSession:a}=WO(e,t),{oAuth2AccessToken:o}=UO(t),s=PC();return{session:n,fetchSession:r,setSession:a,revalidateSession:i,oAuth2AccessToken:o,isAuthenticated:!!(n?.user||o||s?.accessToken)}},KO=({requireUser:e,requireProject:t,requireOrganization:n})=>{let{oAuth2AccessToken:r,session:i}=GO({intlayerConfiguration:CD()}),a=PC(),o=i?i.user:r?.user??a?.user,s=i?i.organization:r?.organization??a?.organization,c=i?i.project:r?.project??a?.project;return{enable:(!e||!!o)&&(!t||!!c)&&(!n||!!s)}},qO=e=>{let{requireUser:t,requireProject:n,requireOrganization:r,...i}=e,{enable:a}=KO({requireUser:t,requireProject:n,requireOrganization:r});return Wt({enabled:i?.enabled!==!1&&a,...i})},JO=()=>{let e=zO();return Gt({mutationKey:[`ai-translateJSON`],mutationFn:t=>e.translateJSON(t)})},YO=()=>{let e=zO();return Gt({mutationKey:[`ai-auditContentDeclarationMetadata`],mutationFn:t=>e.auditContentDeclarationMetadata(t)})},XO=()=>{let e=zO();return Gt({mutationKey:[`ai-auditContentDeclarationField`],mutationFn:t=>e.auditContentDeclarationField(t)})},ZO=()=>{let e=zO();return Gt({mutationKey:[`ai-customQuery`],mutationFn:t=>e.customQuery(t)})},QO=[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]],$O=()=>{let e=IO(),t=pe();return Gt({mutationKey:[`logout`],mutationFn:()=>e.signOut({}),onSettled:()=>{QO.forEach(e=>{t.removeQueries({queryKey:e})})}})},ek={newDictionaries:[],updatedDictionaries:[],upToDateDictionaries:[],error:[]},tk=(e,t)=>({newDictionaries:[...e.newDictionaries,...t.newDictionaries],updatedDictionaries:[...e.updatedDictionaries,...t.updatedDictionaries],upToDateDictionaries:[...e.upToDateDictionaries,...t.upToDateDictionaries],error:[...e.error,...t.error]}),nk=e=>e instanceof Error?e.message:String(e),rk=async(e,t,{batchSize:n=8,concurrency:r=3,onProgress:i}={})=>{let a={totalCount:e.length,settledCount:0,pushingKeys:[],failedKeys:[]},o=()=>i?.({...a});o();let s=async e=>{let n=e.map(e=>e.key);a.pushingKeys=[...a.pushingKeys,...n],o();let r;try{r=await t(e)}catch(e){r=e instanceof Error?e:Error(String(e))}let i=r instanceof Error?n:(r.data?.error??[]).map(({key:e})=>e);return a.pushingKeys=a.pushingKeys.filter(e=>!n.includes(e)),a.settledCount+=e.length,a.failedKeys=[...a.failedKeys,...i],o(),r},c=or(e,n),l=await dr(c,s,r),[u]=l.filter(e=>e instanceof Error);if(u&&l.every(e=>e instanceof Error))throw u;let d=l.reduce((e,t,n)=>tk(e,t instanceof Error?{...ek,error:(c[n]??[]).map(e=>({key:e.key,localId:e.localId,message:nk(t)}))}:{...ek,...t.data}),ek),f=l.find(e=>!(e instanceof Error)&&!e.success);return{success:!u&&!f,status:f?.status??200,data:d,...f?.error&&{error:f.error}}};T();var ik=(e,t)=>{let n=RO();return qO({queryKey:[`dictionaries`,e],queryFn:({signal:t})=>n.getDictionaries(e,{signal:t}),requireUser:!0,requireOrganization:!0,requireProject:!0,...t})},ak=e=>{let t=RO();return qO({queryKey:[`dictionariesKeys`],queryFn:()=>t.getDictionariesKeys(),requireUser:!0,requireOrganization:!0,requireProject:!0,...e})},ok=()=>{let e=RO(),[t,n]=N(null);return{...Gt({mutationKey:[`dictionaries`],mutationFn:t=>rk(t.dictionaries,t=>e.pushDictionaries(t),{onProgress:n}),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}}),progress:t}},sk=()=>{let e=RO();return Gt({mutationKey:[`dictionaries`],mutationFn:t=>e.deleteDictionary(t.dictionaryId),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}})},ck=()=>{let e=VO();return Wt({queryKey:[`editor`,`dictionaries`],queryFn:()=>e.getDictionaries()})},lk=()=>{let e=VO();return Gt({mutationKey:[`editor`,`dictionaries`],mutationFn:t=>e.writeDictionary(t)})},uk=(e,t)=>{let n=LO();return qO({queryKey:[`projects`,e],queryFn:({signal:t})=>n.getProjects(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},dk=(e,t)=>{let n=BO();return qO({queryKey:[`tags`,e],queryFn:({signal:t})=>n.getTags(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},fk=()=>{let{session:e,revalidateSession:t,setSession:n}=GO(),{mutate:r}=$O(),i=e?.user?`authenticated`:`unauthenticated`;return{isAuthenticated:i===`authenticated`,isUnauthenticated:i===`unauthenticated`,user:e?.user,revalidateSession:t,logout:async()=>{n(null),r()}}};u(),p();var pk=2e3,mk=3e4,hk=2**31-1,gk=[`editorAuth`],_k=c(null),vk=()=>i(_k),yk=async()=>(await(await fetch(`/api/auth`)).json()).data,bk=({children:e})=>{let t=pe(),[r,i]=N(!1),[a,o]=N(0),[s,c]=N(!1),[u,d]=N(!1),{data:f}=Wt({queryKey:gk,queryFn:yk,refetchInterval:e=>e.state.data?.isLoginPending?pk:!1,refetchOnWindowFocus:!0}),p=f?.auth??null;M(()=>{if(!p?.expiresAt)return;let e=new Date(p.expiresAt).getTime()-Date.now();if(e>hk)return;let n=setTimeout(()=>t.invalidateQueries({queryKey:gk}),Math.max(e,0));return()=>clearTimeout(n)},[p?.expiresAt,t]);let m=!!f?.isLoginPending;M(()=>{if(c(!1),!m)return;let e=setTimeout(()=>c(!0),mk);return()=>clearTimeout(e)},[m,a]);let h=n(()=>{i(!0),o(e=>e+1),fetch(`/api/auth/login`,{method:`POST`}).then(()=>t.invalidateQueries({queryKey:gk})).finally(()=>i(!1))},[t]),g=n(()=>{d(!0),fetch(`/api/auth/logout`,{method:`POST`}).then(e=>e.json()).then(e=>t.setQueryData(gk,e.data)).finally(()=>d(!1))},[t]),_=r||m&&!s,v=l(()=>({accessToken:p?.accessToken??null,user:p?.user,organization:p?.organization,project:p?.project,login:h,isLoggingIn:_}),[p,h,_]),y=l(()=>({auth:p,isLoggingIn:_,login:h,logout:g,isLoggingOut:u}),[p,_,h,g,u]);return R(_k.Provider,{value:y,children:R(NC,{value:v,children:e})})},xk=({children:e})=>R(jC,{children:R(ln,{children:R(bk,{children:[R(Ld,{}),e]})})}),Sk={key:`dictionary-edition-drawer`,content:{nodeType:`translation`,translation:{en:{openDictionaryEditor:{popoverContent:`Open Dictionary in Editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},"en-GB":{openDictionaryEditor:{popoverContent:`Click to open the dictionary in the editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},fr:{openDictionaryEditor:{popoverContent:`Ouvrir le dictionnaire dans l’éditeur`,label:`Cliquez pour ouvrir le dictionnaire dans l’éditeur`},backButtonText:`Liste des dictionnaires`,modalTitle:`Modifier le dictionnaire`,noDictionaryFocused:`Aucun dictionnaire sélectionné`,focusedDictionaryNotFound:`Dictionnaire focalisé non trouvé`},es:{openDictionaryEditor:{popoverContent:`Abrir el diccionario en el editor`,label:`Haga clic para abrir el diccionario en el editor`},backButtonText:`Lista de diccionarios`,modalTitle:`Editar el diccionario`,noDictionaryFocused:`No hay diccionario enfocado`,focusedDictionaryNotFound:`Diccionario enfocado no encontrado`},de:{openDictionaryEditor:{popoverContent:`Wörterbuch im Editor öffnen`,label:`Klicken Sie hier, um das Wörterbuch im Editor zu öffnen`},backButtonText:`Wörterbuchliste`,modalTitle:`Wörterbuch bearbeiten`,noDictionaryFocused:`Kein Wörterbuch ausgewählt`,focusedDictionaryNotFound:`Ausgewähltes Wörterbuch nicht gefunden`},ja:{openDictionaryEditor:{popoverContent:`エディターで辞書を開く`,label:`エディターで辞書を開く`},backButtonText:`辞書リスト`,modalTitle:`辞書を編集`,noDictionaryFocused:`フォーカスされた辞書がありません`,focusedDictionaryNotFound:`フォーカスされた辞書が見つかりません`},ko:{openDictionaryEditor:{popoverContent:`편집기에서 사전 열기`,label:`편집기에서 사전 열기`},backButtonText:`사전 목록`,modalTitle:`사전 편집`,noDictionaryFocused:`포커스가 있는 사전이 없습니다`,focusedDictionaryNotFound:`포커스가 있는 사전이 없습니다`},zh:{openDictionaryEditor:{popoverContent:`点击打开词典到编辑器`,label:`点击打开词典到编辑器`},backButtonText:`词典列表`,modalTitle:`编辑词典`,noDictionaryFocused:`没有聚焦的词典`,focusedDictionaryNotFound:`没有聚焦的词典`},it:{openDictionaryEditor:{popoverContent:`Apri il dizionario nell’editor`,label:`Fai clic per aprire il dizionario nell’editor`},backButtonText:`Elenco di dizionari`,modalTitle:`Modifica dizionario`,noDictionaryFocused:`Nessun dizionario selezionato`,focusedDictionaryNotFound:`Nessun dizionario selezionato`},pt:{openDictionaryEditor:{popoverContent:`Abrir o dicionário no editor`,label:`Clique para abrir o dicionário no editor`},backButtonText:`Lista de dicionários`,modalTitle:`Editar dicionário`,noDictionaryFocused:`Nenhum dicionário focalizado`,focusedDictionaryNotFound:`Nenhum dicionário focalizado`},hi:{openDictionaryEditor:{popoverContent:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`,label:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`},backButtonText:`शब्दकोश सूची`,modalTitle:`शब्दकोश संपादित करें`,noDictionaryFocused:`कोई फोकस शब्दकोश नहीं है`,focusedDictionaryNotFound:`कोई फोकस शब्दकोश नहीं है`},ar:{openDictionaryEditor:{popoverContent:`انقر لفتح قاموس في المحرر`,label:`انقر لفتح قاموس في المحرر`},backButtonText:`قائمة القوامل`,modalTitle:`تحرير قاموس`,noDictionaryFocused:`لا يوجد قاموس مرتبط`,focusedDictionaryNotFound:`لا يوجد قاموس مرتبط`},ru:{openDictionaryEditor:{popoverContent:`Нажмите, чтобы открыть словарь в редакторе`,label:`Нажмите, чтобы открыть словарь в редакторе`},backButtonText:`Список словарей`,modalTitle:`Редактировать словарь`,noDictionaryFocused:`Нет фокусированного словаря`,focusedDictionaryNotFound:`Нет фокусированного словаря`}}},location:`local`,localId:`dictionary-edition-drawer::local::client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`,filePath:`client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`},Ck=({className:e,strokeWidth:t=4})=>R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:G(`size-full`,e),children:R(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[R(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[R(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),R(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),R(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[R(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),R(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),wk=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>R(C,{children:t&&n?R(`div`,{className:`relative size-full`,children:[R(`div`,{className:G(`absolute inset-s-0 top-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:R(Ck,{className:`size-10 max-h-full max-w-full`})}),e]}):t?R(`div`,{className:G(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:R(Ck,{className:`size-10 max-h-full max-w-full`})}):e??R(C,{})}),Tk=Hc(`flex-none shrink-0`,{variants:{size:{xs:`size-2`,sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-5`,"icon-xl":`size-6`,custom:``}},defaultVariants:{size:`md`}}),Ek=Hc(`rtl-mirror-icons inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{xs:`min-h-7 px-3 text-xs max-md:py-1`,sm:`min-h-7 px-3 text-xs max-md:py-1`,md:`min-h-8 px-6 text-sm max-md:py-2`,lg:`min-h-10 px-8 text-lg max-md:py-3`,xl:`min-h-11 px-10 text-xl max-md:py-4`,"icon-sm":`p-1.5`,"icon-md":`p-1.5`,"icon-lg":`p-1.5`,"icon-xl":`p-3`,custom:``},color:{neutral:`text-neutral ring-neutral-500/5 *:text-text-light`,card:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,text:`text-text ring-text/20 *:text-text-opposite`,foreground:`text-foreground ring-foreground/20 *:text-foreground-opposite`,"text-inverse":`text-text-opposite ring-text-opposite/20 *:text-text`,error:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,success:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,custom:``},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,"4xl":`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,"5xl":`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,full:`rounded-full`},variant:{default:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],outline:[`rounded-2xl border-[1.3px] border-current! bg-current/0 *:text-current!`,`hover:border-transparent hover:bg-current/30! focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],none:`border-none bg-current/0 text-inherit hover:bg-current/0`,link:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,"invisible-link":`h-auto justify-start border-inherit bg-transparent underline-offset-4 *:text-current! hover:bg-transparent`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/5 aria-[current]:bg-current/3`,fade:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/3`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],input:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{left:`justify-start text-start`,center:`justify-center text-center`,right:`justify-end text-end`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`default`,size:`md`,color:`text`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),X=({variant:e,size:t,color:n,children:r,Icon:i,IconRight:a,iconClassName:o,isLoading:s=!1,isActive:c,isSelected:l,isFullWidth:u,roundedSize:d,textAlign:f,disabled:p,label:m,className:h,type:g=`button`,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":b,...x})=>{let S=e===`link`||e===`invisible-link`,C=!r&&(i||a),w={"aria-label":x[`aria-label`]??m??void 0,"aria-labelledby":void 0,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":c===void 0?b:c,"aria-busy":s,"aria-current":c?`page`:void 0,"aria-disabled":p||s,"aria-selected":l},T=t===`icon-sm`||t===`icon-md`||t===`icon-lg`||t===`icon-xl`;return R(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:Ek({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:f??(a?`left`:`center`),className:h}),...w,...x,children:[i&&!s&&R(i,{className:Tk({size:t,className:G(!T&&`me-3`,o)}),"aria-hidden":`true`}),R(`div`,{className:G(`flex items-center justify-center transition-[width] duration-300`,s&&t===`sm`&&`w-3`,s&&t===`md`&&`w-4`,s&&t===`lg`&&`w-6`,s&&t===`xl`&&`w-8`),children:R(wk,{className:Tk({size:t,className:G(!T&&`me-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&R(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&R(`span`,{className:`sr-only`,children:m}),a&&R(a,{className:Tk({size:t,className:G(!T&&`ms-3`,o)}),"aria-hidden":`true`})]})},Dk=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>R(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:G(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-[grid-template-rows] duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,i&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...o,children:R(`div`,{style:{minHeight:`${a}px`},className:G(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})});T();var Ok=({children:e,header:t,isOpen:n,defaultIsOpen:r=!1,onToggle:i,onClick:a,disabled:o=!1,contentClassName:s,headerClassName:c,contentId:l,"aria-label":u,className:d,iconClassName:f,color:p=`text`,...m})=>{let h=n!==void 0,[_,v]=N(r),y=g(),b=h?n:_,x=!b,S=l??`${y}-accordion-content`,C=e=>{if(o)return;let t=!b;h||v(t),i?.(t),a?.(e)};return R(`div`,{className:G(`w-full`,d),children:[R(X,{variant:`hoverable`,color:p,onClick:C,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C(e))},disabled:o,isFullWidth:!0,className:G(`flex items-center justify-between`,c),IconRight:xs,iconClassName:G(`size-3.5 transform transition-transform duration-300 ease-in-out`,b?`rotate-0`:`-rotate-180`,f),"aria-expanded":b,"aria-controls":S,"aria-label":u,role:`button`,...m,children:t}),R(Dk,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:s,role:`region`,"aria-labelledby":S,children:e})]})},kk=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>R(`div`,{className:G(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:R(Ok,{isOpen:a,label:t,header:R(`div`,{className:`flex w-full`,children:[R(`div`,{className:`flex w-full items-center justify-between`,children:[R(`span`,{className:G(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&R(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&R(`p`,{className:`ps-3 text-card-foreground text-sm`,children:n})]}),children:R(`div`,{className:`size-full px-2`,children:r})})}),Ak=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:Gr},s=[...t,o];return R(kk,{level:t.length,title:`${a}`,description:``,isSelected:$n(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:R(gA,{...e,keyPath:s,section:n})},JSON.stringify(n))})},jk=new Set,Mk=null,Nk=()=>{Mk=null;let e=[...jk];jk.clear();for(let t of e)t()},Pk=e=>typeof requestAnimationFrame>`u`?()=>{}:(jk.add(e),Mk??=requestAnimationFrame(Nk),()=>{jk.delete(e),jk.size===0&&Mk!==null&&(cancelAnimationFrame(Mk),Mk=null)});T();var Fk=e=>e?.getAttribute(`aria-selected`)===`true`,Ik=[`aria-selected`,`data-active`,`data-indicator`],Lk=150,Rk=(e,{selector:t=Fk,isHoverable:r=!1,orientation:i=`horizontal`}={selector:Fk,isHoverable:!1,orientation:`horizontal`})=>{let[a,o]=N(null),s=P(null),c=P(null),l=P(null),u=P(null),d=P(t);d.current=t;let f=P(i);f.current=i;let p=e.current.length,m=n(()=>{let t=s.current??e.current.find(d.current)??null;s.current&&c.current&&(clearTimeout(c.current),c.current=null);let n=f.current===`vertical`;if(!t){if(l.current?.opacity===0)return;let e=n?{top:l.current?.top??0,height:l.current?.height??0,opacity:0}:{left:l.current?.left??0,width:l.current?.width??0,opacity:0};o(e),l.current=e;return}if(n){let e=t.offsetTop,n=t.offsetHeight,r=l.current;if(r?.top===e&&r.height===n&&r.opacity===1)return;let i={top:e,height:n,opacity:1};o(i),l.current=i;return}let r=t.offsetLeft,i=t.offsetWidth,a=l.current;if(a?.left===r&&a.width===i&&a.opacity===1)return;let u={left:r,width:i,opacity:1};o(u),l.current=u},[e]),h=n(()=>{u.current===null&&(u.current=Pk(()=>{u.current=null,m()}))},[m]),g=n(()=>{u.current?.(),u.current=null,m()},[m]);return M(()=>{window.addEventListener(`resize`,h,{passive:!0});let t=e.current.filter(Boolean),n=new MutationObserver(h),i=new ResizeObserver(g),a=e=>{c.current&&=(clearTimeout(c.current),null),s.current=e.currentTarget,h()},o=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{s.current=null,h()},Lk)};for(let e of t)n.observe(e,{attributes:!0,attributeFilter:Ik}),i.observe(e),r&&(e.addEventListener(`mouseenter`,a,{passive:!0}),e.addEventListener(`mouseleave`,o,{passive:!0}));return()=>{if(u.current?.(),u.current=null,c.current&&=(clearTimeout(c.current),null),window.removeEventListener(`resize`,h),n.disconnect(),i.disconnect(),r)for(let e of t)e.removeEventListener(`mouseenter`,a),e.removeEventListener(`mouseleave`,o)}},[e,p,r,i,h,g]),{choiceIndicatorPosition:a,calculatePosition:m,scheduleMeasurement:h,orientation:i}};T();var zk=({choices:e=[],value:t,defaultValue:n,onChange:r,hoverable:i=!0,disabled:a=!1},o)=>{let[s,c]=N(t??n??e[0].value),[l,u]=N(null),d=P([]),f=P(null),{choiceIndicatorPosition:p}=Rk(d,{selector:e=>e?.getAttribute(`data-indicator`)===`true`,isHoverable:!1,orientation:o}),m=e.findIndex(e=>e.value===s),h=i&&l!==null?l:m;return M(()=>{t!==void 0&&c(t)},[t]),{valueState:s,hoveredIndex:l,setHoveredIndex:u,optionsRefs:d,indicatorRef:f,choiceIndicatorPosition:p,selectedIndex:m,indicatorIndex:h,handleChange:e=>{c(e),r?.(e)},disabled:a}};T();var Bk=[{content:`Off`,value:!1},{content:`On`,value:!0}],Vk=Hc(`flex h-fit w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-0.38`,{variants:{color:{neutral:`border-neutral text-neutral`,white:`border-white text-white`,black:`border-black text-black`,text:`border-foreground text-foreground`,error:`border-error text-error`},disabled:{true:`cursor-not-allowed opacity-50`,false:``}},defaultVariants:{color:`text`,disabled:!1}}),Hk=Hc(`z-1 flex-1 cursor-pointer whitespace-nowrap font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-background motion-reduce:transition-none`,{variants:{size:{xs:`px-2 py-0.5 text-xs`,sm:`px-2 py-1 text-xs`,md:`p-2 text-sm`,lg:`p-4 text-base`}},defaultVariants:{size:`md`}}),Uk=Hc(`absolute top-0 z-0 h-full w-auto rounded-full transition-all duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{neutral:`bg-neutral data-[indicator=true]:text-white`,white:`bg-white data-[indicator=true]:text-black`,black:`bg-black data-[indicator=true]:text-white`,text:`bg-foreground data-[indicator=true]:text-background`,error:`bg-error data-[indicator=true]:text-white`}}}),Wk=e=>{let{choices:t=Bk,color:n=`text`,size:r=`md`,className:i,itemClassName:o}=e,{selectedIndex:s,indicatorIndex:c,handleChange:l,optionsRefs:u,indicatorRef:d,choiceIndicatorPosition:f,setHoveredIndex:p,disabled:m}=zk({choices:t,value:e.value,defaultValue:e.defaultValue,onChange:e.onChange,hoverable:e.hoverable,disabled:e.disabled},`horizontal`);return R(`div`,{className:Vk({color:n,disabled:m,className:i}),role:`tablist`,"aria-disabled":m?`true`:void 0,children:R(`div`,{className:`relative flex size-full flex-row items-center justify-center`,children:[t.map((e,t)=>{let{content:n,value:i,...d}=e,f=typeof i==`string`||typeof i==`number`,h=t===s,g=t===c;return a(`button`,{...d,type:`button`,className:G(Hk({size:r}),m&&`cursor-not-allowed`,o),key:f?i:t,role:`tab`,onClick:()=>l(i),"aria-selected":h?`true`:void 0,"data-indicator":g?`true`:void 0,disabled:m,tabIndex:h?0:-1,ref:e=>{u.current[t]=e},onMouseEnter:()=>!m&&p(t),onMouseLeave:()=>!m&&p(null)},n)}),f&&R(`div`,{className:G(Uk({color:n})),style:f,ref:d})]})})},Gk=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Ji(n,e,DO());if(a!==void 0&&typeof a!=`boolean`)return R(C,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=a??t;return R(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-start transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,o===2&&`hover:bg-card/30`,o>=3&&``),onClick:t=>{t.stopPropagation(),i(e)},children:R(Wk,{value:s,onChange:t=>r({keyPath:e,newValue:String(t)})})})};T();var Kk=e=>{let{keyPath:t,section:n}=e;return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[Vr]).map(r=>{let i={type:Vr,key:r},o=[...t,i],s=n[Vr][r];return R(C,{children:[R(`span`,{className:`flex items-center font-bold`,children:r}),a(gA,{...e,key:r,keyPath:o,section:s})]})})})};T();var qk=e=>{let{keyPath:t,section:n}=e;return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[zr]).map(r=>{let i={type:zr,key:r},o=[...t,i],s=n[zr][r];return R(C,{children:[R(`span`,{className:`flex items-center font-bold`,children:r}),a(gA,{...e,key:r,keyPath:o,section:s})]})})})},Jk=(...e)=>e.filter(Boolean).join(` `),Yk=Hc(`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`,{variants:{variant:{default:`text-foreground bg-accent 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`,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`}}),Xk=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>R(`input`,{className:Jk(Yk({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),Zk=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>R(`textarea`,{className:G(`resize-none`,Yk({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r});T();var Qk=24,$k=12,eA=({className:e,autoSize:t=!0,onChange:n,maxRows:i=999,ref:a,...o})=>{let s=P(null);r(a,()=>s.current);let c=()=>{let e=s.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let r=e.scrollHeight,a=Qk*i+$k;n.height=`${Math.max(Math.min(r,a),36)}px`};return F(()=>{(o.value??o.defaultValue)&&c()},[o.value,o.defaultValue,t,i]),R(Zk,{ref:e=>{s.current=e},onChange:e=>{n?.(e),c()},className:G(`overflow-y-auto`,t&&`resize-none`,e),...o})};T();var tA=({value:e=``,onCancel:t,onSave:r,onClick:i,children:a,isDisabled:o,...s})=>{let[c,l]=N(!1),u=P(null),d=e=>{e.stopPropagation(),l(!1),r()},f=e=>{e.stopPropagation(),l(!1),t()},p=!e||e===``?`-`:e,m=n(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||u.current&&!u.current.contains(e.target)&&(l(!1),r())},[r]);return M(()=>(c?document.addEventListener(`click`,m):document.removeEventListener(`click`,m),()=>document.removeEventListener(`click`,m)),[m,c]),R(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{l(!0),i?.(e)},ref:u,...s,children:[R(`div`,{className:G(`flex flex-1 gap-2`,c?`display`:`hidden`),children:[a,R(X,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:ys,onClick:d,disabled:o,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),R(X,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Lc,onClick:f,disabled:o,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(c)),R(`div`,{className:G(`flex flex-1 gap-2`,c?`hidden`:`display`),children:[R(`span`,{className:`ms-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:p}),R(X,{label:`Edit`,Icon:dc,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:o,onClick:e=>{e.stopPropagation(),l(!0)}})]})]})};T();var nA=({onSave:e,onCancel:t,ref:n,...i})=>{let a=P(null);return r(n,()=>a.current),R(tA,{value:i.value??a.current?.value??i.defaultValue??``,onCancel:()=>{a.current&&(a.current.value=a.current.defaultValue??``),t?.()},onSave:()=>{e?.(a.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:R(eA,{className:`leading-6`,ref:a,onClick:e=>{e.preventDefault(),e.stopPropagation()},...i})})},rA=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:i,onFocusKeyPath:a,renderSection:o})=>{let s=DO(),c=r??Ji(n,e,s);if(c&&typeof c!=`string`)return R(C,{children:`Error loading section - Edited content Incoherence with the original content format`});let l=e.length,u=String(c??t);return R(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-start transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,l===2&&`hover:bg-card/30`,l>=3&&``),onClick:t=>{t.stopPropagation(),a(e)},children:typeof o==`function`?o(u):R(nA,{"aria-label":`Editable field`,defaultValue:u,onSave:t=>i({keyPath:e,newValue:t}),onCancel:()=>null})})},iA=e=>{let{keyPath:t,section:n}=e,{addEditedContent:r}=DD(),i=Ji(e.editedContent,t),a=n[Ur],{content:o}=n,s=[...t,{type:Ur}];return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:[R(`span`,{className:`text-neutral text-sm`,children:[a,` `]}),R(rA,{...e,keyPath:s,section:o,editedContentValue:i?.content,onContentChange:i=>{r(e.dictionary.localId,{...n,content:i.newValue},t)}})]})};T();var aA=e=>{let{keyPath:t,section:n}=e,r=n[ti];return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:ti,key:n},a=[...t,i];return R(C,{children:[R(`span`,{className:`flex items-center font-bold`,children:n}),R(gA,{...e,keyPath:a,section:r[n]})]},n)})})},oA=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Zr}],i=n[Zr];return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:R(gA,{...e,keyPath:r,section:i})})},sA=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Hr}],i=n[Hr];return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:R(gA,{...e,keyPath:r,section:i})})},cA=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Xr}],i=n[Xr];return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:R(gA,{...e,keyPath:r,section:i})})};T();var lA=j(e=>{let{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:i}=e;return l(()=>Object.keys(n??{}).filter(e=>!hA.includes(e)),[n]).map(a=>{let o={key:a,type:Wr},s=[...t,o],c=$n(s,r);return R(kk,{level:t.length,title:fr(a),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),i(c?[]:s)},children:R(gA,{...e,keyPath:s,section:n[a]})},a)})});T();var uA=({onSave:e,onCancel:t,ref:n,...i})=>{let a=P(null);return r(n,()=>a.current),R(tA,{value:l(()=>i.value??a.current?.value??i.defaultValue,[i.value,i.defaultValue,a.current?.value]),onCancel:()=>{a.current&&(a.current.value=a.current.defaultValue??``),t?.()},onSave:()=>{e?.(a.current?.value??``)},children:R(Xk,{ref:a,...i})})},dA=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Ji(n,e,DO());if(a!==void 0&&typeof a!=`number`)return R(C,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=String(a??t);return R(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-start transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,o===2&&`hover:bg-card/30`,o>=3&&``),onClick:t=>{t.stopPropagation(),i(e)},children:R(uA,{"aria-label":`Editable number field`,type:`number`,defaultValue:s,onSave:t=>r({keyPath:e,newValue:t}),onCancel:()=>null})})};T();var fA=e=>{let{keyPath:t,section:n}=e,r=n[Br];return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:Br,key:n},a=[...t,i];return R(C,{children:[R(`span`,{className:`flex items-center font-bold`,children:n}),R(gA,{...e,keyPath:a,section:r[n]})]},n)})})};T();var pA=e=>{let{keyPath:t,section:n}=e,r=n[ni];return R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:ni,key:n},o=[...t,i];return R(C,{children:[R(`span`,{className:`flex items-center font-bold`,children:n}),a(gA,{...e,key:n,keyPath:o,section:r[n]})]})})})},mA=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:Rr,key:r},a=[...t,i],o=n[Rr][r];return R(gA,{...e,keyPath:a,section:o})};T();var hA=[`filePath`,`id`,`nodeType`],gA=j(e=>{let t=DO(),n=l(()=>Ji(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=l(()=>ta(n),[n]);if(typeof n==`object`)return r===`reactNode`?R(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?R(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):R(r===`markdown`?cA:r===`html`?oA:r===`translation`?mA:r===`enumeration`?qk:r===`plural`?fA:r===`gender`?aA:r===`select`?pA:r===`condition`?Kk:r===`insertion`?sA:r===`array`?Ak:r===`file`?iA:lA,{...e,section:n});if(typeof n==`string`)return R(rA,{...e,section:n});if(typeof n==`number`)return R(dA,{...e,section:n});if(typeof n==`boolean`)return R(Gk,{...e,section:n})});T();var _A=({dictionary:e,...t})=>{let n=DO(),{editedContent:r,addEditedContent:i}=DD(),{focusedContent:o,setFocusedContentKeyPath:s}=kO();return R(`div`,{className:`flex flex-col gap-2`,children:a(gA,{...t,keyPath:[],locale:n,dictionary:e,key:`${JSON.stringify((r?.[e.localId]??e).content)}${n}`,editedContent:r?.[e.localId]?.content,focusedKeyPath:o?.keyPath,section:e.content,onContentChange:t=>{i(e.localId,t.newValue,t.keyPath)},onFocusKeyPath:s})})},vA={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`},addNewSelectCase:{label:`Click to add a select case`,text:`Add new case`},removeSelectCase:{label:`Click to remove the select case`,text:`Remove case`},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`},addNewSelectCase:{label:`Click to add a select case`,text:`Add new case`},removeSelectCase:{label:`Click to remove the select case`,text:`Remove case`},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`},addNewSelectCase:{label:`Cliquez pour ajouter un cas de sélection`,text:`Ajouter un nouveau cas`},removeSelectCase:{label:`Cliquez pour supprimer le cas de sélection`,text:`Supprimer le cas`},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`},addNewSelectCase:{label:`Haga clic para agregar un caso de selección`,text:`Agregar nuevo caso`},removeSelectCase:{label:`Haga clic para eliminar el caso de selección`,text:`Eliminar caso`},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`},addNewSelectCase:{label:`Klicken Sie, um einen Auswahlfall hinzuzufügen`,text:`Neuen Fall hinzufügen`},removeSelectCase:{label:`Klicken Sie, um den Auswahlfall zu entfernen`,text:`Fall entfernen`},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:`新しい列挙を追加`},addNewSelectCase:{label:`選択ケースを追加するにはクリック`,text:`新しいケースを追加`},removeSelectCase:{label:`選択ケースを削除するにはクリック`,text:`ケースを削除`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},addNewSelectCase:{label:`선택 케이스를 추가하려면 클릭하세요`,text:`새 케이스 추가`},removeSelectCase:{label:`선택 케이스를 제거하려면 클릭하세요`,text:`케이스 제거`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},addNewSelectCase:{label:`点击添加选择分支`,text:`添加新分支`},removeSelectCase:{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`},addNewSelectCase:{label:`Clicca per aggiungere un caso di selezione`,text:`Aggiungi nuovo caso`},removeSelectCase:{label:`Clicca per rimuovere il caso di selezione`,text:`Rimuovi caso`},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`},addNewSelectCase:{label:`Clique para adicionar um caso de seleção`,text:`Adicionar novo caso`},removeSelectCase:{label:`Clique para remover o caso de seleção`,text:`Remover caso`},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:`नया सूची जोड़ें`},addNewSelectCase:{label:`चयन केस जोड़ने के लिए क्लिक करें`,text:`नया केस जोड़ें`},removeSelectCase:{label:`चयन केस निकालने के लिए क्लिक करें`,text:`केस निकालें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},addNewSelectCase:{label:`انقر لإضافة حالة تحديد`,text:`أضف حالة جديدة`},removeSelectCase:{label:`انقر لإزالة حالة التحديد`,text:`إزالة الحالة`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},addNewSelectCase:{label:`Нажмите, чтобы добавить вариант выбора`,text:`Добавить новый вариант`},removeSelectCase:{label:`Нажмите, чтобы удалить вариант выбора`,text:`Удалить вариант`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},title:`Navigation view content`,description:`Content declarations used for UI interactions within the navigation view of the Dictionary Field Editor. Includes labels and helper texts for adding or removing elements, enumerations, and conditions.`,tags:[`editor UI`,`form navigation`,`dictionary editor`],location:`local`,localId:`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`},yA=Hc(`flex flex-col text-foreground backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{neutral:``,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:`backdrop-blur-none`,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),bA=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>R(`div`,{className:G(yA({roundedSize:t,transparency:r,padding:n,separator:i,border:typeof o==`boolean`?o?`with`:`none`:void 0,background:c,borderColor:s,gap:l}),a),...u,children:e});T();var xA=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let[o,s]=N(e),[c,l]=N(0),u=o!==e,d=()=>{s(e),l(e=>e+1)},f=()=>{t(o)},p=e=>{s(e.currentTarget.value)},m=e=>{e.key===`Enter`&&!n&&h?(e.preventDefault(),f()):e.key===`Escape`&&(e.preventDefault(),d())};M(()=>{s(e),l(e=>e+1)},[e]);let h=r?.(o)??!0;return R(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[R(Xk,{onChange:p,onKeyDown:m,"aria-label":`Editable input value`,"aria-describedby":u||i?`content-editor-input-actions`:void 0,"aria-invalid":!h,variant:`invisible`,className:`size-full`,defaultValue:e,disabled:n,...a},c),(u||i)&&R(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[u&&R(C,{children:[R(X,{Icon:ys,label:`Save changes${h?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:n||!h,onClick:f,"aria-describedby":h?void 0:`validation-error`}),R(X,{Icon:Lc,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:d,disabled:n})]}),i]})]},String(e))};T();var SA=`​`,CA=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(SA).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===SA?``:t.split(SA).join(``)}).join(`
62
+ `)},wA=e=>{let t=e.split(`
63
+ `);return t.length===0?[``]:t},TA=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null})(),EA=(e,t)=>{if(t<=0)return 0;if(TA){let n=[...TA.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},DA=(e,t)=>{if(t>=e.length)return e.length;if(TA){let n=[...TA.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},OA=(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},kA=(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},AA=(e,t)=>e.slice(0,t).lastIndexOf(`
64
+ `)+1,jA=(e,t)=>{let n=e.indexOf(`
65
+ `,t);return n===-1?e.length:n},MA=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=N(()=>wA(i)),s=P(null),c=P(null),l=e!==void 0,u=P(a);u.current=a,M(()=>{l&&e!==void 0&&o(wA(e))},[e,l]);let d=()=>u.current.join(`
66
+ `),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??0)+1;return e+Math.min(t,r[i]?.length??0)}return e===s.current?t===0?0:r.join(`
67
+ `).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)}};F(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let h=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=(t[r]?.length??0)+1;return n+e.offset},g=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t[e]?.length??0;if(n<=r)return{line:e,offset:n};n-=r+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},_=()=>{let e=f();return e?h(e):0},v=(e,t)=>{let r=wA(e);c.current=g(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=CA(s.current),i=wA(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(`
68
+ `);if(t.hasSelection){let e=r.slice(0,t.start)+r.slice(t.end);v(e,t.start)}else if(n===`deleteContentBackward`){if(t.start===0)return;let e=EA(r,t.start),n=r.slice(0,e)+r.slice(t.start);v(n,e)}else{if(t.start>=r.length)return;let e=DA(r,t.start),n=r.slice(0,t.start)+r.slice(e);v(n,t.start)}}else if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
69
+ `),i=t.data??t.dataTransfer?.getData(`text/plain`)??``,a=r.slice(0,n.start)+i+r.slice(n.end);v(a,n.start+i.length)}else if(n===`insertText`&&t.data){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
70
+ `),i=t.data,a=r.slice(0,n.start)+i+r.slice(n.end);v(a,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(`
71
+ `);if(e.key===`Enter`){e.preventDefault();let r=n.slice(0,t.start)+`
72
+ `+n.slice(t.end);v(r,t.start+1)}else if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection){let e=n.slice(0,t.start)+n.slice(t.end);v(e,t.start)}else{if(t.start===0)return;let r;r=e.metaKey?AA(n,t.start):e.altKey?OA(n,t.start):EA(n,t.start);let i=n.slice(0,r)+n.slice(t.start);v(i,r)}}else if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection){let e=n.slice(0,t.start)+n.slice(t.end);v(e,t.start)}else{if(t.start>=n.length)return;let r;r=e.metaKey?jA(n,t.start):e.altKey?kA(n,t.start):DA(n,t.start);let i=n.slice(0,t.start)+n.slice(r);v(i,t.start)}}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t?.hasSelection)return;let n=u.current.join(`
73
+ `),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i);let a=n.slice(0,t.start)+n.slice(t.end);v(a,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(`
74
+ `),a=i.slice(0,n.start)+t+i.slice(n.end);v(a,n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:_,caretFromFlatOffset:g}},NA=({index:e,text:t,isLast:n,ghostText:r})=>R(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[R(`span`,{"data-editable":!0,children:t||`​`}),r&&R(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&R(`br`,{})]}),PA=24,FA=12,IA=({value:e,defaultValue:t,onChange:n,placeholder:i,disabled:a=!1,minRows:o=1,maxRows:s=999,autoSize:c=!0,validationStyleEnabled:l=!1,variant:u,ghostText:d,ghostLine:f,ghostOffset:p,onClick:m,className:h,dir:g=`auto`,ref:_,...v})=>{let{lines:y,containerRef:b,getText:x,handleInput:S,handleBeforeInput:C,handleKeyDown:w,handleCut:T,handlePaste:E,handleDrop:D,handleDragOver:O,getCursorOffset:k,setCaretPosition:A,caretFromFlatOffset:j}=MA({value:e,defaultValue:t,onChange:n,disabled:a}),M=P(null),N=e=>{M.current=e,b.current=e};r(_,()=>({getContainer:()=>M.current,getText:x,focus:()=>M.current?.focus(),getCursorOffset:k,setCursorAtOffset:e=>{A(j(e,y))}})),F(()=>{if(!c||!M.current)return;let e=M.current,t=PA*s+FA,n=PA*o+FA;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,c,s,o]);let I=y.length===1&&y[0]===``,L=d&&f!==void 0&&p!==void 0;return R(`div`,{className:`relative w-full`,children:[I&&i&&R(`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:i}),R(`div`,{...v,ref:N,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":i,"aria-disabled":a,"aria-autocomplete":L?`inline`:void 0,tabIndex:a?-1:0,contentEditable:!a,suppressContentEditableWarning:!0,dir:g,onInput:S,onBeforeInput:C,onKeyDown:w,onCut:T,onPaste:E,onDrop:D,onDragOver:O,onClick:m,className:G(`wrap-break-word resize-none whitespace-pre-wrap outline-none`,Yk({variant:u,validationStyleEnabled:l?`enabled`:`disabled`}),c&&`overflow-y-auto`,h),children:y.map((e,t)=>R(NA,{index:t,text:e,isLast:t===y.length-1,ghostText:L&&f===t?d:void 0},t))})]})};T();var LA=({isActive:e=!0,suggestion:t,...n})=>{let r=String(n.value??n.defaultValue??``),[i,a]=N(r),[o,s]=N(``),c=P(null);M(()=>{n.value!==void 0&&a(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let l=()=>{let e=t??o;if(!e)return;let n=c.current?.getCursorOffset()??i.length,r=i.slice(0,n)+e+i.slice(n);a(r),s(``),setTimeout(()=>{c.current?.focus(),c.current?.setCursorAtOffset(n+e.length)},0)},u=e?t??(o||void 0):void 0,d=i.split(`
75
+ `);return R(IA,{ref:c,value:i,onChange:e=>{if(a(e),s(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??o)&&(e.preventDefault(),l()),n.onKeyDown?.(e)},ghostText:u,ghostLine:t?d.length-1:void 0,ghostOffset:t?d[d.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,id:n.id,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})};T();var RA=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let{isAuthenticated:o}=fk(),[s,c]=N(e),[l,u]=N(0),d=s!==e,f=()=>{c(e),u(e=>e+1)},p=()=>{t(s)},m=e=>c(e.currentTarget.value??``),h=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!n&&g?(e.preventDefault(),p()):e.key===`Escape`&&(e.preventDefault(),f())};M(()=>{c(e),u(e=>e+1)},[e]);let g=r?.(s)??!0;return R(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[R(LA,{onChange:m,onKeyDown:h,variant:`invisible`,className:`size-full`,value:e,isActive:o,disabled:n,"aria-label":`Editable textarea content`,"aria-describedby":d||i?`content-editor-textarea-actions`:void 0,"aria-invalid":!g,...a},l),(d||i)&&R(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[d&&R(C,{children:[R(X,{Icon:ys,label:`Save changes${g?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:n||!g,onClick:p,"aria-describedby":g?void 0:`textarea-validation-error`}),R(X,{Icon:Lc,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:f,disabled:n})]}),i]})]},e)},zA=(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},BA=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>R(`label`,{className:G(`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&&R(`span`,{className:`ms-1 text-error`,"aria-hidden":`true`,title:`This field is required`,children:`*`})]});T();var VA=new Map,HA=new Map,UA=e=>{try{return localStorage.getItem(e)}catch{return null}},WA=(e,t)=>{try{t===null?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}},GA=e=>{let t=VA.has(e)?VA.get(e):UA(e);return t===`undefined`?null:t},KA=e=>{for(let t of HA.get(e)??[])t()},qA=(e,t)=>{VA.set(e,t),WA(e,t),KA(e)},JA=e=>{let t=e.key===null?[...HA.keys()]:[e.key];for(let e of t)VA.delete(e),KA(e)},YA=(e,t)=>{HA.size===0&&window.addEventListener(`storage`,JA);let n=HA.get(e)??new Set;return n.add(t),HA.set(e,n),()=>{n.delete(t),n.size===0&&HA.delete(e),HA.size===0&&window.removeEventListener(`storage`,JA)}},XA=(e,t)=>{if(e===null)return t;try{return JSON.parse(e)}catch(e){return console.error(e),t}},ZA=(e,t)=>{let[r]=N(t),i=n(t=>YA(e,t),[e]),a=A(i,()=>GA(e),()=>null),o=l(()=>XA(a,r),[a,r]),s=n(t=>{let n=typeof t==`function`?t(XA(GA(e),r)):t;n!==void 0&&qA(e,JSON.stringify(n))},[e,r]),c=n(()=>{VA.delete(e),KA(e)},[e]),u=n(()=>qA(e,null),[e]);return l(()=>[o,s,c,u],[o,s,c,u])},QA=(e,t,n=[],r)=>{let i=e=>t.length===0||t.includes(e),a=(e??[]).filter(i);if(a.length>0)return a;let o=n.filter(i);return o.length>0?o:r&&i(r)?[r]:t.slice(0,1)};T();var $A=c({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),ej=()=>i($A),tj=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{let{locale:r}=aa(),[i,a]=ZA(`locale-content-selector-selected-locales`,t??[r]),o=l(()=>QA(i,e,t,r),[i,e,t,r]);return M(()=>{e.length&&JSON.stringify(o)!==JSON.stringify(i)&&a(o)},[e,o,i,a]),R($A,{value:l(()=>({availableLocales:e,selectedLocales:o,setSelectedLocales:a}),[e,o,a]),children:n})},nj=Object.defineProperty,rj=(e,t)=>nj(e,`name`,{value:t,configurable:!0});function ij(e,[t,n]){return Math.min(n,Math.max(t,e))}rj(ij,`clamp`),T();var aj=Object.defineProperty,oj=(e,t)=>aj(e,`name`,{value:t,configurable:!0}),sj={LTR:`ltr`,RTL:`rtl`},cj=c(void 0);function lj(e){let t=i(cj);return e||t||sj.LTR}oj(lj,`useDirection`),T();var uj=Object.defineProperty,dj=(e,t)=>uj(e,`name`,{value:t,configurable:!0}),fj=0,pj=null;function mj(e){return hj(),e.children}dj(mj,`FocusGuards`);function hj(){M(()=>{pj||={start:gj(),end:gj()};let{start:e,end:t}=pj;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),fj++,()=>{fj===1&&(pj?.start.remove(),pj?.end.remove(),pj=null),fj=Math.max(0,fj-1)}},[])}dj(hj,`useFocusGuards`);function gj(){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}dj(gj,`createFocusGuard`),T();var _j=Object.defineProperty,vj=(e,t)=>_j(e,`name`,{value:t,configurable:!0}),yj=`focusScope.autoFocusOnMount`,bj=`focusScope.autoFocusOnUnmount`,xj={bubbles:!1,cancelable:!0},Sj=x(vj(function(e,t){let{loop:r=!1,trapped:i=!1,branches:a,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=N(null),d=ql(o),f=ql(s),p=P(null),m=tl(t,u),h=P(a);M(()=>{h.current=a});let g=n(e=>e?l?.contains(e)?!0:!!h.current?.some(t=>t.contains(e)):!1,[l]),_=P({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;M(()=>{if(i){let e=function(e){if(_.paused||!l)return;let t=e.target;g(t)?p.current=t:Nj(p.current,{select:!0})},t=function(e){if(_.paused||!l)return;let t=e.relatedTarget;t!==null&&(g(t)||Nj(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Nj(l)};vj(e,`handleFocusIn`),vj(t,`handleFocusOut`),vj(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[i,l,_.paused,g]),M(()=>{if(l){Pj.add(_);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(yj,xj);l.addEventListener(yj,d),l.dispatchEvent(t),t.defaultPrevented||(Dj(Lj(kj(l)),{select:!0}),document.activeElement===e&&Nj(l))}return()=>{l.removeEventListener(yj,d);let t=l.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(bj,xj);l.addEventListener(bj,f),l.dispatchEvent(r),r.defaultPrevented||Nj(e??t.body,{select:!0}),l.removeEventListener(bj,f),Pj.remove(_)},0)}}},[l,d,f,_]);let v=n(e=>{if(!r&&!i||_.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[i,a]=Oj(t);i&&a?!e.shiftKey&&n===a?(e.preventDefault(),r&&Nj(i,{select:!0})):e.shiftKey&&n===i&&(e.preventDefault(),r&&Nj(a,{select:!0})):n===t&&e.preventDefault()}},[r,i,_.paused]);return R(Hl.div,{tabIndex:-1,...c,ref:m,onKeyDown:v})},`FocusScope`)),Cj=c(null);function wj({registry:e,children:t}){return e?R(Cj.Provider,{value:e,children:t}):t}vj(wj,`FocusScopeBranchProvider`);function Tj(){let[e,t]=N([]);return{nodes:e,registry:l(()=>({add:vj(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:vj(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}vj(Tj,`useFocusScopeBranchRegistry`);function Ej(e){let t=i(Cj);M(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}vj(Ej,`useFocusScopeBranch`);function Dj(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Nj(r,{select:t}),document.activeElement!==n)return}vj(Dj,`focusFirst`);function Oj(e){let t=kj(e);return[Aj(t,e),Aj(t.reverse(),e)]}vj(Oj,`getTabbableEdges`);function kj(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:vj(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}vj(kj,`getTabbableCandidates`);function Aj(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):jj(r,{upTo:t})))return r}vj(Aj,`findVisible`);function jj(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}vj(jj,`isHidden`);function Mj(e){return e.tagName===`INPUT`&&typeof e.select==`function`}vj(Mj,`isSelectableInput`);function Nj(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&Mj(e)&&t&&e.select()}}vj(Nj,`focus`);var Pj=Fj();function Fj(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ij(e,t),e.unshift(t)},remove(t){e=Ij(e,t),e[0]?.resume()}}}vj(Fj,`createFocusScopesStack`);function Ij(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}vj(Ij,`arrayRemove`);function Lj(e){return e.filter(e=>e.tagName!==`A`)}vj(Lj,`removeLinks`),T();var Rj=Object.defineProperty,zj=(e,t)=>Rj(e,`name`,{value:t,configurable:!0}),Bj=v.useId||(()=>void 0),Vj=0;function Hj(e){let[t,n]=N(Bj());return Tl(()=>{e||n(e=>e??String(Vj++))},[e]),e||(t?`radix-${t}`:``)}zj(Hj,`useId`);var Uj=[`top`,`right`,`bottom`,`left`],Wj=[`start`,`end`],Gj=Uj.reduce((e,t)=>e.concat(t,t+`-`+Wj[0],t+`-`+Wj[1]),[]),Kj=Math.min,qj=Math.max,Jj=Math.round,Yj=Math.floor,Xj=e=>({x:e,y:e}),Zj={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qj(e,t,n){return qj(e,Kj(t,n))}function $j(e,t){return typeof e==`function`?e(t):e}function eM(e){return e.split(`-`)[0]}function tM(e){return e.split(`-`)[1]}function nM(e){return e===`x`?`y`:`x`}function rM(e){return e===`y`?`height`:`width`}function iM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function aM(e){return nM(iM(e))}function oM(e,t,n){n===void 0&&(n=!1);let r=tM(e),i=aM(e),a=rM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=hM(o)),[o,hM(o)]}function sM(e){let t=hM(e);return[cM(e),t,cM(t)]}function cM(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var lM=[`left`,`right`],uM=[`right`,`left`],dM=[`top`,`bottom`],fM=[`bottom`,`top`];function pM(e,t,n){switch(e){case`top`:case`bottom`:return n?t?uM:lM:t?lM:uM;case`left`:case`right`:return t?dM:fM;default:return[]}}function mM(e,t,n,r){let i=tM(e),a=pM(eM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(cM)))),a}function hM(e){let t=eM(e);return Zj[t]+e.slice(t.length)}function gM(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function _M(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:gM(e)}function vM(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 yM(e,t,n){let{reference:r,floating:i}=e,a=iM(t),o=aM(t),s=rM(o),c=eM(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}}let m=tM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function bM(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}=$j(t,e),p=_M(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=vM(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=vM(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 xM=50,SM=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:bM},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=yM(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<xM&&(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}=yM(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},CM=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}=$j(e,t)||{};if(l==null)return{};let d=_M(u),f={x:n,y:r},p=aM(i),m=rM(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=Kj(d[_],T),D=Kj(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Qj(E,k,O),j=!c.arrow&&tM(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}});function wM(e,t,n){return(e?[...n.filter(t=>tM(t)===e),...n.filter(t=>tM(t)!==e)]:n.filter(e=>eM(e)===e)).filter(n=>!e||tM(n)===e||(t?cM(n)!==n:!1))}var TM=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=Gj,autoAlignment:u=!0,...d}=$j(e,t),f=c!==void 0||l===Gj?wM(c||null,u,l):l,p=r.autoPlacement?.index||0,m=f[p];if(m==null)return{};if(i!==m)return{reset:{placement:f[0]}};let h=await a.detectOverflow(t,d),g=oM(m,n,await(a.isRTL==null?void 0:a.isRTL(o.floating))),_=[h[eM(m)],h[g[0]],h[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:m,overflows:_}],y=f[p+1];if(y)return{data:{index:p+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=tM(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,tM(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:p+1,overflows:v},reset:{placement:x}}}}},EM=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}=$j(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=eM(r),_=iM(o),v=eM(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[hM(o)]:sM(o)),x=p!==`none`;!d&&x&&b.push(...mM(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=oM(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`||_===iM(t)||T.every(e=>iM(e.placement)!==_||e.overflows[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=iM(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}if(r!==n)return{reset:{placement:n}}}return{}}}};function DM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OM(e){return Uj.some(t=>e[t]>=0)}var kM=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=$j(e,t);switch(i){case`referenceHidden`:{let e=DM(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:OM(e)}}}case`escaped`:{let e=DM(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:OM(e)}}}default:return{}}}}};function AM(e){let t=Kj(...e.map(e=>e.left)),n=Kj(...e.map(e=>e.top)),r=qj(...e.map(e=>e.right)),i=qj(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function jM(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>vM(AM(e)))}var MM=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=$j(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=jM(u),f=vM(AM(u)),p=_M(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(iM(n)===`y`){let e=d[0],t=d[d.length-1],r=eM(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return vM({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=eM(n)===`left`,t=qj(...d.map(e=>e.right)),r=Kj(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return vM({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},NM=new Set([`left`,`top`]);async function PM(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=eM(n),s=tM(n),c=iM(n)===`y`,l=NM.has(o)?-1:1,u=a&&c?-1:1,d=$j(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 FM=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 PM(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}}}}},IM=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}=$j(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=iM(i),p=nM(f),m=u[p],h=u[f],g=(e,t)=>Qj(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},LM=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}=$j(e,t),u={x:n,y:r},d=iM(i),f=nM(d),p=u[f],m=u[d],h=$j(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};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=NM.has(eM(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}}}},RM=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=$j(e,t),c=await i.detectOverflow(t,s),l=eM(n),u=tM(n),d=iM(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Kj(p-c[m],g),y=Kj(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*qj(c.left,c.right):S=p-2*qj(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function zM(){return typeof window<`u`}function BM(e){return UM(e)?(e.nodeName||``).toLowerCase():`#document`}function VM(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function HM(e){return((UM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function UM(e){return zM()?e instanceof Node||e instanceof VM(e).Node:!1}function WM(e){return zM()?e instanceof Element||e instanceof VM(e).Element:!1}function GM(e){return zM()?e instanceof HTMLElement||e instanceof VM(e).HTMLElement:!1}function KM(e){return!zM()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof VM(e).ShadowRoot}function qM(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=iN(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function JM(e){return/^(table|td|th)$/.test(BM(e))}function YM(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var XM=/transform|translate|scale|rotate|perspective|filter/,ZM=/paint|layout|strict|content/,QM=e=>!!e&&e!==`none`,$M;function eN(e){let t=WM(e)?iN(e):e;return QM(t.transform)||QM(t.translate)||QM(t.scale)||QM(t.rotate)||QM(t.perspective)||!nN()&&(QM(t.backdropFilter)||QM(t.filter))||XM.test(t.willChange||``)||ZM.test(t.contain||``)}function tN(e){let t=oN(e);for(;GM(t)&&!rN(t);){if(eN(t))return t;if(YM(t))return null;t=oN(t)}return null}function nN(){return $M??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),$M}function rN(e){return/^(html|body|#document)$/.test(BM(e))}function iN(e){return VM(e).getComputedStyle(e)}function aN(e){return WM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oN(e){if(BM(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||KM(e)&&e.host||HM(e);return KM(t)?t.host:t}function sN(e){let t=oN(e);return rN(t)?(e.ownerDocument||e).body:GM(t)&&qM(t)?t:sN(t)}function cN(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=sN(e),i=r===e.ownerDocument?.body,a=VM(r);if(i){let e=lN(a);return t.concat(a,a.visualViewport||[],qM(r)?r:[],e&&n?cN(e):[])}return t.concat(r,cN(r,[],n))}function lN(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uN(e){let t=iN(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=GM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Jj(n)!==a||Jj(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function dN(e){return WM(e)?e:e.contextElement}function fN(e){let t=dN(e);if(!GM(t))return Xj(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=uN(t),o=(a?Jj(n.width):n.width)/r,s=(a?Jj(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var pN=Xj(0);function mN(e){let t=VM(e);return!nN()||!t.visualViewport?pN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hN(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===VM(e)}function gN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=dN(e),o=Xj(1);t&&(r?WM(r)&&(o=fN(r)):o=fN(e));let s=hN(a,n,r)?mN(a):Xj(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&&r){let e=VM(a),t=WM(r)?VM(r):r,n=e,i=lN(n);for(;i&&t!==n;){let e=fN(i),t=i.getBoundingClientRect(),r=iN(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=VM(i),i=lN(n)}}return vM({width:u,height:d,x:c,y:l})}function _N(e,t){let n=aN(e).scrollLeft;return t?t.left+n:gN(HM(e)).left+n}function vN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_N(e,n),y:n.top+t.scrollTop}}function yN(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=HM(r),s=t?YM(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xj(1),u=Xj(0),d=GM(r);if((d||!a)&&((BM(r)!==`body`||qM(o))&&(c=aN(r)),d)){let e=gN(r);l=fN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vN(o,c):Xj(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 bN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function xN(e){let t=aN(e),n=e.ownerDocument.body,r=qj(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qj(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+_N(e),o=-t.scrollTop;return iN(n).direction===`rtl`&&(a+=qj(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var SN=25;function CN(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=VM(e),a=HM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!nN()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(_N(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=SN&&(s-=o)}return{width:s,height:c,x:l,y:u}}function wN(e,t){let n=gN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function TN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=CN(e,n,t);else if(t===`document`)r=xN(HM(e));else if(WM(t))r=wN(t,n);else{let n=mN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vM(r)}function EN(e,t){let n=t.get(e);if(n)return n;let r=cN(e,[],!1).filter(e=>WM(e)&&BM(e)!==`body`),i=null,a=iN(e).position===`fixed`,o=a?oN(e):e;for(;WM(o)&&!rN(o);){let e=iN(o),t=eN(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=oN(o)}return t.set(e,r),r}function DN(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?YM(t)?[]:EN(t,this._c):[].concat(n),r],o=TN(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=TN(t,a[e],i);s=qj(n.top,s),c=Kj(n.right,c),l=Kj(n.bottom,l),u=qj(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ON(e){let{width:t,height:n}=uN(e);return{width:t,height:n}}function kN(e,t,n){let r=GM(t),i=HM(t),a=n===`fixed`,o=gN(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Xj(0);if((r||!a)&&((BM(t)!==`body`||qM(i))&&(s=aN(t)),r)){let e=gN(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=_N(i));let l=i&&!r&&!a?vN(i,s):Xj(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function AN(e){return iN(e).position===`static`}function jN(e,t){if(!GM(e)||iN(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return HM(e)===n&&(n=n.ownerDocument.body),n}function MN(e,t){let n=VM(e);if(YM(e))return n;if(!GM(e)){let t=oN(e);for(;t&&!rN(t);){if(WM(t)&&!AN(t))return t;t=oN(t)}return n}let r=jN(e,t);for(;r&&JM(r)&&AN(r);)r=jN(r,t);return r&&rN(r)&&AN(r)&&!eN(r)?n:r||tN(e)||n}var NN=async function(e){let t=this.getOffsetParent||MN,n=this.getDimensions,r=await n(e.floating);return{reference:kN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PN(e){return iN(e).direction===`rtl`}var FN={convertOffsetParentRelativeRectToViewportRelativeRect:yN,getDocumentElement:HM,getClippingRect:DN,getOffsetParent:MN,getElementRects:NN,getClientRects:bN,getDimensions:ON,getScale:fN,isElement:WM,isRTL:PN};function IN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LN(e,t,n){let r=null,i,a=HM(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Yj(d),h=Yj(a.clientWidth-(u+f)),g=Yj(a.clientHeight-(d+p)),_=Yj(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:qj(0,Kj(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!IN(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=VM(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function RN(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=dN(e),u=i||a?[...l?cN(l):[],...t?cN(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?LN(l,n,a):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?gN(e):null;c&&g();function g(){let t=gN(e);h&&!IN(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 zN=FM,BN=TM,VN=IM,HN=EM,UN=RM,WN=kM,GN=CM,KN=MM,qN=LM,JN=(e,t,n)=>{let r=new Map,i=n??{},a={...FN,...i.platform,_c:r};return SM(e,t,{...i,platform:a})};T();var YN=typeof document<`u`?F:function(){};function XN(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(!XN(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)&&!XN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ZN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QN(e,t){let n=ZN(e);return Math.round(t*n)/n}function $N(e){let t=P(e);return YN(()=>{t.current=e}),t}function eP(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:r=`absolute`,middleware:i=[],platform:a,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=N({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=N(i);XN(h,i)||g(i);let[_,v]=N(null),[y,b]=N(null),x=n(e=>{e!==T.current&&(T.current=e,v(e))},[]),S=n(e=>{e!==E.current&&(E.current=e,b(e))},[]),C=o||_,w=s||y,T=P(null),E=P(null),D=P(f),O=u!=null,k=$N(u),A=$N(a),j=$N(d),M=n(()=>{if(!T.current||!E.current)return;let e={placement:t,strategy:r,middleware:h};A.current&&(e.platform=A.current),JN(T.current,E.current,e).then(e=>{let t={...e,isPositioned:j.current!==!1};F.current&&!XN(D.current,t)&&(D.current=t,m(()=>{p(t)}))})},[h,t,r,A,j]);YN(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let F=P(!1);YN(()=>(F.current=!0,()=>{F.current=!1}),[]),YN(()=>{if(C&&(T.current=C),w&&(E.current=w),C&&w){if(k.current)return k.current(C,w,M);M()}},[C,w,M,k,O]);let I=l(()=>({reference:T,floating:E,setReference:x,setFloating:S}),[x,S]),L=l(()=>({reference:C,floating:w}),[C,w]),R=l(()=>{let e={position:r,left:0,top:0};if(!L.floating)return e;let t=QN(L.floating,f.x),n=QN(L.floating,f.y);return c?{...e,transform:`translate(`+t+`px, `+n+`px)`,...ZN(L.floating)>=1.5&&{willChange:`transform`}}:{position:r,left:t,top:n}},[r,c,L.floating,f.x,f.y]);return l(()=>({...f,update:M,refs:I,elements:L,floatingStyles:R}),[f,M,I,L,R])}var tP=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?{}:GN({element:r.current,padding:i}).fn(n):r?GN({element:r,padding:i}).fn(n):{}}}},nP=(e,t)=>{let n=zN(e);return{name:n.name,fn:n.fn,options:[e,t]}},rP=(e,t)=>{let n=VN(e);return{name:n.name,fn:n.fn,options:[e,t]}},iP=(e,t)=>({fn:qN(e).fn,options:[e,t]}),aP=(e,t)=>{let n=HN(e);return{name:n.name,fn:n.fn,options:[e,t]}},oP=(e,t)=>{let n=UN(e);return{name:n.name,fn:n.fn,options:[e,t]}},sP=(e,t)=>{let n=WN(e);return{name:n.name,fn:n.fn,options:[e,t]}},cP=(e,t)=>{let n=tP(e);return{name:n.name,fn:n.fn,options:[e,t]}};T();var lP=Object.defineProperty,uP=(e,t)=>lP(e,`name`,{value:t,configurable:!0});function dP(e){let[t,n]=N(void 0);return Tl(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}uP(dP,`useSize`),T();var fP=Object.defineProperty,pP=(e,t)=>fP(e,`name`,{value:t,configurable:!0}),mP={Partial:`partial`,Always:`always`},hP={Optimized:`optimized`,Always:`always`},gP=`Popper`,[_P,vP]=al(gP),[yP,bP]=_P(gP),xP=pP(e=>{let{__scopePopper:t,children:n}=e,[r,i]=N(null),[a,o]=N(void 0);return R(yP,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),SP=`PopperAnchor`,CP=x(pP(function(e,t){let{__scopePopper:r,virtualRef:i,...a}=e,o=bP(SP,r),s=P(null),c=o.onAnchorChange,l=tl(t,n(e=>{s.current=e,e&&c(e)},[c])),u=P(null);M(()=>{if(!i)return;let e=u.current;u.current=i.current,e!==u.current&&c(u.current)});let d=o.placementState&&AP(o.placementState),f=d?.[0],p=d?.[1];return i?null:R(Hl.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...a,ref:l})},`PopperAnchor`)),wP=`PopperContent`,[TP,EP]=_P(wP),DP=x(pP(function(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=mP.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=hP.Optimized,onPlaced:m,...h}=e,g=bP(wP,n),[_,v]=N(null),y=tl(t,v),[b,x]=N(null),S=dP(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(OP),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:P,middlewareData:F}=eP({strategy:`fixed`,placement:T,whileElementsMounted:pP((...e)=>RN(...e,{animationFrame:p===hP.Always}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[nP({mainAxis:i+w,alignmentAxis:o}),c&&rP({mainAxis:!0,crossAxis:!1,...d===mP.Partial?{limiter:iP()}:{},...k}),c&&aP({...k}),oP({...k,apply:pP(({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`)},`apply`)}),b&&cP({element:b,padding:s}),kP({arrowWidth:C,arrowHeight:w}),f&&sP(O?{strategy:`referenceHidden`,...k}:{strategy:`referenceHidden`,padding:k.padding,altBoundary:k.altBoundary})]}),I=g.setPlacementState;Tl(()=>(I(M),()=>{I(void 0)}),[M,I]);let[L,ee]=AP(M),te=ql(m);Tl(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,z=F.arrow?.y,re=F.arrow?.centerOffset!==0,[ie,B]=N();return Tl(()=>{_&&B(window.getComputedStyle(_).zIndex)},[_]),R(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:P?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ie,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:R(TP,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:x,arrowX:ne,arrowY:z,shouldHideArrow:re,children:R(Hl.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`));function OP(e){return e!==null}pP(OP,`isNotNull`);var kP=pP(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]=AP(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}}}}),`transformOrigin`);function AP(e){let[t,n=`center`]=e.split(`-`);return[t,n]}pP(AP,`getSideAndAlignFromPlacement`);var jP=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},MP=new WeakMap,NP=new WeakMap,PP={},FP=0,IP=function(e){return e&&(e.host||IP(e.parentNode))},LP=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=IP(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})},RP=function(e,t,n,r){var i=LP(t,Array.isArray(e)?e:[e]);PP[n]||(PP[n]=new WeakMap);var a=PP[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=(MP.get(e)||0)+1,l=(a.get(e)||0)+1;MP.set(e,c),a.set(e,l),o.push(e),c===1&&i&&NP.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(),FP++,function(){o.forEach(function(e){var t=MP.get(e)-1,i=a.get(e)-1;MP.set(e,t),a.set(e,i),t||(NP.has(e)||e.removeAttribute(r),NP.delete(e)),i||e.removeAttribute(n)}),FP--,FP||(MP=new WeakMap,MP=new WeakMap,NP=new WeakMap,PP={})}},zP=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||jP(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),RP(r,i,n,`aria-hidden`)):function(){return null}},BP=function(){return BP=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},BP.apply(this,arguments)};function VP(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 HP(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 UP=`right-scroll-bar-position`,WP=`width-before-scroll-bar`,GP=`with-scroll-bars-hidden`,KP=`--removed-body-scroll-bar-size`;function qP(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}T();function JP(e,t){var n=N(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}T();var YP=typeof window<`u`?F:M,XP=new WeakMap;function ZP(e,t){var n=JP(t||null,function(t){return e.forEach(function(e){return qP(e,t)})});return YP(function(){var t=XP.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||qP(e,null)}),i.forEach(function(e){r.has(e)||qP(e,a)})}XP.set(n,e)},[e]),n}function QP(e){return e}function $P(e,t){t===void 0&&(t=QP);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 eF(e){e===void 0&&(e={});var t=$P(null);return t.options=BP({async:!0,ssr:!1},e),t}T();var tF=function(e){var t=e.sideCar,n=VP(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 a(r,BP({},n))};tF.isSideCarExport=!0;function nF(e,t){return e.useMedium(t),tF}var rF=eF();T();var iF=function(){},aF=x(function(e,t){var n=P(null),r=N({onScrollCapture:iF,onWheelCapture:iF,onTouchMoveCapture:iF}),i=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,b=v===void 0?`div`:v,x=e.gapMode,S=VP(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),w=p,T=ZP([n,t]),D=BP(BP({},S),i);return a(C,null,d&&a(w,{sideCar:rF,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:x}),s?y(E.only(c),BP(BP({},D),{ref:T})):a(b,BP({},D,{className:l,ref:T}),c))});aF.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},aF.classNames={fullWidth:WP,zeroRight:UP};var oF=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function sF(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=oF();return t&&e.setAttribute(`nonce`,t),e}function cF(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lF(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var uF=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sF())&&(cF(t,n),lF(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};T();var dF=function(){var e=uF();return function(t,n){M(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fF=function(){var e=dF();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},pF={left:0,top:0,right:0,gap:0},mF=function(e){return parseInt(e||``,10)||0},hF=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[mF(n),mF(r),mF(i)]},gF=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return pF;var t=hF(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])}};T();var _F=fF(),vF=`data-scroll-locked`,yF=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
+ .${GP} {
77
+ overflow: hidden ${r};
78
+ padding-right: ${s}px ${r};
79
+ }
80
+ body[${vF}] {
81
+ overflow: hidden ${r};
82
+ overscroll-behavior: contain;
83
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
84
+ padding-left: ${i}px;
85
+ padding-top: ${a}px;
86
+ padding-right: ${o}px;
87
+ margin-left:0;
88
+ margin-top:0;
89
+ margin-right: ${s}px ${r};
90
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
91
+ }
92
+
93
+ .${UP} {
94
+ right: ${s}px ${r};
95
+ }
96
+
97
+ .${WP} {
98
+ margin-right: ${s}px ${r};
99
+ }
100
+
101
+ .${UP} .${UP} {
102
+ right: 0 ${r};
103
+ }
104
+
105
+ .${WP} .${WP} {
106
+ margin-right: 0 ${r};
107
+ }
108
+
109
+ body[${vF}] {
110
+ ${KP}: ${s}px;
111
+ }
112
+ `},bF=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},xF=function(){M(function(){return document.body.setAttribute(vF,(bF()+1).toString()),function(){var e=bF()-1;e<=0?document.body.removeAttribute(vF):document.body.setAttribute(vF,e.toString())}},[])},SF=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;xF();var o=l(function(){return gF(i)},[i]);return a(_F,{styles:yF(o,!t,i,n?``:`!important`)})},CF=!1;if(typeof window<`u`)try{var wF=Object.defineProperty({},"passive",{get:function(){return CF=!0,!0}});window.addEventListener(`test`,wF,wF),window.removeEventListener(`test`,wF,wF)}catch{CF=!1}var TF=CF?{passive:!1}:!1,EF=function(e){return e.tagName===`TEXTAREA`},DF=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!EF(e)&&n[t]===`visible`)},OF=function(e){return DF(e,`overflowY`)},kF=function(e){return DF(e,`overflowX`)},AF=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),NF(e,r)){var i=PF(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jF=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},MF=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},NF=function(e,t){return e===`v`?OF(t):kF(t)},PF=function(e,t){return e===`v`?jF(t):MF(t)},FF=function(e,t){return e===`h`&&t===`rtl`?-1:1},IF=function(e,t,n,r,i){var a=FF(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=PF(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&NF(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l};T();var LF=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RF=function(e){return[e.deltaX,e.deltaY]},zF=function(e){return e&&`current`in e?e.current:e},BF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VF=function(e){return`
113
+ .block-interactivity-${e} {pointer-events: none;}
114
+ .allow-interactivity-${e} {pointer-events: all;}
115
+ `},HF=0,UF=[];function WF(e){var t=P([]),r=P([0,0]),i=P(),o=N(HF++)[0],s=N(fF)[0],c=P(e);M(function(){c.current=e},[e]),M(function(){if(e.inert){document.body.classList.add(`block-interactivity-${o}`);var t=HP([e.lockRef.current],(e.shards||[]).map(zF),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${o}`)}),function(){document.body.classList.remove(`block-interactivity-${o}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${o}`)})}}},[e.inert,e.lockRef.current,e.shards]);var l=n(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!c.current.allowPinchZoom;var n=LF(e),a=r.current,o=`deltaX`in e?e.deltaX:a[0]-n[0],s=`deltaY`in e?e.deltaY:a[1]-n[1],l,u=e.target,d=Math.abs(o)>Math.abs(s)?`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=AF(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=AF(d,u)),!m)return!1;if(!i.current&&`changedTouches`in e&&(o||s)&&(i.current=l),!l)return!0;var h=i.current||l;return IF(h,t,e,h===`h`?o:s,!0)},[]),u=n(function(e){var n=e;if(UF.length&&UF[UF.length-1]===s){var r=`deltaY`in n?RF(n):LF(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&BF(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var a=(c.current.shards||[]).map(zF).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?l(n,a[0]):!c.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),d=n(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:GF(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),f=n(function(e){r.current=LF(e),i.current=void 0},[]),p=n(function(t){d(t.type,RF(t),t.target,l(t,e.lockRef.current))},[]),m=n(function(t){d(t.type,LF(t),t.target,l(t,e.lockRef.current))},[]);M(function(){return UF.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener(`wheel`,u,TF),document.addEventListener(`touchmove`,u,TF),document.addEventListener(`touchstart`,f,TF),function(){UF=UF.filter(function(e){return e!==s}),document.removeEventListener(`wheel`,u,TF),document.removeEventListener(`touchmove`,u,TF),document.removeEventListener(`touchstart`,f,TF)}},[]);var h=e.removeScrollBar,g=e.inert;return a(C,null,g?a(s,{styles:VF(o)}):null,h?a(SF,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var KF=nF(rF,WF);T();var qF=x(function(e,t){return a(aF,BP({},e,{ref:t,sideCar:KF}))});qF.classNames=aF.classNames,T();var JF=Object.defineProperty,YF=(e,t)=>JF(e,`name`,{value:t,configurable:!0}),XF={ItemAligned:`item-aligned`,Popper:`popper`},ZF={LTR:`ltr`,RTL:`rtl`},QF=[` `,`Enter`,`ArrowUp`,`ArrowDown`],$F=[` `,`Enter`],eI=`Select`,[tI,nI,rI]=Ol(eI),[iI,aI]=al(eI,[rI,vP]),oI=vP(),[sI,cI]=iI(eI),[lI,uI]=iI(eI);function dI(e){let{__scopeSelect:t,children:r,open:i,defaultOpen:a,onOpenChange:o,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=oI(t),[v,y]=N(null),[b,x]=N(null),[S,C]=N(!1),w=lj(u),[T,E]=Ou({prop:i,defaultProp:a??!1,onChange:o,caller:eI}),[D,O]=Ou({prop:s,defaultProp:c,onChange:l,caller:eI}),k=P(null),A=P(!1),[j,F]=N(null),I=YF(e=>{F({value:e,hasConsumerStoppedPropagation:A.current}),O(e)},`handleUserSelect`),L=P(D);M(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=YF(()=>O(L.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let ee=!v||!!h||!!v.closest(`form`),[te,ne]=N(new Set),z=Hj(),re=Array.from(te).map(e=>e.props.value).join(`;`),ie=n(e=>{ne(t=>new Set(t).add(e))},[]),B=n(e=>{ne(t=>{let n=new Set(t);return n.delete(e),n})},[]),ae={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:z,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:A,userSelection:j,onUserSelect:I,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:te,nativeSelectKey:re,isFormControl:ee};return R(xP,{..._,children:R(sI,{scope:t,...ae,children:R(tI.Provider,{scope:t,children:R(lI,{scope:t,onNativeOptionAdd:ie,onNativeOptionRemove:B,children:nL(g)?g(ae):r})})})})}YF(dI,`SelectProvider`);var fI=YF(e=>{let{__scopeSelect:t,children:n,...r}=e;return R(dI,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>R(C,{children:[n,e?R(tL,{__scopeSelect:t}):null]})})},`Select`),pI=`SelectTrigger`,mI=x(YF(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=oI(n),o=cI(pI,n),s=o.disabled||r,c=tl(t,o.onTriggerChange),l=nI(n),u=P(`touch`),[d,f,p]=iL(e=>{let t=l().filter(e=>!e.disabled),n=aL(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=YF(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return R(CP,{asChild:!0,...a,children:R(Hl.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"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":rL(o.value)?``:void 0,...i,ref:c,onClick:Kc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Kc(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:Kc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),t&&e.key===` `||QF.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),hI=`SelectValue`,gI=x(YF(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=cI(hI,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=tl(t,c.onValueNodeChange);Tl(()=>{l(u)},[l,u]);let f=rL(c.value);return R(Hl.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:R(C,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),_I=x(YF(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return R(Hl.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[vI,yI]=iI(`SelectPortal`,{forceMount:void 0}),bI=YF(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return R(vI,{scope:e.__scopeSelect,forceMount:n,children:R(uu,{asChild:!0,...r})})},`SelectPortal`),xI=`SelectContent`,SI=x(YF(function(e,t){let n=yI(xI,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=cI(xI,e.__scopeSelect),[o,s]=N();return Tl(()=>{s(new DocumentFragment)},[]),R(mu,{present:r||a.open,children:({present:e})=>e?R(OI,{...i,ref:t}):R(CI,{...i,fragment:o})})},`SelectContent`)),CI=x(YF(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?D(R(TI,{scope:n,children:R(tI.Slot,{scope:n,children:R(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),wI=10,[TI,EI]=iI(xI),DI=ll(`SelectContent.RemoveScroll`),OI=x(YF(function(e,t){let{__scopeSelect:r}=e,{position:i=XF.ItemAligned,onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:s,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=cI(xI,r),[b,x]=N(null),[S,C]=N(null),w=tl(t,x),[T,E]=N(null),[D,O]=N(null),k=nI(r),[A,j]=N(!1),F=P(!1),I=P(!1),L=P(!1);M(()=>{if(b)return zP(b)},[b]),hj();let ee=n(e=>{let[t,...n]=k().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},[k,S]),te=n(()=>ee([T,b]),[ee,T,b]);M(()=>{A&&te()},[A,te]);let{onOpenChange:ne,triggerPointerDownPosRef:z}=y;M(()=>{if(b){let e={x:0,y:0},t=YF(t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},`handlePointerMove`),n=YF(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||ne(!1),document.removeEventListener(`pointermove`,t),z.current=null},`handlePointerUp`);return z.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,ne,z]),M(()=>{let e=YF(()=>ne(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[re,ie]=iL(e=>{let t=k().filter(e=>!e.disabled),n=aL(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),B=n((e,t,n)=>{let r=!I.current;r&&(I.current=!0);let i=!F.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(F.current=!0)):r&&E(e)},[y.value]),ae=n(()=>b?.focus(),[b]),oe=n((e,t,n)=>{if(!e)return;let r=!L.current;r&&(L.current=!0);let i=!F.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),se=i===XF.Popper?AI:kI,ce=se===AI?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return R(TI,{scope:r,content:b,viewport:S,onViewportChange:C,itemRefCallback:B,selectedItem:T,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:te,selectedItemText:D,position:i,isPositioned:A,searchRef:re,children:R(qF,{as:DI,allowPinchZoom:!0,children:R(Sj,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Kc(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:R(tu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:R(se,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...ce,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:Kc(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().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(()=>ee(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),kI=x(YF(function(e,t){let{__scopeSelect:r,onPlaced:i,...a}=e,o=cI(xI,r),s=EI(xI,r),[c,l]=N(null),[u,d]=N(null),f=tl(t,d),p=nI(r),m=P(!1),h=P(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=s,b=n(()=>{if(o.trigger&&o.valueNode&&c&&u&&g&&_&&v){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),r=v.getBoundingClientRect();if(o.dir!==ZF.RTL){let i=r.left-t.left,a=n.left-i,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-wI,d=ij(a,[wI,Math.max(wI,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let i=t.right-r.right,a=window.innerWidth-n.right-i,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-wI,d=ij(a,[wI,Math.max(wI,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let a=p(),s=window.innerHeight-wI*2,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+h+l+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-wI,D=s-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=f+h+k,j=x-A;if(A<=E){let e=a.length>0&&_===a[a.length-1].ref.current;c.style.bottom=`0px`;let t=u.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);c.style.height=n+`px`}else{let e=a.length>0&&_===a[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+g.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}c.style.margin=`${wI}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,i?.(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,c,u,g,_,v,o.dir,i]);Tl(()=>b(),[b]);let[x,S]=N();return Tl(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]),R(jI,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:n(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]),children:R(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:R(Hl.div,{...a,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...a.style}})})})},`SelectItemAlignedPosition`)),AI=x(YF(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=wI,...a}=e;return R(DP,{...oI(n),...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)`}})},`SelectPopperPosition`)),[jI,MI]=iI(xI,{}),NI=`SelectViewport`,PI=x(YF(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=EI(NI,n),o=MI(NI,n),s=tl(t,a.onViewportChange),c=P(0);return R(C,{children:[R(`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}),R(tI.Slot,{scope:n,children:R(Hl.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Kc(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-wI*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})})})]})},`SelectViewport`)),[FI,II]=iI(`SelectGroup`),LI=x(YF(function(e,t){let{__scopeSelect:n,...r}=e,i=Hj();return R(FI,{scope:n,id:i,children:R(Hl.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),RI=`SelectLabel`,zI=x(YF(function(e,t){let{__scopeSelect:n,...r}=e,i=II(RI,n);return R(Hl.div,{id:i.id,...r,ref:t})},`SelectLabel`)),BI=`SelectItem`,[VI,HI]=iI(BI),UI=x(YF(function(e,t){let{__scopeSelect:r,value:i,disabled:a=!1,textValue:o,...s}=e,c=cI(BI,r),l=EI(BI,r),u=c.value===i,[d,f]=N(o??``),[p,m]=N(!1),h=tl(t,ql(e=>l.itemRefCallback?.(e,i,a))),g=Hj(),_=P(`touch`);function v(e){c.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),c.onUserSelect(i),c.onOpenChange(!1)}return YF(v,`handleSelect`),R(VI,{scope:r,value:i,disabled:a,textId:g,isSelected:u,onItemTextChange:n(e=>{f(t=>t||(e?.textContent??``).trim())},[]),children:R(tI.ItemSlot,{scope:r,value:i,disabled:a,textValue:d,children:R(Hl.div,{role:`option`,"aria-labelledby":g,"data-highlighted":p?``:void 0,"aria-selected":u&&p,"data-state":u?`checked`:`unchecked`,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,tabIndex:a?void 0:-1,...s,ref:h,onFocus:Kc(s.onFocus,()=>m(!0)),onBlur:Kc(s.onBlur,()=>m(!1)),onClick:Kc(s.onClick,e=>{a||_.current!==`mouse`&&v(e)}),onPointerUp:Kc(s.onPointerUp,e=>{a||_.current===`mouse`&&v(e)}),onPointerDown:Kc(s.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Kc(s.onPointerMove,e=>{_.current=e.pointerType,a?l.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Kc(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Kc(s.onKeyDown,e=>{a||e.target!==e.currentTarget||(l.searchRef?.current===``||e.key!==` `)&&($F.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),WI=`SelectItemText`,GI=x(YF(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=cI(WI,n),s=EI(WI,n),c=HI(WI,n),u=uI(WI,n),[d,f]=N(null),p=ql(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),m=tl(t,f,c.onItemTextChange,p),h=d?.textContent,g=l(()=>R(`option`,{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=u;return Tl(()=>(_(g),()=>v(g)),[_,v,g]),R(C,{children:[R(Hl.span,{id:c.textId,...a,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!rL(o.value)?D(a.children,o.valueNode):null]})},`SelectItemText`)),KI=`SelectItemIndicator`,qI=x(YF(function(e,t){let{__scopeSelect:n,...r}=e;return HI(KI,n).isSelected?R(Hl.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),JI=`SelectScrollUpButton`,YI=x(YF(function(e,t){let n=EI(JI,e.__scopeSelect),r=MI(JI,e.__scopeSelect),[i,a]=N(!1),o=tl(t,r.onScrollButtonChange);return Tl(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};YF(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?R(QI,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),XI=`SelectScrollDownButton`,ZI=x(YF(function(e,t){let n=EI(XI,e.__scopeSelect),r=MI(XI,e.__scopeSelect),[i,a]=N(!1),o=tl(t,r.onScrollButtonChange);return Tl(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};YF(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?R(QI,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),QI=x(YF(function(e,t){let{__scopeSelect:r,onAutoScroll:i,...a}=e,o=EI(`SelectScrollButton`,r),s=P(null),c=nI(r),l=n(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return M(()=>()=>l(),[l]),Tl(()=>{c().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[c]),R(Hl.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Kc(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(i,50))}),onPointerMove:Kc(a.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(i,50))}),onPointerLeave:Kc(a.onPointerLeave,()=>{l()})})},`SelectScrollButtonImpl`)),$I=x(YF(function(e,t){let{__scopeSelect:n,...r}=e;return R(Hl.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),eL=`SelectBubbleInput`,tL=x(YF(function({__scopeSelect:e,...t},n){let r=cI(eL,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=P(null),h=tl(n,m),g=i??``,_=P(g),v=P(d),y=P(!1),b=Array.from(f).some(e=>(e.props.value??``)===``);return M(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==v.current;v.current=d;let i=_.current!==g;_.current=g;let a=r&&i;if(r&&!i&&d.value!==g&&!d.hasConsumerStoppedPropagation&&n){y.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{y.current=!1,n.call(e,g)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,g),e.dispatchEvent(t)}},[g,d]),R(Hl.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{y.current||a(e.target.value)},...t,style:{...Fu,...t.style},ref:h,defaultValue:g,children:[rL(i)&&!b?R(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function nL(e){return typeof e==`function`}YF(nL,`isFunction`);function rL(e){return e===``||e===void 0}YF(rL,`shouldShowPlaceholder`);function iL(e){let t=ql(e),r=P(``),i=P(0),a=n(e=>{let n=r.current+e;t(n);function a(e){r.current=e,window.clearTimeout(i.current),e!==``&&(i.current=window.setTimeout(()=>a(``),1e3))}YF(a,`updateSearch`),a(n)},[t]),o=n(()=>{r.current=``,window.clearTimeout(i.current)},[]);return M(()=>()=>window.clearTimeout(i.current),[]),[r,a,o]}YF(iL,`useTypeaheadSearch`);function aL(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=oL(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}YF(aL,`findNextItem`);function oL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}YF(oL,`wrapArray`);var sL=fI,cL=LI,lL=gI,uL=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>R(mI,{suppressHydrationWarning:!0,className:G(`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-foreground`,`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,R(_I,{asChild:!0,children:R(ks,{className:`size-4 opacity-50`})})]}),dL=({className:e,...t})=>R(YI,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:R(Ds,{})}),fL=({className:e,...t})=>R(ZI,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:R(xs,{})}),pL=({className:e,children:t,position:n=`popper`,...r})=>R(bI,{children:R(SI,{className:G(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-foreground`,`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:[R(dL,{}),R(PI,{className:G(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),R(fL,{})]})}),mL=({className:e,...t})=>R(zI,{className:G(`px-1 py-0.5 font-semibold text-sm`,e),...t}),hL=({className:e,children:t,...n})=>R(UI,{className:G(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 ps-2 pe-8 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[R(`span`,{className:`absolute inset-e-2 flex size-3.5 items-center justify-center`,children:R(qI,{children:R(ys,{className:`size-4`})})}),R(GI,{children:t})]}),gL=({className:e,...t})=>R($I,{className:G(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),Z=sL;Z.Group=cL,Z.Value=lL,Z.Trigger=uL,Z.ScrollUpButton=dL,Z.ScrollDownButton=fL,Z.Content=pL,Z.Label=mL,Z.Item=hL,Z.Separator=gL,T();var _L=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=({value:e,onChange:t})=>{let{comparator:n,numberValue:r}=l(()=>_L(e),[e]),[i,a]=N(n??null),[o,s]=N(r??null);return M(()=>{i&&o&&(i!==n||o!==r)&&t(`${i}${o}`)},[i,n,r,o,t]),R(`div`,{className:`flex gap-1`,children:[R(Z,{onValueChange:a,defaultValue:n,children:[R(Z.Trigger,{className:`w-20`,children:R(Z.Value,{placeholder:`Select a comparator`})}),R(Z.Content,{children:[R(Z.Item,{value:`<`,children:`<`}),R(Z.Item,{value:`<=`,children:`<=`}),R(Z.Item,{value:`=`,children:`=`}),R(Z.Item,{value:`>=`,children:`>=`}),R(Z.Item,{value:`>`,children:`>`})]})]}),R(Xk,{type:`number`,"aria-label":`Quantity`,defaultValue:o??void 0,onChange:e=>s(e.target.value),className:`min-w-4`})]})};T();var yL=({rawContent:e})=>{let[t,n]=N(``);return M(()=>{kn(async()=>{let{default:e}=await import(`./purify.es-Dqk5qvad.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?R(`div`,{dangerouslySetInnerHTML:{__html:t}}):R(`div`,{})};T();var bL=w(()=>kn(()=>import(`./MarkDownRender-HV9SKc56.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2]))),xL=w(()=>kn(()=>import(`./MarkdownEditor-BSbSD-tQ.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([3,2,4,1]))),SL=j(function({label:e,...t}){let[n,r]=N(!1);return R(Ok,{header:e,label:e,onToggle:e=>{e&&!n&&r(!0)},children:n?R(VL,{...t}):null})}),CL=({keyPath:e,dictionary:t,...n})=>{let{editedContent:r,addEditedContent:i}=DD(),a=CD(),{mutate:o,isPending:s}=XO();return R(RA,{variant:`default`,onContentChange:n=>i(t.localId,n,e),additionalButtons:R(X,{Icon:Fc,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:s,onClick:()=>{o({fileContent:JSON.stringify({...t,...r?.[t.localId]??{}}),keyPath:e,locales:a?.internationalization.locales??[],aiOptions:{apiKey:a?.ai?.apiKey,model:a?.ai?.model,temperature:a?.ai?.temperature}},{onSuccess:n=>{if(n?.data)try{let r=n.data.fileContent;i(t.localId,r,e)}catch(e){console.error(e)}}})}}),...n})},wL=({keyPath:e,dictionary:t,...n})=>{let{addEditedContent:r}=DD();return R(xA,{variant:`default`,onContentChange:n=>r(t.localId,n,e),...n})},TL=[{content:`False`,value:!1},{content:`True`,value:!0}],EL=({dictionary:e,keyPath:t,...n})=>{let{addEditedContent:r}=DD();return R(Wk,{choices:TL,value:!0,onChange:n=>r(e.localId,n,t),color:`text`,size:`sm`,...n})},DL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{locale:i,defaultLocale:a}=aa(),{selectedLocales:o}=ej(),s=e[Rr];return R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex w-full flex-col gap-2`,children:o.map(e=>{let o=`${JSON.stringify(t)}-translation-${e}`;return R(C,{children:[R(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:R(`td`,{className:`flex w-full`,children:Tr(e,i)})}),R(`tr`,{className:`flex`,children:R(`td`,{className:`flex w-full`,children:R(HL,{section:s[e]??Xi(s[a]),keyPath:[...t,{type:Rr,key:e}],dictionary:n,renderSection:r})})})]},o)})})})},OL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=DD(),{addNewEnumeration:a,removeEnumeration:o}=V(vA),s=e[zr],c=Object.keys(s)[0];return R(`div`,{className:`flex flex-col gap-2`,children:[R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(e[zr]).map(a=>{let l=[...t,{type:zr,key:a}],u=`${JSON.stringify(t)}-enumeration-${a}`;return R(C,{children:[R(`tr`,{className:`mt-2 w-full`,children:R(`td`,{className:`flex w-full`,children:R(`div`,{className:`flex flex-1`,children:R(X,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:Dc,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),R(`tr`,{className:`w-full p-2`,children:R(`td`,{className:`flex w-full`,children:R(vL,{value:a,onChange:r=>{let o=e[zr],s=zA(o,a,r),c={...e,[zr]:s};console.log(`newValue`,c),i(n.localId,c,t)}})})}),R(`tr`,{className:`block w-full`,children:R(`td`,{className:`flex w-full`,children:R(VL,{section:s[a]??Xi(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),R(X,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Xi(s[c])??``,[...t,{type:zr,key:`unknown`}]),Icon:pc,className:`m-2`,children:a.text})]})},kL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=DD(),{addNewSelectCase:a,removeSelectCase:o}=V(vA),s=e[ni],c=Object.keys(s)[0]??``;return R(`div`,{className:`flex flex-col gap-2`,children:[R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(s).map(a=>{let l=[...t,{type:ni,key:a}],u=`${JSON.stringify(t)}-select-${a}`;return R(C,{children:[R(`tr`,{className:`mt-2 w-full`,children:R(`td`,{className:`flex w-full`,children:R(`div`,{className:`flex flex-1`,children:R(X,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:Dc,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),R(`tr`,{className:`w-full p-2`,children:R(`td`,{className:`flex w-full`,children:R(xA,{"aria-label":`Edit case`,type:`text`,variant:`default`,onContentChange:r=>{let o={...e,[ni]:zA(s,a,String(r))};i(n.localId,o,t)},children:a})})}),R(`tr`,{className:`block w-full`,children:R(`td`,{className:`flex w-full`,children:R(VL,{section:s[a]??Xi(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),R(X,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Xi(s[c])??``,[...t,{type:ni,key:`newCase`}]),Icon:pc,className:`m-2`,children:a.text})]})},AL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Vr];return R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return R(C,{children:[R(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:R(`td`,{className:`flex w-full`,children:String(e)})}),R(`tr`,{className:`block w-full`,children:R(`td`,{className:`flex w-full`,children:R(HL,{section:i[e]??Xi(i.true),keyPath:[...t,{type:Vr,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},jL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[ti];return R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return R(C,{children:[R(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:R(`td`,{className:`flex w-full`,children:String(e)})}),R(`tr`,{className:`block w-full`,children:R(`td`,{className:`flex w-full`,children:R(HL,{section:i[e]??Xi(i.male),keyPath:[...t,{type:ti,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},ML=[`zero`,`one`,`two`,`few`,`many`,`other`],NL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Br];return R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex w-full flex-col gap-2`,children:ML.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return R(C,{children:[R(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:R(`td`,{className:`flex w-full`,children:e})}),R(`tr`,{className:`block w-full`,children:R(`td`,{className:`flex w-full`,children:R(HL,{section:i[e]??Xi(i.other),keyPath:[...t,{type:Br,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},PL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=DD(),{addNewElement:a,removeElement:o}=V(vA);return R(`div`,{className:`flex flex-col gap-2`,children:[R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex w-full flex-col gap-2`,children:e.map((a,s)=>{let c=`${JSON.stringify(t)}-array-${s}`;return R(C,{children:[R(`tr`,{className:`mt-2 w-full p-2`,children:R(`td`,{className:`flex w-full`,children:R(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[R(`span`,{className:`text-xs`,children:String(s)}),R(X,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,onClick:()=>{let e=[...t,{type:Gr,key:s}];i(n.localId,void 0,e)},Icon:Dc,children:o.text})]})})}),R(`tr`,{className:`block w-full`,children:R(`td`,{className:`flex w-full`,children:R(HL,{section:a??Xi(e[0]),keyPath:[...t,{type:Gr,key:s}],dictionary:n,renderSection:r})})})]},c)})})}),R(X,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>{let r=[...t,{type:Gr,key:e.length}];i(n.localId,Xi(e[0])??``,r,!1)},Icon:pc,children:a.text})]})},FL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return R(`table`,{className:`w-full`,children:R(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:Wr,key:e}],s=i[e]??Xi(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?R(C,{children:[R(`tr`,{className:`mt-2 p-2 text-xs`,children:R(`td`,{className:`flex w-full`,children:String(e)})}),R(`tr`,{className:`block w-full`,children:R(`td`,{className:`flex w-full`,children:R(VL,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):R(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:R(`td`,{className:`flex w-full`,children:R(SL,{label:fr(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},IL=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=N(0),a=[{content:`Edit`,value:0},{content:`Preview`,value:1}],o=[...t,{type:Zr}],s=e[Zr];return R(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[R(Wk,{choices:a,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),R(HL,{section:s,keyPath:o,dictionary:n,renderSection:r===1?e=>R(yL,{rawContent:e}):void 0})]})},LL=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=N(0),{addEditedContent:a}=DD(),o=[{content:`Edit`,value:0},{content:`Raw`,value:1},{content:`Preview`,value:2}],s=[...t,{type:Xr}],c=e.markdown??``;return R(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[R(Wk,{choices:o,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),R(HL,{section:c,keyPath:s,dictionary:n,renderSection:r===0?(e,t)=>R(O,{fallback:R(wk,{}),children:R(xL,{defaultValue:e,onChange:e=>a(n.localId,e,t)},JSON.stringify(t))}):r===2?e=>R(O,{fallback:R(wk,{}),children:R(bL,{children:e})}):void 0})]})},RL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:Hr}],i=e[Hr];return R(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:R(HL,{section:i,keyPath:r,...n})})},zL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:Ur}],i=e[Ur],{content:a}=e;return R(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[R(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),R(HL,{section:a,keyPath:r,...n})]})},BL=({keyPath:e,dictionary:t,renderSection:n,section:r,...i})=>{let{addEditedContent:a}=DD(),o=r[Kr],s=[...e,{type:Kr}];return R(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[R(BA,{children:`Dictionary key`}),R(xA,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,dictionaryKey:String(e)},s)},children:o.dictionaryKey??``}),R(BA,{children:`Path (optional)`}),R(xA,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,path:e===``?void 0:e},s)},children:o.path??``})]})},VL=j(function({section:e,keyPath:t,dictionary:n,renderSection:r}){let{tsxNotEditable:i}=V(vA),a=ta(e);return a===`reactNode`?R(`div`,{className:`flex w-full flex-col gap-2`,children:[R(`span`,{children:`(React Node)`}),R(`span`,{className:`flex text-muted-foreground text-xs`,children:i})]}):a===`nested`?R(BL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`translation`?R(DL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`enumeration`?R(OL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`condition`?R(AL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`select`?R(kL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`gender`?R(jL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`plural`?R(NL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`insertion`?R(RL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`markdown`?R(LL,{dictionary:n,keyPath:t,section:e}):a===`html`?R(IL,{dictionary:n,keyPath:t,section:e}):a===`file`?R(zL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`array`?R(PL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`object`?R(FL,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`number`?R(`div`,{className:`w-full p-2`,children:R(wL,{dictionary:n,keyPath:t,type:`number`,"aria-label":`Edit field`,children:e})}):a===`text`?R(`div`,{className:`w-full p-2`,children:typeof r==`function`?r(e,t):R(CL,{variant:`default`,"aria-label":`Edit field`,keyPath:t,dictionary:n,children:e})}):a===`boolean`?R(`div`,{className:`w-full p-2`,children:R(EL,{dictionary:n,keyPath:t,value:e})}):R(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(e,null,2),JSON.stringify(t,null,2),`NodeType : `,a]})}),HL=j(function(e){return R(bA,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:R(VL,{...e})})}),UL=[zr,Br,Vr,ti,ni],WL=[Xr,Zr,Hr],GL=[qr,Jr,Yr,ii],KL=[`zero`,`one`,`two`,`few`,`many`,`other`],qL=/^[A-Za-z_$][\w$-]*$/,JL=(e,t)=>{let n=qL.test(t)?t:`[${JSON.stringify(t)}]`;return e===``?n:n.startsWith(`[`)?`${e}${n}`:`${e}.${n}`},YL=(e,t)=>`${e}[${t}]`,XL=e=>e[e.nodeType],ZL=(e,{locales:t,sourceLocale:n})=>{let r=new Map,i=[],a=(e,t,n,a,o)=>{let s=r.get(e.path);return s?n===`group`&&s.kind===`leaf`&&(s.kind=`group`,s.typeChain=a,s.leafKind=void 0):(s={id:e.path,label:e.label,parentId:e.parentId,depth:e.depth,kind:n,typeChain:a,leafKind:o,wrappers:e.wrappers,isLocalized:e.isLocalized,cells:{},childIds:[]},r.set(e.path,s),e.parentId===void 0?i.push(e.path):r.get(e.parentId)?.childIds.push(e.path)),s.isLocalized||=e.isLocalized,s.cells[e.cellKey]={keyPath:e.keyPath,value:t,isMissing:e.isMissing},s},o=(e,t,n,r,i)=>({...e,path:n,label:r,parentId:t.id,depth:e.depth+1,keyPath:[...e.keyPath,i],wrappers:[],typeChain:[]}),s=(e,r)=>{let i=ta(e),l=[...r.typeChain,i];if(i===`translation`&&r.cellKey===`*`){let i=XL(e)??{},a=i[n]??Object.values(i)[0],o=[...new Set([...t,...Object.keys(i)])];for(let e of o){let t=i[e],n=t==null;s(n?Xi(a):t,{...r,cellKey:e,keyPath:[...r.keyPath,{type:Rr,key:e}],typeChain:l,isLocalized:!0,isMissing:r.isMissing||n})}c(r,e)}else if(WL.includes(i)){let t=XL(e),n={...r,keyPath:[...r.keyPath,{type:i}],wrappers:[...r.wrappers,i],typeChain:l};typeof t==`string`||t==null?a(n,t??``,`leaf`,l,QL(Qr,n.wrappers)):s(t,n),c(r,e)}else if(UL.includes(i)){let t=a(r,e,`group`,l),n=Object.entries(XL(e)??{});for(let[e,a]of n)s(a,o(r,t,JL(r.path,e),e,{type:i,key:e}));c(r,e)}else if(i===`array`){let t=a(r,e,`group`,l);e.forEach((e,n)=>{s(e,o(r,t,YL(r.path,n),`[${n}]`,{type:Gr,key:n}))}),c(r,e)}else if(i===`object`){let t=r.path===``,n=t?void 0:a(r,e,`group`,l);for(let[t,i]of Object.entries(e)){let e=JL(r.path,t),a={type:Wr,key:t};s(i,n?o(r,n,e,t,a):{...r,path:e,label:t,keyPath:[...r.keyPath,a],wrappers:[],typeChain:[]})}t||c(r,e)}else a(r,e,`leaf`,l,e===void 0?`empty`:QL(i,r.wrappers)),c(r,e)},c=(e,t)=>{if(e.cellKey!==`*`)return;let i=r.get(e.path);i&&(i.rootKeyPath=e.keyPath,i.rootNode=t,i.typeChain=$L(t,n))};s(e,{path:``,label:``,parentId:void 0,depth:0,cellKey:`*`,keyPath:[],wrappers:[],typeChain:[],isLocalized:!1,isMissing:!1});for(let e of r.values())e.typeChain[e.typeChain.length-1]===`plural`&&e.childIds.sort((e,t)=>KL.indexOf(r.get(e)?.label??``)-KL.indexOf(r.get(t)?.label??``));let l=[],u=e=>{let t=r.get(e);t&&(l.push(t),t.childIds.forEach(u))};return i.forEach(u),l},QL=(e,t)=>e===`text`&&t.includes(`markdown`)?`markdown`:e===`text`&&t.includes(`html`)?`html`:e===`number`?`number`:e===`boolean`?`boolean`:e===`file`?`file`:e===`nested`?`nested`:e===`null`?`empty`:GL.includes(e)?`readonly`:`text`,$L=(e,t)=>{let n=[],r=e;for(let e=0;e<8;e++){let e=ta(r);if(n.push(e),e===`translation`){let e=XL(r)??{};r=e[t]??Object.values(e)[0]}else if(WL.includes(e))r=XL(r);else break}return n},eR=(e,t)=>`${e}::${t}`,tR=e=>ta(e)===Xr,nR={key:`change-set`,content:{nodeType:`translation`,translation:{en:{title:`Unsaved changes`,emptyList:`No unsaved changes`,allLocales:`all locales`,added:`added`,changed:`changed`,removed:`removed`,emptyValue:`(empty)`,revertButton:{text:`Revert`,label:`Restore the saved value of this field`}},"en-GB":{title:`Unsaved changes`,emptyList:`No unsaved changes`,allLocales:`all locales`,added:`added`,changed:`changed`,removed:`removed`,emptyValue:`(empty)`,revertButton:{text:`Revert`,label:`Restore the saved value of this field`}},fr:{title:`Modifications non enregistrées`,emptyList:`Aucune modification non enregistrée`,allLocales:`toutes les langues`,added:`ajouté`,changed:`modifié`,removed:`supprimé`,emptyValue:`(vide)`,revertButton:{text:`Rétablir`,label:`Restaurer la valeur enregistrée de ce champ`}},es:{title:`Cambios sin guardar`,emptyList:`No hay cambios sin guardar`,allLocales:`todos los idiomas`,added:`añadido`,changed:`modificado`,removed:`eliminado`,emptyValue:`(vacío)`,revertButton:{text:`Revertir`,label:`Restaurar el valor guardado de este campo`}},de:{title:`Nicht gespeicherte Änderungen`,emptyList:`Keine ungespeicherten Änderungen`,allLocales:`alle Sprachen`,added:`hinzugefügt`,changed:`geändert`,removed:`entfernt`,emptyValue:`(leer)`,revertButton:{text:`Zurücksetzen`,label:`Gespeicherten Wert dieses Felds wiederherstellen`}},ja:{title:`未保存の変更`,emptyList:`未保存の変更はありません`,allLocales:`すべてのロケール`,added:`追加`,changed:`変更`,removed:`削除`,emptyValue:`(空)`,revertButton:{text:`元に戻す`,label:`このフィールドの保存済みの値に戻す`}},ko:{title:`저장되지 않은 변경 사항`,emptyList:`저장되지 않은 변경 사항 없음`,allLocales:`모든 로케일`,added:`추가됨`,changed:`변경됨`,removed:`삭제됨`,emptyValue:`(비어 있음)`,revertButton:{text:`되돌리기`,label:`이 필드의 저장된 값 복원`}},zh:{title:`未保存的更改`,emptyList:`没有未保存的更改`,allLocales:`所有语言`,added:`已添加`,changed:`已更改`,removed:`已删除`,emptyValue:`(空)`,revertButton:{text:`还原`,label:`恢复此字段的已保存值`}},it:{title:`Modifiche non salvate`,emptyList:`Nessuna modifica non salvata`,allLocales:`tutte le lingue`,added:`aggiunto`,changed:`modificato`,removed:`rimosso`,emptyValue:`(vuoto)`,revertButton:{text:`Ripristina`,label:`Ripristina il valore salvato di questo campo`}},pt:{title:`Alterações não salvas`,emptyList:`Nenhuma alteração não salva`,allLocales:`todos os idiomas`,added:`adicionado`,changed:`alterado`,removed:`removido`,emptyValue:`(vazio)`,revertButton:{text:`Reverter`,label:`Restaurar o valor salvo deste campo`}},hi:{title:`असहेजे परिवर्तन`,emptyList:`कोई असहेजा परिवर्तन नहीं`,allLocales:`सभी भाषाएँ`,added:`जोड़ा गया`,changed:`बदला गया`,removed:`हटाया गया`,emptyValue:`(खाली)`,revertButton:{text:`वापस करें`,label:`इस फ़ील्ड का सहेजा गया मान पुनर्स्थापित करें`}},ar:{title:`تغييرات غير محفوظة`,emptyList:`لا توجد تغييرات غير محفوظة`,allLocales:`كل اللغات`,added:`مضاف`,changed:`معدّل`,removed:`محذوف`,emptyValue:`(فارغ)`,revertButton:{text:`تراجع`,label:`استعادة القيمة المحفوظة لهذا الحقل`}},ru:{title:`Несохранённые изменения`,emptyList:`Нет несохранённых изменений`,allLocales:`все языки`,added:`добавлено`,changed:`изменено`,removed:`удалено`,emptyValue:`(пусто)`,revertButton:{text:`Откатить`,label:`Восстановить сохранённое значение поля`}}}},title:`Change set`,description:`Labels of the unsaved changes list of the dictionary editor: one entry per edited field and locale, with revert actions.`,tags:[`component`,`dictionary`,`design system`],location:`local`,localId:`change-set::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/ContentGrid/changeSet.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/ContentGrid/changeSet.content.mjs`};T();var rR=c(null),iR=e=>{let t=i(rR)??e;return{triggerId:`unrollable-panel-button-${t}`,panelId:`unrollable-panel-${t}`}},aR=({children:e,className:t,identifier:n,...r})=>{let i=`${n}${g()}`,{triggerId:a}=iR(i);return R(rR,{value:i,children:R(`div`,{className:G(`group/popover relative flex cursor-pointer`,t),id:a,"aria-haspopup":!0,...r,children:e})})},oR=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`below`,identifier:o,className:s,displayArrow:c=!0,...l})=>{let{triggerId:u,panelId:d}=iR(o);return R(bA,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":u,id:d,className:G(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`inset-s-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`inset-e-0`,a===`below`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-99 before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:inset-s-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:inset-e-2`,c&&a===`below`&&`before:-top-3.5 before:border-s-[10px] before:border-s-transparent before:border-e-[10px] before:border-e-transparent before:border-b-[10px] before:border-b-neutral`,c&&a===`above`&&`before:-bottom-3.5 before:border-s-[10px] before:border-s-transparent before:border-e-[10px] before:border-e-transparent before:border-t-[10px] before:border-t-neutral`,`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})},sR=({identifier:e,...t})=>{let{panelId:n}=iR(e);return R(`button`,{type:`button`,popoverTarget:n,...t})};aR.Detail=oR,aR.Trigger=sR,T();var cR=8,lR=(e,t,n,r)=>{let i=e.getBoundingClientRect(),{offsetWidth:a,offsetHeight:o}=t,{innerWidth:s,innerHeight:c}=window,l=getComputedStyle(e).direction===`rtl`,u=n===`start`!==l,d=i.left,f=i.right-a,p=d+a<=s-cR,m=f>=cR,h=u?p||!m?d:f:m||!p?f:d,g=c-i.bottom-16,_=i.top-16,v=g>=o,y=_>=o,b=(r===`above`?y||!v&&_>g:!v&&(y||_>g))?i.top-cR-o:i.bottom+cR,x=s-a-cR,S=c-o-cR;t.style.left=`${Math.max(cR,Math.min(h,x))}px`,t.style.top=`${Math.max(cR,Math.min(b,S))}px`},uR=({identifier:e,xAlign:t=`start`,yAlign:n=`below`,onOpenChange:r,onBeforeToggle:i,className:a,ref:o,...s})=>{let{triggerId:c,panelId:l}=iR(e),u=P(null),d=e=>{if(u.current=e,typeof o==`function`)return o(e);o&&(o.current=e)};M(()=>{let e=u.current;if(!e)return;let r=()=>{let r=document.getElementById(c);r&&e.matches(`:popover-open`)&&lR(r,e,t,n)},i=null,a=()=>{i||=Pk(()=>{i=null,r()})},o=new ResizeObserver(r);o.observe(e);let s=e=>{e.newState===`open`?(window.addEventListener(`scroll`,a,{passive:!0,capture:!0}),window.addEventListener(`resize`,a,{passive:!0})):(window.removeEventListener(`scroll`,a,!0),window.removeEventListener(`resize`,a))};return e.addEventListener(`toggle`,s),()=>{i?.(),o.disconnect(),e.removeEventListener(`toggle`,s),window.removeEventListener(`scroll`,a,!0),window.removeEventListener(`resize`,a)}},[c,t,n]);let f=e=>{i?.(e),r?.(e.newState===`open`)};return R(bA,{transparency:`xs`,roundedSize:`md`,role:`group`,"aria-labelledby":c,...s,ref:d,id:l,popover:`auto`,onBeforeToggle:f,className:G(`fixed inset-auto m-0 hidden ring-1 ring-neutral [&:popover-open]:flex`,a)})};T();var dR=16,fR=16,pR=e=>R(aR,{...e}),mR=({xAlign:e=`start`,yAlign:t=`below`,...n})=>{let r=P(null),{triggerId:i}=iR(n.identifier),[a,o]=N(e),[s,c]=N(t),[l,u]=N(void 0);return F(()=>{let n=null,a=null,s=!1,l=()=>{let n=r.current,s=document.getElementById(i);if(!n||!s)return;let l=s.getBoundingClientRect(),d=window.innerWidth,f=window.innerHeight,p=d-l.left-fR,m=l.right-fR;u(Math.max(p,m));let h=n.classList.contains(`invisible`);h&&(n.style.visibility=`hidden`,n.classList.remove(`invisible`)),a=Pk(()=>{a=null;let r=n.getBoundingClientRect();h&&(n.style.visibility=``,n.classList.add(`invisible`));let i=t,u=f-l.bottom-dR,p=l.top-dR;t===`below`&&u<r.height?p>=r.height&&(i=`above`):t===`above`&&p<r.height&&u>=r.height&&(i=`below`);let m=e,g=d-l.left-fR,_=l.right-fR,v=getComputedStyle(s).direction===`rtl`,y=v?_:g,b=v?g:_;e===`start`&&y<r.width?b>=r.width&&(m=`end`):e===`end`&&b<r.width&&y>=r.width&&(m=`start`),c(i),o(m)})},d=()=>{n||=Pk(()=>{n=null,l()})},f=()=>{s||(s=!0,window.addEventListener(`scroll`,d,{passive:!0,capture:!0})),d()},p=()=>{s&&(s=!1,window.removeEventListener(`scroll`,d,!0))},m=document.getElementById(i);m&&(m.addEventListener(`mouseenter`,f,{passive:!0}),m.addEventListener(`focusin`,f,{passive:!0}),m.addEventListener(`mouseleave`,p,{passive:!0}),m.addEventListener(`focusout`,p,{passive:!0}));let h=new ResizeObserver(()=>{s&&d()});return r.current&&h.observe(r.current),window.addEventListener(`resize`,d,{passive:!0}),()=>{n?.(),a?.(),m&&(m.removeEventListener(`mouseenter`,f),m.removeEventListener(`focusin`,f),m.removeEventListener(`mouseleave`,p),m.removeEventListener(`focusout`,p)),h.disconnect(),window.removeEventListener(`resize`,d),window.removeEventListener(`scroll`,d,!0)}},[i,e,t]),R(oR,{...n,xAlign:a,yAlign:s,ref:r,style:{...n.style,maxWidth:l?`${l}px`:void 0}})},hR=pR;hR.Detail=mR,hR.Trigger=sR,hR.Panel=uR;var gR=Hc(`w-fit backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,xl:`rounded-xl`,xxl:`rounded-2xl`,xxxl:`rounded-3xl`,full:`rounded-full`},color:{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-foreground`,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`}}),_R=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>R(`div`,{className:gR({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e});function vR(e){return typeof e==`object`?e.key:e}function yR(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function bR(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return(o.length!==r.length||o.some((e,t)=>r[t]!==e))&&(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1),i}return o.updateDeps=e=>{r=e},o}function xR(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var SR=(e,t)=>Math.abs(e-t)<1.01,CR=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})};function wR({offset:e,isScrolling:t,elementMax:n,holdOffset:r,scrollOffset:i,pendingWrite:a,clampedMaxAtWrite:o}){return t&&a===null&&e===i?`spurious`:a!==null&&Math.abs(e-a.target)<1.5?`readBack`:a!==null&&!a.smooth&&n!==null&&a.target>n+r+.5&&Math.abs(e-(n+r))<1.5||a!==null&&!a.smooth&&a.lowMaxes?.some(t=>Math.abs(e-t)<1.5)?`clampedReadBack`:o!==null&&Math.abs(e-o)<1.5?`clampedEcho`:`external`}var TR=e=>e===`smooth`||e===`smoothFinishing`;function ER({kind:e,offset:t,command:n,target:r}){return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!TR(n.phase)&&!SR(t,n.lastTargetOffset)&&!SR(t,r())&&e!==`clampedEcho`}var DR=40;function OR(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<DR;)n--;if(n<0)return!1;let r=e[n],i=n-1;for(;i>=0&&r.t-e[i].t<DR;)i--;if(i<0)return!1;let a=e[i],o=(t.offset-r.offset)/(t.t-r.t),s=(r.offset-a.offset)/(r.t-a.t);return o*s>=0&&Math.abs(o)>=2*Math.abs(s)&&Math.abs(o)-Math.abs(s)>=.8}function kR(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<DR;)n--;if(n<0)return!1;let r=e[n];return Math.abs(t.offset-r.offset)/(t.t-r.t)>=.05}var AR,jR=()=>{if(AR!==void 0)return AR;if(typeof navigator>`u`)return AR=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return AR=!0;let e=navigator.maxTouchPoints;return AR=navigator.platform===`MacIntel`&&e!==void 0&&e>0},MR,NR=()=>MR===void 0?MR=jR()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):MR,PR=()=>!jR()||NR(),FR={capture:!0,passive:!0},IR=class{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>this._touch!==null&&this._touch.phase!==`lateFling`,this.dragging=()=>this._touch?.phase===`down`&&this._touch.moved,this.tail=()=>this._touch?.phase===`tail`?this._touch.moved?`fling`:`tap`:null,this.onScroll=({isScrolling:e,ownReadBack:t,moved:n,external:r})=>(e&&this._touch?.phase===`tail`?this._openTail(this._touch.moved||!t,!1):this._touch?.phase===`lateFling`&&(this.host.now()>this._touch.until?this._touch=null:r&&e&&n&&this._openTail(!0,!1)),!t&&e&&n&&this._touch?.phase===`down`?(this._touch.moved=!0,!0):!1),this.touchStart=()=>{this.end(),this._touch={phase:`down`,moved:!1}},this.touchEnd=()=>{let e=this._touch?.phase===`down`&&this._touch.moved;this.end(),this._openTail(e,e)},this.end=()=>{let e=this.host.getWindow();this._touch?.phase===`tail`&&e!=null&&e.clearTimeout(this._touch.timerId),this._touch=null},this.listen=e=>{let t=()=>this.touchStart(),n=()=>this.touchEnd();return e.addEventListener(`touchstart`,t,FR),e.addEventListener(`touchend`,n,FR),e.addEventListener(`touchcancel`,n,FR),()=>{e.removeEventListener(`touchstart`,t,FR),e.removeEventListener(`touchend`,n,FR),e.removeEventListener(`touchcancel`,n,FR),this.end()}},this._openTail=(e,t)=>{let n=this.host.getWindow();if(n==null)return;this.end();let r={phase:`tail`,moved:e,awaitingFling:t,timerId:n.setTimeout(()=>{this.host.tailStillMoving()?this._openTail(r.moved,r.awaitingFling):(this._touch=r.awaitingFling?{phase:`lateFling`,until:this.host.now()+1e3}:null,this.host.onTailClosed())},150)};this._touch=r}}get touch(){return this._touch}},LR=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},RR=e=>{let t=new Set;return{schedule:n=>{let r=e.requestAnimationFrame(()=>{t.delete(r),n()});t.add(r)},cancel:()=>{t.forEach(t=>e.cancelAnimationFrame(t)),t.clear()}}},zR=e=>e,BR=e=>{let t=e.overscan*Math.max(e.lanes??1,1),n=Math.max(e.startIndex-t,0),r=Math.min(e.endIndex+t,e.count-1)-n+1,i=Array(r);for(let e=0;e<r;e++)i[e]=n+e;return i},VR=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(LR(n)),!r.ResizeObserver)return()=>{};let a=RR(r),o=new r.ResizeObserver(()=>{let t=()=>{i(LR(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},HR={passive:!0},UR=typeof window>`u`||`onscrollend`in window,WR=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&UR,o=0,s=a?null:CR(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,HR),a&&r.addEventListener(`scrollend`,u,HR),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},GR=(e,t)=>WR(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),KR=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},qR=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},JR=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,YR=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function XR(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var ZR=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new IR({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{let e=this.scrollState;if(e?.phase!==`queued`||this.pendingWrite!==null)return!1;let t=this._readElementOffset();return t===null||this._lastElementOffset===null||Math.abs(t-this._lastElementOffset)<1?!1:(this._lastElementOffset=t,e.samples=[...e.samples??[],{t:this.now(),offset:t}],!0)},onTailClosed:()=>{let e=this.scrollState;e?.phase===`queued`&&kR(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand(),this._retryClampedAdjustment()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=null,n=!1,r=!1,i=new Set,a=()=>{if(e)return e;let r=this.targetWindow;if(!r||!r.ResizeObserver)return null;let i=t=RR(r);return e=new r.ResizeObserver(e=>{let t=()=>{let t={sync:!1};this._resizeBatch=t;try{e.forEach(o)}finally{this._resizeBatch=null,t.notify&&(this.notify(t.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment(),this.measureElement(null))}};if(this.options.useAnimationFrameWithResizeObserver)i.schedule(t);else{n=!0;try{t()}finally{n=!1}}})},o=e=>{let t=e.target,n=this.indexFromElement(t);if(t.isConnected)this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}}};return{disconnect:()=>{var n;(n=a())==null||n.disconnect(),t?.cancel(),i.clear(),r=!1,e=null,t=null},observe:o=>{let s=a();s&&(n?(i.add(o),r||(r=!0,t?.schedule(()=>{r=!1,i.forEach(t=>{t.isConnected&&e?.observe(t,{box:`border-box`})}),i.clear()}))):s.observe(o,{box:`border-box`}))},unobserve:e=>{var t;i.delete(e),(t=a())==null||t.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:zR,rangeExtractor:BR,onChange:()=>{},measureElement:KR,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>vR(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||XR(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=null;if(r&&this.scrollOffset!==null&&!this._awaitingCommandReadBack()){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:s}=this.options,c=0;for(;c<a&&s(c)!==e;)c++;if(c<a){let e=n[c];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(o=n-this.scrollOffset,this.scrollOffset=n)}}}i?this.pendingScrollAnchor={kind:`follow`,behavior:i}:o!==null&&(this._canWriteScroll()?this.pendingScrollAnchor={kind:`anchor`,delta:o}:(this._holdOffset+=o,this._followOffsetTarget(o)))},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=bR(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var e;this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,(e=this._momentumStop)==null||e.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{let n=t?this._elementMaxScrollOffset():null,r=this._reportedOverscroll;this._reportedOverscroll=e<0||n!==null&&e>n+1;let i=e;this._lastElementOffset=i,e=this._toLayoutOffset(e);let a=this._classifyScrollEvent(e,t,n);if(a===`spurious`)return;a===`readBack`?e=this.pendingWrite.target:a===`clampedReadBack`&&this.scrollState?.index!=null&&e<this.getMaxScrollOffset()-1.5?this.scrollState.lastTargetOffset=e:ER({kind:a,offset:e,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);let o=this.getScrollOffset(),s=this.scrollDirection;this.scrollDirection=t?o===e?this.scrollDirection:o<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t;let c=this.scrollState;if(c?.phase===`queued`&&a===`external`&&t){if(r||this._reportedOverscroll)c.samples=[];else{let e=this.now();c.samples=[...(c.samples??[]).filter(t=>e-t.t<=200),{t:e,offset:i}],(s!==null&&this.scrollDirection!==s||OR(c.samples))&&(this.scrollState=null)}}this._iosGesture.onScroll({isScrolling:t,ownReadBack:a===`readBack`,moved:e!==o,external:a===`external`&&this.scrollState?.phase!==`smooth`&&this.scrollState?.phase!==`smoothFinishing`})&&this.scrollState?.phase===`queued`&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();let t=this.pendingScrollAnchor;this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled&&(t.kind===`anchor`?this._canWriteScroll()?YR(this.scrollState)&&!SR(this.getScrollOffset()-t.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(t.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=t.delta,this._followOffsetTarget(t.delta),this.notify(!1)):this.scrollToEnd({behavior:t.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,n)=>wR({offset:e,isScrolling:t,elementMax:n,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:this._clampedAdjustment?.maxAtWrite??null}),this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled||!this._canWriteScroll())return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e))},this._writeAwaitingCommand=()=>{let e=this.scrollState;if(e===null||e.phase!==`queued`)return;let{behavior:t}=e;this.getMeasurements();let n=this.getScrollStateTarget(e);e.lastTargetOffset=n,this._clampedAdjustment=null,e.phase=JR(t,e.index!=null&&SR(n,this.getScrollOffset())),this._scrollToOffset(n,{behavior:t}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{let e=this.scrollElement;if(e==null)return null;let{horizontal:t,isRtl:n}=this.options;return typeof e.scrollTop==`number`?t?e.scrollLeft*(n&&-1||1):e.scrollTop:typeof e.scrollY==`number`?t?e.scrollX:e.scrollY:null},this._canWriteScroll=()=>!(jR()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=e=>{if(this._holdOffset===0||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||this.scrollState?.phase===`smooth`)return;this._holdOffset=0,this.scrollOffset!==null&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(e);let t=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(t),this._scrollToOffset(t)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=bR(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=bR(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=yR(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=bR(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes,this._getLayoutTotalSize()+this.options.scrollMargin],(e,t,n,r,i)=>{if(e.length===0||t===0)return this.range=null,null;let a=Math.max(i-t,0);return this.range=ez(e,t,Math.min(n,a),r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range},{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=bR(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t,this.options.lanes]},(e,t,n,r,i,a)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n,lanes:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!YR(this.scrollState))return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),e.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;if(!this.isIndexInRange(e))return;this._resizeBatch?.sync&&this.getMeasurements();let r,i,a,o=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&o!=null)a=this.options.getItemKey(e),i=o[e*2],r=o[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;a=t.key,i=t.start,r=t.size}let s=this.itemSizeCache.get(a)??r,c=t-s;if(c!==0){let o=this.options.anchorTo===`end`&&!YR(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,l=o?this._getLayoutTotalSize():0,u=this.getScrollOffset(),d=this.itemSizeCache.has(a)?i+s<=u&&this.scrollDirection!==`backward`:i<u,f=!YR(this.scrollState)&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?d:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:a,start:i,size:r,end:i+r,lane:0},c,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(a,t),this.itemSizeCacheVersion++;let p=!1;if(this._awaitingCommandReadBack()||(o?p=this.applyScrollAdjustment(this._getLayoutTotalSize()-l):f&&(p=this.applyScrollAdjustment(c))),this._resizeBatch){this._resizeBatch.notify=!0,(n=this._resizeBatch).sync||(n.sync=p);return}this.notify(p),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}},this.getVirtualItems=bR(()=>[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(e,t,n)=>{let r=[];for(let i=0,a=e.length;i<a;i++){let a=t[e[i]];r.push(n===0?a:{...a,start:a.start-n,end:a.end-n})}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return xR(t[QR(0,t.length-1,r?e=>n[e*2]:e=>xR(t[e]).start,e)])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;let e=this._elementMaxScrollOffset();if(e===null)return;let t=this.pendingWrite,n=Math.max(e,0)+this._holdOffset;if(n>=t.target)return;let r=t.lowMaxes??=[];r[r.length-1]!==n&&r.push(n)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=e=>{let t=e+this._holdOffset;return this.pendingScrollAnchor?.kind===`anchor`&&(t+=this.pendingScrollAnchor.delta),t},this._elementMaxScrollOffset=()=>{let e=this.scrollElement;if(e===null)return null;if(`scrollHeight`in e)return this.options.horizontal?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;if(`document`in e){let t=e.document.documentElement;return this.options.horizontal?t.scrollWidth-e.innerWidth:t.scrollHeight-e.innerHeight}return null},this._momentumStop=null,this._stopMomentum=e=>{let t=this.scrollElement,n=this.targetWindow;if(t===null||n===null)return;let r=`document`in t?t.document.scrollingElement:t;if(!r?.style)return;if(this._momentumStop){this._momentumStop.done=e;return}let{style:i}=r,a=this.options.horizontal?`overflow-x`:`overflow-y`,o=i.getPropertyValue(a),s=i.getPropertyPriority(a),c=()=>this.options.horizontal?r.clientHeight:r.clientWidth,l=c();if(i.setProperty(a,`hidden`,`important`),c()!==l){i.setProperty(a,o,s);return}let u={restore:()=>i.getPropertyValue(a)!==`hidden`||i.getPropertyPriority(a)!==`important`?!1:(i.setProperty(a,o,s),!0),done:e};this._momentumStop=u,n.requestAnimationFrame(()=>n.requestAnimationFrame(()=>{this._momentumStop===u&&(this._momentumStop=null,u.restore()&&u.done())}))},this._clampedBy=e=>{let t=this._elementMaxScrollOffset();if(t===null)return null;let n=t+this._holdOffset;return e>n+.5?{target:e,maxAtWrite:n}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()+this.options.scrollMargin-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1){let e=this.getMaxScrollOffset(),n=e-this.options.paddingEnd+this.options.scrollPaddingEnd;return[Math.max(Math.min(n,e),0),t]}let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._startScroll({index:null,align:t},this.getOffsetForAlignment(e,t),n,`absolute`)},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r;this._startScroll({index:e,align:a},i,n,`absolute`)},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+e,`start`);this._startScroll({index:null,align:`start`},n,t,`relative`)},this.scrollToEnd=({behavior:e=`auto`}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:`end`,toEnd:!0},Math.max(this.getMaxScrollOffset(),0),e,`absolute`):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.cancelScroll=()=>{this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n}={})=>{let r={target:e+(t??0),smooth:n===`smooth`};return this.pendingWrite=r,this.options.scrollToFn(e-this._holdOffset,{behavior:n,adjustments:t},this),r},this.getCommandWrittenOffset=()=>this.scrollState!==null&&this.pendingWrite!==null&&!this.pendingWrite.smooth?this.pendingWrite.target:null,this._awaitingCommandReadBack=()=>{let e=this.getCommandWrittenOffset();return!(jR()&&this._iosGesture.dragging())&&e!==null&&!SR(e,this.getScrollOffset())},this._followOffsetTarget=e=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=e)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(e===0)return!1;if(this._followOffsetTarget(e),this._canWriteScroll()){let n=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(n+e);let r=this._scrollToOffset(n,{adjustments:e,behavior:t});return this.scrollOffset!==null&&(this.pendingWrite===r&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}return this._holdOffset+=e,this.scrollOffset!==null&&(this.scrollOffset+=e),!0}scheduleScrollReconcile(){this.targetWindow?this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}):this.scrollState=null}getScrollStateTarget(e){let t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:e.index==null?void 0:this.getOffsetForIndex(e.index,e.align);return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if(this.scrollState.phase===`queued`){this.scheduleScrollReconcile();return}this.getMeasurements();let e=this.getScrollStateTarget(this.scrollState),t=this.scrollState.index==null?1:this.options.useAnimationFrameWithResizeObserver?3:2,n=e!==this.scrollState.lastTargetOffset;if(!n&&SR(e,this.getScrollOffset())){if(this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothLanded`:this.scrollState.phase===`smoothFinishing`&&(this.scrollState.phase=`instant`),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let t=this.getSize()||600,n=Math.abs(e-this.getScrollOffset()),r=YR(this.scrollState)&&n>t;this.scrollState.lastTargetOffset=e,r?this.scrollState.phase=`smooth`:this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothFinishing`:this.scrollState.phase===`smoothLanded`&&(this.scrollState.phase=`instant`),this._scrollToOffset(e,{behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}_startScroll(e,t,n,r){this.pendingScrollAnchor=null,this._clampedAdjustment=null;let i=this._iosGesture.tail();if(r===`absolute`&&i!==null){if(i===`fling`&&PR()){this._stopMomentum(()=>{this.scrollState?.phase!==`queued`||this._iosGesture.tail()!==`fling`||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:`queued`,behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:JR(n,e.index!=null&&SR(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},QR=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function $R(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function ez(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=$R(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=QR(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}T();var tz=typeof document<`u`?F:M;function nz({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=f(e=>e+1,0)[1],a=P({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=P(!1),s=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=(e,t,n)=>{let r=a.current,i=!!e.options.horizontal,o=t.start-e.options.scrollMargin;r.lastPositions.get(n)!==o&&(r.lastPositions.set(n,o),r.mode===`transform`?n.style.transform=i?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:n.style[i?`left`:`top`]=`${o}px`)},l=e=>{let t=a.current;if(t.enabled&&t.container){s(e);for(let t of e.getVirtualItems()){let n=e.elementsCache.get(t.key);n&&c(e,t,n)}}},u={...r,onChange:(t,n)=>{var s;let c=a.current,u=!0;if(c.enabled){l(t);let e=t.range,n=c.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n&&!o.current?m(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[d]=N(()=>{let e=new ZR(u),t=e.measureElement;return e.measureElement=n=>{o.current=!0;try{t(n)}finally{o.current=!1}let r=a.current;if(n!==null&&r.enabled&&r.container){let t=e.measurementsCache[e.indexFromElement(n)];t&&c(e,t,n)}},Object.assign(e,{containerRef:t=>{let n=a.current;n.container=t,n.lastSize=null,t!==null&&l(e)}})});return d.setOptions(u),tz(()=>d._didMount(),[]),tz(()=>(s(d),d._willUpdate())),tz(()=>{l(d)}),d}function rz(e){return nz({observeElementRect:VR,observeElementOffset:GR,scrollToFn:qR,...e})}T();var iz=6,az=({items:e,itemHeight:t,getItemKey:n,renderItem:r,overscan:i=iz,className:a})=>{let o=P(null),s=rz({count:e.length,getScrollElement:()=>o.current,estimateSize:()=>t,getItemKey:t=>{let r=e[t];return r===void 0?t:n(r,t)},overscan:i});return R(`div`,{ref:o,className:G(`min-h-0 overflow-y-auto`,a),children:R(`ul`,{className:`relative w-full`,style:{height:s.getTotalSize()},children:s.getVirtualItems().map(n=>{let i=e[n.index];return i===void 0?null:R(`li`,{className:`absolute inset-x-0 top-0`,style:{height:t,transform:`translateY(${n.start}px)`},children:r(i,n.index)},n.key)})})})};T();var oz=60,sz=52,cz={added:`success`,changed:`warning`,removed:`error`},lz=e=>{if(e==null||e===``)return;let t=(typeof e==`string`?e:JSON.stringify(e)).replace(/\s+/g,` `).trim();return t.length>oz?`${t.slice(0,oz)}…`:t},uz=j(({entry:e,onRevert:t})=>{let n=V(nR),r=lz(e.previousValue),i=lz(e.nextValue);return R(`div`,{className:`flex h-full items-start gap-2 overflow-hidden rounded-lg px-2 py-1.5 hover:bg-text/5`,children:[R(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[R(`div`,{className:`flex min-w-0 items-center gap-2`,children:[R(`span`,{className:`truncate font-mono text-xs`,dir:`ltr`,children:[e.rowId,R(`span`,{className:`text-muted-foreground`,children:[` · `,e.cellKey===`*`?n.allLocales:e.cellKey]})]}),R(_R,{size:`xs`,color:cz[e.kind],className:`ms-auto shrink-0`,children:n[e.kind]})]}),R(`span`,{className:`flex min-w-0 items-center gap-1 text-xs`,children:[R(`span`,{dir:`auto`,className:G(`truncate text-muted-foreground`,r&&`line-through`),children:r??n.emptyValue}),R(`span`,{className:`shrink-0 text-muted-foreground`,children:`→`}),R(`span`,{dir:`auto`,className:`truncate`,children:i??n.emptyValue})]})]}),t&&R(X,{label:n.revertButton.label.value,Icon:hc,variant:`hoverable`,color:`text`,size:`icon-sm`,onClick:()=>t(e)})]})}),dz=e=>e.cellId,fz=({changeSet:e,onRevert:t,children:n,className:r})=>{let i=V(nR);return R(hR,{identifier:`change-set`,className:r,children:[n,R(hR.Detail,{identifier:`change-set`,isFocusable:!0,xAlign:`end`,yAlign:`above`,roundedSize:`2xl`,className:`flex max-h-96 w-[min(28rem,90vw)] cursor-default flex-col gap-2 overflow-hidden rounded-2xl p-3`,children:[R(`div`,{className:`flex items-center justify-between gap-2`,children:[R(`span`,{className:`font-semibold text-sm`,children:i.title}),e.length>0&&R(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:e.length})]}),e.length===0?R(`span`,{className:`text-muted-foreground text-sm`,children:i.emptyList}):R(az,{items:e,itemHeight:sz,getItemKey:dz,renderItem:e=>R(uz,{entry:e,onRevert:t})})]})]})};T();var pz=e=>e.type===`checkbox`,mz=e=>e.type===`file`,hz=e=>e instanceof Date,gz=e=>e==null,_z=e=>typeof e==`object`,vz=e=>!gz(e)&&!Array.isArray(e)&&_z(e)&&!hz(e),yz=e=>vz(e)&&e.target?pz(e.target)?e.target.checked:mz(e.target)?e.target.files:e.target.value:e,bz=/[.[\]'"]/,xz=e=>e.split(bz).filter(Boolean);function Sz(e,t){let n=xz(t),r=e._formValues,i=e._defaultValues;for(let e=0;e<n.length-1;e++){let t=n[e];if(r=r==null?r:r[t],i=i==null?i:i[t],r===null||i===null)return null}}var Cz=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),wz=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function Tz(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e);let t=typeof Blob<`u`&&e instanceof Blob,n=typeof FileList<`u`&&e instanceof FileList;if(wz&&(t||n))return e;let r=Array.isArray(e),i=Object.getPrototypeOf(e);if(!r&&i&&i.constructor!==Object)return e;let a=r?Array(e.length):Object.create(i);for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=Tz(e[t]));return a}var Ez={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},Dz={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},Oz={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},kz=[Oz.required,Oz.min,Oz.max,Oz.minLength,Oz.maxLength,Oz.pattern,Oz.validate],Az=`form`,jz=`root`,Mz=[`__proto__`,`constructor`,`prototype`],Nz=/^\w*$/,Pz=e=>Nz.test(e),Fz=e=>e===void 0,Q=(e,t,n)=>{if(!t||!vz(e))return n;let r=Pz(t)?[t]:xz(t);if(r.some(e=>Mz.includes(e)))return n;let i=r.reduce((e,t)=>gz(e)?void 0:e[t],e);return Fz(i)||i===e?Fz(e[t])?n:e[t]:i},Iz=e=>typeof e==`boolean`,Lz=e=>typeof e==`function`,Rz=(e,t,n)=>{let r=-1,i=Pz(t)?[t]:xz(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=vz(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(Mz.includes(t))return;e[t]=a,e=e[t]}},zz=_.createContext(null);zz.displayName=`HookFormControlContext`;var Bz=()=>_.useContext(zz),Vz=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==Dz.all&&(t._proxyFormState[i]=!r||Dz.all),n&&(n[i]=!0),e[i]}});return i},Hz=wz?_.useLayoutEffect:_.useEffect,Uz=e=>{let t=e.constructor&&e.constructor.prototype;return vz(t)&&t.hasOwnProperty(`isPrototypeOf`)},Wz=e=>gz(e)||!_z(e),Gz=(e,t)=>t.length===0&&!Array.isArray(e)&&Object.getPrototypeOf(e)!==null&&!Uz(e);function Kz(e,t,n=!1,r=new WeakMap){if(e===t)return!0;if(Wz(e)||Wz(t))return Object.is(e,t);if(hz(e)&&hz(t))return Object.is(e.getTime(),t.getTime());if(Array.isArray(e)&&Array.isArray(t)&&e.length!==t.length)return!1;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;if(Gz(e,i)||Gz(t,a))return Object.is(e,t);if(!i.length&&Array.isArray(e)!==Array.isArray(t))return!1;let o=r.get(e);if(o&&o.has(t))return!0;if(o)o.add(t);else{let n=new WeakSet;n.add(t),r.set(e,n)}for(let a of i){let i=e[a];if(!Object.prototype.hasOwnProperty.call(t,a))return!1;if(!n||a!==`ref`){let e=t[a];if(hz(i)&&hz(e)||(vz(i)||Array.isArray(i))&&(vz(e)||Array.isArray(e))?!Kz(i,e,n,r):!Object.is(i,e))return!1}}return!0}function qz(e){let t=_.useRef(!1),n=_.useRef(!1),r=_.useRef(void 0),i=_.useRef(0);return i.current++,!n.current&&e&&(n.current=!0,r.current=Tz(e())),{resyncIfNeeded:_.useCallback((e,a,o)=>{if(e&&(t.current||n.current&&i.current>1)){let e=a();Kz(r.current,e)||o(e)}t.current=!0},[]),snapshot:_.useCallback((e,t)=>{e&&(r.current=Tz(t()))},[])}}function Jz(e){let t=Bz(),{control:n=t,disabled:r,name:i,exact:a}=e||{},o=()=>({...n._formState,defaultValues:n._defaultValues}),[s,c]=_.useState(o),l=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:u,snapshot:d}=qz(o);return Hz(()=>{u(!r,o,c);let e=n._subscribe({name:i,formState:l.current,exact:a,callback:e=>{!r&&c({...n._formState,...e,defaultValues:n._defaultValues})}});return()=>{e(),d(!r,o)}},[n,i,r,a,u,d]),_.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),_.useMemo(()=>Vz(s,n,l.current,!1),[s,n])}var Yz=e=>typeof e==`string`,Xz=(e,t,n,r,i)=>Yz(e)?(r&&t.watch.add(e),Q(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Q(n,e,Q(i,e)))):(r&&(t.watchAll=!0),n);function Zz(e){let t=Bz(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=_.useRef(i),l=_.useRef(s),u=_.useRef(n),d=_.useRef(r);l.current=s;let f=()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e},[p,m]=_.useState(f),h=_.useRef(p),g=_.useCallback(e=>{let t=Xz(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),v=_.useCallback(e=>{if(!a){let t=Xz(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);Kz(e,h.current)||(m(e),h.current=e)}else m(t)}},[n._formValues,n._names,a,r]),{resyncIfNeeded:y,snapshot:b}=qz(f),x=_.useRef(v);x.current=v;let S=_.useRef(g);S.current=g,Hz(()=>{u.current!==n||!Kz(d.current,r)?(u.current=n,d.current=r,x.current()):y(!a,()=>S.current(),e=>{let t=Tz(e);m(t),h.current=t});let e=n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{x.current(e.values)}});return()=>{e(),b(!a,()=>S.current())}},[n,o,r,a,y,b]),_.useEffect(()=>n._removeUnmounted());let C=u.current!==n,w=d.current,T=_.useMemo(()=>!C&&!Kz(w,r),[C,r,w]);return(C||T)&&(c.current=i),!a&&(C||T)?g():p}function Qz(e){let t=Bz(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=Cz(i._names.array,n),l=Zz({control:i,name:n,defaultValue:_.useMemo(()=>{let e=Q(i._formValues,n,Q(i._defaultValues,n,o));return Fz(e)?Sz(i,n):e},[i,n,o]),exact:s}),u=Jz({control:i,name:n,exact:s}),d=_.useRef(e),f=_.useRef(null),p=_.useRef(i.register(n,{...e.rules,value:l,...Iz(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;let m=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Q(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Q(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Q(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Q(u.validatingFields,n)},error:{enumerable:!0,get:()=>Q(u.errors,n)}}),[u,n]),h=_.useCallback(e=>{let t=yz(e);return Q(i._fields,n)||(p.current=i.register(n,{...d.current.rules,value:t})),p.current.onChange({target:{value:yz(e),name:n},type:Ez.CHANGE})},[n,i]),g=_.useCallback(()=>{let e=Q(i._formValues,n);return Q(i._fields,n)||(p.current=i.register(n,{...d.current.rules,value:e})),p.current.onBlur({target:{value:e,name:n},type:Ez.BLUR})},[n,i]),v=_.useCallback(e=>{e&&(f.current={focus:()=>Lz(e.focus)&&e.focus(),select:()=>Lz(e.select)&&e.select(),setCustomValidity:t=>Lz(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>Lz(e.reportValidity)&&e.reportValidity()});let t=Q(i._fields,n);t&&t._f&&e&&(t._f.ref=f.current,t._f._c=!0)},[i._fields,n]),y=_.useMemo(()=>({name:n,value:l,...Iz(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h,onBlur:g,ref:v}),[n,r,u.disabled,h,g,v,l]);return _.useEffect(()=>{let e=i._options.shouldUnregister||a;p.current=i.register(n,{...d.current.rules,...Iz(d.current.disabled)?{disabled:d.current.disabled}:{}});let t=(e,t)=>{let n=Q(i._fields,e);n&&n._f&&(n._f.mount=t,n._f._c=t)};if(t(n,!0),e){let e=Tz(Q(a?i._defaultValues:i._options.values||i._defaultValues,n,Q(i._options.defaultValues,n,d.current.defaultValue)));Rz(i._defaultValues,n,e),Fz(Q(i._formValues,n))&&Rz(i._formValues,n,e)}if(!c&&i.register(n,{...d.current.rules,...Iz(d.current.disabled)?{disabled:d.current.disabled}:{}}),f.current){let e=Q(i._fields,n);e&&e._f&&(e._f.ref=f.current)}return()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),_.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),_.useMemo(()=>({field:y,formState:u,fieldState:m}),[y,u,m])}var $z=e=>e.render(Qz(e)),eB=e=>({isOnSubmit:!e||e===Dz.onSubmit,isOnBlur:e===Dz.onBlur,isOnChange:e===Dz.onChange,isOnAll:e===Dz.all,isOnTouch:e===Dz.onTouched}),tB=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(let n of t.watch)if(e.startsWith(n)&&e.charAt(n.length)===`.`)return!0;return!1},nB=(e,t,n)=>{for(let r of n||Object.keys(e)){if(r===`_f`)continue;let i=n?Q(e,r):e[r];if(i){let{_f:e}=i;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],e.name)||e.ref&&t(e.ref,e.name)||nB(i,t))return!0}else if((vz(i)||Array.isArray(i))&&nB(i,t))return!0}}},rB=(e,t,n)=>{let r=Q(e,n),i=Array.isArray(r)?r:[];return Rz(i,jz,t[n]),Rz(e,n,i),e},iB=e=>vz(e)&&!Object.keys(e).length,aB=e=>{if(!wz)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},oB=e=>e.type===`radio`,sB=e=>e instanceof RegExp,cB=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},lB={value:!1,isValid:!1},uB={value:!0,isValid:!0},dB=e=>{if(!Array.isArray(e))return lB;if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}let t=e[0];return!t||!t.checked||t.disabled?lB:!t.attributes||!(`value`in t.attributes)||Fz(t.value)||t.value===``?uB:{value:t.value,isValid:!0}},fB={isValid:!1,value:null},pB=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,fB):fB;function mB(e,t,n=`validate`){if(Yz(e)||Array.isArray(e)&&e.length&&e.every(Yz)||Iz(e)&&!e)return{type:n,message:Yz(e)?e:``,ref:t}}var hB=e=>vz(e)&&!sB(e)?e:{value:e,message:``},gB=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_,_c:v}=e._f,y=Q(n,h);if(!_||t.has(h))return{};let b=s?s[0]:o,x=e=>{if(i&&b.reportValidity){let t=Iz(e)?``:e||``;s?s.forEach(e=>Lz(e.setCustomValidity)&&e.setCustomValidity(t)):b.setCustomValidity(t),b.reportValidity()}},S={},C=!v&&oB(o),w=!v&&pz(o),T=C||w,E=(g||mz(o))&&Fz(o.value)&&Fz(y)||aB(o)&&o.value===``&&!v||y===``||Array.isArray(y)&&!y.length,D=cB.bind(null,h,r,S),O=(e,t,n,r=Oz.maxLength,i=Oz.minLength)=>{let a=e?t:n;S[h]={type:e?r:i,message:a,ref:o,...D(e?r:i,a)}};if(a?!Array.isArray(y)||!y.length:c&&(!T&&(E||gz(y))||Iz(y)&&!y||w&&!dB(s).isValid||C&&!pB(s).isValid)){let{value:e,message:t}=Yz(c)?{value:!!c,message:c}:hB(c);if(e&&(S[h]={type:Oz.required,message:t,ref:b,...D(Oz.required,t)},!r))return x(t),S}if(!E&&(!gz(d)||!gz(f))){let e,t,n=hB(f),i=hB(d);if(!gz(y)&&!hz(y)&&!isNaN(y)){let r=!v&&o.valueAsNumber||y&&+y;gz(n.value)||(e=r>n.value),gz(i.value)||(t=r<i.value)}else{let r=!v&&o.valueAsDate||new Date(y),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;Yz(n.value)&&y&&(e=s?a(y)>a(n.value):c?y>n.value:r>new Date(n.value)),Yz(i.value)&&y&&(t=s?a(y)<a(i.value):c?y<i.value:r<new Date(i.value))}if((e||t)&&(O(!!e,n.message,i.message,Oz.max,Oz.min),!r))return x(S[h].message),S}if((!gz(l)||!gz(u))&&!E&&(Yz(y)||a&&Array.isArray(y))){let e=hB(l),t=hB(u),n=!gz(e.value)&&y.length>+e.value,i=!gz(t.value)&&y.length<+t.value;if((n||i)&&(O(n,e.message,t.message),!r))return x(S[h].message),S}if(p&&!E&&Yz(y)){let{value:e,message:t}=hB(p);if(sB(e)&&!y.match(e)&&(S[h]={type:Oz.pattern,message:t,ref:o,...D(Oz.pattern,t)},!r))return x(t),S}if(m){if(Lz(m)){let e=mB(await m(y,n),b);if(e&&(S[h]={...e,...D(Oz.validate,e.message)},!r))return x(e.message),S}else if(vz(m)){let e={};for(let t in m){if(!iB(e)&&!r)break;let i=mB(await m[t](y,n),b,t);i&&(e={...i,...D(t,i.message)},r||x(i.message),r&&(S[h]=e))}if(!iB(e)&&(S[h]={ref:b,...e},!r))return S}}let k=S[h];return x(!k||k.message),S},_B=e=>Array.isArray(e)?e:[e],vB=e=>Array.isArray(e)?e.filter(Boolean):[];function yB(e,t){let n=t.length-1,r=0;for(;r<n;){if(gz(e)){e=void 0;break}e=e[t[r]],r++}return e}function bB(e){for(let t in e)if(e.hasOwnProperty(t)&&!Fz(e[t]))return!1;return!0}function xB(e,t){if(Yz(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:Pz(t)?[t]:xz(t);if(n.some(e=>Mz.includes(String(e))))return e;let r=n.length===1?e:yB(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(vz(r)&&iB(r)||Array.isArray(r)&&bB(r))&&xB(e,n.slice(0,-1)),e}var SB=()=>{let e=new Set,t=0;return{get observers(){return Array.from(e)},next:n=>{let r=e;t++;for(let e of r)e.next&&e.next(n);r===e&&t--},subscribe:n=>(e.add(n),{unsubscribe:()=>{t&&=(e=new Set(e),0),e.delete(n)}}),unsubscribe:()=>{e=new Set,t=0}}};function CB(e,t){let n=Array.isArray(e)?[]:{};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let i=e[r],a=t[r];i&&(vz(i)||Array.isArray(i))&&a?n[r]=CB(i,a):e[r]&&(n[r]=a)}return n}var wB=(e,t)=>e!==null&&_z(e)&&Object.prototype.hasOwnProperty.call(e,t),TB=(e,t)=>{if(!t)return!1;let n=e;for(let r of Pz(t)?[t]:xz(t)){if(!wB(n,r))return wB(e,t);n=n[r]}return!0},EB=e=>e.type===`select-multiple`,DB=e=>{let t=[...e.options];return!e.multiple&&e.size<2&&!t.some(e=>e.defaultSelected)?e.selectedIndex!==t.findIndex(e=>!e.disabled):t.some(e=>e.selected!==e.defaultSelected)},OB=e=>pz(e)?e.checked!==e.defaultChecked:e.type===`select-one`||EB(e)?DB(e):!oB(e)&&`defaultValue`in e&&e.value!==e.defaultValue,kB=e=>oB(e)||pz(e),AB=e=>aB(e)&&e.isConnected;function jB(e){return Array.isArray(e)||vz(e)}function MB(e,t,n=``,r=[]){for(let i in e){let a=n?`${n}.${i}`:i,o=e[i];jB(o)&&jB(Q(t,a))?MB(o,t,a,r):r.push(a)}return r}var NB=e=>{for(let t in e)if(Lz(e[t]))return!0;return!1};function PB(e){return Array.isArray(e)||vz(e)&&!NB(e)}function FB(e){return!!(e&&`_f`in e)}function IB(e){return Array.isArray(e)?!e.some(e=>!Fz(e)):!Object.keys(e).length}function LB(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function RB(e,t={},n){for(let r in e){let i=e[r],a=n&&n[r];PB(i)&&(!Array.isArray(i)||!FB(a))?(t[r]=Array.isArray(i)?[]:{},RB(i,t[r],a),IB(t[r])&&LB(t,r)):Fz(i)||(t[r]=!0)}return t}function zB(e,t,n,r){n||=RB(t,Array.isArray(gz(t)?e:t)?[]:{},r);for(let i in e){let a=e[i],o=r&&r[i];PB(a)&&(!Array.isArray(a)||!FB(o))?(Fz(t)||Wz(n[i])?n[i]=RB(a,Array.isArray(a)?[]:{},o):zB(a,gz(t)?{}:t[i],n[i],o),IB(n[i])&&LB(n,i)):Kz(a,gz(t)?void 0:t[i])?LB(n,i):n[i]=!0}return n}var BB=(e,t)=>{let n=t.split(`.`),r=[],i=n[0];for(let t=1;t<n.length;i+=`.`+n[t++])!isNaN(+n[t])&&e.has(i)&&r.push(`${i}.${n[t]}`);return r},VB=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Fz(e)?e:t?e===``?NaN:e&&+e:n&&Yz(e)?new Date(e):r?r(e):e;function HB(e){let t=e.ref;return mz(t)?t.files:oB(t)?pB(e.refs).value:EB(t)?[...t.selectedOptions].map(({value:e})=>e):pz(t)?dB(e.refs).value:VB(t.value,e)}var UB=(e,t,n,r)=>{let i={};for(let n of e){let e=Q(t,n);e&&Rz(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},WB=e=>Fz(e)?e:sB(e)?e.source:vz(e)?sB(e.value)?e.value.source:e.value:e,GB=`AsyncFunction`,KB=e=>{if(!e||!e.validate)return!1;if(Lz(e.validate))return e.validate.constructor.name===GB;if(vz(e.validate)){for(let t in e.validate)if(e.validate[t].constructor.name===GB)return!0}return!1},qB=e=>e.mount&&(e.required||!Fz(e.required)&&e.required!==!1||!Fz(e.min)||!Fz(e.max)||!Fz(e.maxLength)||!Fz(e.minLength)||e.pattern||e.validate);function JB(e,t,n){let r=Q(e,n);if(r&&(r.type||r.message)||Array.isArray(r))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=Q(t,r),o=Q(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var YB=(e,t,n)=>{let r=Object.keys(e).filter(e=>e!==`name`);return!r.length||n&&r.length>=Object.keys(t).length||r.find(e=>t[e]===(!n||Dz.all))},XB=(e,t,n)=>n?e===t||e.startsWith(t+`.`):e.startsWith(t)||t.startsWith(e),ZB=(e,t,n)=>{if(!e||!t||e===t)return!0;if(!Array.isArray(e))return XB(e,t,n);for(let r of e)if(r&&XB(r,t,n))return!0;return!1},QB=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e,$B=(e,t)=>{let n=Q(e,t);!vB(n).length&&!(n&&n.root)&&xB(e,t)},eV={mode:Dz.onSubmit,reValidateMode:Dz.onChange,shouldFocusError:!0},tV=(e,t)=>{for(let t in e)delete e[t];Object.assign(e,t)},nV={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function rV(e={}){let t={...eV,...e},n={...Tz(nV),isLoading:Lz(t.defaultValues),errors:Tz(t.errors)||{},disabled:t.disabled||!1},r={},i=(vz(t.defaultValues)||vz(t.values))&&Tz(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:Tz(i),o={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},s=!1,c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},l={},u={},d=new Set,f=eB(t.mode),p=eB(t.reValidateMode),m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...m},g={},_=(...e)=>e.some(e=>h[e]||g[e]),v=e=>{for(let t of d)if(ZB(t.name,e,t.exact))return!0;return!1},y={array:SB(),state:SB()},b=0,x=0,S=0,C={},w=t.criteriaMode===Dz.all,T=(e,t)=>n=>{clearTimeout(u[e]),u[e]=setTimeout(t,n)},E=e=>{clearTimeout(u[e]),delete u[e],delete l[e]},D=e=>{E(e);let t=`${e}.`;for(let e of Object.keys(l))e.startsWith(t)&&E(e)},O=async e=>{if(!o.keepIsValid&&!t.disabled&&(_(`isValid`)||e)){let e=++b,i;t.resolver?(i=iB((await z()).errors),e===b&&A()):i=await B({fields:r,onlyCheckValid:!0,eventType:Ez.VALID}),e===b&&i!==n.isValid&&y.state.next({isValid:i})}},k=(e,t)=>{let r=[...e];if(!r.some(e=>e&&(t?Q(n.validatingFields,e)!==!0:TB(n.validatingFields,e))))return;let i=Tz(n.validatingFields);for(let e of r)e&&(t?Rz(i,e,!0):xB(i,e));Kz(n.validatingFields,i)||(n.validatingFields=i)},A=(e,r)=>{!t.disabled&&_(`isValidating`,`validatingFields`)&&(k(e||c.mount,r),y.state.next({validatingFields:n.validatingFields,isValidating:!iB(n.validatingFields)}))},j=()=>{n.dirtyFields=zB(i,a,void 0,r)},M=(e,i=[],c,l,u=!0,d=!0)=>{if(l&&c&&!t.disabled){o.action=!0,o.keepIsValid=!1;let t=Q(r,e),a=t&&t._f,f=a?Object.assign([],t):t;if(o.actionArrayLengths.has(e)||o.actionArrayLengths.set(e,Array.isArray(f)?f.length:0),d&&Array.isArray(f)){let t=c(f,l.argA,l.argB)||f;a?Rz(r,e,{...t,_f:a}):u&&Rz(r,e,t)}let p=Q(n.errors,e);if(d&&Array.isArray(p)){let t=p.root,r=c(p,l.argA,l.argB)||p;t&&(r.root=t),u&&Rz(n.errors,e,r),$B(n.errors,e),n.errors={...n.errors}}let m=Q(n.touchedFields,e),h=d&&Array.isArray(m);if(h){let t=c(m,l.argA,l.argB);u&&Rz(n.touchedFields,e,t)}let g=Q(n.dirtyFields,e);if(d&&Array.isArray(g)){let t=c(g,l.argA,l.argB)||g;u&&Rz(n.dirtyFields,e,t)}_(`dirtyFields`)?j():s=!0,y.state.next({name:e,isDirty:oe(e,i),dirtyFields:n.dirtyFields,...h&&{touchedFields:n.touchedFields},errors:n.errors,isValid:n.isValid})}else Rz(a,e,i)},N=(e,t)=>{Rz(n.errors,e,t),n.errors={...n.errors},y.state.next({errors:n.errors})},P=e=>{Object.keys(l).forEach(E);let t=!iB(e);n.errors=Tz(e),y.state.next({errors:n.errors,...t?{isValid:!1}:{}}),!t&&o.mount&&O()},F=e=>Pz(e)?[e]:xz(e),I=e=>{let t=F(e),n=a,r=i;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=gz(n)?n:n[i],r=gz(r)?r:r[i],n===null&&r!==null)return!0}return!1},L=e=>{if(!o.actionArrayLengths.size)return!1;let t=F(e),n=a,r=``,i=-1,s=0;for(let e=0;e<t.length;e++){if(gz(n))return!1;let a=t[e];if(r=r?`${r}.${a}`:a,Array.isArray(n)&&+a>=n.length)return i===-1?!1:e!==i||+a<s;if(o.actionArrayLengths.has(r)&&(i=e+1,s=o.actionArrayLengths.get(r)),n=n[a],Fz(n)&&i!==-1&&e>i&&+t[i]<s)return!0}return!1},R=e=>{let t=a;for(let n of F(e)){if(Array.isArray(t)&&+n>=t.length)return!0;t&&=t[n]}return!1},ee=(e,l,u,d)=>{let f=Q(r,e);if(f){if(I(e)||L(e))return;let r=Fz(Q(a,e)),p=Q(a,e,Fz(u)?Q(i,e):u),m=!!d&&!n.isReady&&OB(d);if(Fz(p)||d&&d.defaultChecked||m||l){let t=l?p:HB(f._f);Fz(t)&&R(e)||(_(`dirtyFields`)&&!Kz(Q(a,e),t)&&(s=!0),Rz(a,e,t),m&&te(e,t))}else le(e,p);o.mount&&!o.action&&(t.resolver&&_(`isValidating`,`validatingFields`)?Promise.resolve().then(()=>O()):O(),r&&n.isDirty&&_(`isDirty`)&&(oe()||(n.isDirty=!1,y.state.next({...n}))),t.shouldUnregister&&r&&!Fz(Q(a,e))&&tB(e,c)&&(o.watch=!0))}},te=(e,o,c,l,u)=>{let d=!1,f=!1,p={name:e};if(!t.disabled||l===!0){if(!c||l){let t=Kz(Q(i,e),o);if(_(`isDirty`)&&(f=n.isDirty,n.isDirty=p.isDirty=!t||oe(),d=f!==p.isDirty),f=!!Q(n.dirtyFields,e),t)xB(n.dirtyFields,e);else{let t=Q(i,e),a=Q(r,e),s=!(a&&a._f)&&(vz(t)||Array.isArray(t))?zB(t,o,void 0,a):!0;Rz(n.dirtyFields,e,s)}let c=!1;if(s||t&&(_(`isDirty`)?n.isDirty:oe())){s=!1;let e=zB(i,a,void 0,r);Kz(n.dirtyFields,e)||(c=!0,tV(n.dirtyFields,e))}p.dirtyFields=n.dirtyFields,d||=_(`dirtyFields`)&&(c||f!==!t)}if(c){let t=TB(n.touchedFields,e)?Q(n.touchedFields,e):void 0;t||(Rz(n.touchedFields,e,c),p.touchedFields=n.touchedFields,d||=_(`touchedFields`)&&t!==c)}d&&u&&y.state.next(p)}return d?p:{}},ne=(e,r,i,a)=>{let o=Q(n.errors,e),s=_(`isValid`)&&Iz(r)&&n.isValid!==r;if(t.delayError&&i?(l[e]=T(e,()=>N(e,i)),l[e](t.delayError)):(E(e),i?Rz(n.errors,e,i):xB(n.errors,e),n.errors={...n.errors}),(i?!Kz(o,i,!0):o)||!iB(a)||s){let t={...a,...s&&Iz(r)?{isValid:r}:{},errors:n.errors,name:e};y.state.next(t)}},z=async e=>(A(e,!0),await t.resolver(a,t.context,UB(e||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),re=async e=>{let t=x,i=S,a=e?e.filter(e=>Q(r,e)):[],{errors:o}=await z(e);if(t!==x)return o;if(A(e),e){for(let t of e){if(a.includes(t)&&(!Q(r,t)||C[t]>i)){xB(o,t);continue}let e=Q(o,t);D(t);let s=c.array.has(t)&&vz(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e))),l=Q(r,t),u=vz(l)&&Object.keys(l).some(e=>e!==`_f`);s?rB(n.errors,{[t]:e},t):e&&(e.type||e.message)||Array.isArray(e)||vz(e)&&u?Rz(n.errors,t,e):xB(n.errors,t)}n.errors={...n.errors}}else Object.keys(l).forEach(E),n.errors=o;return o},ie=async({name:e,eventType:r})=>{if(t.validate){let i=x,o=await t.validate({formValues:a,formState:n,name:e,eventType:r});if(i!==x)return!0;if(vz(o)){let e=!0;be(Az);for(let t in o){let n=o[t];n&&(e=!1,xe(`${Az}.${t}`,{message:Yz(n.message)?n.message:``,type:n.type||Oz.validate}))}return e}return Yz(o)||!o?(xe(Az,{message:o||``,type:Oz.validate}),!1):(be(Az),!0)}return!0},B=async({fields:e,onlyCheckValid:i,name:o,eventType:s,context:l={valid:!0,runRootValidation:!1}})=>{let u=x;if(t.validate&&!l.runRootValidation&&(l.runRootValidation=!0,!await ie({name:o,eventType:s})&&(l.valid=!1,i)))return l.valid;for(let o in e){let d=e[o];if(d){let{_f:e,...f}=d;if(e){let o=c.array.has(e.name),s=d._f&&KB(d._f),f=_(`isValidating`,`validatingFields`);s&&f&&A([e.name],!0);let p=S,m=await gB(d,c.disabled,a,w,t.shouldUseNativeValidation&&!i,o);if(u!==x)return l.valid;if(s&&f&&A([e.name]),!Q(r,e.name)||C[e.name]>p)continue;if(m[e.name]&&(l.valid=!1,i)||(i||(E(e.name),Q(m,e.name)?o?rB(n.errors,m,e.name):Rz(n.errors,e.name,m[e.name]):xB(n.errors,e.name)),t.shouldUseNativeValidation&&m[e.name]))break}!iB(f)&&await B({context:l,onlyCheckValid:i,fields:f,name:o,eventType:s})}}return l.valid},ae=()=>{for(let e of c.unMount){let t=Q(r,e);t&&(t._f.refs?t._f.refs.every(e=>!AB(e)):!AB(t._f.ref))&&Te(e)}c.unMount=new Set},oe=(e,t)=>(e&&!Fz(t)&&Rz(a,e,t),!Kz(o.mount?a:i,i)),se=(e,t,n)=>{let r=o.mount?a:Fz(t)||!Fz(e)?i:t;return Xz(e,c,Fz(e)?{...r}:r,n,t)},ce=e=>vB(Q(o.mount?a:i,e,t.shouldUnregister?Q(i,e,[]):[])),le=(e,t,n={},i=!1,o=!1,s=!1)=>{let c=Q(r,e),l=t;if(c){let n=c._f;n&&(!n.disabled&&Rz(a,e,VB(t,n)),l=aB(n.ref)&&gz(t)?``:t,EB(n.ref)?[...n.ref.options].forEach(e=>e.selected=l.includes(e.value)):n.refs?pz(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(e.checked=Array.isArray(l)?!!l.find(t=>t===e.value):l===e.value||!!l)}):n.refs.forEach(e=>e.checked=e.value===l):mz(n.ref)?n.ref.value=``:(n.ref.value=l,n.ref.type||o||s||y.state.next({name:e,values:i?a:v(e)?Tz(a):void 0})))}(n.shouldDirty||n.shouldTouch)&&te(e,c&&c._f&&!c._f.disabled&&(c._f.valueAsNumber||c._f.valueAsDate||c._f.setValueAs)?VB(t,c._f):l,n.shouldTouch,n.shouldDirty,!o),n.shouldValidate&&ge(e,{delayError:n.delayError}),n.shouldValidate&&c&&c._f&&c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&ge(c._f.deps)},ue=(e,t,n,i=!1,o=!1,s=!1)=>{for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;let u=t[l],d=e+`.`+l,f=Q(r,d);c.array.has(d)&&y.array.next({name:d,values:i?a:Tz(a)}),(c.array.has(e)||vz(u)||f&&!f._f)&&!hz(u)?ue(d,u,n,i,o,s):le(d,u,n,i,o,s)}},de=(e,t,i,s,l=!1)=>{let u=Q(r,e),d=c.array.has(e),f=s?t:Tz(t),p=Kz(Q(a,e),f);if(p||Rz(a,e,f),d)y.array.next({name:e,values:s?a:Tz(a)}),_(`isDirty`,`dirtyFields`)&&i.shouldDirty&&(j(),n.isDirty=oe(e,f),l||y.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:n.isDirty})),i.shouldValidate&&ge(e,{delayError:i.delayError});else{let t=Array.isArray(f)&&!f.length||iB(f),n=!p&&!l;!u||u._f||gz(f)||t?le(e,f,i,s,l,n):ue(e,f,i,s,l,n)}if(!p&&!l){let t=tB(e,c),r=o.mount||t?e:void 0,i=d?[]:BB(c.array,e),l=s?a:v(r)||i.some(v)?Tz(a):void 0;y.state.next({...t&&n,name:r,values:l});for(let e of i)y.state.next({name:e,values:l})}},fe=(e,t,n={})=>de(e,t,n,!1),pe=(e,t={})=>{let r=Lz(e)?e(a):e;if(!Kz(a,r)){a={...a,...r};for(let e of new Set([...c.mount,...c.array]))TB(r,e)&&de(e,Q(r,e),t,!0,!0);y.state.next({...n,name:void 0,type:void 0,...d.size?{values:a}:{}}),t.shouldValidate&&O()}},me=async e=>{o.mount=!0;let i=e.target,s=i.name,u=!0,d=Q(r,s),m=S,h=e=>{u=!!Q(r,s)&&!(C[s]>m)&&Kz(e,Q(a,s,e))};if(d){o.keepIsValid=!1;let m,g,S=!1,C=i.type?HB(d._f):yz(e),T=e.type===Ez.BLUR||e.type===Ez.FOCUS_OUT,E=!qB(d._f)&&!t.validate&&!t.resolver&&!Q(n.errors,s)&&!d._f.deps,D=E||QB(T,Q(n.touchedFields,s),n.isSubmitted,p,f),k=tB(s,c,T);Rz(a,s,Tz(C)),T?i&&i.readOnly||(d._f.onBlur&&d._f.onBlur(e),Object.prototype.hasOwnProperty.call(l,s)&&(S=!0,l[s](0))):d._f.onChange&&d._f.onChange(e);let j=te(s,C,T),M=!iB(j)||k;if(!T&&y.state.next({name:s,type:e.type,...v(s)?{values:Tz(a)}:{}}),D)return E&&n.isValid||!_(`isValid`)||(t.mode===`onBlur`?T&&O():T||O()),M&&y.state.next({name:s,...k?{}:j});if(!t.resolver&&t.validate&&await ie({name:s,eventType:e.type}),!T&&k&&y.state.next({...n}),t.resolver){let e=x,{errors:t}=await z([s]);if(e!==x)return;if(A([s]),h(C),!u){!iB(j)&&y.state.next(j);return}let i=JB(n.errors,r,s),a=JB(t,r,i.name||s);m=a.error,s=a.name,g=iB(t)}else{let n=x,i=++b;if(A([s],!0),m=(await gB(d,c.disabled,a,w,t.shouldUseNativeValidation))[s],n!==x)return;if(A([s]),h(C),u){if(m)g=!1;else if(_(`isValid`)){if(g=await B({fields:r,onlyCheckValid:!0,name:s,eventType:e.type}),n!==x)return;h(C),i!==b&&(g=void 0)}}}u&&(d._f.deps&&(!Array.isArray(d._f.deps)||d._f.deps.length>0)&&ge(d._f.deps),ne(s,g,m,j),S&&Object.prototype.hasOwnProperty.call(l,s)&&l[s](0))}},he=(e,t)=>{if(Q(n.errors,t)&&e.focus)return e.focus(),1},ge=async(e,i={})=>{o.keepIsValid=!1;let a,s,u=_B(e),d=x;if(t.resolver){let t=await re(Fz(e)?e:u);a=iB(t),s=e?!u.some(e=>Q(t,e)):a}else e?(s=(await Promise.all(u.map(async e=>{let t=Q(r,e);return await B({fields:t&&t._f?{[e]:t}:t,eventType:Ez.TRIGGER})}))).every(Boolean),(s||n.isValid)&&O()):s=a=await B({fields:r,name:e,eventType:Ez.TRIGGER});if(d!==x)return s;if(i.delayError&&t.delayError&&Yz(e)){let r=Q(n.errors,e);r?(xB(n.errors,e),l[e]=T(e,()=>N(e,r)),l[e](t.delayError)):E(e)}if(i.shouldTouch)for(let t of e?u:c.mount)!c.array.has(t)&&Rz(n.touchedFields,t,!0);return n.errors={...n.errors},y.state.next({...!Yz(e)||_(`isValid`)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},...i.shouldTouch&&_(`touchedFields`)?{touchedFields:n.touchedFields}:{},errors:n.errors}),i.shouldFocus&&!s&&nB(r,he,e?u:c.mount),s},_e=((e,t)=>{let r=Fz(e)&&!t?{...o.mount?a:i}:o.mount?a:i;return t&&(r=CB(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),Fz(e)?r:Yz(e)?Q(r,e):e.map(e=>Q(r,e))}),ve=(e=>Fz(e)?{...n.errors}:Yz(e)?Q(n.errors,e):e.map(e=>Q(n.errors,e))),ye=(e,t)=>{let r=t||n,i=Q(r.errors,e);return{invalid:!!i,isDirty:!!Q(r.dirtyFields,e),error:i,isValidating:!!Q(r.validatingFields,e),isTouched:!!Q(r.touchedFields,e)}},be=e=>{let t=e?_B(e):void 0;t?t.forEach(e=>{D(e),xB(n.errors,e),n.errors={...n.errors},y.state.next({name:e,errors:n.errors})}):(Object.keys(l).forEach(E),n.errors={},y.state.next({errors:n.errors}))},xe=(e,t,i)=>{D(e);let a=Q(r,e,{_f:{}}),o=a._f&&a._f.ref,{ref:s,message:c,type:l,types:u,...d}=Q(n.errors,e)||{};Rz(n.errors,e,{...d,...t,ref:o}),n.errors={...n.errors},y.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&o&&o.focus&&o.focus()},Se=(e,t)=>{if(Lz(e)){let n={};d.add(n);let{unsubscribe:r}=y.state.subscribe({next:n=>`values`in n&&e(n.values||se(void 0,t),n)});return{unsubscribe:()=>{d.delete(n),r()}}}return se(e,t,!0)},Ce=e=>{let t={name:e.name,exact:e.exact};e.formState&&e.formState.values&&d.add(t);let{unsubscribe:r}=y.state.subscribe({next:t=>{if(ZB(e.name,t.name,e.exact)&&YB(t,e.formState||h,e.reRenderRoot)){let r=t.values||{...a};e.callback({...n,...t,validatingFields:n.validatingFields,isValidating:n.isValidating,values:r,defaultValues:i})}}});return()=>{d.delete(t),r()}},we=e=>{o.mount=!0;let t=Object.keys(e.formState||{}).filter(t=>e.formState&&e.formState[t]);for(let e of t)g[e]=(g[e]||0)+1;let n=Ce({...e,formState:{...m,...e.formState}});return()=>{for(let e of t.splice(0))g[e]--;n()}},Te=(e,o={})=>{let s=e?_B(e):c.mount;o.keepIsValidating||k(s);for(let e of s)c.mount.delete(e),c.array.delete(e),c.disabled.delete(e),xB(r,e),!o.keepValue&&xB(a,e),o.keepError||(D(e),xB(n.errors,e)),!o.keepDirty&&xB(n.dirtyFields,e),!o.keepTouched&&xB(n.touchedFields,e),!t.shouldUnregister&&!o.keepDefaultValue&&xB(i,e);o.keepError||(n.errors={...n.errors}),d.size&&y.state.next({values:Tz(a)}),y.state.next({...n,...o.keepDirty?{}:{isDirty:oe()},...o.keepIsValidating?{}:{isValidating:!iB(n.validatingFields)}}),!o.keepIsValid&&O()},Ee=({disabled:e,name:t})=>{if(Iz(e)&&o.mount||e||c.disabled.has(t)){let n=c.disabled.has(t)!==!!e;e?c.disabled.add(t):c.disabled.delete(t),n&&o.mount&&!o.action&&O()}},De=(e,n={})=>{let a=Q(r,e),s=Iz(n.disabled)||Iz(t.disabled),l=!c.registerName.has(e)&&a&&a._f&&!a._f.mount;if(a&&a._f||(C[e]=++S),Rz(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),c.mount.add(e),a&&a._f){let t=Q(r,e);for(let e of kz)e in n||delete t._f[e]}return a&&!l?Ee({disabled:Iz(n.disabled)?n.disabled:t.disabled,name:e}):ee(e,!0,n.value),{...s?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!WB(n.required),min:WB(n.min),max:WB(n.max),minLength:WB(n.minLength),maxLength:WB(n.maxLength),pattern:WB(n.pattern)}:{},name:e,onChange:me,onBlur:me,ref:s=>{if(s){c.registerName.add(e),De(e,n),c.registerName.delete(e),a=Q(r,e);let t=Fz(s.value)&&s.querySelectorAll&&s.querySelectorAll(`input,select,textarea`)[0]||s,o=kB(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;let u={...a._f};o?(u.refs=[...l.filter(AB),t,...Array.isArray(Q(i,e))?[{}]:[]],u.ref={type:t.type,name:e}):(u.ref=t,delete u.refs),Rz(r,e,{_f:u}),ee(e,!1,void 0,t)}else a=Q(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(Cz(c.array,e)&&o.action)&&c.unMount.add(e)}}},Oe=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&nB(r,he,c.mount),ke=e=>{Iz(e)&&(y.state.next({disabled:e}),nB(r,(t,n)=>{let i=Q(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0))},Ae=(e,i)=>async o=>{let s,u;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let d=Tz(a);y.state.next({isSubmitting:!0});let f=x,p=e=>{throw f===x&&y.state.next({isSubmitting:!1}),e};if(t.resolver){let e;try{e=await z()}catch(e){p(e)}let{errors:t,values:r}=e;if(f!==x)return;A(),Object.keys(l).forEach(E),n.errors=t,d=Tz(r)}else{try{await B({fields:r,eventType:Ez.SUBMIT})}catch(e){p(e)}if(f!==x)return;xB(n.errors,jz),n.errors={...n.errors}}if(c.disabled.size)for(let e of c.disabled)xB(d,e);if(iB(n.errors)){y.state.next({errors:{}});try{s=await e(d,o)}catch(e){u=e}}else{if(i)try{await i({...n.errors},o)}catch(e){p(e)}Oe(),setTimeout(Oe)}if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:iB(n.errors)&&!u,submitCount:n.submitCount+1,errors:n.errors}),u)throw u;return s},je=(e,t={})=>{Q(r,e)&&(k([e]),Fz(t.defaultValue)?fe(e,Tz(Q(i,e))):(fe(e,t.defaultValue),Rz(i,e,Tz(t.defaultValue))),t.keepTouched||xB(n.touchedFields,e),t.keepDirty||(xB(n.dirtyFields,e),n.isDirty=Fz(t.defaultValue)?oe():oe(e,Tz(Q(i,e)))),t.keepError||(D(e),xB(n.errors,e),n.errors={...n.errors},O()),y.state.next({...n,isValidating:!iB(n.validatingFields)}))},Me=(e,u={})=>{x++,b++;let d=e?Tz(e):i,f=Tz(d),p=iB(e),m=f,g=r;if(Object.keys(l).forEach(E),u.keepDefaultValues||(i=d),!u.keepValues){if(u.keepDirtyValues){let e=new Set([...c.mount,...MB(zB(i,a,void 0,g),n.dirtyFields)]);for(let t of e){let e=Q(n.dirtyFields,t),r=Q(a,t),i=Q(m,t);e&&!Fz(r)?Rz(m,t,r):!e&&!Fz(i)&&fe(t,i)}}else{if(wz&&Fz(e))for(let e of c.mount){let t=Q(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(aB(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(u.keepFieldsRef)for(let e of c.mount)fe(e,Q(m,e));else r={}}if(t.shouldUnregister){if(a=u.keepDefaultValues?Tz(i):{},u.keepFieldsRef)for(let e of c.mount)Rz(a,e,Q(m,e))}else a=Tz(m);y.array.next({values:{...m}}),y.state.next({name:void 0,type:void 0,values:{...m}})}c={mount:u.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:u.keepValues||u.keepDirtyValues||u.keepFieldsRef?new Set([...c.disabled].filter(e=>Q(r,e))):new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!h.isValid||!!u.keepIsValid||!!u.keepDirtyValues||!t.shouldUnregister&&!iB(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!u.keepIsValid,o.action=!1,o.actionArrayLengths.clear(),s=!1,u.keepErrors||(n.errors={}),y.state.next({submitCount:u.keepSubmitCount?n.submitCount:0,isDirty:p?!1:u.keepDirty?n.isDirty:u.keepValues?oe():!!(u.keepDefaultValues&&e&&!Kz(e,i)),isSubmitted:u.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:p?{}:u.keepDirtyValues?u.keepDefaultValues&&a?zB(i,a,void 0,g):n.dirtyFields:u.keepDefaultValues&&e?zB(i,e,void 0,g):u.keepDirty?n.dirtyFields:u.keepValues?zB(i,a,void 0,g):{},touchedFields:u.keepTouched?n.touchedFields:{},...!u.keepIsValidating&&(n.isValidating||!iB(n.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:u.keepErrors?n.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Ne=(e,n)=>Me(Lz(e)?e(a):e,{...t.resetOptions,...n}),Pe=(e,t={})=>{let n=Q(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&Lz(e.select)&&e.select()})}};y.state.subscribe({next:e=>{let{name:t,type:r,values:i,...a}=e;Object.keys(a).length&&(n={...n,...a})}});let Fe={control:{register:De,unregister:Te,getFieldState:ye,handleSubmit:Ae,setError:xe,_subscribe:Ce,_runSchema:z,_updateIsValidating:A,_focusError:Oe,_getWatch:se,_getDirty:oe,_setValid:O,_setFieldArray:M,_setDisabledField:Ee,_setErrors:P,_getFieldArray:ce,_reset:Me,_resetDefaultValues:()=>Lz(t.defaultValues)&&t.defaultValues().then(e=>{Ne(e,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:ae,_disableForm:ke,_subjects:y,_proxyFormState:h,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return c},set _names(e){c=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e},f=eB(t.mode),p=eB(t.reValidateMode),w=t.criteriaMode===Dz.all}},subscribe:we,trigger:ge,register:De,handleSubmit:Ae,watch:Se,setValue:fe,setValues:pe,getValues:_e,getErrors:ve,reset:Ne,resetField:je,resetDefaultValues:(e,t={})=>{if(i=Tz(e),!t.keepDirty){let e=zB(i,a,void 0,r);n.dirtyFields=e,n.isDirty=!iB(e)}t.keepIsValid||O(),y.state.next({...n,defaultValues:i})},clearErrors:be,unregister:Te,setError:xe,setFocus:Pe,getFieldState:ye};return{...Fe,formControl:Fe}}var iV={mode:eV.mode,reValidateMode:eV.reValidateMode,shouldFocusError:eV.shouldFocusError,resolver:void 0,criteriaMode:void 0,delayError:void 0,shouldUnregister:void 0,shouldUseNativeValidation:void 0,context:void 0,progressive:void 0,resetOptions:void 0};function aV(e={}){let t=_.useRef(void 0),n=_.useRef(void 0),r=_.useRef(e.formControl),i=_.useRef(!1),a=_.useRef(!!e.validate),o=_.useRef(!!e.errors),s=_.useRef(!1),[c,l]=_.useState(()=>({...Tz(nV),isLoading:Lz(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Lz(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl){if(r.current=e.formControl,i.current=!1,e.formControl)t.current={...e.formControl,formState:c},e.defaultValues&&!Lz(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...r}=rV(e);t.current={...r,formState:c}}}let u=t.current.control,d=u._options,f={};for(let t in iV)t in d&&!(t in e)&&(f[t]=iV[t]);i.current&&!e.disabled&&(f.disabled=!1),u._options={...f,...e,validate:e.validate};let p=()=>({...u._formState,defaultValues:u._defaultValues}),{resyncIfNeeded:m,snapshot:h}=qz(p);return Hz(()=>{m(!0,p,l);let e=u._subscribe({formState:u._proxyFormState,callback:()=>l({...u._formState,defaultValues:u._defaultValues}),reRenderRoot:!0});return l(e=>({...e,isReady:!0})),u._formState.isReady=!0,u._subjects.state.next({isReady:!0}),()=>{e(),h(!0,p)}},[u,m,h]),_.useEffect(()=>{u._disableForm(i.current&&!e.disabled?!1:e.disabled),i.current=!!e.disabled},[u,e.disabled]),_.useEffect(()=>{e.mode&&(u._options.mode=e.mode),e.reValidateMode&&(u._options.reValidateMode=e.reValidateMode)},[u,e.mode,e.reValidateMode]),_.useEffect(()=>{e.errors?(u._setErrors(e.errors),u._focusError()):o.current&&u._setErrors({}),o.current=!!e.errors},[u,e.errors]),_.useEffect(()=>{a.current&&!e.validate&&t.current&&t.current.clearErrors(Az),a.current=!!e.validate},[e.validate]),_.useEffect(()=>{e.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[u,e.shouldUnregister]),_.useEffect(()=>{if(u._proxyFormState.isDirty){let e=u._getDirty();e!==c.isDirty&&u._subjects.state.next({isDirty:e})}},[u,c.isDirty]),_.useEffect(()=>{e.values&&!Kz(e.values,n.current)?(u._reset(e.values,{keepFieldsRef:!0,...u._options.resetOptions}),u._options.resetOptions&&u._options.resetOptions.keepIsValid||u._setValid(),n.current=e.values,l(e=>({...e}))):u._resetDefaultValues()},[u,e.values]),_.useEffect(()=>{u._state.mount&&(s.current||e.values)||(u._setValid(),u._state.mount=!0),s.current=!0,u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),t.current.formState=_.useMemo(()=>Vz(c,u),[u,c]),t.current}var oV=_.createContext(null);oV.displayName=`HookFormContext`;var sV=()=>_.useContext(oV),cV=({children:e,watch:t,getValues:n,getErrors:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,resetDefaultValues:p,handleSubmit:m,unregister:h,control:g,register:v,setFocus:y,subscribe:b})=>{let x=_.useMemo(()=>({watch:t,getValues:n,getErrors:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,resetDefaultValues:p,handleSubmit:m,unregister:h,control:g,register:v,setFocus:y,subscribe:b}),[o,g,u,r,i,n,m,v,f,p,d,a,y,s,c,b,l,h,t]);return _.createElement(oV.Provider,{value:x},_.createElement(zz.Provider,{value:x.control},e))},lV=(e,t,n)=>{if(e&&`reportValidity`in e){let r=Q(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},uV=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?lV(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>lV(t,n,e))}},dV=(e,t)=>{t.shouldUseNativeValidation&&uV(e,t);let n={};for(let r in e){let i=Q(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.refs?i.refs[0]:i&&i.ref});if(fV(t.names||Object.keys(e),r)){let e=Object.assign({},Q(n,r));Rz(e,`root`,a),Rz(n,r,e)}else Rz(n,r,a)}return n},fV=(e,t)=>{let n=pV(t).replace(/[.*+?^${}()|\\]/g,`\\$&`);return e.some(e=>pV(e).match(`^${n}\\.\\d+`))};function pV(e){return e.replace(/\[(\d+)]/g,`.$1`).replace(/[[\]]/g,``)}function mV(){return mV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mV.apply(null,arguments)}function hV(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function gV(e,t){for(var n=Object.create(null);e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o]){if(`unionErrors`in r){var s=r.unionErrors.reduce(function(e,t){return t.errors.length<e.errors.length?t:e}).errors[0];n[o]={message:s?.message??a,type:s?.code??i}}else n[o]={message:a,type:i}}if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=cB(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function _V(e,t){for(var n=Object.create(null),r=function(){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o]){if(r.code===`invalid_union`&&r.errors.length>0){var s=r.errors.reduce(function(e,t){return t.length<e.length?t:e})[0];n[o]={message:s?.message??a,type:s?.code??i}}else n[o]={message:a,type:i}}if(r.code===`invalid_union`&&r.errors.forEach(function(t){return t.forEach(function(t){return e.push(mV({},t,{path:[].concat(r.path,t.path)}))})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=cB(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()};e.length;)r();return n}function vV(e,t,n){if(n===void 0&&(n={}),function(e){return`_zod`in e&&typeof e._zod==`object`}(e))return function(r,i,a){try{return Promise.resolve(hV(function(){function i(e){return a.shouldUseNativeValidation&&uV({},a),{errors:{},values:n.raw?Object.assign({},r):e}}var o=e;return n.mode===`sync`?i(o.parse(r,t)):Promise.resolve(o.parseAsync(r,t)).then(i)},function(e){if(function(e){var t;return!(e==null||(t=e._zod)==null||(t=t.traits)==null||!t.has(`$ZodError`))}(e))return{values:{},errors:dV(_V(e.issues,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};if(function(e){return`_def`in e&&typeof e._def==`object`}(e))return function(r,i,a){try{return Promise.resolve(hV(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&uV({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:dV(gV(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};throw Error(`Invalid input: not a Zod schema`)}var yV=({toolName:e,toolDescription:t,toolAutoSubmit:n})=>e?{toolname:e,tooldescription:t,toolautosubmit:n?``:void 0}:{},bV=async e=>e&&typeof e.then==`function`?await e:e,xV=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:i,children:a,autoComplete:o,method:s,toolName:c,toolDescription:l,toolAutoSubmit:u,...d})=>{let f=async i=>{let a=e?.safeParse(i)??{success:!0,data:void 0};await bV(t?.(i)),a.success?await bV(n?.(a.data)):await bV(r?.(Error(a.error.issues.map(e=>e.message).join(`, `))))},p=e=>{if(e.key!==`Enter`)return;let t=e.target;if(t.tagName!==`INPUT`)return;e.preventDefault();let n=e.currentTarget,r=Array.from(n.querySelectorAll(`input:not([disabled]):not([type="hidden"]), textarea:not([disabled])`)),i=r.indexOf(t);i>=0&&i<r.length-1&&r[i+1]?.focus()};return R(cV,{...d,children:R(`form`,{className:G(`flex flex-col gap-y-6`,i),onSubmit:d.handleSubmit(f),onKeyDown:p,autoComplete:o?`on`:`off`,noValidate:!0,method:s,...yV({toolName:c,toolDescription:l,toolAutoSubmit:u}),children:a})})},SV=(e,t)=>{let n=aV({resolver:vV(e),...t}),{isSubmitting:r,isSubmitted:i,isLoading:a,isValid:o}=Jz({control:n.control});return{form:n,isSubmitting:r,isSubmitted:i,isLoading:a,isValid:o}},CV=xV;T();var wV=({id:e,...t})=>{let n=g(),r=e??n;return R(TV,{value:{id:r},children:R(`div`,{className:`flex flex-col gap-2 p-2`,id:r,suppressHydrationWarning:!0,...t})})},TV=c({});T();var EV=c({}),DV=({...e})=>R(EV,{value:l(()=>({name:e.name}),[e.name]),children:R($z,{...e})}),OV=()=>{let e=i(EV),t=i(TV),{getFieldState:n,formState:r}=sV(),a=n(e.name,r);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...a}},kV=e=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=OV();return R(ul,{id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})},AV=e=>{let{formDescriptionId:t}=OV();return R(`p`,{className:`text-neutral text-sm`,id:t,...e})},jV=({children:e,...t})=>{let{error:n,formMessageId:r}=OV(),i=n?String(n?.message??``):e;return i?R(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:r,...t,children:i}):null},MV=({className:e,children:t,...n})=>R(`i`,{className:G(`text-neutral-400 text-xs`,e),...n,children:[`ⓘ `,t]}),NV=({className:e,...t})=>{let{error:n,formItemId:r}=OV();return R(BA,{className:G(`mb-2`,n&&`text-error`,e),htmlFor:r,...t})},PV=({isRequired:e})=>e?R(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):R(C,{}),FV=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>R(`div`,{className:`ms-1 flex gap-1 align-middle text-base leading-none`,children:[e&&R(NV,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:G(`font-bold`,i),children:[e,R(PV,{isRequired:t})]}),n&&R(MV,{content:n})]}),IV=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o,className:s})=>R(wV,{className:G(`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,s),children:[(t||e)&&R(`div`,{className:`flex max-w-full flex-col gap-1 p-1 leading-none`,children:[e&&R(FV,{isRequired:n,info:r,htmlFor:o,children:e}),t&&R(AV,{children:t})]}),R(kV,{children:i}),a&&R(jV,{"data-testid":`error-message`})]}),LV=e=>e?{toolparamdescription:e}:{},RV=({field:e,name:t,label:n,Element:r,isRequired:i=!1,info:a,description:o,showErrorMessage:s=!0,layoutClassName:c,toolParamDescription:l,...u})=>{let{error:d}=OV(),{value:f,onChange:p,...m}=e??{},h=u,g=h.value===void 0?f??``:h.value,_=(...e)=>{typeof p==`function`&&p(...e),typeof h.onChange==`function`&&h.onChange(...e)};return R(IV,{htmlFor:t,label:n,description:o,isRequired:i,info:a,showErrorMessage:s,"aria-invalid":!!d,className:c,children:R(r,{"data-testid":`element`,id:t,...m,...u,...LV(l),value:g,onChange:_,children:u.children})})},zV=e=>{let{control:t}=sV();return R(DV,{control:t,name:e.name,render:({field:t})=>R(RV,{...e,field:t})})},BV=e=>R(zV,{id:e.name,"data-testid":e.name,Element:Xk,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),VV=Hc(`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:{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-muted-foreground 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-foreground hover:opacity-80`,custom:``},variant:{default:`rounded-lg text-foreground-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:`text`,size:`md`}}),HV=({className:e,variant:t=`default`,color:n=`text`,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 R(p,{className:G(VV({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pe-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&&R(`button`,{type:`button`,className:`ms-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:R(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[R(`title`,{children:`Remove badge`}),R(`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`})]})})]})};T();var UV=Object.defineProperty,WV=(e,t)=>UV(e,`name`,{value:t,configurable:!0}),GV=`Dialog`,[KV,qV]=al(GV),[JV,YV]=KV(GV),XV=WV(e=>{let{__scopeDialog:t,children:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=P(null),l=P(null),{nodes:u,registry:d}=Tj(),[f,p]=Ou({prop:i,defaultProp:a??!1,onChange:o,caller:GV}),[m,h]=N(0),[g,_]=N(0);return R(JV,{scope:t,triggerRef:c,contentRef:l,contentId:Hj(),titleId:Hj(),descriptionId:Hj(),titlePresent:m>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:_,open:f,onOpenChange:p,onOpenToggle:n(()=>p(e=>!e),[p]),modal:s,branchNodes:u,branchRegistry:d,children:r})},`Dialog`),ZV=`DialogPortal`,[QV,$V]=KV(ZV,{forceMount:void 0}),eH=WV(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=YV(ZV,t);return R(QV,{scope:t,forceMount:n,children:E.map(r,e=>R(mu,{present:n||a.open,children:R(uu,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),tH=`DialogOverlay`,nH=x(WV(function(e,t){let n=$V(tH,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=YV(tH,e.__scopeDialog);return a.modal?R(mu,{present:r||a.open,children:R(iH,{...i,ref:t})}):null},`DialogOverlay`)),rH=ll(`DialogOverlay.RemoveScroll`),iH=x(WV(function(e,t){let{__scopeDialog:n,...r}=e,i=YV(tH,n),a=tl(t,ru());return R(qF,{as:rH,allowPinchZoom:!0,shards:l(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:R(Hl.div,{"data-state":dH(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),aH=`DialogContent`,oH=x(WV(function(e,t){let n=$V(aH,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=YV(aH,e.__scopeDialog);return R(mu,{present:r||a.open,children:a.modal?R(sH,{...i,ref:t}):R(cH,{...i,ref:t})})},`DialogContent`)),sH=x(WV(function(e,t){let n=YV(aH,e.__scopeDialog),r=P(null),i=tl(t,n.contentRef,r);return M(()=>{let e=r.current;if(e)return zP(e)},[]),R(lH,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Kc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Kc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Kc(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),cH=x(WV(function(e,t){let n=YV(aH,e.__scopeDialog),r=P(!1),i=P(!1);return R(lH,{...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()}})},`DialogContentNonModal`)),lH=x(WV(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=YV(aH,n);return hj(),R(wj,{registry:l.branchRegistry,children:R(Sj,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:R(tu,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?uH(o,l.descriptionId):o,"data-state":dH(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`));function uH(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}WV(uH,`concatAriaDescribedby`);function dH(e){return e?`open`:`closed`}WV(dH,`getState`);var fH=1,pH=.9,mH=.8,hH=.17,gH=.1,_H=.999,vH=.9999,yH=.99,bH=/[\\\/_+.#"@\[\(\{&]/,xH=/[\\\/_+.#"@\[\(\{&]/g,SH=/[\s-]/,CH=/[\s-]/g;function wH(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?fH:yH;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=wH(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=fH:bH.test(e.charAt(l-1))?(d*=mH,p=e.slice(i,l-1).match(xH),p&&i>0&&(d*=_H**+p.length)):SH.test(e.charAt(l-1))?(d*=pH,m=e.slice(i,l-1).match(CH),m&&i>0&&(d*=_H**+m.length)):(d*=hH,i>0&&(d*=_H**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=vH)),(d<gH&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=wH(e,t,n,r,l+1,a+2,o),f*gH>d&&(d=f*gH)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function TH(e){return e.toLowerCase().replace(CH,` `)}function EH(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,wH(e,t,TH(e),TH(t),0,0,{})}T();var DH=Object.defineProperty,OH=(e,t)=>DH(e,`name`,{value:t,configurable:!0});function kH(e){let t=x((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];LH(r)&&typeof VH==`function`&&(r=VH(r._payload)),E.forEach(r,e=>{if(FH(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;LH(n)&&typeof VH==`function`&&(n=VH(n._payload)),a=MH(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=y(a,void 0,s):!o&&E.count(r)===1&&b(r)&&(a=r);let c=a?PH(a):void 0,l=tl(n,c);if(!a){if(r||r===0)throw Error(o?BH(e):zH(e));return r}let u=NH(i,a.props??{});return a.type!==C&&(u.ref=n?l:c),y(a,u)});return t.displayName=`${e}.Slot`,t}OH(kH,`createSlot`);var AH=Symbol.for(`radix.slottable`);function jH(e){let t=OH(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=AH,t}OH(jH,`createSlottable`);var MH=OH((e,t)=>{if(`child`in e.props){let t=e.props.child;return b(t)?y(t,void 0,e.props.children(t.props.children)):null}return b(t)?t:null},`getSlottableElementFromSlottable`);function NH(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}OH(NH,`mergeProps`);function PH(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}OH(PH,`getElementRef`);function FH(e){return b(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===AH}OH(FH,`isSlottable`);var IH=Symbol.for(`react.lazy`);function LH(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===IH&&`_payload`in e&&RH(e._payload)}OH(LH,`isLazyComponent`);function RH(e){return typeof e==`object`&&!!e&&`then`in e}OH(RH,`isPromiseLike`);var zH=OH(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),BH=OH(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),VH=v.use;T();var HH=Object.defineProperty,UH=(e,t)=>HH(e,`name`,{value:t,configurable:!0}),WH=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=kH(`Primitive.${t}`),r=x((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),R(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function GH(e,t){e&&m(()=>e.dispatchEvent(t))}UH(GH,`dispatchDiscreteCustomEvent`),T();var KH=`[cmdk-group=""]`,qH=`[cmdk-group-items=""]`,JH=`[cmdk-group-heading=""]`,YH=`[cmdk-item=""]`,XH=`${YH}:not([aria-disabled="true"])`,ZH=`cmdk-item-select`,QH=`data-value`,$H=(e,t,n)=>EH(e,t,n),eU=c(void 0),tU=()=>i(eU),nU=c(void 0),rU=()=>i(nU),iU=c(void 0),aU=x((e,t)=>{let n=yU(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=yU(()=>new Set),i=yU(()=>new Map),o=yU(()=>new Map),s=yU(()=>new Set),c=_U(e),{label:u,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=Hj(),x=Hj(),S=Hj(),C=P(null),w=SU();vU(()=>{if(f!==void 0){let e=f.trim();n.current.value=e,T.emit()}},[f]),vU(()=>{w(6,j)},[]);let T=l(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)A(),O(),w(1,k);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(S);e?e.focus():(i=document.getElementById(b))==null||i.focus()}if(w(7,()=>{n.current.selectedItemId=M()?.id,T.emit()}),r||w(5,j),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}T.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),E=l(()=>({value:(e,t,r)=>{t!==o.current.get(e)?.value&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,D(t,r)),w(2,()=>{O(),T.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),w(3,()=>{A(),O(),n.current.value||k(),T.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();w(4,()=>{A(),t?.getAttribute(`id`)===e&&k(),T.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{o.current.delete(e),i.current.delete(e)}),filter:()=>c.current.shouldFilter,label:u||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:b,inputId:S,labelId:x,listInnerRef:C}),[]);function D(e,t){let r=c.current?.filter??$H;return e?r(e,n.current.search,t):0}function O(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=C.current;N().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(qH);t?t.appendChild(e.parentElement===t?e:e.closest(`${qH} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${qH} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=C.current?.querySelector(`${KH}[${QH}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function k(){let e=N().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(QH);T.setState(`value`,e||void 0)}function A(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=D(o.current.get(t)?.value??``,o.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function j(){var e;let t=M();t&&(t.parentElement?.firstChild===t&&((e=t.closest(KH)?.querySelector(JH))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function M(){return C.current?.querySelector(`${YH}[aria-selected="true"]`)}function N(){return Array.from(C.current?.querySelectorAll(XH)||[])}function F(e){let t=N()[e];t&&T.setState(`value`,t.getAttribute(QH))}function I(e){var t;let n=M(),r=N(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&T.setState(`value`,a.getAttribute(QH))}function L(e){let t=M()?.closest(KH),n;for(;t&&!n;)t=e>0?hU(t,KH):gU(t,KH),n=t?.querySelector(XH);n?T.setState(`value`,n.getAttribute(QH)):I(e)}let R=()=>F(N().length-1),ee=e=>{e.preventDefault(),e.metaKey?R():e.altKey?L(1):I(1)},te=e=>{e.preventDefault(),e.metaKey?F(0):e.altKey?L(-1):I(-1)};return a(WH.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&ee(e);break;case`ArrowDown`:ee(e);break;case`p`:case`k`:v&&e.ctrlKey&&te(e);break;case`ArrowUp`:te(e);break;case`Home`:e.preventDefault(),F(0);break;case`End`:e.preventDefault(),R();break;case`Enter`:{e.preventDefault();let t=M();if(t){let e=new Event(ZH);t.dispatchEvent(e)}}}}},a(`label`,{"cmdk-label":``,htmlFor:E.inputId,id:E.labelId,style:TU},u),wU(e,e=>a(nU.Provider,{value:T},a(eU.Provider,{value:E},e))))}),oU=x((e,t)=>{let n=Hj(),r=P(null),o=i(iU),s=tU(),c=_U(e),l=c.current?.forceMount??o?.forceMount;vU(()=>{if(!l)return s.item(n,o?.id)},[l]);let u=xU(n,r,[e.value,e.children,r],e.keywords),d=rU(),f=bU(e=>e.value&&e.value===u.current),p=bU(e=>l||s.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);M(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(ZH,m),()=>t.removeEventListener(ZH,m)},[p,e.onSelect,e.disabled]);function m(){var e,t;h(),(t=(e=c.current).onSelect)==null||t.call(e,u.current)}function h(){d.setState(`value`,u.current,!0)}if(!p)return null;let{disabled:g,value:_,onSelect:v,forceMount:y,keywords:b,...x}=e;return a(WH.div,{ref:el(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),sU=x((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,s=Hj(),c=P(null),u=P(null),d=Hj(),f=tU(),p=bU(e=>i||f.filter()===!1?!0:!e.search||e.filtered.groups.has(s));vU(()=>f.group(s),[]),xU(s,c,[e.value,e.heading,u]);let m=l(()=>({id:s,forceMount:i}),[i]);return a(WH.div,{ref:el(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:!p||void 0},n&&a(`div`,{ref:u,"cmdk-group-heading":``,"aria-hidden":!0,id:d},n),wU(e,e=>a(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?d:void 0},a(iU.Provider,{value:m},e))))}),cU=x((e,t)=>{let{alwaysRender:n,...r}=e,i=P(null),o=bU(e=>!e.search);return!n&&!o?null:a(WH.div,{ref:el(i,t),...r,"cmdk-separator":``,role:`separator`})}),lU=x((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=rU(),s=bU(e=>e.search),c=bU(e=>e.selectedItemId),l=tU();return M(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),a(WH.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:i?e.value:s,onChange:e=>{i||o.setState(`search`,e.target.value),n?.(e.target.value)}})}),uU=x((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,o=P(null),s=P(null),c=bU(e=>e.selectedItemId),l=tU();return M(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),a(WH.div,{ref:el(o,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},wU(e,e=>a(`div`,{ref:el(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),dU=x((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:s,...c}=e;return a(XV,{open:n,onOpenChange:r},a(eH,{container:s},a(nH,{"cmdk-overlay":``,className:i}),a(oH,{"aria-label":e.label,"cmdk-dialog":``,className:o},a(aU,{ref:t,...c}))))}),fU=x((e,t)=>bU(e=>e.filtered.count===0)?a(WH.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),pU=x((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...o}=e;return a(WH.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},wU(e,e=>a(`div`,{"aria-hidden":!0},e)))}),mU=Object.assign(aU,{List:uU,Item:oU,Input:lU,Group:sU,Separator:cU,Dialog:dU,Empty:fU,Loading:pU});function hU(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function gU(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function _U(e){let t=P(e);return vU(()=>{t.current=e}),t}var vU=typeof window>`u`?M:F;function yU(e){let t=P();return t.current===void 0&&(t.current=e()),t}function bU(e){let t=rU(),n=()=>e(t.snapshot());return A(t.subscribe,n,n)}function xU(e,t,n,r=[]){let i=P(),a=tU();return vU(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(QH,s),i.current=s}),i}var SU=()=>{let[e,t]=N(),n=yU(()=>new Map);return vU(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function CU(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function wU({asChild:e,children:t},n){return e&&b(t)?y(CU(t),{ref:t.ref},n(t.props.children)):n(t)}var TU={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},EU=({className:e,...t})=>R(mU,{className:G(`flex flex-col overflow-hidden rounded-md px-3 py-2`,e),...t}),DU=({children:e,...t})=>R(XV,{...t,children:R(oH,{className:`overflow-hidden p-0`,children:R(EU,{className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5`,children:e})})}),OU=({className:e,...t})=>R(`div`,{className:G(`flex flex-1 items-center gap-2 px-3 py-2`,`rounded-2xl supports-[corner-shape:squircle]:rounded-4xl`,`bg-neutral-50 dark:bg-neutral-950`,`ring-1 ring-neutral-100 dark:ring-neutral-700`,`transition-shadow duration-100 focus-within:ring-3 hover:ring-3`,e),"cmdk-input-wrapper":``,children:[R(Cc,{className:`size-4 shrink-0 opacity-50`}),R(mU.Input,{className:`flex-1 bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,...t})]}),kU=({className:e,...t})=>R(mU.List,{className:G(`max-h-75 overflow-y-auto overflow-x-hidden`,e),...t}),AU=e=>R(mU.Empty,{className:`py-6 text-center text-sm`,...e}),jU=({className:e,...t})=>R(mU.Group,{className:G(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs`,e),...t}),MU=({className:e,...t})=>R(mU.Separator,{className:G(`-mx-1 h-px bg-border`,e),...t}),NU=({className:e,...t})=>R(mU.Item,{className:G(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50`,e),...t}),PU=({className:e,...t})=>R(`span`,{className:G(`ms-auto text-muted-foreground text-xs tracking-widest`,e),...t}),FU={...EU,Dialog:DU,Input:OU,List:kU,Empty:AU,Group:jU,Separator:MU,Item:NU,Shortcut:PU};T();var IU=c(null),LU=()=>{let e=i(IU);if(!e)throw Error(`useMultiSelect must be used within MultiSelectProvider`);return e},RU=({values:e,defaultValues:t,onValueChange:r,loop:i=!1,disabled:a=!1,className:o,children:s,dir:c,...u})=>{let[d,f]=N(t??[]),[p,m]=N(``),[h,g]=N(!1),[_,v]=N(-1),y=P(null),[b,x]=N(!1),[S,C]=N(``);M(()=>{e&&f(e)},[e]);let w=n(e=>{if(d.includes(e)){let t=d.filter(t=>t!==e);f(t),r?.(t)}else{let t=[...d,e];f(t),r?.(t)}},[d]),T=n(e=>{e.preventDefault();let t=e.currentTarget,n=t.value.substring(t.selectionStart??0,t.selectionEnd??0);C(n),x(n===p)},[p]),E=n(e=>{e.stopPropagation();let t=y.current;if(!t)return;let n=()=>{let e=_+1;v(e>d.length-1?i?0:-1:e)},r=()=>{let e=_-1;v(e<0?d.length-1:e)},a=()=>{let e=_-1<=0?d.length-1==0?-1:0:_-1;v(e)};switch(e.key){case`ArrowLeft`:c===`rtl`?d.length>0&&(_!==-1||i)&&n():d.length>0&&t.selectionStart===0&&r();break;case`ArrowRight`:c===`rtl`?d.length>0&&t.selectionStart===0&&r():d.length>0&&(_!==-1||i)&&n();break;case`Backspace`:case`Delete`:if(d.length>0){let e=d[_];_!==-1&&e!==void 0?(w(e),a()):(t.selectionStart===0&&S===p||b)&&w(d[d.length-1])}break;case`Enter`:g(!0);break;case`Escape`:_===-1?h&&g(!1):v(-1)}},[d,p,_,i]);return R(IU,{value:l(()=>({value:d,onValueChange:w,open:h,setOpen:g,inputValue:p,setInputValue:m,activeIndex:_,setActiveIndex:v,ref:y,handleSelect:T}),[d,w,h,g,p,m,_,v,y,T]),children:R(EU,{onKeyDown:E,className:G(`flex w-full flex-col gap-2 overflow-visible bg-transparent`,a&&`cursor-not-allowed opacity-50`,o),dir:c,"aria-disabled":a||void 0,inert:a,...u,children:s})})},zU=({className:e,getBadgeValue:t=e=>e,validationStyleEnabled:r=!1,children:i,...a})=>{let{value:o,onValueChange:s,activeIndex:c}=LU(),l=n(e=>{e.preventDefault(),e.stopPropagation()},[]);return R(`div`,{className:G(`flex w-full flex-col gap-3`,`cursor-pointer select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-foreground`,`ring-0`,`focus-within:outline-none`,`focus-within:ring-3`,`focus-within:ring-neutral-200`,`dark:focus-within:ring-neutral-500`,`focus-within:ring-offset-white`,`dark:focus-within:ring-offset-neutral-500`,`[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,r&&`valid:border-success invalid:border-error`,e),...a,children:[o.length>0&&R(`div`,{className:`flex w-full flex-wrap gap-1`,children:o.map((e,n)=>R(HV,{className:G(`flex items-center gap-1 rounded-xl px-1`,c===n&&`ring-2 ring-muted-foreground`),color:`text`,children:[R(`span`,{className:`text-xs`,children:t(e)}),R(`button`,{"aria-label":`Remove ${e} option`,"aria-roledescription":`button to remove option`,onMouseDown:l,onClick:()=>s(e),children:[R(`span`,{className:`sr-only`,children:[`Remove `,e,` option`]}),R(Lc,{className:`size-4 cursor-pointer`})]})]},e))}),i]})},BU=({className:e,...t})=>{let{setOpen:n,inputValue:r,setInputValue:i,activeIndex:a,setActiveIndex:o,handleSelect:s,ref:c}=LU();return R(FU.Input,{...t,tabIndex:0,ref:c,value:r,onValueChange:a===-1?i:void 0,onSelect:s,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>o(-1),className:G(`ms-2 flex-1 cursor-pointer outline-hidden`,e,a!==-1&&`caret-transparent`)})},VU=({children:e})=>{let{open:t}=LU();return R(`div`,{className:`relative`,children:t&&e})},HU=({className:e,children:t})=>R(FU.List,{className:G(`absolute top-0 z-10 flex w-full flex-col gap-2`,`rounded-xl p-2 shadow-md`,`bg-white dark:bg-neutral-950`,`text-foreground`,`border border-neutral-200 dark:border-neutral-800`,`transition-colors`,e),children:[t,R(FU.Empty,{children:R(`span`,{className:`text-muted-foreground`,children:`No results found`})})]}),UU=({className:e,value:t,children:r,...i})=>{let{value:a,onValueChange:o,setInputValue:s}=LU(),c=n(e=>{e.preventDefault(),e.stopPropagation()},[]),l=a.includes(t);return R(FU.Item,{...i,onSelect:()=>{o(t),s(``)},className:G(`flex cursor-pointer justify-between`,`rounded-lg px-2 py-1`,`transition-colors`,`hover:bg-neutral/10`,l&&`opacity-50`,i.disabled&&`cursor-not-allowed opacity-50`,e),onMouseDown:c,children:[r,l&&R(ys,{className:`size-4`})]})},WU=RU;WU.Trigger=zU,WU.Input=BU,WU.Content=VU,WU.List=HU,WU.Item=UU;var GU=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c})=>{let{error:l}=OV();return R(IV,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!l,children:R(WU,{onValueChange:e.onChange,values:e.value,...c,children:s})})},KU=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>{let{control:c}=sV();return R(DV,{control:c,name:e,render:({field:c})=>R(GU,{field:c,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,...s,children:o})})},qU=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c})=>{let{error:l}=OV();return R(IV,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!l,children:R(Z,{onValueChange:e.onChange,defaultValue:e.value,...c,children:s})})},JU=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>{let{control:c}=sV();return R(DV,{control:c,name:e,render:({field:c})=>R(qU,{field:c,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,...s,children:o})})};function YU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function XU(e,t){return typeof t==`bigint`?t.toString():t}var ZU=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function QU(e){return new ZU(e)}function $U(e){return e==null}function eW(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function tW(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var nW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function rW(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function iW(e){if(rW(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return rW(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function aW(e){return iW(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var oW=new Set([`string`,`number`,`symbol`]);function sW(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function cW(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function lW(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function uW(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function dW(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function fW(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function pW(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function mW(e){return typeof e==`string`?e:e?.message}function hW(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function gW(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function _W(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:mW(e.inst?._zod.def?.error?.(e))??mW(a?.(e))??mW(t?.error?.(e))??mW(n.customError?.(e))??mW(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var vW=/[\uD800-\uDBFF]/;function yW(e){let t=e.length;if(!vW.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function bW(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function xW(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function SW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):TW(e,n,r.value)}}function CW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function wW(e,t,n){return CW(e,t,n,!1)}function TW(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:CW(this,t,n.bind(this))},set(e){CW(this,t,e)}})}function EW(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var DW,OW=!1,kW={configurable:!0,get(){OW=!0}};function AW(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&DW!==e._zod?DW=void 0:(DW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,kW);let e=OW;OW=!1;try{let r=n(this);return OW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),OW||=e,r}catch(n){throw delete this[t],OW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function jW(e,t,n,r){let i=EW(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var MW,NW={value:void 0,enumerable:!1},PW=`captureStackTrace`in Error?Error:null;function FW(e){let t=PW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return PW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function IW(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){NW.value=new a(r);try{Object.defineProperty(n,"_zod",NW)}finally{NW.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),SW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?FW(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var LW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(MW=globalThis).__zod_globalConfig??(MW.__zod_globalConfig={});var RW=globalThis.__zod_globalConfig;function zW(e){return e&&Object.assign(RW,e),RW}function BW(){let e=this._zod;return e.message??=JSON.stringify(e.def,XU,2),e.message}function VW(e){this._zod.message=e}var HW={get:BW,set:VW,enumerable:!0,configurable:!0},UW={value:void 0,enumerable:!1},WW=new WeakSet([Object.prototype,Error.prototype]),GW=IW(`$ZodError`,(e,t)=>{e.name=`$ZodError`,UW.value=t,Object.defineProperty(e,"issues",UW),UW.value=void 0,Object.defineProperty(e,"message",HW);let n=Object.getPrototypeOf(e);WW.has(n)||(WW.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},void 0,{Parent:Error}),KW=(e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new LW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>_W(e,o,zW())));throw nW(n,a?.callee??t),n}return s.value};return t})(GW),qW=(e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>_W(e,o,zW())));throw nW(n,a?.callee??t),n}return s.value};return t})(GW),JW=(e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new LW;return a.issues.length?YW(e,a.issues,i):{success:!0,data:a.value}})(GW);function YW(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>_W(e,n,zW()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var XW=(e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?YW(e,a.issues,i):{success:!0,data:a.value}})(GW),ZW=/^[\s\S]{0,}$/,QW=IW(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),$W=e=>{let t=e.value;return!$U(t)&&t.length!==void 0},eG=IW(`$ZodCheckMinLength`,(e,t)=>{var n;QW.init(e,t),(n=e._zod.def).when??(n.when=$W),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?yW(r):i)>=t.minimum)return;let a=bW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tG=IW(`$ZodCheckStringFormat`,(e,t)=>{var n,r;QW.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nG=IW(`$ZodCheckRegex`,(e,t)=>{tG.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rG={major:4,minor:6,patch:7},iG=IW(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rG;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=dW(t),a;for(let o of n){if(o._zod.def.when){if(fW(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new LW;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(gW(t.issues,n,e),i||=dW(t,n))});else{if(t.issues.length===n)continue;gW(t.issues,n,e),i||=dW(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(dW(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new LW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new LW;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return wW(this,`~standard`,sG(this))},set"~standard"(e){CW(this,`~standard`,e)}}),aG=(e,t)=>e.issues.length?{issues:e.issues.map(e=>_W(e,t,zW()))}:{value:e.value};async function oG(e,t){let n={async:!0};return aG(await e._zod.run({value:t,issues:[]},n),n)}function sG(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return aG(r,n)}catch{}return oG(e,t)},vendor:`zod`,version:1}}var cG=IW(`$ZodString`,(e,t)=>{iG.init(e,t),e._zod.pattern=t.pattern??ZW,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}});function lG(e,t){let n=hW(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of hW(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,gW(n.issues,t,e),n}}return i(n,a)}}var uG=e=>Array.isArray(e)?e.length:-1;function dG(e,t,n){e.issues.length&&t.issues.push(...pW(n,e.issues)),t.value[n]=e.value}var fG=IW(`$ZodArray`,(e,t)=>{iG.init(e,t);let n=RW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>dG(t,r,e)));else if(dG(c,r,e),s&&c.issues.length!==0&&dW(c))break}return o.length?Promise.all(o).then(()=>r):r},lG(e,uG)});function pG(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...pW(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var mG=[];function hG(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:mG,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=uW(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function gG(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(dW(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>pG(e,n,i,t,d,f))):pG(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var _G=IW(`$ZodObject`,(e,t)=>{iG.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=QU(()=>hG(t));AW(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||tW(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=rW,o=t.catchall,s,c=RW.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(dW(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>pG(n,t,e,r,a,o))):pG(s,t,e,r,a,o)}return o?gG(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),vG=IW(`$ZodEnum`,(e,t)=>{iG.init(e,t);let n=YU(t.entries),r=new Set(n);e._zod.values=r,AW(e,`pattern`,e=>{let t=YU(e.def.entries).filter(e=>oW.has(typeof e));return RegExp(t.length?`^(${t.map(e=>sW(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}});function yG(e,t){return e.value=t.issues.length?void 0:t.value,e}var bG=IW(`$ZodOptional`,(e,t)=>{iG.init(e,t),AW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,AW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),AW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${eW(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>yG(e,t)):yG(e,r)}return t.innerType._zod.run(e,n)}}),xG=IW(`$ZodDefault`,(e,t)=>{iG.init(e,t),e._zod.optin=`defaulted`,AW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>SG(e,t)):SG(r,t)}});function SG(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var CG=IW(`$ZodCustom`,(e,t)=>{QW.init(e,t),iG.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>wG(t,n,r,e));wG(i,n,r,e)}});function wG(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(xW(e))}}function TG(e){return e.checks&&=[...e.checks],e}function EG(e,t){return new e(TG({type:`string`,...lW(t)}))}function DG(e,t){return new eG({check:`min_length`,...lW(t),minimum:e})}function OG(e,t){return new nG({check:`string_format`,format:`regex`,...lW(t),pattern:e})}function kG(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...lW(n)})}var AG=IW(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);iG.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){CW(this,`with`,e)},parse(e,t){return KW(this,e,t,{callee:this.parse})},parseAsync(e,t){return qW(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return JW(this,e,t)},safeParseAsync(e,t){return XW(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0})},clone(e,t){return cW(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),jG=IW(`ZodMiniString`,(e,t)=>{cG.init(e,t),AG.init(e,t)});function MG(e){return EG(jG,e)}var NG=IW(`ZodMiniArray`,(e,t)=>{fG.init(e,t),AG.init(e,t)});function PG(e,t){return new NG({type:`array`,element:e,...lW(t)})}var FG=IW(`ZodMiniObject`,(e,t)=>{_G.init(e,t),AG.init(e,t),jW(e,`shape`,e=>e._zod.def.shape,!1)});function IG(e,t){return new FG({type:`object`,shape:e??{},...lW(t)})}var LG=IW(`ZodMiniEnum`,(e,t)=>{vG.init(e,t),AG.init(e,t),e.options=[...e._zod.values]});function RG(e,t){return new LG({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...lW(t)})}var zG=IW(`ZodMiniOptional`,(e,t)=>{bG.init(e,t),AG.init(e,t)});function BG(e){return new zG({type:`optional`,innerType:e})}var VG=IW(`ZodMiniDefault`,(e,t)=>{xG.init(e,t),AG.init(e,t)});function HG(e,t){return new VG({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():aW(t)}})}var UG=IW(`ZodMiniCustom`,(e,t)=>{CG.init(e,t),AG.init(e,t)});function WG(e,t={}){return kG(UG,e,t)}var GG=e=>{let t=new Map;for(let n of e)if(n.kind===`leaf`)for(let[e,r]of Object.entries(n.cells))t.set(eR(n.id,e),r);return t},KG=e=>e==null||typeof e==`string`&&e.trim()===``,qG=(e,t)=>e===t||JSON.stringify(e)===JSON.stringify(t),JG=(e,t,{sourceLocale:n,originalCells:r,aiCellIds:i,lockedLocales:a})=>{let o=e.cells[t],s=eR(e.id,t);if(e.leafKind===`readonly`)return`readonly`;if(t!==`*`&&a.has(t))return`locked`;if(i.has(s))return`ai`;if(!o||o.isMissing||KG(o.value))return`missing`;let c=r.get(s);return!c||!qG(c.value,o.value)?`edited`:e.isLocalized&&t!==n&&typeof o.value==`string`&&o.value===e.cells[n]?.value?`identical`:`done`},YG=(e,t)=>t===`all`||e===t,XG=(e,t,n)=>{let r={readonly:0,locked:0,ai:0,missing:0,edited:0,identical:0,done:0};for(let i of e){if(i.kind!==`leaf`)continue;let e=i.isLocalized?t:[`*`];for(let t of e)(i.cells[t]||i.isLocalized)&&r[JG(i,t,n)]++}return r},ZG=e=>{let t=e.lastIndexOf(`::`);return{rowId:e.slice(0,t),cellKey:e.slice(t+2)}},QG=(e,t)=>{let n=GG(e),r=GG(t),i=[];for(let[e,t]of r){let r=n.get(e),a=!r||r.isMissing;a&&t.isMissing||(a||t.isMissing||!qG(r?.value,t.value))&&i.push({cellId:e,...ZG(e),keyPath:t.keyPath,kind:a?`added`:`changed`,previousValue:a?void 0:r?.value,nextValue:t.value})}for(let[e,t]of n)r.has(e)||t.isMissing||i.push({cellId:e,...ZG(e),keyPath:t.keyPath,kind:`removed`,previousValue:t.value,nextValue:void 0});return i},$G=[Xr,Zr,Hr],eK=[zr,Br,Vr,ti,ni],tK=[Qr,$r,ei],nK=e=>e[e.nodeType],rK=(e,t)=>{if(ta(e)===t)return{node:e,isLossless:!0};if(t===`text`&&typeof e!=`object`)return{node:String(e??``),isLossless:!0};if(t===`number`&&typeof e==`string`){let t=Number(e);if(e.trim()!==``&&!Number.isNaN(t))return{node:t,isLossless:!0}}},iK=(e,t,{locales:n,sourceLocale:r})=>{let i=ta(e);if(i===t)return{node:e,isLossless:!0};if($G.includes(i)&&!$G.includes(t))return iK(nK(e),t,{locales:n,sourceLocale:r});if(t===`translation`)return{node:{nodeType:Rr,[Rr]:Object.fromEntries(n.map(t=>[t,t===r?structuredClone(e):Xi(e)]))},isLossless:!0};if($G.includes(t)&&!$G.includes(i))return{node:{nodeType:t,[t]:structuredClone(e)},isLossless:!0};if(i===`translation`){let i=nK(e)??{},a=iK(i[r]??Object.values(i)[0]??``,t,{locales:n,sourceLocale:r});return{node:a.node,isLossless:a.isLossless&&Object.keys(i).length<=1}}if(tK.includes(i)){if(tK.includes(t))return rK(e,t)??{node:Yi(t,n),isLossless:!1};if(eK.includes(t)||t===`array`)return{node:Yi(t,n,e),isLossless:!0}}if(eK.includes(i)&&tK.includes(t)){let n=Object.values(nK(e)??{}),r=rK(n[0]??``,t);if(r)return{node:r.node,isLossless:n.length<=1}}return{node:Yi(t,n),isLossless:!1}};T();var aK=c(void 0),oK=()=>{let e=i(aK);if(!e)throw Error(`useContentGrid must be used inside ContentGridProvider`);return e},sK=({dictionary:e,lockedLocales:t,children:r})=>{let i=CD(),{editedContent:a,addEditedContent:o,removeEditedContent:s}=DD(),{mutateAsync:c,isPending:u}=JO(),[d,f]=N(()=>new Set),p=e.localId,m=l(()=>(i?.internationalization?.locales??[]).map(String),[i]),h=String(i?.internationalization?.defaultLocale??m[0]??`en`),g=l(()=>new Set(t??[]),[t]),_=a?.[p]?.content,v=_===void 0?e.content:_,y=l(()=>({locales:m,sourceLocale:h}),[m,h]),b=l(()=>ZL(e.content,y),[e.content,y]),x=l(()=>ZL(v,y),[v,y]),S=l(()=>new Map(x.map(e=>[e.id,e])),[x]),C=l(()=>GG(b),[b]),w=l(()=>QG(b,x),[b,x]),T=l(()=>({sourceLocale:h,originalCells:C,aiCellIds:d,lockedLocales:g}),[h,C,d,g]),E=n(e=>f(t=>{let n=new Set(t);return e(n),n}),[]),D=n((e,t)=>{t===void 0?s(p,e.keyPath):o(p,t,e.keyPath)},[o,s,p]),O=n((e,t,n)=>{let r=e.cells[t];r&&(D(r,n),E(n=>n.delete(eR(e.id,t))))},[D,E]),k=l(()=>({locales:m,sourceLocale:h}),[m,h]),A=n(e=>e.rootKeyPath?[{keyPath:e.rootKeyPath,node:e.rootNode}]:Object.values(e.cells).map(e=>({keyPath:e.keyPath,node:e.value})),[]),j=n((e,t)=>{for(let n of A(e)){let{node:e}=iK(n.node,t,k);o(p,e,n.keyPath)}},[A,k,o,p]),M=n((e,t)=>A(e).every(e=>iK(e.node,t,k).isLossless),[A,k]),P=n(e=>{D({keyPath:e.keyPath,value:e.previousValue,isMissing:!1},e.previousValue),E(t=>t.delete(e.cellId))},[D,E]),F=n(e=>E(t=>t.delete(e)),[E]),I=n(()=>f(new Set),[]),L=n(e=>{let t=w.find(t=>t.cellId===e);t?P(t):F(e)},[w,P,F]),ee=n((e,t)=>{let n=t?t.flatMap(e=>S.get(e)??[]):x,r=[];for(let t of n)if(t.kind===`leaf`&&t.isLocalized&&typeof t.cells[h]?.value==`string`)for(let n of e)n===h||g.has(n)||t.cells[n]&&JG(t,n,T)===`missing`&&r.push({row:t,cellKey:n});return r},[x,S,h,g,T]),te=n(async t=>{let n=new Map;for(let e of t){if(g.has(e.cellKey))continue;let t=n.get(e.cellKey)??[];t.push(e),n.set(e.cellKey,t)}for(let[t,r]of n){let n=Object.fromEntries(r.map(({row:e})=>[e.id,e.cells[h]?.value??``])),a=(await c({entryFileContent:n,presetOutputContent:{},dictionaryDescription:e.description,entryLocale:h,outputLocale:t,mode:`complete`,aiOptions:{apiKey:i?.ai?.apiKey,model:i?.ai?.model,temperature:i?.ai?.temperature}}))?.data?.fileContent??{},o=[];for(let{row:e,cellKey:t}of r){let n=a[e.id],r=e.cells[t];typeof n==`string`&&r&&(D(r,n),o.push(eR(e.id,t)))}E(e=>{for(let t of o)e.add(t)})}},[g,h,c,e.description,i,D,E]),ne=n((e,t)=>JG(e,t,T),[T]),z=l(()=>({dictionary:e,rows:x,rowsById:S,locales:m,sourceLocale:h,lockedLocales:g,statusContext:T,changeSet:w,getStatus:ne,setCellValue:O,changeRowType:j,getIsTypeChangeLossless:M,revertChange:P,aiCellIds:d,acceptAICell:F,acceptAllAICells:I,revertAICell:L,translateCells:te,isTranslating:u,getMissingTargets:ee}),[e,x,S,m,h,g,T,w,ne,O,j,M,P,d,F,I,L,te,u,ee]);return R(aK.Provider,{value:z,children:r})},cK=/^[A-Za-z_$][\w$-]*$/,lK=e=>{let t=``;for(let n of e)if(n.type!==`translation`){if(n.type===`array`)t=`${t}[${n.key}]`;else if(n.key!==void 0){let e=String(n.key),r=cK.test(e)?e:`[${JSON.stringify(e)}]`;t=t===``?r:r.startsWith(`[`)?`${t}${r}`:`${t}.${r}`}}return t},uK=(e,t)=>{let n=t.filter(e=>e.type!==Rr);if(n.length===0||Object.values(e.cells).some(e=>{let t=e.keyPath.filter(e=>e.type!==`translation`);return $n(n,t)||$n(t,n)}))return!0;let r=lK(n);return!!(r&&(e.id===r||e.id.startsWith(`${r}.`)||e.id.startsWith(`${r}[`)||r.startsWith(`${e.id}.`)||r.startsWith(`${e.id}[`)))},dK={[Rr]:`t`,[Xr]:`md`,[zr]:`enum`,[Hr]:`insert`,[Vr]:`cond`,[qr]:`react`,[Jr]:`preact`,[Yr]:`solid`},fK=e=>(e.length>1&&e[e.length-1]===`text`?e.slice(0,-1):e).map(e=>dK[e]??e).join(` · `),pK=e=>{if(e==null)return``;if(typeof e==`string`)return e.replace(/\s+/g,` `).trim();if(typeof e==`number`||typeof e==`boolean`)return String(e);let t=e;if(t.nodeType===`file`)return String(t.file??``);if(t.nodeType===`nested`){let e=t.nested??{};return[e.dictionaryKey,e.path].filter(Boolean).join(` / `)}return``},mK=(e,t)=>e.isLocalized?t:[`*`],hK=(e,t)=>e.id.toLowerCase().includes(t)?!0:Object.values(e.cells).some(e=>pK(e.value).toLowerCase().includes(t)),gK=(e,t,{query:n,statusFilter:r,localeKeys:i,collapsedRowIds:a,getStatus:o,focusedKeyPath:s})=>{let c=n.trim().toLowerCase(),l=(s?.length??0)>0,u=c!==``||r!==`all`||l,d=new Set;if(u)for(let n of e){if(n.kind!==`leaf`)continue;let e=c===``||hK(n,c),a=!l||uK(n,s),u=r===`all`||mK(n,i).some(e=>n.cells[e]!==void 0&&YG(o(n,e),r));if(!e||!a||!u)continue;let f=n.id;for(;f!==void 0&&!d.has(f);)d.add(f),f=t.get(f)?.parentId}let f=e=>{if(u)return!1;let n=e.parentId;for(;n!==void 0;){if(a.has(n))return!0;n=t.get(n)?.parentId}return!1};return e.filter(e=>(!u||d.has(e.id))&&!f(e))},_K=e=>{if(e.rootKeyPath&&e.kind===`group`){if(e.typeChain[0]===`object`)return`field`;if(e.typeChain[0]===`array`)return`item`}},vK=(e,{collapsedRowIds:t,isRootObject:n})=>{let r=[],i=[],a=e=>{for(;(i[i.length-1]?.row.depth??-1)>=e;){let e=i.pop();if(!e)break;r.push({type:`add`,addLine:{kind:e.kind,parentRow:e.row,depth:e.row.depth+1}})}};for(let n of e){a(n.depth),r.push({type:`row`,row:n});let e=_K(n);e&&!t.has(n.id)&&i.push({row:n,kind:e})}return a(0),n&&r.push({type:`add`,addLine:{kind:`field`,parentRow:void 0,depth:0}}),r},yK=(e,t,n,r)=>{let i=[];for(let n of e)if(n.kind===`leaf`)for(let e of mK(n,t))n.cells[e]!==void 0&&i.push({row:n,cellKey:e});let a=r?i.findIndex(e=>e.row.id===r.rowId&&e.cellKey===r.cellKey):-1;for(let e=1;e<=i.length;e++){let t=i[(a+e+i.length)%i.length];if(!t)continue;let{row:r,cellKey:o}=t;if(n(r,o)===`missing`)return{rowId:r.id,cellKey:o}}},bK=e=>{let[t,n]=(e??``).split(`:`).map(Number),r=t=>t===void 0||Number.isNaN(t)||e===void 0?-1:t;return{rowIndex:r(t),columnIndex:r(n)}},xK=e=>{let t=e.replace(/([a-z\d])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1)},SK=(e,t)=>{let n=e.parentId?t.get(e.parentId):void 0,r=e.parentId?n?.rootKeyPath:[],i=e.rootKeyPath;if(!r||!i||i.length!==r.length+1)return;let a=i[r.length];if(a?.type===`object`||a?.type===`array`)return{parentKeyPath:r,childKey:a.key}},CK={key:`content-grid`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"fieldColumn":"Field","searchPlaceholder":"Search a path or a value","filterAll":"All","filterMissing":"Missing","filterEdited":"Edited","filterAI":"AI-filled","statusMissing":"Missing value","statusEdited":"Edited, not saved","statusAI":"Filled by AI, not reviewed","statusDone":"Translated","statusIdentical":"Identical to the source locale","statusLocked":"Locked for your role","statusReadonly":"Read-only","readonlyChip":"read-only","readonlyTooltip":"Comes from code — not editable here","lockedTooltip":"Your role cannot edit this locale","sameForAllLocales":"Same for all locales","makeTranslatable":"Translate per locale","reorderField":"Drag to reorder (Alt + ↑/↓)","sourceLocale":"source","fill":"Fill","translateMissing":"Translate missing","translateColumn":"Translate the missing values of this locale with AI","translateRow":"Translate this field into the missing locales with AI","skippedLocked":"Skipped (locked):","confirmTranslateDescription":"Missing values to translate from","confirm":"Fill","cancel":"Cancel","acceptAll":"Accept all AI values","accept":"Accept","revert":"Revert","aiBanner":"Filled by AI from the source locale. Review it before publishing.","changeType":"Change type","typeSearchPlaceholder":"Search a type","groupPrimitives":"Primitives","groupMultilingual":"Multilingual","groupConditional":"Conditional","groupRichText":"Rich text","groupStructural":"Structure","htmlType":"HTML","resetWarning":"This change resets the value. Part of the current content will be lost.","addField":"Add field","addItem":"Add item","fieldKeyPlaceholder":"Field key","keyRequired":"A key is required","keyExists":"This key already exists","add":"Add","close":"Close","backToList":"Back to the list","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expand","false":"Collapse"}},"expand":"Expand","collapse":"Collapse","noResults":"No field matches the current filters","openEditor":"Open the editor","editValue":"Edit the value","emptyValue":"Empty","locale":"Locale","jumpToMissing":"Next missing value"},"en-GB":{"fieldColumn":"Field","searchPlaceholder":"Search a path or a value","filterAll":"All","filterMissing":"Missing","filterEdited":"Edited","filterAI":"AI-filled","statusMissing":"Missing value","statusEdited":"Edited, not saved","statusAI":"Filled by AI, not reviewed","statusDone":"Translated","statusIdentical":"Identical to the source locale","statusLocked":"Locked for your role","statusReadonly":"Read-only","readonlyChip":"read-only","readonlyTooltip":"Comes from code — not editable here","lockedTooltip":"Your role cannot edit this locale","sameForAllLocales":"Same for all locales","makeTranslatable":"Translate per locale","reorderField":"Drag to reorder (Alt + ↑/↓)","sourceLocale":"source","fill":"Fill","translateMissing":"Translate missing","translateColumn":"Translate the missing values of this locale with AI","translateRow":"Translate this field into the missing locales with AI","skippedLocked":"Skipped (locked):","confirmTranslateDescription":"Missing values to translate from","confirm":"Fill","cancel":"Cancel","acceptAll":"Accept all AI values","accept":"Accept","revert":"Revert","aiBanner":"Filled by AI from the source locale. Review it before publishing.","changeType":"Change type","typeSearchPlaceholder":"Search a type","groupPrimitives":"Primitives","groupMultilingual":"Multilingual","groupConditional":"Conditional","groupRichText":"Rich text","groupStructural":"Structure","htmlType":"HTML","resetWarning":"This change resets the value. Part of the current content will be lost.","addField":"Add field","addItem":"Add item","fieldKeyPlaceholder":"Field key","keyRequired":"A key is required","keyExists":"This key already exists","add":"Add","close":"Close","backToList":"Back to the list","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expand","false":"Collapse"}},"expand":"Expand","collapse":"Collapse","noResults":"No field matches the current filters","openEditor":"Open the editor","editValue":"Edit the value","emptyValue":"Empty","locale":"Locale","jumpToMissing":"Next missing value"},"fr":{"fieldColumn":"Champ","searchPlaceholder":"Rechercher un chemin ou une valeur","filterAll":"Tous","filterMissing":"Manquants","filterEdited":"Modifiés","filterAI":"Remplis par IA","statusMissing":"Valeur manquante","statusEdited":"Modifié, non enregistré","statusAI":"Rempli par IA, non relu","statusDone":"Traduit","statusIdentical":"Identique à la langue source","statusLocked":"Verrouillé pour votre rôle","statusReadonly":"Lecture seule","readonlyChip":"lecture seule","readonlyTooltip":"Provient du code — non modifiable ici","lockedTooltip":"Votre rôle ne peut pas modifier cette langue","sameForAllLocales":"Identique pour toutes les langues","makeTranslatable":"Traduire par langue","reorderField":"Glisser pour réordonner (Alt + ↑/↓)","sourceLocale":"source","fill":"Fill","translateMissing":"Traduire les manquants","translateColumn":"Traduire avec l’IA les valeurs manquantes de cette langue","translateRow":"Traduire ce champ dans les langues manquantes avec l’IA","skippedLocked":"Ignorées (verrouillées) :","confirmTranslateDescription":"Valeurs manquantes à traduire depuis","confirm":"Remplir","cancel":"Annuler","acceptAll":"Accepter toutes les valeurs IA","accept":"Accepter","revert":"Annuler la modification","aiBanner":"Rempli par l’IA depuis la langue source. Relisez-le avant de publier.","changeType":"Changer le type","typeSearchPlaceholder":"Rechercher un type","groupPrimitives":"Primitifs","groupMultilingual":"Multilingue","groupConditional":"Conditionnel","groupRichText":"Texte enrichi","groupStructural":"Structure","htmlType":"HTML","resetWarning":"Ce changement réinitialise la valeur. Une partie du contenu actuel sera perdue.","addField":"Ajouter un champ","addItem":"Ajouter un élément","fieldKeyPlaceholder":"Clé du champ","keyRequired":"Une clé est requise","keyExists":"Cette clé existe déjà","add":"Ajouter","close":"Fermer","backToList":"Retour à la liste","toggleCollapse":{"nodeType":"condition","condition":{"true":"Déplier","false":"Replier"}},"expand":"Déplier","collapse":"Replier","noResults":"Aucun champ ne correspond aux filtres","openEditor":"Ouvrir l’éditeur","editValue":"Modifier la valeur","emptyValue":"Vide","locale":"Langue","jumpToMissing":"Prochaine valeur manquante"},"es":{"fieldColumn":"Campo","searchPlaceholder":"Buscar una ruta o un valor","filterAll":"Todos","filterMissing":"Faltantes","filterEdited":"Editados","filterAI":"Rellenados por IA","statusMissing":"Valor faltante","statusEdited":"Editado, sin guardar","statusAI":"Rellenado por IA, sin revisar","statusDone":"Traducido","statusIdentical":"Idéntico al idioma de origen","statusLocked":"Bloqueado para tu rol","statusReadonly":"Solo lectura","readonlyChip":"solo lectura","readonlyTooltip":"Viene del código: no se puede editar aquí","lockedTooltip":"Tu rol no puede editar este idioma","sameForAllLocales":"Igual para todos los idiomas","makeTranslatable":"Traducir por idioma","reorderField":"Arrastre para reordenar (Alt + ↑/↓)","sourceLocale":"origen","fill":"Fill","translateMissing":"Traducir faltantes","translateColumn":"Traducir con IA los valores faltantes de este idioma","translateRow":"Traducir este campo a los idiomas faltantes con IA","skippedLocked":"Omitidos (bloqueados):","confirmTranslateDescription":"Valores faltantes a traducir desde","confirm":"Rellenar","cancel":"Cancelar","acceptAll":"Aceptar todos los valores de IA","accept":"Aceptar","revert":"Revertir","aiBanner":"Rellenado por IA desde el idioma de origen. Revísalo antes de publicar.","changeType":"Cambiar tipo","typeSearchPlaceholder":"Buscar un tipo","groupPrimitives":"Primitivos","groupMultilingual":"Multilingüe","groupConditional":"Condicional","groupRichText":"Texto enriquecido","groupStructural":"Estructura","htmlType":"HTML","resetWarning":"Este cambio restablece el valor. Se perderá parte del contenido actual.","addField":"Añadir campo","addItem":"Añadir elemento","fieldKeyPlaceholder":"Clave del campo","keyRequired":"Se requiere una clave","keyExists":"Esta clave ya existe","add":"Añadir","close":"Cerrar","backToList":"Volver a la lista","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expandir","false":"Contraer"}},"expand":"Expandir","collapse":"Contraer","noResults":"Ningún campo coincide con los filtros","openEditor":"Abrir el editor","editValue":"Editar el valor","emptyValue":"Vacío","locale":"Idioma","jumpToMissing":"Siguiente valor faltante"},"de":{"fieldColumn":"Feld","searchPlaceholder":"Pfad oder Wert suchen","filterAll":"Alle","filterMissing":"Fehlend","filterEdited":"Bearbeitet","filterAI":"KI-ausgefüllt","statusMissing":"Wert fehlt","statusEdited":"Bearbeitet, nicht gespeichert","statusAI":"Von KI ausgefüllt, ungeprüft","statusDone":"Übersetzt","statusIdentical":"Identisch mit der Ausgangssprache","statusLocked":"Für Ihre Rolle gesperrt","statusReadonly":"Schreibgeschützt","readonlyChip":"schreibgeschützt","readonlyTooltip":"Stammt aus dem Code – hier nicht bearbeitbar","lockedTooltip":"Ihre Rolle kann diese Sprache nicht bearbeiten","sameForAllLocales":"Für alle Sprachen gleich","makeTranslatable":"Pro Sprache übersetzen","reorderField":"Zum Neuordnen ziehen (Alt + ↑/↓)","sourceLocale":"Quelle","fill":"Fill","translateMissing":"Fehlende übersetzen","translateColumn":"Fehlende Werte dieser Sprache mit KI übersetzen","translateRow":"Dieses Feld mit KI in fehlende Sprachen übersetzen","skippedLocked":"Übersprungen (gesperrt):","confirmTranslateDescription":"Fehlende Werte zum Übersetzen aus","confirm":"Ausfüllen","cancel":"Abbrechen","acceptAll":"Alle KI-Werte übernehmen","accept":"Übernehmen","revert":"Zurücksetzen","aiBanner":"Von KI aus der Ausgangssprache ausgefüllt. Vor dem Veröffentlichen prüfen.","changeType":"Typ ändern","typeSearchPlaceholder":"Typ suchen","groupPrimitives":"Primitive Werte","groupMultilingual":"Mehrsprachig","groupConditional":"Bedingt","groupRichText":"Formatierter Text","groupStructural":"Struktur","htmlType":"HTML","resetWarning":"Diese Änderung setzt den Wert zurück. Ein Teil des Inhalts geht verloren.","addField":"Feld hinzufügen","addItem":"Element hinzufügen","fieldKeyPlaceholder":"Feldschlüssel","keyRequired":"Ein Schlüssel ist erforderlich","keyExists":"Dieser Schlüssel existiert bereits","add":"Hinzufügen","close":"Schließen","backToList":"Zurück zur Liste","toggleCollapse":{"nodeType":"condition","condition":{"true":"Ausklappen","false":"Einklappen"}},"expand":"Ausklappen","collapse":"Einklappen","noResults":"Kein Feld entspricht den Filtern","openEditor":"Editor öffnen","editValue":"Wert bearbeiten","emptyValue":"Leer","locale":"Sprache","jumpToMissing":"Nächster fehlender Wert"},"ja":{"fieldColumn":"フィールド","searchPlaceholder":"パスまたは値を検索","filterAll":"すべて","filterMissing":"未入力","filterEdited":"編集済み","filterAI":"AI入力","statusMissing":"値がありません","statusEdited":"編集済み・未保存","statusAI":"AI入力・未確認","statusDone":"翻訳済み","statusIdentical":"ソース言語と同一","statusLocked":"あなたのロールではロック中","statusReadonly":"読み取り専用","readonlyChip":"読み取り専用","readonlyTooltip":"コード由来のためここでは編集できません","lockedTooltip":"あなたのロールではこの言語を編集できません","sameForAllLocales":"全言語で共通","makeTranslatable":"言語ごとに翻訳","reorderField":"ドラッグして並べ替え(Alt + ↑/↓)","sourceLocale":"ソース","fill":"Fill","translateMissing":"未入力を翻訳","translateColumn":"この言語の未入力をAIで翻訳","translateRow":"このフィールドを未入力の言語へAIで翻訳","skippedLocked":"スキップ(ロック中):","confirmTranslateDescription":"翻訳元の言語","confirm":"補完","cancel":"キャンセル","acceptAll":"AIの値をすべて承認","accept":"承認","revert":"元に戻す","aiBanner":"ソース言語からAIが入力しました。公開前に確認してください。","changeType":"タイプを変更","typeSearchPlaceholder":"タイプを検索","groupPrimitives":"プリミティブ","groupMultilingual":"多言語","groupConditional":"条件付き","groupRichText":"リッチテキスト","groupStructural":"構造","htmlType":"HTML","resetWarning":"この変更で値がリセットされ、現在の内容の一部が失われます。","addField":"フィールドを追加","addItem":"項目を追加","fieldKeyPlaceholder":"フィールドキー","keyRequired":"キーが必要です","keyExists":"このキーは既に存在します","add":"追加","close":"閉じる","backToList":"一覧に戻る","toggleCollapse":{"nodeType":"condition","condition":{"true":"展開","false":"折りたたむ"}},"expand":"展開","collapse":"折りたたむ","noResults":"条件に一致するフィールドはありません","openEditor":"エディターを開く","editValue":"値を編集","emptyValue":"空","locale":"言語","jumpToMissing":"次の未入力"},"ko":{"fieldColumn":"필드","searchPlaceholder":"경로 또는 값 검색","filterAll":"전체","filterMissing":"누락","filterEdited":"편집됨","filterAI":"AI 작성","statusMissing":"값 누락","statusEdited":"편집됨, 저장 안 됨","statusAI":"AI 작성, 검토 안 됨","statusDone":"번역됨","statusIdentical":"원본 언어와 동일","statusLocked":"내 역할에서 잠김","statusReadonly":"읽기 전용","readonlyChip":"읽기 전용","readonlyTooltip":"코드에서 정의됨 — 여기서 편집할 수 없음","lockedTooltip":"내 역할로는 이 언어를 편집할 수 없습니다","sameForAllLocales":"모든 언어에 동일","makeTranslatable":"언어별로 번역","reorderField":"드래그하여 순서 변경 (Alt + ↑/↓)","sourceLocale":"원본","fill":"Fill","translateMissing":"누락 항목 번역","translateColumn":"이 언어의 누락 값을 AI로 번역","translateRow":"이 필드를 누락된 언어로 AI 번역","skippedLocked":"건너뜀(잠김):","confirmTranslateDescription":"번역할 누락 값, 원본 언어","confirm":"채우기","cancel":"취소","acceptAll":"AI 값 모두 승인","accept":"승인","revert":"되돌리기","aiBanner":"원본 언어에서 AI가 작성했습니다. 게시 전에 검토하세요.","changeType":"유형 변경","typeSearchPlaceholder":"유형 검색","groupPrimitives":"기본형","groupMultilingual":"다국어","groupConditional":"조건부","groupRichText":"서식 있는 텍스트","groupStructural":"구조","htmlType":"HTML","resetWarning":"이 변경은 값을 초기화하며 현재 내용 일부가 사라집니다.","addField":"필드 추가","addItem":"항목 추가","fieldKeyPlaceholder":"필드 키","keyRequired":"키가 필요합니다","keyExists":"이미 존재하는 키입니다","add":"추가","close":"닫기","backToList":"목록으로 돌아가기","toggleCollapse":{"nodeType":"condition","condition":{"true":"펼치기","false":"접기"}},"expand":"펼치기","collapse":"접기","noResults":"필터와 일치하는 필드가 없습니다","openEditor":"편집기 열기","editValue":"값 편집","emptyValue":"비어 있음","locale":"언어","jumpToMissing":"다음 누락 값"},"zh":{"fieldColumn":"字段","searchPlaceholder":"搜索路径或值","filterAll":"全部","filterMissing":"缺失","filterEdited":"已编辑","filterAI":"AI 填充","statusMissing":"缺少值","statusEdited":"已编辑,未保存","statusAI":"AI 填充,未审核","statusDone":"已翻译","statusIdentical":"与源语言相同","statusLocked":"您的角色无法编辑","statusReadonly":"只读","readonlyChip":"只读","readonlyTooltip":"来自代码,无法在此编辑","lockedTooltip":"您的角色无法编辑此语言","sameForAllLocales":"所有语言相同","makeTranslatable":"按语言翻译","reorderField":"拖动以重新排序(Alt + ↑/↓)","sourceLocale":"源","fill":"Fill","translateMissing":"翻译缺失项","translateColumn":"用 AI 翻译此语言的缺失值","translateRow":"用 AI 将此字段翻译为缺失语言","skippedLocked":"已跳过(锁定):","confirmTranslateDescription":"要翻译的缺失值,源语言","confirm":"填充","cancel":"取消","acceptAll":"接受所有 AI 值","accept":"接受","revert":"还原","aiBanner":"由 AI 根据源语言填充。发布前请审核。","changeType":"更改类型","typeSearchPlaceholder":"搜索类型","groupPrimitives":"基本类型","groupMultilingual":"多语言","groupConditional":"条件","groupRichText":"富文本","groupStructural":"结构","htmlType":"HTML","resetWarning":"此更改会重置值,部分当前内容将丢失。","addField":"添加字段","addItem":"添加项","fieldKeyPlaceholder":"字段键","keyRequired":"需要键名","keyExists":"该键已存在","add":"添加","close":"关闭","backToList":"返回列表","toggleCollapse":{"nodeType":"condition","condition":{"true":"展开","false":"折叠"}},"expand":"展开","collapse":"折叠","noResults":"没有字段符合当前筛选","openEditor":"打开编辑器","editValue":"编辑值","emptyValue":"空","locale":"语言","jumpToMissing":"下一个缺失值"},"it":{"fieldColumn":"Campo","searchPlaceholder":"Cerca un percorso o un valore","filterAll":"Tutti","filterMissing":"Mancanti","filterEdited":"Modificati","filterAI":"Compilati da IA","statusMissing":"Valore mancante","statusEdited":"Modificato, non salvato","statusAI":"Compilato da IA, non revisionato","statusDone":"Tradotto","statusIdentical":"Identico alla lingua di origine","statusLocked":"Bloccato per il tuo ruolo","statusReadonly":"Sola lettura","readonlyChip":"sola lettura","readonlyTooltip":"Proviene dal codice: non modificabile qui","lockedTooltip":"Il tuo ruolo non può modificare questa lingua","sameForAllLocales":"Uguale per tutte le lingue","makeTranslatable":"Traduci per lingua","reorderField":"Trascina per riordinare (Alt + ↑/↓)","sourceLocale":"origine","fill":"Fill","translateMissing":"Traduci mancanti","translateColumn":"Traduci con l’IA i valori mancanti di questa lingua","translateRow":"Traduci questo campo nelle lingue mancanti con l’IA","skippedLocked":"Saltate (bloccate):","confirmTranslateDescription":"Valori mancanti da tradurre da","confirm":"Compila","cancel":"Annulla","acceptAll":"Accetta tutti i valori IA","accept":"Accetta","revert":"Ripristina","aiBanner":"Compilato dall’IA dalla lingua di origine. Revisionalo prima di pubblicare.","changeType":"Cambia tipo","typeSearchPlaceholder":"Cerca un tipo","groupPrimitives":"Primitivi","groupMultilingual":"Multilingue","groupConditional":"Condizionale","groupRichText":"Testo formattato","groupStructural":"Struttura","htmlType":"HTML","resetWarning":"Questa modifica reimposta il valore. Parte del contenuto andrà persa.","addField":"Aggiungi campo","addItem":"Aggiungi elemento","fieldKeyPlaceholder":"Chiave del campo","keyRequired":"È richiesta una chiave","keyExists":"Questa chiave esiste già","add":"Aggiungi","close":"Chiudi","backToList":"Torna all’elenco","toggleCollapse":{"nodeType":"condition","condition":{"true":"Espandi","false":"Comprimi"}},"expand":"Espandi","collapse":"Comprimi","noResults":"Nessun campo corrisponde ai filtri","openEditor":"Apri l’editor","editValue":"Modifica il valore","emptyValue":"Vuoto","locale":"Lingua","jumpToMissing":"Prossimo valore mancante"},"pt":{"fieldColumn":"Campo","searchPlaceholder":"Pesquisar um caminho ou um valor","filterAll":"Todos","filterMissing":"Em falta","filterEdited":"Editados","filterAI":"Preenchidos por IA","statusMissing":"Valor em falta","statusEdited":"Editado, não guardado","statusAI":"Preenchido por IA, não revisto","statusDone":"Traduzido","statusIdentical":"Idêntico ao idioma de origem","statusLocked":"Bloqueado para a sua função","statusReadonly":"Só de leitura","readonlyChip":"só de leitura","readonlyTooltip":"Vem do código — não editável aqui","lockedTooltip":"A sua função não pode editar este idioma","sameForAllLocales":"Igual para todos os idiomas","makeTranslatable":"Traduzir por idioma","reorderField":"Arraste para reordenar (Alt + ↑/↓)","sourceLocale":"origem","fill":"Fill","translateMissing":"Traduzir em falta","translateColumn":"Traduzir com IA os valores em falta deste idioma","translateRow":"Traduzir este campo para os idiomas em falta com IA","skippedLocked":"Ignorados (bloqueados):","confirmTranslateDescription":"Valores em falta a traduzir de","confirm":"Preencher","cancel":"Cancelar","acceptAll":"Aceitar todos os valores de IA","accept":"Aceitar","revert":"Reverter","aiBanner":"Preenchido por IA a partir do idioma de origem. Reveja antes de publicar.","changeType":"Alterar tipo","typeSearchPlaceholder":"Pesquisar um tipo","groupPrimitives":"Primitivos","groupMultilingual":"Multilíngue","groupConditional":"Condicional","groupRichText":"Texto formatado","groupStructural":"Estrutura","htmlType":"HTML","resetWarning":"Esta alteração repõe o valor. Parte do conteúdo atual será perdida.","addField":"Adicionar campo","addItem":"Adicionar item","fieldKeyPlaceholder":"Chave do campo","keyRequired":"É necessária uma chave","keyExists":"Esta chave já existe","add":"Adicionar","close":"Fechar","backToList":"Voltar à lista","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expandir","false":"Recolher"}},"expand":"Expandir","collapse":"Recolher","noResults":"Nenhum campo corresponde aos filtros","openEditor":"Abrir o editor","editValue":"Editar o valor","emptyValue":"Vazio","locale":"Idioma","jumpToMissing":"Próximo valor em falta"},"hi":{"fieldColumn":"फ़ील्ड","searchPlaceholder":"पथ या मान खोजें","filterAll":"सभी","filterMissing":"अनुपलब्ध","filterEdited":"संपादित","filterAI":"AI द्वारा भरा","statusMissing":"मान अनुपलब्ध","statusEdited":"संपादित, सहेजा नहीं गया","statusAI":"AI द्वारा भरा, समीक्षा नहीं हुई","statusDone":"अनुवादित","statusIdentical":"स्रोत भाषा के समान","statusLocked":"आपकी भूमिका के लिए लॉक","statusReadonly":"केवल पढ़ने योग्य","readonlyChip":"केवल पढ़ने योग्य","readonlyTooltip":"कोड से आता है — यहाँ संपादित नहीं हो सकता","lockedTooltip":"आपकी भूमिका इस भाषा को संपादित नहीं कर सकती","sameForAllLocales":"सभी भाषाओं के लिए समान","makeTranslatable":"प्रत्येक भाषा के लिए अनुवाद करें","reorderField":"क्रम बदलने के लिए खींचें (Alt + ↑/↓)","sourceLocale":"स्रोत","fill":"Fill","translateMissing":"अनुपलब्ध का अनुवाद करें","translateColumn":"इस भाषा के अनुपलब्ध मानों का AI से अनुवाद करें","translateRow":"इस फ़ील्ड का अनुपलब्ध भाषाओं में AI से अनुवाद करें","skippedLocked":"छोड़ा गया (लॉक):","confirmTranslateDescription":"अनुवाद के लिए अनुपलब्ध मान, स्रोत","confirm":"भरें","cancel":"रद्द करें","acceptAll":"सभी AI मान स्वीकार करें","accept":"स्वीकार करें","revert":"वापस लें","aiBanner":"स्रोत भाषा से AI द्वारा भरा गया। प्रकाशित करने से पहले समीक्षा करें।","changeType":"प्रकार बदलें","typeSearchPlaceholder":"प्रकार खोजें","groupPrimitives":"मूल प्रकार","groupMultilingual":"बहुभाषी","groupConditional":"सशर्त","groupRichText":"रिच टेक्स्ट","groupStructural":"संरचना","htmlType":"HTML","resetWarning":"यह बदलाव मान को रीसेट करता है। वर्तमान सामग्री का कुछ हिस्सा खो जाएगा।","addField":"फ़ील्ड जोड़ें","addItem":"आइटम जोड़ें","fieldKeyPlaceholder":"फ़ील्ड कुंजी","keyRequired":"कुंजी आवश्यक है","keyExists":"यह कुंजी पहले से मौजूद है","add":"जोड़ें","close":"बंद करें","backToList":"सूची पर वापस जाएँ","toggleCollapse":{"nodeType":"condition","condition":{"true":"विस्तार करें","false":"संक्षिप्त करें"}},"expand":"विस्तार करें","collapse":"संक्षिप्त करें","noResults":"वर्तमान फ़िल्टर से कोई फ़ील्ड मेल नहीं खाता","openEditor":"संपादक खोलें","editValue":"मान संपादित करें","emptyValue":"खाली","locale":"भाषा","jumpToMissing":"अगला अनुपलब्ध मान"},"ar":{"fieldColumn":"الحقل","searchPlaceholder":"ابحث عن مسار أو قيمة","filterAll":"الكل","filterMissing":"مفقود","filterEdited":"معدّل","filterAI":"معبأ بالذكاء الاصطناعي","statusMissing":"قيمة مفقودة","statusEdited":"معدّل، غير محفوظ","statusAI":"معبأ بالذكاء الاصطناعي، غير مراجع","statusDone":"مترجم","statusIdentical":"مطابق للغة المصدر","statusLocked":"مقفل لدورك","statusReadonly":"للقراءة فقط","readonlyChip":"للقراءة فقط","readonlyTooltip":"مصدره الكود — لا يمكن تعديله هنا","lockedTooltip":"لا يمكن لدورك تعديل هذه اللغة","sameForAllLocales":"نفسه لجميع اللغات","makeTranslatable":"ترجمة لكل لغة","reorderField":"اسحب لإعادة الترتيب (Alt + ↑/↓)","sourceLocale":"المصدر","fill":"Fill","translateMissing":"ترجمة المفقود","translateColumn":"ترجمة القيم المفقودة لهذه اللغة بالذكاء الاصطناعي","translateRow":"ترجمة هذا الحقل إلى اللغات المفقودة بالذكاء الاصطناعي","skippedLocked":"تم التخطي (مقفل):","confirmTranslateDescription":"القيم المفقودة للترجمة من","confirm":"ملء","cancel":"إلغاء","acceptAll":"قبول كل قيم الذكاء الاصطناعي","accept":"قبول","revert":"تراجع","aiBanner":"عبّأه الذكاء الاصطناعي من لغة المصدر. راجعه قبل النشر.","changeType":"تغيير النوع","typeSearchPlaceholder":"ابحث عن نوع","groupPrimitives":"أنواع أساسية","groupMultilingual":"متعدد اللغات","groupConditional":"شرطي","groupRichText":"نص منسق","groupStructural":"البنية","htmlType":"HTML","resetWarning":"هذا التغيير يعيد تعيين القيمة. سيُفقد جزء من المحتوى الحالي.","addField":"إضافة حقل","addItem":"إضافة عنصر","fieldKeyPlaceholder":"مفتاح الحقل","keyRequired":"المفتاح مطلوب","keyExists":"هذا المفتاح موجود بالفعل","add":"إضافة","close":"إغلاق","backToList":"العودة إلى القائمة","toggleCollapse":{"nodeType":"condition","condition":{"true":"توسيع","false":"طي"}},"expand":"توسيع","collapse":"طي","noResults":"لا يوجد حقل يطابق عوامل التصفية","openEditor":"فتح المحرر","editValue":"تعديل القيمة","emptyValue":"فارغ","locale":"اللغة","jumpToMissing":"القيمة المفقودة التالية"},"ru":{"fieldColumn":"Поле","searchPlaceholder":"Поиск по пути или значению","filterAll":"Все","filterMissing":"Отсутствуют","filterEdited":"Изменённые","filterAI":"Заполнено ИИ","statusMissing":"Нет значения","statusEdited":"Изменено, не сохранено","statusAI":"Заполнено ИИ, не проверено","statusDone":"Переведено","statusIdentical":"Совпадает с исходным языком","statusLocked":"Заблокировано для вашей роли","statusReadonly":"Только чтение","readonlyChip":"только чтение","readonlyTooltip":"Задаётся в коде — здесь не редактируется","lockedTooltip":"Ваша роль не может редактировать этот язык","sameForAllLocales":"Одинаково для всех языков","makeTranslatable":"Переводить для каждого языка","reorderField":"Перетащите для изменения порядка (Alt + ↑/↓)","sourceLocale":"исходный","fill":"Fill","translateMissing":"Перевести недостающее","translateColumn":"Перевести недостающие значения этого языка с ИИ","translateRow":"Перевести это поле на недостающие языки с ИИ","skippedLocked":"Пропущено (заблокировано):","confirmTranslateDescription":"Недостающие значения для перевода с","confirm":"Заполнить","cancel":"Отмена","acceptAll":"Принять все значения ИИ","accept":"Принять","revert":"Откатить","aiBanner":"Заполнено ИИ с исходного языка. Проверьте перед публикацией.","changeType":"Изменить тип","typeSearchPlaceholder":"Поиск типа","groupPrimitives":"Примитивы","groupMultilingual":"Многоязычный","groupConditional":"Условный","groupRichText":"Форматированный текст","groupStructural":"Структура","htmlType":"HTML","resetWarning":"Это изменение сбросит значение. Часть текущего содержимого будет потеряна.","addField":"Добавить поле","addItem":"Добавить элемент","fieldKeyPlaceholder":"Ключ поля","keyRequired":"Нужен ключ","keyExists":"Такой ключ уже существует","add":"Добавить","close":"Закрыть","backToList":"Назад к списку","toggleCollapse":{"nodeType":"condition","condition":{"true":"Развернуть","false":"Свернуть"}},"expand":"Развернуть","collapse":"Свернуть","noResults":"Нет полей, подходящих под фильтры","openEditor":"Открыть редактор","editValue":"Изменить значение","emptyValue":"Пусто","locale":"Язык","jumpToMissing":"Следующее недостающее значение"}}}`),title:`Content grid`,description:`Labels of the dictionary content grid editor: filters, statuses, AI actions and type picker.`,location:`local`,localId:`content-grid::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/ContentGrid/contentGrid.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/ContentGrid/contentGrid.content.mjs`},wK=`text-text`,TK=({status:e,className:t})=>{let{statusMissing:n,statusEdited:r,statusAI:i,statusDone:a,statusIdentical:o,statusLocked:s,statusReadonly:c}=V(CK),l={missing:n.value,edited:r.value,ai:i.value,done:a.value,identical:o.value,locked:s.value,readonly:c.value};return e===`readonly`?null:R(`span`,{className:G(`inline-flex size-4 shrink-0 items-center justify-center`,t),title:l[e],children:[(()=>{switch(e){case`missing`:return R(`span`,{className:`block size-2.5 rounded-full border-2 border-warning bg-text-opposite`});case`edited`:return R(`span`,{className:`block size-2.5 rounded-full border-2 border-warning bg-text-opposite`});case`ai`:return R(Tc,{className:G(`size-3.5`,wK)});case`done`:return R(ys,{className:`size-3.5 text-text`});case`identical`:return R(`span`,{className:`font-bold font-mono text-warning text-xs leading-none`,children:`=`});case`locked`:return R(Zs,{className:`size-3 text-neutral`});default:return null}})(),R(`span`,{className:`sr-only`,children:l[e]})]})};T();var EK=[`markdown`,`html`,`file`,`nested`],DK=e=>e.leafKind!==void 0&&EK.includes(e.leafKind),OK=[{content:`False`,value:!1},{content:`True`,value:!0}],kK=({value:e,isDisabled:t,onCommit:n,onStopEditing:r})=>{let{editValue:i}=V(CK),[a,o]=N(e),s=P(!1),c=P(null);return M(()=>{let e=c.current;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},[]),R(eA,{ref:c,dir:`auto`,variant:`invisible`,className:`min-h-0 w-full bg-transparent p-0 text-sm`,"aria-label":i.value,value:a,disabled:t,onChange:e=>o(e.currentTarget.value),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`?(e.preventDefault(),s.current=!0,r()):e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.blur())},onBlur:()=>{!s.current&&a!==e&&n(a),r()}})},AK=j(({row:e,cellKey:t,onOpenEditor:n,position:r,showStatus:i=!0,className:a})=>{let{getStatus:o,setCellValue:s}=oK(),c=V(CK),[l,u]=N(!1),d=P(null),f=e.cells[t],p=o(e,t),m=p===`locked`,h=e.leafKind===`readonly`,g=DK(e),_=f?.value,v=n=>s(e,t,n),y=()=>{u(!1),d.current?.focus()},b=()=>{m||h||(g?n(e.id,t):(e.leafKind===`text`||e.leafKind===`empty`)&&u(!0))};return R(`div`,{ref:d,role:`gridcell`,tabIndex:-1,"data-grid-position":r,"aria-readonly":m||h,title:m?c.lockedTooltip.value:void 0,onClick:l?void 0:b,onKeyDown:e=>{e.target===e.currentTarget&&e.key===`Enter`&&(e.preventDefault(),b())},className:G(`flex min-h-10 w-full min-w-0 max-w-xl items-start gap-2.5 rounded-lg px-3 py-2.5 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-text/40`,!m&&!h&&`cursor-text hover:bg-text/5`,g&&`cursor-pointer`,m&&`cursor-not-allowed opacity-60`,a),children:[i&&R(TK,{status:p,className:`mt-0.5`}),(()=>{if(!f)return null;if(h)return R(`span`,{className:`rounded-md border border-neutral/30 px-1.5 py-0.5 font-mono text-[10px] text-neutral`,title:c.readonlyTooltip.value,children:c.readonlyChip});if(e.leafKind===`boolean`)return R(Wk,{choices:OK,value:_===!0,onChange:e=>v(e),disabled:m,color:`text`,size:`xs`});if(e.leafKind===`number`)return R(Xk,{type:`number`,size:`sm`,dir:`ltr`,defaultValue:typeof _==`number`?_:``,disabled:m,"aria-label":c.editValue.value,onKeyDown:e=>e.stopPropagation(),onBlur:e=>{let t=Number(e.currentTarget.value);!Number.isNaN(t)&&t!==_&&v(t)}},String(_));if(l)return R(kK,{value:typeof _==`string`?_:``,isDisabled:m,onCommit:v,onStopEditing:y});let t=pK(_);return R(`span`,{dir:`auto`,className:G(`line-clamp-3 min-w-0 flex-1 whitespace-pre-wrap break-words text-sm`,t===``&&`text-neutral italic`,g&&`line-clamp-1`,m&&`text-neutral`),title:g?t:void 0,children:t===``?c.emptyValue:t})})(),g&&!m&&R(rc,{className:`mt-0.5 size-3.5 shrink-0 text-neutral`,"aria-label":c.openEditor.value})]})});AK.displayName=`ContentGridCell`;var jK={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,select:`Select`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,select:`Select`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,plural:`Pluriel`,gender:`Genre`,select:`Sélection`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,plural:`Plural`,gender:`Género`,select:`Selección`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Geschlecht`,select:`Auswahl`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,plural:`複数形`,gender:`性別`,select:`選択`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,plural:`복수`,gender:`성별`,select:`선택`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,plural:`复数`,gender:`性别`,select:`选择`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,plural:`Plurale`,gender:`Genere`,select:`Selezione`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,plural:`Plural`,gender:`Gênero`,select:`Seleção`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,plural:`बहुवचन`,gender:`लिंग`,select:`चयन`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,plural:`جمع`,gender:`جنس`,select:`تحديد`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,plural:`Множественное число`,gender:`Пол`,select:`Выбор`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},title:`Node type selector`,description:`Defines the available node types that can be selected for content modeling, including text, number, boolean, object structures, arrays, and other specialized types like enumeration, gender, condition, and markdown.`,tags:[`content modeling`,`field type`,`editor`],location:`local`,localId:`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`};T();var MK=[{groupKey:`groupPrimitives`,nodeTypes:[Qr,$r,ei]},{groupKey:`groupMultilingual`,nodeTypes:[Rr]},{groupKey:`groupConditional`,nodeTypes:[zr,Br,ti,ni,Vr]},{groupKey:`groupRichText`,nodeTypes:[Xr,Zr,Hr]},{groupKey:`groupStructural`,nodeTypes:[Wr,Gr,Kr,Ur]}],NK=({row:e,className:t})=>{let{changeRowType:n,getIsTypeChangeLossless:r}=oK(),i=V(CK),a=V(jK),[o,s]=N(!1),c=P(null),[l,u]=N(``),[d,f]=N(),p=fK(e.typeChain),m=e.leafKind===`readonly`,h=e.typeChain[0],g=e=>({text:a.text.value,number:a.number.value,boolean:a.boolean.value,translation:a.multilingual.value,enumeration:a.enumeration.value,plural:a.plural.value,gender:a.gender.value,select:a.select.value,condition:a.condition.value,markdown:a.markdown.value,html:i.htmlType.value,insertion:a.insertion.value,object:a.node.value,array:a.array.value,nested:a.nest.value,file:a.file.value})[e]??e,_=()=>c.current?.hidePopover(),v=e=>{s(e),e||(u(``),f(void 0))},y=t=>{n(e,t),_()},b=t=>{if(t===h)return _();if(r(e,t))return y(t);f(t)},x=G(`inline-flex shrink-0 items-center rounded-md border border-neutral/30 px-1.5 py-0.5 font-mono text-[10px] text-neutral leading-none`,t);if(m)return R(`span`,{className:x,title:i.readonlyTooltip.value,children:i.readonlyChip});let S=l.trim().toLowerCase();return R(hR,{identifier:`type-picker`,className:`inline-flex shrink-0`,children:[R(hR.Trigger,{identifier:`type-picker`,className:G(x,`cursor-pointer transition-colors hover:border-text hover:text-text`),"aria-label":`${i.changeType.value}: ${p}`,"aria-expanded":o,dir:`ltr`,children:p}),R(hR.Panel,{ref:c,identifier:`type-picker`,onOpenChange:v,roundedSize:`xl`,className:`min-w-74 p-2`,children:[o&&d&&R(`div`,{className:`flex flex-col gap-3 p-1`,children:[R(`p`,{className:`flex items-start gap-2 text-sm text-warning`,children:[R(kc,{className:`mt-0.5 size-4 shrink-0`}),i.resetWarning]}),R(`div`,{className:`flex justify-end gap-2`,children:[R(X,{label:i.cancel.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>f(void 0),children:i.cancel}),R(X,{label:i.changeType.value,color:`error`,variant:`outline`,size:`sm`,onClick:()=>y(d),children:i.changeType})]})]}),o&&!d&&R(`div`,{className:`flex flex-col gap-4`,children:[R(Xk,{size:`sm`,className:`bg-text-opposite`,autoFocus:o,value:l,onChange:e=>u(e.currentTarget.value),placeholder:i.typeSearchPlaceholder.value,"aria-label":i.typeSearchPlaceholder.value}),R(`div`,{className:`flex max-h-xl flex-col gap-2 overflow-y-auto`,children:MK.map(({groupKey:e,nodeTypes:t})=>{let n=t.filter(e=>S===``||e.toLowerCase().includes(S)||g(e).toLowerCase().includes(S));return n.length===0?null:R(`div`,{className:`flex flex-col`,children:[R(`span`,{className:`px-2 py-1 text-neutral text-xs`,children:i[e]}),n.map(e=>R(`button`,{type:`button`,onClick:()=>b(e),"aria-current":e===h,className:`flex cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1 text-start text-sm hover:bg-text/10 aria-current:bg-text/10 aria-current:font-semibold`,children:[R(`span`,{children:g(e)}),R(`span`,{className:`font-mono text-[10px] text-neutral`,dir:`ltr`,children:e})]},e))]},e)})})]})]})]})};T();var PK={horizontal:{forward:`ArrowRight`,backward:`ArrowLeft`},vertical:{forward:`ArrowDown`,backward:`ArrowUp`}},FK=({itemIds:e,onMove:t,canMove:n=()=>!0,orientation:r=`horizontal`,title:i})=>{let[a,o]=N(),[s,c]=N(),l=()=>{o(void 0),c(void 0)},u=e=>a!==void 0&&a!==e&&n(a,e),d=t=>{if(s===t&&u(t))return e.indexOf(a)<e.indexOf(t)?`after`:`before`},f=s=>({draggable:!0,title:i,"data-dragging":a===s,onDragStart:e=>{e.stopPropagation(),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,s),requestAnimationFrame(()=>o(s))},onDragEnd:l,onKeyDown:i=>{if(!i.altKey)return;let{forward:a,backward:o}=PK[r];if(i.key!==a&&i.key!==o)return;let c=r===`horizontal`&&getComputedStyle(i.currentTarget).direction===`rtl`,l=((i.key===a===c?-1:1)==1?e.slice(e.indexOf(s)+1):e.slice(0,e.indexOf(s)).reverse()).find(e=>n(s,e));l&&(i.preventDefault(),i.stopPropagation(),t(s,l))}}),p=e=>({"data-drop-position":d(e),onDragOver:t=>{u(e)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`move`,s!==e&&c(e))},onDragLeave:t=>{let n=t.relatedTarget;n instanceof Node&&t.currentTarget.contains(n)||c(t=>t===e?void 0:t)},onDrop:n=>{u(e)&&(n.preventDefault(),n.stopPropagation(),t(a,e),l())}});return{draggedId:a,getDragHandleProps:f,getDropZoneProps:p,getReorderProps:e=>({...f(e),...p(e)})}},IK=`relative data-[drop-position=after]:after:absolute data-[drop-position=before]:after:absolute data-[drop-position=after]:after:inset-x-0 data-[drop-position=before]:after:inset-x-0 data-[drop-position=after]:after:-bottom-px data-[drop-position=before]:after:-top-px data-[drop-position=after]:after:h-0.5 data-[drop-position=before]:after:h-0.5 data-[drop-position=after]:after:bg-text data-[drop-position=before]:after:bg-text data-[drop-position=after]:after:content-[""] data-[drop-position=before]:after:content-[""] data-[drop-position=after]:after:z-20 data-[drop-position=before]:after:z-20`;T();var LK=1.25,RK=.75,zK=e=>({paddingInlineStart:`${RK+e*LK}rem`}),BK=`sticky start-0 z-10 flex min-w-0 rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl items-start gap-2 bg-background py-2.5 pe-3`,VK=({depth:e})=>Array.from({length:e},(e,t)=>R(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 border-neutral/20 border-s`,style:{insetInlineStart:`${RK+t*LK+.4375}rem`}},t)),HK=j(({row:e,localeKeys:t,rowIndex:n,gridTemplateColumns:r,isCollapsed:i,isFocused:a,onToggleCollapse:o,onOpenEditor:s,dragHandleProps:c,dropZoneProps:l})=>{let{getMissingTargets:u,translateCells:d,isTranslating:f,changeRowType:p}=oK(),m=V(CK),h=e.kind===`group`,g=e.kind===`leaf`&&e.isLocalized?u(t,[e.id]):[],_=()=>h?R(`div`,{className:`self-stretch rounded-lg bg-text/[0.03] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,style:{gridColumn:`span ${t.length}`}}):e.isLocalized?t.map((t,r)=>e.cells[t]?R(AK,{row:e,cellKey:t,position:`${n}:${r}`,onOpenEditor:s},t):R(`div`,{className:`flex items-center px-2 text-neutral text-xs`,"aria-hidden":!0,children:`—`},t)):R(C,{children:[R(AK,{row:e,cellKey:`*`,position:`${n}:0`,onOpenEditor:s}),t.length>1&&R(`div`,{className:`flex items-center gap-2 px-2 py-1.5 text-neutral text-xs`,style:{gridColumn:`span ${t.length-1}`},children:[R(`span`,{className:`italic`,children:m.sameForAllLocales}),e.leafKind!==`readonly`&&R(X,{label:m.makeTranslatable.value,variant:`hoverable`,color:`text`,size:`sm`,Icon:Ys,onClick:()=>p(e,`translation`),children:m.makeTranslatable})]})]});return R(`div`,{role:`row`,"aria-expanded":h?!i:void 0,"aria-level":e.depth+1,className:G(`group/row grid min-w-full items-start`,h&&e.depth===0&&`mt-2`,a&&`bg-text/5`,l&&`relative data-[drop-position=after]:after:absolute data-[drop-position=before]:after:absolute data-[drop-position=after]:after:inset-x-0 data-[drop-position=before]:after:inset-x-0 data-[drop-position=after]:after:-bottom-px data-[drop-position=before]:after:-top-px data-[drop-position=after]:after:h-0.5 data-[drop-position=before]:after:h-0.5 data-[drop-position=after]:after:bg-text data-[drop-position=before]:after:bg-text data-[drop-position=after]:after:content-[""] data-[drop-position=before]:after:content-[""] data-[drop-position=after]:after:z-20 data-[drop-position=before]:after:z-20`,c?.[`data-dragging`]&&`opacity-40`),style:{gridTemplateColumns:r},...l,children:[R(`div`,{role:`rowheader`,className:G(BK,h&&`bg-[color-mix(in_oklab,var(--color-text)_3%,var(--color-background))]`,a&&`bg-[color-mix(in_oklab,var(--color-text)_5%,var(--color-background))]`),style:zK(e.depth),children:[R(VK,{depth:e.depth}),c&&R(X,{...c,label:m.reorderField.value,Icon:qs,variant:`none`,color:`neutral`,size:`custom`,roundedSize:`sm`,className:`absolute inset-s-0 top-2.5 cursor-grab p-0.5 opacity-0 transition-opacity hover:bg-text/10 focus-visible:opacity-100 active:cursor-grabbing group-hover/row:opacity-100`,iconClassName:`size-3`}),h?R(X,{label:m.toggleCollapse(i).value,Icon:Ts,iconClassName:G(`size-3.5 transition-transform`,!i&&`rotate-90`),variant:`none`,color:`neutral`,size:`custom`,roundedSize:`sm`,className:`mt-1 hover:text-text`,onClick:()=>o(e.id)}):R(`span`,{className:`w-3.5 shrink-0`}),R(`button`,{type:`button`,dir:`ltr`,title:`${m.openEditor.value}: ${e.id}`,onClick:()=>s(e.id,e.isLocalized?t[0]??`*`:`*`),className:G(`min-w-0 cursor-pointer break-words text-start text-sm hover:underline`,h?`font-semibold`:`text-text`),children:xK(e.label)}),R(NK,{row:e,className:`mt-0.5`}),g.length>0&&R(X,{label:m.translateRow.value,title:m.translateRow.value,Icon:Tc,iconClassName:`size-3.5`,variant:`none`,color:`custom`,size:`custom`,roundedSize:`sm`,disabled:f,onClick:()=>d(g),className:G(`mt-0.5 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/row:opacity-100`,`text-text`)})]}),_()]})});HK.displayName=`ContentGridRow`;var UK=e=>e&&typeof e==`object`&&!Array.isArray(e)?Object.keys(e):[],WK=({addLine:e,gridTemplateColumns:t,rootKeys:n})=>{let{dictionary:r}=oK(),{addEditedContent:i}=DD(),a=V(CK),[o,s]=N(!1),[c,l]=N(``),[u,d]=N(),f=r.localId,p=e.parentRow?.rootKeyPath??[],m=e.parentRow?UK(e.parentRow.rootNode):n,h=()=>{let t=e.parentRow?.rootNode??[];i(f,Xi(t[0])??``,[...p,{type:Gr,key:t.length}],!1)},g=()=>{s(!1),l(``),d(void 0)},_=e=>{e.preventDefault();let t=c.trim();if(t===``)return d(a.keyRequired.value);if(m.includes(t))return d(a.keyExists.value);i(f,``,[...p,{type:Wr,key:t}]),g()},v=e.kind===`item`?a.addItem:a.addField;return R(`div`,{className:`grid min-w-full`,style:{gridTemplateColumns:t},children:R(`div`,{className:G(BK,`items-center`),style:zK(e.depth),children:[R(VK,{depth:e.depth}),R(`span`,{className:`w-3.5 shrink-0`}),o?R(`form`,{onSubmit:_,className:`flex min-w-0 flex-1 flex-col gap-1`,children:[R(`div`,{className:`flex items-center gap-1`,children:[R(Xk,{size:`sm`,dir:`ltr`,autoFocus:!0,className:`font-mono`,value:c,placeholder:a.fieldKeyPlaceholder.value,"aria-label":a.fieldKeyPlaceholder.value,"aria-invalid":u!==void 0,onChange:e=>{l(e.currentTarget.value),d(void 0)},onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&g()}}),R(X,{type:`submit`,label:a.add.value,size:`sm`,color:`text`,children:a.add})]}),u&&R(`span`,{className:`text-error text-xs`,children:u})]}):R(X,{label:v.value,variant:`hoverable`,color:`neutral`,size:`sm`,Icon:pc,onClick:()=>e.kind===`item`?h():s(!0),children:v})]})})},GK=({row:e,cellKey:t,isNarrow:n,onClose:r})=>{let{dictionary:i,aiCellIds:a,acceptAICell:o,revertAICell:s}=oK(),c=V(CK),l=e.cells[t]??Object.values(e.cells)[0],u=e.rootKeyPath?e.rootNode:l?.value,d=e.rootKeyPath??l?.keyPath??[],f=Object.keys(e.cells).map(t=>eR(e.id,t)).filter(e=>a.has(e));return R(`section`,{"aria-label":e.id,className:`flex h-full min-h-0 w-full min-w-0 flex-col`,children:[R(`header`,{className:`flex items-center gap-2 border-neutral/20 border-b px-3 py-2`,children:[n&&R(X,{label:c.backToList.value,variant:`hoverable`,color:`text`,size:`icon-md`,Icon:ps,onClick:r}),R(`span`,{dir:`ltr`,className:`min-w-0 truncate font-mono font-semibold text-sm`,title:e.id,children:e.id}),R(NK,{row:e}),!n&&R(X,{label:c.close.value,variant:`hoverable`,color:`text`,size:`icon-md`,Icon:Lc,className:`ms-auto`,onClick:r})]}),f.length>0&&R(`div`,{className:G(`flex flex-wrap items-center gap-2 border-b px-3 py-2 text-sm`,`border-text/30`,`bg-text/5`,`text-text`),children:[R(Tc,{className:`size-4 shrink-0`}),R(`span`,{className:`flex-1`,children:c.aiBanner}),R(X,{label:c.revert.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>f.forEach(s),children:c.revert}),R(X,{label:c.accept.value,color:`text`,size:`sm`,onClick:()=>f.forEach(o),children:c.accept})]}),R(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:l&&R(VL,{dictionary:i,section:u,keyPath:d},e.id)})]})};T();var KK=({children:e,onClickOutSide:t,listenForEscape:r=!1,disabled:i=!1,...a})=>{let o=P(null),s=n(e=>{i||o.current&&!o.current.contains(e.target)&&t()},[t,i]),c=n(e=>{!i&&r&&e.key===`Escape`&&t()},[t,i,r]);return M(()=>(document.addEventListener(`mousedown`,s,{passive:!0}),r&&document.addEventListener(`keydown`,c),()=>{document.removeEventListener(`mousedown`,s),r&&document.removeEventListener(`keydown`,c)}),[s,c,r]),R(`div`,{ref:o,...a,role:a.role||`region`,children:e})},qK=({className:e,...t})=>R(`div`,{className:`relative flex w-full items-center gap-1`,children:[R(Cc,{className:`absolute inset-s-2 size-4`}),R(Xk,{...t,type:`search`,className:G(`ps-8`,e)})]});T();var JK={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},YK=e=>typeof e==`number`?e:JK[e]??JK.md,XK=()=>{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)},ZK=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},QK=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},$K=Object.freeze({isMobileScreen:void 0,isMobileUserAgent:void 0,isMobile:void 0,isIOS:void 0,isMac:void 0}),eq,tq=()=>(eq??={isMobileUserAgent:XK(),isIOS:ZK(),isMac:QK()},eq),nq=new Map,rq=e=>{let t=window.matchMedia(`(max-width: ${e}px)`),n=new Set,r=e=>({...tq(),isMobileScreen:e,isMobile:e}),i=r(t.matches),a=e=>i.isMobileScreen!==e&&(i=r(e),!0),o=e=>{if(a(e.matches))for(let e of n)e()};return{subscribe:e=>(n.size===0&&(a(t.matches),t.addEventListener(`change`,o)),n.add(e),()=>{n.delete(e),n.size===0&&t.removeEventListener(`change`,o)}),getSnapshot:()=>i}},iq=e=>{let t=nq.get(e);if(t)return t;let n=rq(e);return nq.set(e,n),n},aq=()=>$K,oq=(e=`md`)=>{let t=YK(e),r=n(e=>iq(t).subscribe(e),[t]),i=n(()=>iq(t).getSnapshot(),[t]);return A(r,i,aq)};T();var sq=e=>e.split(` + `).map(e=>e.trim()),cq=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,lq=(e,t)=>{let n=t.map(cq),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(cq(e)));if(!i)return!1;let a=cq(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},uq=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,dq=(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},fq=({shortcut:e,onTriggered:t,display:n=!0,disabled:r=!1,className:i,size:a=`md`})=>{let{isMac:o}=oq(),s=dq(e,o??!1),c=l(()=>sq(s),[s]),[u,d]=N(new Set);if(M(()=>{let e=e=>{let n=e.target,i=n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.isContentEditable,a=e.key,s=new Set;if(e.metaKey&&s.add(`⌘`),e.ctrlKey&&s.add(`Ctrl`),e.altKey&&s.add(o?`⌥`:`Alt`),e.shiftKey&&s.add(`Shift`),a.startsWith(`Arrow`)?(s.add(a),s.add(uq(a))):s.add(a.toUpperCase()),d(s),!r&&t&&lq(e,c)){let n=c.includes(`Escape`);if(i&&!n)return;e.preventDefault(),t()}},n=()=>{d(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,n),window.addEventListener(`blur`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,n),window.removeEventListener(`blur`,n)}},[c,t,o,r]),!n)return null;let f=e=>{let t=e.toUpperCase(),n=cq(e);return u.has(e)||u.has(t)||u.has(n)||e===`⌘`&&u.has(`Meta`)||e===`Ctrl`&&u.has(`Control`)||e===`⌥`&&u.has(`Alt`)||e===`Alt`&&u.has(`Alt`)||e===`←`&&u.has(`ArrowLeft`)||e===`→`&&u.has(`ArrowRight`)||e===`↑`&&u.has(`ArrowUp`)||e===`↓`&&u.has(`ArrowDown`)};return R(`kbd`,{className:G(`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 text-neutral`,a===`sm`&&`text-xs`,a===`md`&&`text-sm`,a===`lg`&&`text-base`,i),children:c.map((t,n)=>{let r=`${t}-${n}-${e}`,i=uq(t);return R(`span`,{className:`inline-flex items-center`,children:[n>0&&R(`span`,{className:`text-neutral/50`,children:`+`}),R(`span`,{className:G(`min-w-4 px-0.5 text-center`,f(t)&&`scale-120 font-bold text-foreground`),suppressHydrationWarning:!0,children:i})]},r)})})},pq={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`},reorderLocale:`Drag to reorder (Alt + ↑/↓)`},"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`},reorderLocale:`Drag to reorder (Alt + ↑/↓)`},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`},reorderLocale:`Glisser pour réordonner (Alt + ↑/↓)`},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`},reorderLocale:`Arrastre para reordenar (Alt + ↑/↓)`},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`},reorderLocale:`Zum Neuordnen ziehen (Alt + ↑/↓)`},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`},reorderLocale:`ドラッグして並べ替え(Alt + ↑/↓)`},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`},reorderLocale:`드래그하여 순서 변경 (Alt + ↑/↓)`},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`},reorderLocale:`拖动以重新排序(Alt + ↑/↓)`},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`},reorderLocale:`Trascina per riordinare (Alt + ↑/↓)`},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`},reorderLocale:`Arraste para reordenar (Alt + ↑/↓)`},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`},reorderLocale:`क्रम बदलने के लिए खींचें (Alt + ↑/↓)`},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`},reorderLocale:`اسحب لإعادة الترتيب (Alt + ↑/↓)`},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`},reorderLocale:`Перетащите для изменения порядка (Alt + ↑/↓)`}}},title:`Locale switcher content`,description:`Content strings for the locale switcher component, including labels, placeholders, and toggle options for displaying available locales.`,tags:[`component`,`locale switcher`,`i18n`],location:`local`,localId:`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`},mq=({children:e,className:t,identifier:n,...r})=>R(`div`,{className:G(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});mq.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>R(X,{className:G([`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}),mq.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>R(`div`,{className:G(`absolute z-100 min-w-full`,i===`start`&&`inset-s-0`,i===`end`&&`inset-e-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:R(Dk,{isHidden:t,className:G(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});var hq={key:`locale-switcher-drop-down`,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`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`}}}},title:`Locale switcher`,description:`Content declaration for the locale switcher component, including user interface labels for switching and searching between different languages.`,tags:[`language selector`,`internationalization`,`UI component`],location:`local`,localId:`locale-switcher-drop-down::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs`};function gq(e){return Array.isArray?Array.isArray(e):Eq(e)===`[object Array]`}function _q(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 vq(e){return e==null?``:_q(e)}function yq(e){return typeof e==`string`}function bq(e){return typeof e==`number`}function xq(e){return e===!0||e===!1||Cq(e)&&Eq(e)==`[object Boolean]`}function Sq(e){return typeof e==`object`}function Cq(e){return Sq(e)&&e!==null}function wq(e){return e!=null}function Tq(e){return!e.trim().length}function Eq(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Dq=`Incorrect 'index' type`,Oq=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,kq=e=>`Invalid value for key ${e}`,Aq=e=>`Pattern length exceeds max of ${e}.`,jq=e=>`Missing ${e} property in key`,Mq=e=>`Property 'weight' in key '${e}' must be a positive integer`,Nq=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,Pq=Object.prototype.hasOwnProperty,Fq=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=Iq(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 Iq(e){let t=null,n=null,r=null,i=1,a=null;if(yq(e)||gq(e))r=e,t=Lq(e),n=Rq(e);else{if(!Pq.call(e,`name`))throw Error(jq(`name`));let o=e.name;if(r=o,Pq.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(Mq(Rq(o)));t=Lq(o),n=Rq(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function Lq(e){return gq(e)?e:e.split(`.`)}function Rq(e){return gq(e)?e.join(`.`):e}function zq(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(wq(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!wq(s))return;if(a===t.length-1&&(yq(s)||bq(s)||xq(s)||typeof s==`bigint`))n.push(o===void 0?vq(s):{v:vq(s),i:o});else if(gq(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,yq(t)?t.split(`.`):t,0),r?n:n[0]}var Bq={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Vq={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},Hq={location:0,threshold:.6,distance:100},Uq={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:zq,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},$=Object.freeze({...Vq,...Bq,...Hq,...Uq});function Wq(e){return e>=9&&e<=13||e===32||e===160}function Gq(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)Wq(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var Kq=class{constructor({getFn:e=$.getFn,fieldNormWeight:t=$.fieldNormWeight}={}){this.norm=Gq(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(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(yq(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(Oq);if(yq(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(Oq);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!wq(e)||Tq(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(wq(i)){if(gq(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(wq(n)){if(yq(n)){if(!Tq(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(wq(n.v)){let t=yq(n.v)?n.v:vq(n.v);if(!Tq(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(yq(i)&&!Tq(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function qq(e,t,{getFn:n=$.getFn,fieldNormWeight:r=$.fieldNormWeight}={}){let i=new Kq({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(Iq)),i.setSources(t),i.create(),i}function Jq(e,{getFn:t=$.getFn,fieldNormWeight:n=$.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new Kq({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Yq(e=[],t=$.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}function Xq(e,t,n,{location:r=$.location,distance:i=$.distance,threshold:a=$.threshold,findAllMatches:o=$.findAllMatches,minMatchCharLength:s=$.minMatchCharLength,includeMatches:c=$.includeMatches,ignoreLocation:l=$.ignoreLocation}={}){if(t.length>32)throw Error(Aq(32));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=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=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(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=Yq(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function Zq(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 Qq(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 $q={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},eJ=RegExp(`[`+Object.keys($q).join(``)+`]`,`g`),tJ=typeof String.prototype.normalize==`function`?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(eJ,e=>$q[e]):e=>e,nJ=class{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.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?tJ(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Zq(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;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?tJ(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};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}=Xq(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=Qq(u)),p}},rJ=new Set([`fuzzy`,`include`]);function iJ(e){return e.startsWith(`inverse`)}var aJ=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new nJ(e,{location:t.location??$.location,threshold:t.threshold??$.threshold,distance:t.distance??$.distance,includeMatches:t.includeMatches??$.includeMatches,findAllMatches:t.findAllMatches??$.findAllMatches,minMatchCharLength:t.minMatchCharLength??$.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??$.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??$.ignoreDiacritics,ignoreLocation:t.ignoreLocation??$.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],oJ=aJ.length,sJ=`\0`,cJ=`|`;function lJ(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 uJ(e,t){let n=e.match(t);return n?n[1]:null}function dJ(e,t={}){return e.replace(/\\\|/g,sJ).split(cJ).map(e=>{let n=lJ(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<oJ;){let e=aJ[o],n=uJ(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<oJ;){let e=aJ[o],n=uJ(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var fJ=class{constructor(e,{isCaseSensitive:t=$.isCaseSensitive,ignoreDiacritics:n=$.ignoreDiacritics,includeMatches:r=$.includeMatches,minMatchCharLength:i=$.minMatchCharLength,ignoreLocation:a=$.ignoreLocation,findAllMatches:o=$.findAllMatches,location:s=$.location,threshold:c=$.threshold,distance:l=$.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?tJ(e):e,this.pattern=e,this.query=dJ(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?tJ(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,iJ(r.type)&&(c=!0),n&&(rJ.has(r.type)?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=Qq(o)),e}}return{isMatch:!1,score:1}}},pJ=[];function mJ(...e){pJ.push(...e)}function hJ(e,t){for(let n=0,r=pJ.length;n<r;n+=1){let r=pJ[n];if(r.condition(e,t))return new r(e,t)}return new nJ(e,t)}var gJ={AND:`$and`,OR:`$or`},_J={PATH:`$path`,PATTERN:`$val`},vJ=e=>!!(e[gJ.AND]||e[gJ.OR]),yJ=e=>!!e[_J.PATH],bJ=e=>!gq(e)&&Sq(e)&&!vJ(e),xJ=e=>({[gJ.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function SJ(e,t,{auto:n=!0}={}){let r=e=>{if(yq(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=hJ(e,t)),r}let i=Object.keys(e),a=yJ(e);if(!a&&i.length>1&&!vJ(e))return r(xJ(e));if(bJ(e)){let r=a?e[_J.PATH]:i[0],o=a?e[_J.PATTERN]:e[r];if(!yq(o))throw Error(kq(r));let s={keyId:Rq(r),pattern:o};return n&&(s.searcher=hJ(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];gq(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return vJ(e)||(e=xJ(e)),r(e)}function CJ(e,{ignoreFieldNorm:t=$.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 wJ(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){e.forEach(e=>{e.score=CJ(e.matches,{ignoreFieldNorm:t})})}var TJ=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)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&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function EJ(e){let t=[];return e.matches.forEach(e=>{if(!wq(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function DJ(e,t,{includeMatches:n=$.includeMatches,includeScore:r=$.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=EJ(e)),r&&(a.score=e.score),a})}var OJ=/[\p{L}\p{M}\p{N}_]+/gu,kJ=new WeakSet;function AJ(e){kJ.has(e)||(kJ.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function jJ(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||AJ(e),t=>t.match(e)||[]):e=>e.match(OJ)||[]}function MJ({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=jJ(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=tJ(n)),r(n)}}}var NJ=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=MJ({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});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 nJ(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)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=Qq(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function PJ(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function FJ(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0)PJ(e,a,i,r);else if(o)for(let t=0;t<n;t++){let n=o[t];if(n){if(Array.isArray(n))for(let t of n)PJ(e,t.v,i,r);else PJ(e,n.v,i,r)}}}function IJ(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)FJ(r,i,t,n);return r}function LJ(e,t,n,r){FJ(e,t,n,r)}function RJ(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function zJ(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)RJ(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var BJ=class{constructor(e,t,n){this.options={...$,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Fq(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=hJ(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 Kq))throw Error(Dq);if(this._myIndex=t||qq(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=MJ({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=IJ(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!wq(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=MJ({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});LJ(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}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){this._invertedIndex&&zJ(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(Oq);this._invertedIndex&&zJ(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(yq(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return bq(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&bq(n)&&n>0&&yq(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new TJ(n,u);yq(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=yq(e)?yq(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),wJ(d,{ignoreFieldNorm:s}),a&&d.sort(yq(e)?u:l),bq(n)&&n>-1&&(d=d.slice(0,n));return DJ(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!wq(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=CJ(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=SJ(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===gJ.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(wq(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!wq(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=CJ(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!wq(t))return[];let r=[];if(gq(t))t.forEach(({v:t,i,n:a})=>{if(!wq(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};BJ.version=`7.5.0`,BJ.createIndex=qq,BJ.parseIndex=Jq,BJ.config=$,BJ.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(Nq);return hJ(e,{...$,...n}).searchIn(t)},BJ.parseQuery=SJ,mJ(fJ),mJ(NJ),BJ.use=function(...e){e.forEach(e=>mJ(e))};var VJ=BJ;T();var HJ={sm:{nav:`rounded-full border-[1.3px] border-text`,trigger:`min-h-0 px-1.5 py-0.5 text-xs`,label:`px-1`,icon:`size-3`},md:{nav:`rounded-xl border border-text`,trigger:``,label:`px-2`,icon:`w-5`}},UJ=`locale-switcher`,WJ=({locale:e,localeList:t,availableLocales:r,fullLocaleName:i=!0,setLocale:a,panelProps:o,size:s=`md`,border:c,borderColor:u,roundedSize:d,variant:f,color:p,className:m})=>{let h=`-`,{switchTo:g,searchInput:_,languageListLabel:v,localeSwitcherLabel:y}=V(hq),b=P(null),x=l(()=>t.map(t=>({locale:t,englishName:Tr(t,`en`),currentLocaleName:Tr(t,e),ownLocaleName:Tr(t)})),[t,e]),[S,C]=N(x),w=l(()=>new VJ(x,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[x]),T=n(e=>{if(e){let t=w.search(e).map(e=>e.item);C(t)}else C(x)},[w,x]);return e&&(h=i?Tr(e):e.toUpperCase()),R(`nav`,{className:G(f?void 0:HJ[s].nav,m),"aria-label":y.value,children:R(mq,{identifier:UJ,children:[R(mq.Trigger,{identifier:UJ,...f&&{variant:f},color:p??`custom`,size:s===`sm`?`custom`:`md`,roundedSize:s===`sm`?`full`:`md`,className:G(!p&&`text-text`,HJ[s].trigger),children:R(`div`,{className:`flex w-full items-center justify-between`,children:[R(`div`,{className:G(`text-nowrap`,HJ[s].label),children:h}),R(sc,{className:G(`self-center`,HJ[s].icon)})]})}),R(mq.Panel,{identifier:UJ,isOverable:!0,isFocusable:!0,align:`end`,...o,children:R(bA,{className:`max-h-[80vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:c,borderColor:u,roundedSize:d,"aria-label":v.value,children:[R(`div`,{className:`p-3`,children:R(Xk,{type:`search`,"aria-label":_.ariaLabel.value,placeholder:_.placeholder.value,onChange:e=>T(e.target.value),ref:b})}),R(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:S.map(({locale:n,currentLocaleName:i,ownLocaleName:o})=>R(`li`,{className:`px-1.5 py-1`,children:R(X,{onClick:()=>a(n),label:`${g} ${i}`,disabled:!(r??t).includes(n),isActive:e===n,variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,children:R(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[R(`div`,{className:`flex flex-col text-nowrap`,children:[R(`span`,{dir:wr(n),lang:n,suppressHydrationWarning:!0,children:o}),R(`span`,{className:`text-neutral text-xs`,suppressHydrationWarning:!0,children:i})]}),R(`span`,{className:`text-neutral text-sm`,children:n.toUpperCase()})]})})},n))})]})})]})})},GJ=(e,t,n)=>{let r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1||r===i)return[...e];let a=[...e];return a.splice(r,1),a.splice(i,0,t),a};T();var KJ=(e,t=`horizontal`)=>{let{setSelectedLocales:r}=ej(),{reorderLocale:i}=V(pq),a=n((e,t)=>r(n=>GJ(n,e,t)),[r]);return{...FK({itemIds:e,onMove:a,orientation:t,title:i.value}),moveLocale:a}},qJ=IK;T();var JJ=`locale-switcher-content`,YJ=({panelProps:e,isMultilingual:t=!0,className:n,size:r=`md`,border:i,borderColor:a,roundedSize:o,variant:s,color:c})=>{let{switchTo:u,searchInput:d,localeSwitcherLabel:f,languageListLabel:p,seeAllLocalesSwitch:m}=V(pq),h=P(null),{locale:g}=aa(),{availableLocales:_,selectedLocales:v,setSelectedLocales:y}=ej(),{getDragHandleProps:b,getDropZoneProps:x}=KJ(v,`vertical`),S=l(()=>_.map(e=>({locale:e,englishName:Tr(e,`en`),currentLocaleName:Tr(e,g),ownLocaleName:Tr(e)})),[_,g]),[C,w]=N(``),[T,E]=ZA(`locale-content-selector-see-all-locales`,!1),D=l(()=>new VJ(S,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[S]),O=l(()=>{if(C)return D.search(C).map(e=>e.item);let e=v.flatMap(e=>S.filter(t=>t.locale===e)),t=S.filter(e=>!v.includes(e.locale));return[...e,...t]},[C,S,D,v]),k=e=>t&&!C&&v.length>1&&v.includes(e),A=e=>{t?v.includes(e)?v.length>1&&y(t=>t.filter(t=>t!==e)):y(t=>[...t,e]):y([e])},j=e=>{E(e),w(``),y(e?_:[g])};return R(`nav`,{className:G(s?void 0:HJ[r].nav,n),"aria-label":f.value,children:R(mq,{identifier:JJ,children:[R(mq.Trigger,{identifier:JJ,label:f.value,roundedSize:`3xl`,variant:`outline`,color:`text`,size:`md`,className:G(!s&&!c&&`text-text`,!s&&HJ[r].trigger),children:R(`div`,{className:`flex items-center justify-between gap-1.5`,children:[R(Gs,{className:G(`shrink-0`,r===`sm`?`size-3.5`:`size-4`)}),R(sc,{className:G(`shrink-0 self-center`,r===`sm`?`size-3`:`size-3.5`)})]})}),R(mq.Panel,{identifier:JJ,isOverable:!0,isFocusable:!0,align:`end`,...e,children:R(bA,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:i??!0,roundedSize:o??`3xl`,borderColor:a??`text`,"aria-label":p.value,children:[t&&R(`div`,{className:`m-auto p-2`,children:R(Wk,{defaultValue:T,onChange:j,color:`text`,size:`sm`,className:`!w-60 mx-3`,choices:[{content:m.true.value,value:!0},{content:m.false.value,value:!1}]})}),!(t&&T)&&R(`div`,{className:`p-3`,children:R(Xk,{type:`search`,"aria-label":d.ariaLabel.value,placeholder:d.placeholder.value,onChange:e=>w(e.target.value),ref:h})}),R(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:O.map(({locale:e,currentLocaleName:n,ownLocaleName:r})=>R(`li`,{...k(e)?x(e):{},className:G(`px-1.5 py-1`,k(e)&&qJ),children:R(X,{...k(e)?b(e):{},onClick:()=>A(e),label:`${u} ${n}`,disabled:!(_??_).includes(e),isActive:v.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:R(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[k(e)&&R(qs,{"aria-hidden":!0,className:`size-3.5 shrink-0 cursor-grab text-neutral`}),t&&R(`div`,{className:`w-4`,children:v.includes(e)&&R(ys,{className:`size-full`})}),R(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[R(`div`,{className:`flex flex-col text-nowrap`,children:[R(`span`,{dir:wr(e),lang:e,children:r}),R(`span`,{className:`text-neutral text-xs`,children:n})]}),R(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})})]})})};T();var XJ=Hc(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{error:`border-error bg-error text-error`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-foreground`}},defaultVariants:{color:`text`}}),ZJ=Hc(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{error:`bg-error/10 aria-selected:text-foreground`,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-foreground-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`inset-s-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),QJ=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`text`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=P([]),c=P(null),{choiceIndicatorPosition:l,scheduleMeasurement:u}=Rk(s,{isHoverable:i,orientation:a});return M(()=>{u()},[t]),R(`div`,{className:G(XJ({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return y(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&&R(`div`,{className:G(ZJ({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})};T();var $J=e=>e.map(e=>e.toUpperCase()).join(`, `),eY=({targets:e,targetLocales:t,skippedLocales:n})=>{let{translateCells:r,isTranslating:i,sourceLocale:a}=oK(),o=V(CK),[s,c]=N(!1),l=e.length===0,u=l?o.fill.value:`${o.translateMissing.value} → ${$J(t)}`;return R(KK,{onClickOutSide:()=>c(!1),listenForEscape:!0,disabled:!s,className:`inline-flex`,children:R(hR,{identifier:`content-grid-translate-missing`,children:[R(X,{label:u,variant:`outline`,color:`neutral`,size:`sm`,roundedSize:`md`,Icon:Tc,isLoading:i,disabled:l||i,onClick:()=>c(e=>!e),children:R(`span`,{dir:`ltr`,children:u})}),R(hR.Detail,{identifier:`content-grid-translate-missing`,isHidden:!s,isOverable:!1,displayArrow:!1,xAlign:`end`,className:`w-72 p-3 delay-0`,children:R(`div`,{className:`flex flex-col gap-3 text-sm`,children:[R(`p`,{children:[o.confirmTranslateDescription,` `,R(`span`,{className:`font-mono`,dir:`ltr`,children:a.toUpperCase()})]}),R(`ul`,{className:`flex flex-col gap-1`,children:t.map(t=>R(`li`,{className:`flex items-center justify-between font-mono text-xs`,dir:`ltr`,children:[R(`span`,{children:t.toUpperCase()}),R(`span`,{children:e.filter(e=>e.cellKey===t).length})]},t))}),n.length>0&&R(`p`,{className:`text-neutral text-xs`,children:[o.skippedLocked,` `,R(`span`,{className:`font-mono`,dir:`ltr`,children:$J(n)})]}),R(`div`,{className:`flex justify-end gap-2`,children:[R(X,{label:o.cancel.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>c(!1),children:o.cancel}),R(X,{label:o.confirm.value,color:`text`,size:`sm`,onClick:()=>{c(!1),r(e)},children:o.confirm})]})]})})]})})},tY=({query:e,onQueryChange:t,statusFilter:n,onStatusFilterChange:r,statusCounts:i,localeKeys:a,onJumpToMissing:o,isNarrow:s})=>{let{sourceLocale:c,lockedLocales:l,getMissingTargets:u,aiCellIds:d,acceptAllAICells:f}=oK(),p=V(CK),m=u(a),h=a.filter(e=>e!==c&&!l.has(e)),g=a.filter(e=>l.has(e)),_=[{filter:`all`,label:p.filterAll},{filter:`missing`,label:p.filterMissing,count:i.missing,status:`missing`},{filter:`edited`,label:p.filterEdited,count:i.edited,status:`edited`},{filter:`ai`,label:p.filterAI,count:i.ai,status:`ai`}];return R(`div`,{className:`flex shrink-0 flex-col gap-2`,children:[R(`div`,{className:`flex flex-wrap items-center justify-between gap-x-6 gap-y-2`,children:[R(`div`,{className:`min-w-48 max-w-md flex-1`,children:R(qK,{value:e,onChange:e=>t(e.currentTarget.value),placeholder:p.searchPlaceholder.value,"aria-label":p.searchPlaceholder.value})}),R(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!s&&R(YJ,{size:`sm`,variant:`outline`,color:`neutral`,roundedSize:`2xl`}),R(eY,{targets:m,targetLocales:h,skippedLocales:g}),d.size>0&&R(X,{label:p.acceptAll.value,variant:`hoverable`,color:`text`,size:`sm`,roundedSize:`md`,Icon:ys,onClick:f,children:p.acceptAll})]})]}),R(`div`,{className:`flex flex-wrap items-center gap-2 py-3`,children:[R(QJ,{selectedChoice:n,hoverable:!0,color:`text`,className:`w-auto`,tabs:_.map(({filter:e,label:t,count:i,status:a})=>R(`button`,{type:`button`,"aria-pressed":n===e,"data-active":n===e,onClick:()=>r(e),className:`flex cursor-pointer items-center gap-2 whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,children:[a&&R(TK,{status:a}),R(`span`,{children:t}),i!==void 0&&R(`span`,{className:`font-mono opacity-70`,children:i})]},e))}),o&&i.missing>0&&R(X,{label:p.jumpToMissing.value,variant:`hoverable`,color:`neutral`,size:`sm`,roundedSize:`md`,Icon:Ls,className:`ms-auto`,onClick:o,children:p.jumpToMissing}),o&&i.missing>0&&R(fq,{shortcut:`J`,size:`sm`,onTriggered:o})]})]})};T();var nY=(e=640)=>{let t=P(null),[n,r]=N(!1);return M(()=>{let n=t.current;if(!n)return;let i=new ResizeObserver(([t])=>{t&&r(t.contentRect.width<e)});return i.observe(n),()=>i.disconnect()},[e]),{containerRef:t,isNarrow:n}},rY={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:`Перейти на`}}},title:`Breadcrumb navigation`,description:`Content declaration for the breadcrumb component's navigation label, used to guide users through hierarchical structures within the interface.`,tags:[`navigation`,`breadcrumb`],location:`local`,localId:`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`};T();var iY=Hc(`rtl-mirror-icons 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:underline hover:underline-offset-6 hover:opacity-80`,"invisible-link":`h-auto justify-start border-inherit bg-current/0`,button:`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,"button-outlined":`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current! px-6 text-center font-medium text-sm text-text ring-0 *:text-text hover:bg-current/30! hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,hoverable:`block rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/5 aria-[current]:bg-current/3`},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:{neutral:`text-neutral`,text:`text-text`,error:`text-error`,success:`text-success`,"text-inverse":`text-text-opposite`,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 text-xs max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 text-sm max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 text-lg max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 text-xl max-md:py-4`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/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:`custom`}}),aY=({href:e,isExternalLink:t},n)=>{if(typeof t==`boolean`)return t;if(typeof e!=`string`||e.trim()===``||!/^https?:\/\//.test(e))return!1;if(n)try{let t=new URL(e).hostname,r=new URL(n.startsWith(`http`)?n:`https://${n}`).hostname,i=e=>e.split(`.`).slice(-2).join(`.`);return i(t)!==i(r)}catch{return!0}return!0},oY=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(oY):b(e)?oY(e.props.children):!1,sY=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,rel:m,target:h,...g}=e,_=t===`button`||t===`button-outlined`,v=u??(_?`md`:`custom`),y=d??aY(e),b=f??p?.startsWith(`#`)??!1,x=oY(i),S=y?`noopener noreferrer nofollow`:m,C=y?`_blank`:h??`_self`,w=l&&p&&!y&&!b?xr(p,l):p,T=w===``?void 0:w;return R(`a`,{...g,href:T,"aria-label":a,rel:S,target:C,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:G(iY({variant:t,color:n,roundedSize:r,underlined:c,size:v,className:o})),children:[_&&x?R(`span`,{children:i}):i,y&&x&&R(Vs,{className:`ms-2 inline-block size-4`}),b&&R(ac,{className:`ms-2 inline-block size-4`})]})};T();var cY=e=>e&&{neutral:`text-neutral`,text:`text-muted-foreground`,"text-inverse":`text-foreground-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,lY=Hc(`flex flex-row flex-wrap items-center`,{variants:{size:{xs:`gap-1 text-xs`,sm:`gap-1.5 text-sm`,md:`gap-2 text-base`,lg:`gap-3 text-lg`,xl:`gap-4 text-xl`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`md`,spacing:`normal`}}),uY=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let{linkLabel:l}=V(rY,o);return R(C,{children:[R(sY,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l.value} ${n}`,itemID:e,size:`custom`,children:R(`span`,{itemProp:`name`,children:n})}),R(`meta`,{itemProp:`position`,content:a.toString()})]})},dY=({children:e,onClick:t,color:n,position:r,className:i,...a})=>{let{linkLabel:o}=V(rY);return R(C,{children:[R(X,{onClick:t,variant:`link`,label:`${o} ${e}`,color:n,itemProp:`item`,size:`custom`,...a,children:R(`span`,{itemProp:`name`,children:e})}),R(`meta`,{itemProp:`position`,content:r.toString()})]})},fY=({children:e,position:t,className:n,...r})=>R(`span`,{itemProp:`item`,className:G(`inline-flex items-center`,`font-medium text-muted-foreground`,`transition-colors duration-200`,n),children:[R(`span`,{itemProp:`name`,...r,children:e}),R(`meta`,{itemProp:`position`,content:t.toString()})]}),pY=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:o=R(Ts,{size:10}),ariaLabel:s=`breadcrumb`,includeStructuredData:c=!0,maxItems:l,size:u,spacing:d,...f})=>{let p=l&&e.length>l?[...e.slice(0,1),`...`,...e.slice(-(l-2))]:e;return R(`nav`,{"aria-label":s,className:`rtl-mirror-icons`,children:R(`ol`,{className:G(lY({size:u,spacing:d}),t),...c&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...f,children:p.map((e,t)=>{let s=t===p.length-1,l=typeof e==`object`&&typeof e.href==`string`,u=typeof e==`object`&&typeof e.onClick==`function`,d=t===p.length-1,f=d?i:void 0,m=e===`...`,h=typeof e==`string`?e:e.text,g=cY(n);if(m)return R(C,{children:[R(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:R(`span`,{className:`text-neutral-500`,children:`…`})}),!s&&R(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:R(`span`,{className:G(g),children:o})})]},`truncated-${h}`);let _=R(fY,{position:t+1,"aria-current":f,className:G(`transition-colors duration-200`,d&&`text-foreground`),children:h},h);l?_=R(uY,{href:e.href,color:n,position:t+1,locale:r,"aria-current":f,className:G(d&&`cursor-default text-foreground`),children:h},h):u&&(_=R(dY,{onClick:e.onClick,color:n,position:t+1,"aria-current":f,className:G(d&&`cursor-default text-neutral-900`),children:h},h));let v=a(`li`,{...c&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:h,className:`flex items-center`},_);return s?v:R(C,{children:[v,R(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:R(`span`,{className:G(g),children:o})})]},h)})})})},mY=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>R(pY,{links:[...a?[{text:fr(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:fr(t.key?.toString()??``)}))],locale:r,elementType:`location`,color:i}),hY=(e,t,n)=>{if(Array.isArray(e)){let r=e;return GJ(r.map((e,t)=>t),Number(t),Number(n)).map(e=>r[e])}if(e&&typeof e==`object`){let r=e,i=GJ(Object.keys(r),String(t),String(n));return Object.fromEntries(i.map(e=>[e,r[e]]))}return e};T();var gY=e=>{let{editedContent:t,addEditedContent:r}=DD(),i=e.localId;return{moveField:n((n,a,o)=>{let s=t?.[i]?.content??e.content,c=n.length===0?s:Ji(s,n);c&&typeof c==`object`&&r(i,hY(c,a,o),n)},[t,i,e.content,r])}};T();var _Y=1,vY=(e,t)=>{let n=t.target.dataset.gridPosition;if(!n)return;let{rowIndex:r,columnIndex:i}=bK(n),a=Array.from(e.querySelectorAll(`[data-grid-position]`)).map(e=>{let{rowIndex:t,columnIndex:n}=bK(e.dataset.gridPosition);return{element:e,cellRow:t,cellColumn:n}}),o=getComputedStyle(e).direction===`rtl`,s=o?`ArrowLeft`:`ArrowRight`,c=o?`ArrowRight`:`ArrowLeft`,l;if(t.key===s||t.key===c){let e=t.key===s?1:-1;l=a.find(t=>t.cellRow===r&&t.cellColumn===i+e)}else if(t.key===`ArrowDown`||t.key===`ArrowUp`){let e=t.key===`ArrowDown`,n=a.filter(t=>e?t.cellRow>r:t.cellRow<r),o=e?Math.min(...n.map(e=>e.cellRow)):Math.max(...n.map(e=>e.cellRow)),s=n.filter(e=>e.cellRow===o);l=s.find(e=>e.cellColumn===i)??s[s.length-1]}l&&(t.preventDefault(),l.element.focus())},yY=({className:e})=>{let t=oK(),{rows:r,rowsById:i,locales:a,sourceLocale:o,lockedLocales:s,statusContext:c,getStatus:u,getMissingTargets:d,translateCells:f,isTranslating:p}=t,m=V(CK),{locale:h}=aa(),{selectedLocales:g}=ej(),{containerRef:_,isNarrow:v}=nY(),y=P(null),{focusedContent:b,setFocusedContentKeyPath:x}=kO(),[,w]=S(),T=n(e=>w(()=>x(e)),[x]),E=!b?.dictionaryKey||b.dictionaryKey===t.dictionary.key?b?.keyPath:void 0,[D,O]=N(``),[k,A]=N(`all`),[j,F]=N(()=>new Set),[I,L]=N(),[ee,te]=N();M(()=>{if(!E||E.length===0){L(void 0);return}for(let e of r)if(e.kind===`leaf`){for(let[t,n]of Object.entries(e.cells))if($n(E,n.keyPath)){L({rowId:e.id,cellKey:t});return}}let e=E.filter(e=>e.type!==Rr),t=E.find(e=>e.type===Rr)?.key;for(let n of r)if(n.kind===`leaf`)for(let[r,i]of Object.entries(n.cells)){let a=i.keyPath.filter(e=>e.type!==Rr);if($n(e,a)||$n(a,e)){t&&n.cells[t]?L({rowId:n.id,cellKey:t}):L({rowId:n.id,cellKey:r});return}}L(void 0)},[E,r]);let ne=l(()=>{let e=g.map(String).filter(e=>a.includes(e));return e.length>0?e:[o]},[g,a,o]),z=ee&&a.includes(ee)?ee:ne.find(e=>e!==o)??ne[0]??o,re=v?[z]:ne,ie=l(()=>new Set(r.filter(e=>e.kind===`group`&&e.depth>_Y!==j.has(e.id)).map(e=>e.id)),[r,j]),B=l(()=>gK(r,i,{query:D,statusFilter:k,localeKeys:re,collapsedRowIds:ie,getStatus:u,focusedKeyPath:E}),[r,i,D,k,re,ie,u,E]),ae=(E?.length??0)>0,oe=D.trim()!==``||k!==`all`||ae,se=l(()=>r.filter(e=>e.parentId===void 0),[r]),ce=se.every(e=>Object.values(e.cells)[0]?.keyPath[0]?.type===Wr),le=l(()=>vK(B,{collapsedRowIds:oe?new Set:ie,isRootObject:!oe&&ce}).filter(e=>!oe||e.type===`row`),[B,ie,oe,ce]),{moveField:ue}=gY(t.dictionary),de=l(()=>new Map(r.map(e=>[e.id,SK(e,i)])),[r,i]),{getDragHandleProps:fe,getDropZoneProps:pe}=FK({itemIds:l(()=>le.flatMap(e=>e.type===`row`?[e.row.id]:[]),[le]),orientation:`vertical`,title:m.reorderField.value,canMove:(e,t)=>!!de.get(e)&&!!de.get(t)&&i.get(e)?.parentId===i.get(t)?.parentId,onMove:(e,t)=>{let n=de.get(e),r=de.get(t);n&&r&&ue(n.parentKeyPath,n.childKey,r.childKey)}}),me=e=>!oe&&de.get(e.id)!==void 0,he=l(()=>se.map(e=>e.label),[se]),ge=l(()=>XG(r,re,c),[r,re,c]),_e=n(e=>F(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),ve=n((e,t)=>L({rowId:e,cellKey:t}),[]),ye=n(()=>L(void 0),[]),be=e=>{let t=le.findIndex(t=>t.type===`row`&&t.row.id===e.rowId),n=i.get(e.rowId)?.isLocalized?re.indexOf(e.cellKey):0;y.current?.querySelector(`[data-grid-position="${t}:${n}"]`)?.focus()},xe=()=>{let e=document.activeElement?.dataset.gridPosition,t;if(e){let{rowIndex:n,columnIndex:r}=bK(e),i=le[n];i?.type===`row`&&(t={rowId:i.row.id,cellKey:i.row.isLocalized?re[r]??`*`:`*`})}let n=yK(B,re,u,t);n&&be(n)},Se=e=>{y.current&&vY(y.current,e)},Ce=e=>{e.target===e.currentTarget&&e.currentTarget.querySelector(`[data-grid-position]`)?.focus()},we=I?i.get(I.rowId):void 0,Te=`minmax(14rem, 20rem) repeat(${re.length}, minmax(14rem, 1fr))`,Ee=e=>{let t=d([e]),n=s.has(e);return R(`div`,{role:`columnheader`,className:G(`flex max-w-xl items-center gap-1.5 px-3 py-2.5 text-xs`,n&&`opacity-60`),title:n?m.lockedTooltip.value:void 0,children:[R(`span`,{className:`font-mono font-semibold`,dir:`ltr`,children:e.toUpperCase()}),R(`span`,{className:`truncate text-neutral`,children:Tr(e,h)}),e===o&&R(_R,{color:`neutral`,size:`xs`,className:`px-1.5 text-[10px]`,children:m.sourceLocale}),n&&R(Zs,{className:`size-3 shrink-0 text-neutral`}),t.length>0&&R(X,{label:`${m.translateColumn.value} (${e.toUpperCase()})`,title:m.translateColumn.value,Icon:Tc,iconClassName:`size-3.5`,variant:`none`,color:`custom`,size:`custom`,roundedSize:`sm`,disabled:p,onClick:()=>f(t),className:G(`ms-auto p-0.5`,`hover:bg-text/10`,`text-text`)})]},e)},De=(e,t)=>{let n=e.kind===`group`,r=ie.has(e.id)&&!oe,i=e.isLocalized?z:`*`;return R(`div`,{role:`row`,className:`relative flex flex-col gap-2 border-neutral/10 border-b py-3`,style:zK(e.depth),children:[R(VK,{depth:e.depth}),R(`div`,{className:`flex min-w-0 items-center gap-1.5 pe-2`,children:[n&&R(X,{label:m.toggleCollapse(r).value,Icon:Ts,iconClassName:G(`size-3.5 transition-transform`,!r&&`rotate-90`),variant:`none`,color:`neutral`,size:`custom`,className:`hover:text-text`,onClick:()=>_e(e.id)}),R(`button`,{type:`button`,dir:`ltr`,title:e.id,onClick:()=>ve(e.id,i),className:G(`min-w-0 cursor-pointer break-words text-start text-sm hover:underline`,n&&`font-semibold`),children:xK(e.label)}),R(NK,{row:e})]}),!n&&e.cells[i]&&R(AK,{row:e,cellKey:i,position:`${t}:0`,onOpenEditor:ve})]},e.id)},Oe=R(`p`,{className:`p-6 text-center text-neutral text-sm`,children:m.noResults});return R(`div`,{ref:_,className:G(`flex h-full min-h-0 w-full min-w-0 flex-col gap-6`,e),children:[!(v&&we)&&R(`div`,{className:`flex flex-col gap-4`,children:[R(mY,{dictionaryKey:t.dictionary.key,keyPath:E??[],onClickKeyPath:T}),R(tY,{query:D,onQueryChange:O,statusFilter:k,onStatusFilterChange:A,statusCounts:ge,localeKeys:re,onJumpToMissing:xe,isNarrow:v})]}),v?we&&I?R(GK,{row:we,cellKey:I.cellKey,isNarrow:!0,onClose:ye}):R(C,{children:[R(Z,{value:z,onValueChange:te,children:[R(Z.Trigger,{"aria-label":m.locale.value,children:R(Z.Value,{})}),R(Z.Content,{children:a.map(e=>R(Z.Item,{value:e,children:R(`span`,{className:`flex items-center gap-1.5`,children:[Tr(e,h),s.has(e)&&R(Zs,{className:`size-3 text-neutral`})]})},e))})]}),R(`div`,{ref:y,role:`grid`,tabIndex:0,"aria-label":t.dictionary.key,onKeyDown:Se,onFocus:Ce,className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:le.length===0?Oe:le.map((e,t)=>e.type===`row`?De(e.row,t):R(WK,{addLine:e.addLine,rootKeys:he},`add-${e.addLine.parentRow?.id??`root`}`))})]}):R(`div`,{className:`flex min-h-0 flex-1 gap-3`,children:[R(`div`,{ref:y,role:`grid`,tabIndex:0,"aria-label":t.dictionary.key,"aria-colcount":re.length+1,onKeyDown:Se,onFocus:Ce,className:`min-h-0 min-w-0 flex-1 overflow-auto`,children:R(`div`,{className:`w-max min-w-full`,children:[R(`div`,{role:`row`,className:`sticky top-0 z-20 grid min-w-full border-neutral/10 border-b bg-background`,style:{gridTemplateColumns:Te},children:[R(`div`,{role:`columnheader`,className:G(BK,`z-30 items-center ps-4 text-neutral text-xs`),children:m.fieldColumn}),re.map(Ee)]}),le.length===0?Oe:le.map((e,t)=>e.type===`row`?R(HK,{row:e.row,localeKeys:re,rowIndex:t,gridTemplateColumns:Te,isCollapsed:ie.has(e.row.id)&&!oe,isFocused:I?.rowId===e.row.id,onToggleCollapse:_e,onOpenEditor:ve,dragHandleProps:me(e.row)?fe(e.row.id):void 0,dropZoneProps:me(e.row)?pe(e.row.id):void 0},e.row.id):R(WK,{addLine:e.addLine,gridTemplateColumns:Te,rootKeys:he},`add-${e.addLine.parentRow?.id??`root`}`))]})}),we&&I&&R(`div`,{className:`flex min-h-0 w-[28rem] max-w-[45%] shrink-0 flex-col overflow-hidden rounded-2xl border border-neutral/20`,children:R(GK,{row:we,cellKey:I.cellKey,isNarrow:!1,onClose:ye})})]})]})},bY=/^ {0,3}(#{1,6})[ \t]+(.+?)[ \t#]*$/,xY=/^ {0,3}(```|~~~)/,SY=/[*_`~]|\[([^\]]*)\]\([^)]*\)/g,CY=e=>{let t=e.split(/\r?\n/),n=[],r,i=0;if(t[0]?.trim()===`---`){let e=t.findIndex((e,t)=>t>0&&e.trim()===`---`);e>0&&(i=e+1)}for(let e=i;e<t.length;e++){let i=t[e]??``,a=xY.exec(i)?.[1];if(a){r?r===a&&(r=void 0):r=a;continue}if(r)continue;let o=bY.exec(i);if(!o)continue;let s=(o[2]??``).replace(SY,(e,t)=>t??``).trim();s&&n.push({level:o[1]?.length??1,text:s,lineIndex:e})}return n},wY=e=>e.replace(/```[\s\S]*?```/g,` `).replace(/[#>*_`~|[\]()-]/g,` `).split(/\s+/).filter(e=>/[\p{L}\p{N}]/u.test(e)).length,TY=/^---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,EY=e=>{let t=TY.exec(e)?.[0]??``;return{frontMatter:t,body:e.slice(t.length)}},DY={key:`markdown-document`,content:{nodeType:`translation`,translation:{en:{editMode:`Edit`,rawMode:`Raw`,previewMode:`Preview`,outline:`Outline`,noHeadings:`No headings yet`,frontMatter:`Front matter`,compareWithSource:`Compare with source`,completionStatus:{nodeType:`condition`,condition:{true:`Missing`,false:`Complete`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} words`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Source · {{locale}}`}},"en-GB":{editMode:`Edit`,rawMode:`Raw`,previewMode:`Preview`,outline:`Outline`,noHeadings:`No headings yet`,frontMatter:`Front matter`,compareWithSource:`Compare with source`,completionStatus:{nodeType:`condition`,condition:{true:`Missing`,false:`Complete`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} words`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Source · {{locale}}`}},fr:{editMode:`Éditer`,rawMode:`Brut`,previewMode:`Aperçu`,outline:`Plan`,noHeadings:`Aucun titre pour le moment`,frontMatter:`Métadonnées (front matter)`,compareWithSource:`Comparer avec la source`,completionStatus:{nodeType:`condition`,condition:{true:`Manquant`,false:`Complet`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} mots`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Source · {{locale}}`}},es:{editMode:`Editar`,rawMode:`Sin formato`,previewMode:`Vista previa`,outline:`Esquema`,noHeadings:`Aún no hay títulos`,frontMatter:`Metadatos (front matter)`,compareWithSource:`Comparar con el origen`,completionStatus:{nodeType:`condition`,condition:{true:`Falta`,false:`Completo`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} palabras`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Origen · {{locale}}`}},de:{editMode:`Bearbeiten`,rawMode:`Roh`,previewMode:`Vorschau`,outline:`Gliederung`,noHeadings:`Noch keine Überschriften`,frontMatter:`Front Matter`,compareWithSource:`Mit Quelle vergleichen`,completionStatus:{nodeType:`condition`,condition:{true:`Fehlt`,false:`Vollständig`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} Wörter`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Quelle · {{locale}}`}},ja:{editMode:`編集`,rawMode:`ソース`,previewMode:`プレビュー`,outline:`アウトライン`,noHeadings:`見出しはまだありません`,frontMatter:`フロントマター`,compareWithSource:`ソースと比較`,completionStatus:{nodeType:`condition`,condition:{true:`未入力`,false:`完了`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} 語`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`ソース · {{locale}}`}},ko:{editMode:`편집`,rawMode:`원본`,previewMode:`미리 보기`,outline:`개요`,noHeadings:`아직 제목이 없습니다`,frontMatter:`프런트 매터`,compareWithSource:`원본과 비교`,completionStatus:{nodeType:`condition`,condition:{true:`누락`,false:`완료`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}}단어`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`원본 · {{locale}}`}},zh:{editMode:`编辑`,rawMode:`源码`,previewMode:`预览`,outline:`大纲`,noHeadings:`暂无标题`,frontMatter:`前置元数据`,compareWithSource:`与源语言对比`,completionStatus:{nodeType:`condition`,condition:{true:`缺失`,false:`完成`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} 个词`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`源语言 · {{locale}}`}},it:{editMode:`Modifica`,rawMode:`Sorgente`,previewMode:`Anteprima`,outline:`Struttura`,noHeadings:`Ancora nessun titolo`,frontMatter:`Front matter`,compareWithSource:`Confronta con la sorgente`,completionStatus:{nodeType:`condition`,condition:{true:`Mancante`,false:`Completo`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} parole`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Sorgente · {{locale}}`}},pt:{editMode:`Editar`,rawMode:`Bruto`,previewMode:`Pré-visualizar`,outline:`Estrutura`,noHeadings:`Nenhum título ainda`,frontMatter:`Front matter`,compareWithSource:`Comparar com a origem`,completionStatus:{nodeType:`condition`,condition:{true:`Ausente`,false:`Completo`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} palavras`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Origem · {{locale}}`}},hi:{editMode:`संपादित करें`,rawMode:`कच्चा`,previewMode:`पूर्वावलोकन`,outline:`रूपरेखा`,noHeadings:`अभी कोई शीर्षक नहीं`,frontMatter:`फ्रंट मैटर`,compareWithSource:`स्रोत से तुलना करें`,completionStatus:{nodeType:`condition`,condition:{true:`अनुपलब्ध`,false:`पूर्ण`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} शब्द`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`स्रोत · {{locale}}`}},ar:{editMode:`تحرير`,rawMode:`خام`,previewMode:`معاينة`,outline:`المخطط`,noHeadings:`لا توجد عناوين بعد`,frontMatter:`البيانات الأمامية`,compareWithSource:`قارن مع المصدر`,completionStatus:{nodeType:`condition`,condition:{true:`مفقود`,false:`مكتمل`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} كلمة`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`المصدر · {{locale}}`}},ru:{editMode:`Редактировать`,rawMode:`Исходник`,previewMode:`Предпросмотр`,outline:`Структура`,noHeadings:`Заголовков пока нет`,frontMatter:`Front matter`,compareWithSource:`Сравнить с исходником`,completionStatus:{nodeType:`condition`,condition:{true:`Отсутствует`,false:`Готово`}},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`Слов: {{count}}`},sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Исходник · {{locale}}`}}}},title:`Markdown document`,description:`Labels of the document mode of the dictionary editor, used for markdown (.content.md) dictionaries: view modes, outline, word count and front matter.`,tags:[`component`,`dictionary`,`markdown`,`design system`],location:`local`,localId:`markdown-document::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/ContentGrid/markdownDocument.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/ContentGrid/markdownDocument.content.mjs`};T();var OY=w(()=>kn(()=>import(`./MarkdownEditor-BSbSD-tQ.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([3,2,4,1]))),kY=w(()=>kn(()=>import(`./MarkDownRender-HV9SKc56.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2]))),AY=e=>typeof e==`string`?e:JSON.stringify(e),jY=()=>{let{rows:e,dictionary:t,sourceLocale:n,getStatus:r,setCellValue:i}=oK(),{selectedLocales:a}=ej(),o=V(DY),[s,c]=N(`edit`),[u,d]=N(!1),f=P(null),p=e.find(e=>e.kind===`leaf`),m=l(()=>{if(!p)return[];if(!p.isLocalized)return[`*`];let e=a.map(String).filter(e=>p.cells[e]);return e.length>0?e:Object.keys(p.cells)},[p,a]),[h,g]=N(),_=h&&m.includes(h)?h:m[0]??`*`,{frontMatter:v,body:y}=EY(String(p?.cells[_]?.value??``)),{body:b}=EY(String(p?.cells[n]?.value??``)),x=l(()=>CY(y),[y]),S=l(()=>wY(y),[y]),C=t.content?.metadata,w=!!p?.isLocalized&&_!==n,T=w&&u,E=[{content:o.editMode.value,value:`edit`},{content:o.rawMode.value,value:`raw`},{content:o.previewMode.value,value:`preview`}],D=e=>{Array.from(f.current?.querySelectorAll(`h1, h2, h3, h4, h5, h6`)??[]).find(t=>t.textContent?.trim()===e)?.scrollIntoView({behavior:`smooth`,block:`start`})};if(!p)return null;let k=e=>i(p,_,`${v}${e}`);return R(`div`,{className:`flex w-full flex-col gap-4`,children:[R(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[p.isLocalized?R(`div`,{className:`min-w-0 overflow-x-auto`,children:R(QJ,{selectedChoice:_,hoverable:!0,color:`text`,tabs:m.map(e=>{let t=r(p,e)===`missing`;return R(`button`,{type:`button`,"data-active":e===_,onClick:()=>g(e),title:o.completionStatus(t).value,className:`flex cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1 font-mono text-sm`,children:[R(`span`,{"aria-hidden":!0,className:G(`inline-block size-2 rounded-full`,t?`border border-error`:`bg-text`)}),e]},e)})})}):R(`span`,{}),R(`div`,{className:`flex items-center gap-2`,children:[w&&R(X,{label:o.compareWithSource.value,Icon:js,variant:u?`default`:`hoverable`,color:`text`,size:`icon-sm`,"aria-pressed":u,onClick:()=>d(e=>!e)}),R(Wk,{choices:E,value:s,onChange:c,color:`text`,size:`sm`})]})]}),R(`div`,{className:`flex w-full gap-6`,children:[R(`aside`,{className:`sticky top-4 @4xl:flex hidden max-h-[70vh] w-52 shrink-0 flex-col gap-2 self-start overflow-y-auto`,children:[R(`span`,{className:`font-semibold text-muted-foreground text-xs uppercase`,children:o.outline}),x.length===0?R(`span`,{className:`text-muted-foreground text-xs`,children:o.noHeadings}):R(`ul`,{className:`flex flex-col gap-0.5`,children:x.map(e=>R(`li`,{children:R(`button`,{type:`button`,dir:`auto`,onClick:()=>D(e.text),style:{paddingInlineStart:`${(e.level-1)*12}px`},className:`w-full cursor-pointer truncate rounded-md py-0.5 text-start text-sm hover:bg-text/5`,children:e.text})},`${e.lineIndex}-${e.text}`))}),R(`span`,{className:`mt-2 text-muted-foreground text-xs`,children:o.wordCount({count:S})})]}),R(`div`,{className:G(`grid min-w-0 flex-1 gap-6`,T&&`@3xl:grid-cols-2`),children:[T&&R(bA,{border:!0,background:`none`,roundedSize:`2xl`,className:`flex flex-col gap-3 p-6 opacity-80`,children:[R(`span`,{className:`font-mono text-muted-foreground text-xs`,children:o.sourceLabel({locale:n})}),R(`div`,{dir:`auto`,className:`text-base leading-relaxed`,children:R(O,{fallback:R(wk,{}),children:R(kY,{children:b})})})]}),R(`div`,{ref:f,dir:`auto`,className:`mx-auto flex w-full max-w-3xl flex-col gap-2 text-base leading-relaxed`,children:[R(O,{fallback:R(wk,{}),children:[s===`edit`&&R(OY,{defaultValue:y,onChange:k},_),s===`raw`&&R(eA,{value:y,onChange:e=>k(e.currentTarget.value),className:`font-mono text-sm`,"aria-label":o.rawMode.value},_),s===`preview`&&R(kY,{children:y})]}),R(`span`,{className:`@4xl:hidden text-muted-foreground text-xs`,children:o.wordCount({count:S})})]})]})]}),C&&Object.keys(C).length>0&&R(Ok,{header:R(`span`,{className:`text-muted-foreground text-sm`,children:o.frontMatter}),label:o.frontMatter.value,children:R(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 px-2 py-2 font-mono text-xs`,children:Object.entries(C).map(([e,t])=>R(`div`,{className:`contents`,children:[R(`dt`,{className:`text-muted-foreground`,children:e}),R(`dd`,{dir:`auto`,className:`truncate`,children:AY(t)})]},e))})})]})};T();var MY=()=>i(aK),NY={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`},contentTab:`Content`,detailsTab:`Details`,viewSwitcherLabel:`Editor view`,gridView:`Grid`,treeView:`Tree`,structureView:`Structure`,jsonView:`JSON`,documentView:`Document`},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`},contentTab:`Content`,detailsTab:`Details`,viewSwitcherLabel:`Editor view`,gridView:`Grid`,treeView:`Tree`,structureView:`Structure`,jsonView:`JSON`,documentView:`Document`},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`},contentTab:`Contenu`,detailsTab:`Détails`,viewSwitcherLabel:`Vue de l'éditeur`,gridView:`Grille`,treeView:`Arbre`,structureView:`Structure`,jsonView:`JSON`,documentView:`Document`},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`},contentTab:`Contenido`,detailsTab:`Detalles`,viewSwitcherLabel:`Vista del editor`,gridView:`Cuadrícula`,treeView:`Árbol`,structureView:`Estructura`,jsonView:`JSON`,documentView:`Documento`},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`},contentTab:`Inhalt`,detailsTab:`Details`,viewSwitcherLabel:`Editoransicht`,gridView:`Raster`,treeView:`Baum`,structureView:`Struktur`,jsonView:`JSON`,documentView:`Dokument`},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`},contentTab:`コンテンツ`,detailsTab:`詳細`,viewSwitcherLabel:`エディタービュー`,gridView:`グリッド`,treeView:`ツリー`,structureView:`構造`,jsonView:`JSON`,documentView:`ドキュメント`},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`},contentTab:`콘텐츠`,detailsTab:`세부 정보`,viewSwitcherLabel:`편집기 보기`,gridView:`그리드`,treeView:`트리`,structureView:`구조`,jsonView:`JSON`,documentView:`문서`},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`},contentTab:`内容`,detailsTab:`详情`,viewSwitcherLabel:`编辑器视图`,gridView:`网格`,treeView:`树`,structureView:`结构`,jsonView:`JSON`,documentView:`文档`},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`},contentTab:`Contenuto`,detailsTab:`Dettagli`,viewSwitcherLabel:`Vista editor`,gridView:`Griglia`,treeView:`Albero`,structureView:`Struttura`,jsonView:`JSON`,documentView:`Documento`},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`},contentTab:`Conteúdo`,detailsTab:`Detalhes`,viewSwitcherLabel:`Visualização do editor`,gridView:`Grade`,treeView:`Árvore`,structureView:`Estrutura`,jsonView:`JSON`,documentView:`Documento`},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`},contentTab:`सामग्री`,detailsTab:`विवरण`,viewSwitcherLabel:`संपादक दृश्य`,gridView:`ग्रिड`,treeView:`ट्री`,structureView:`संरचना`,jsonView:`JSON`,documentView:`दस्तावेज़`},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`},contentTab:`المحتوى`,detailsTab:`التفاصيل`,viewSwitcherLabel:`عرض المحرر`,gridView:`شبكة`,treeView:`شجرة`,structureView:`البنية`,jsonView:`JSON`,documentView:`مستند`},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`},contentTab:`Содержимое`,detailsTab:`Детали`,viewSwitcherLabel:`Вид редактора`,gridView:`Сетка`,treeView:`Дерево`,structureView:`Структура`,jsonView:`JSON`,documentView:`Документ`}}},title:`Dictionary field editor`,description:`Content declaration for the dictionary field editor component, including labels and texts used for navigation to the dictionary list.`,tags:[`component`,`dictionary`,`design system`],location:`local`,localId:`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`};T();var PY=(e,t=2e3,n,r)=>{let[i,a]=N(!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))}}}},FY=({text:e,children:t,className:n,"aria-label":r=`Copy to clipboard`,"aria-copied-label":i=`Copied to clipboard`,feedbackDuration:a=2e3,onCopySuccess:o,onCopyError:s,disable:c,preventDefault:l=!0,stopPropagation:u=!0,size:d=14})=>{let{isCopied:f,copy:p}=PY(e,a,o,s);if(c)return R(`span`,{className:n,children:t});let m=e=>{(e.key===`Enter`||e.key===` `)&&h(e)},h=e=>{l&&e.preventDefault(),u&&e.stopPropagation(),p()},g=f?i:r,_=f?Ns:Fs;return R(`span`,{className:G(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,n),onClick:h,onKeyDown:m,role:`button`,tabIndex:0,"aria-label":g,"aria-pressed":f,"data-testid":`copy-to-clipboard`,children:[R(`span`,{className:`min-w-0 break-all`,children:t}),e&&R(_,{className:`ms-1 ms-auto shrink-0`,size:d,"aria-hidden":`true`})]})},IY={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"},"qualifierSection":{"title":"Qualifier","item":"Item","variant":"Variant","meta":"Meta"},"siblingDictionaries":{"title":"Related dictionaries","noSiblings":"No other dictionaries share this key.","collectionItems":"Collection items","variants":"Variants","metaRecords":"Meta records","itemIndex":"Item"},"typeSwitch":{"label":"Type","description":"The type controls how this dictionary is selected at runtime.","standard":"Standard","collection":"Collection","variant":"Variant","meta":"Dynamic","itemValueLabel":"Item index","itemValuePlaceholder":"e.g. 1","variantValueLabel":"Variant name","variantValuePlaceholder":"e.g. default","metaValueLabel":"Meta fields (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"Invalid JSON. Please fix before saving.","disablePickerTitle":"Sibling dictionaries with qualifiers","disablePickerDescription":"The following sibling dictionaries still have qualifiers. Navigate to each to update their type."},"auditButton":{"label":"Audit","popover":"Use AI to generate and review fields"}},"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"},"qualifierSection":{"title":"Qualifier","item":"Item","variant":"Variant","meta":"Meta"},"siblingDictionaries":{"title":"Related dictionaries","noSiblings":"No other dictionaries share this key.","collectionItems":"Collection items","variants":"Variants","metaRecords":"Meta records","itemIndex":"Item"},"typeSwitch":{"label":"Type","description":"The type controls how this dictionary is selected at runtime.","standard":"Standard","collection":"Collection","variant":"Variant","meta":"Dynamic","itemValueLabel":"Item index","itemValuePlaceholder":"e.g. 1","variantValueLabel":"Variant name","variantValuePlaceholder":"e.g. default","metaValueLabel":"Meta fields (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"Invalid JSON. Please fix before saving.","disablePickerTitle":"Sibling dictionaries with qualifiers","disablePickerDescription":"The following sibling dictionaries still have qualifiers. Navigate to each to update their type."},"auditButton":{"label":"Audit","popover":"Use AI to generate and review fields"}},"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"},"qualifierSection":{"title":"Qualificateur","item":"Élément","variant":"Variante","meta":"Méta"},"siblingDictionaries":{"title":"Dictionnaires liés","noSiblings":"Aucun autre dictionnaire ne partage cette clé.","collectionItems":"Éléments de collection","variants":"Variantes","metaRecords":"Enregistrements méta","itemIndex":"Élément"},"typeSwitch":{"label":"Type","description":"Le type contrôle comment ce dictionnaire est sélectionné à l'exécution.","standard":"Standard","collection":"Collection","variant":"Variante","meta":"Dynamique","itemValueLabel":"Index de l'élément","itemValuePlaceholder":"ex. 1","variantValueLabel":"Nom de variante","variantValuePlaceholder":"ex. défaut","metaValueLabel":"Champs méta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mon-enregistrement\\" }","variantJsonError":"JSON invalide. Veuillez corriger avant de sauvegarder.","disablePickerTitle":"Dictionnaires frères avec qualificateurs","disablePickerDescription":"Les dictionnaires frères suivants ont encore des qualificateurs. Naviguez vers chacun d'eux pour mettre à jour leur type."},"auditButton":{"label":"Auditer","popover":"Utiliser l'IA pour générer et réviser les champs"}},"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"},"qualifierSection":{"title":"Calificador","item":"Elemento","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Diccionarios relacionados","noSiblings":"Ningún otro diccionario comparte esta clave.","collectionItems":"Elementos de colección","variants":"Variantes","metaRecords":"Registros meta","itemIndex":"Elemento"},"typeSwitch":{"label":"Tipo","description":"El tipo controla cómo se selecciona este diccionario en tiempo de ejecución.","standard":"Estándar","collection":"Colección","variant":"Variante","meta":"Dinámico","itemValueLabel":"Índice del elemento","itemValuePlaceholder":"ej. 1","variantValueLabel":"Nombre de variante","variantValuePlaceholder":"ej. predeterminado","metaValueLabel":"Campos meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mi-registro\\" }","variantJsonError":"JSON no válido. Por favor, corrija antes de guardar.","disablePickerTitle":"Diccionarios hermanos con calificadores","disablePickerDescription":"Los siguientes diccionarios hermanos todavía tienen calificadores. Navegue a cada uno para actualizar su tipo."},"auditButton":{"label":"Auditar","popover":"Usa IA para generar y revisar campos"}},"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"},"qualifierSection":{"title":"Qualifikator","item":"Element","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Verwandte Wörterbücher","noSiblings":"Kein anderes Wörterbuch verwendet denselben Schlüssel.","collectionItems":"Sammlungselemente","variants":"Varianten","metaRecords":"Meta-Datensätze","itemIndex":"Element"},"typeSwitch":{"label":"Typ","description":"Der Typ steuert, wie dieses Wörterbuch zur Laufzeit ausgewählt wird.","standard":"Standard","collection":"Sammlung","variant":"Variante","meta":"Dynamisch","itemValueLabel":"Elementindex","itemValuePlaceholder":"z.B. 1","variantValueLabel":"Variantenname","variantValuePlaceholder":"z.B. Standard","metaValueLabel":"Meta-Felder (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mein-eintrag\\" }","variantJsonError":"Ungültiges JSON. Bitte vor dem Speichern korrigieren.","disablePickerTitle":"Geschwister-Wörterbücher mit Qualifikatoren","disablePickerDescription":"Die folgenden Geschwister-Wörterbücher haben noch Qualifikatoren. Navigieren Sie zu jedem, um seinen Typ zu aktualisieren."},"auditButton":{"label":"Prüfen","popover":"KI verwenden, um Felder zu generieren und zu überprü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":"辞書のファイルパスを入力してください"},"qualifierSection":{"title":"修飾子","item":"項目","variant":"バリアント","meta":"メタ"},"siblingDictionaries":{"title":"関連辞書","noSiblings":"他の辞書はこのキーを共有していません。","collectionItems":"コレクション項目","variants":"バリアント","metaRecords":"メタレコード","itemIndex":"項目"},"typeSwitch":{"label":"タイプ","description":"タイプは実行時にこの辞書がどのように選択されるかを制御します。","standard":"スタンダード","collection":"コレクション","variant":"バリアント","meta":"ダイナミック","itemValueLabel":"要素インデックス","itemValuePlaceholder":"例: 1","variantValueLabel":"バリアント名","variantValuePlaceholder":"例: default","metaValueLabel":"メタフィールド(JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"無効なJSONです。保存する前に修正してください。","disablePickerTitle":"修飾子を持つ兄弟辞書","disablePickerDescription":"次の兄弟辞書にはまだ修飾子があります。それぞれに移動してタイプを更新してください。"},"auditButton":{"label":"監査","popover":"AIを使用してフィールドを生成および確認"}},"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":"사전의 파일 경로를 입력하세요"},"qualifierSection":{"title":"한정자","item":"항목","variant":"변형","meta":"메타"},"siblingDictionaries":{"title":"관련 사전","noSiblings":"이 키를 공유하는 다른 사전이 없습니다.","collectionItems":"컬렉션 항목","variants":"변형","metaRecords":"메타 레코드","itemIndex":"항목"},"typeSwitch":{"label":"유형","description":"유형은 런타임에 이 사전이 선택되는 방식을 제어합니다.","standard":"표준","collection":"컬렉션","variant":"변형","meta":"동적","itemValueLabel":"항목 인덱스","itemValuePlaceholder":"예: 1","variantValueLabel":"변형 이름","variantValuePlaceholder":"예: default","metaValueLabel":"메타 필드 (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"잘못된 JSON입니다. 저장하기 전에 수정하세요.","disablePickerTitle":"한정자가 있는 형제 사전","disablePickerDescription":"다음 형제 사전에는 아직 한정자가 있습니다. 각각으로 이동하여 유형을 업데이트하세요."},"auditButton":{"label":"감사","popover":"AI를 사용하여 필드 생성 및 검토"}},"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":"输入字典的文件路径"},"qualifierSection":{"title":"限定符","item":"项目","variant":"变体","meta":"元"},"siblingDictionaries":{"title":"相关字典","noSiblings":"没有其他字典共享此键。","collectionItems":"集合项","variants":"变体","metaRecords":"元记录","itemIndex":"项目"},"typeSwitch":{"label":"类型","description":"类型控制此字典在运行时的选择方式。","standard":"标准","collection":"集合","variant":"变体","meta":"动态","itemValueLabel":"项目索引","itemValuePlaceholder":"例如 1","variantValueLabel":"变体名称","variantValuePlaceholder":"例如 default","metaValueLabel":"元字段 (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"无效的JSON。请在保存前修复。","disablePickerTitle":"具有限定符的兄弟字典","disablePickerDescription":"以下兄弟字典仍有限定符。导航到每个字典以更新其类型。"},"auditButton":{"label":"审核","popover":"使用 AI 生成并审核字段"}},"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"},"qualifierSection":{"title":"Qualificatore","item":"Elemento","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Dizionari correlati","noSiblings":"Nessun altro dizionario condivide questa chiave.","collectionItems":"Elementi di raccolta","variants":"Varianti","metaRecords":"Record meta","itemIndex":"Elemento"},"typeSwitch":{"label":"Tipo","description":"Il tipo controlla come questo dizionario viene selezionato in fase di esecuzione.","standard":"Standard","collection":"Raccolta","variant":"Variante","meta":"Dinamico","itemValueLabel":"Indice elemento","itemValuePlaceholder":"es. 1","variantValueLabel":"Nome variante","variantValuePlaceholder":"es. predefinito","metaValueLabel":"Campi meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mio-record\\" }","variantJsonError":"JSON non valido. Correggere prima di salvare.","disablePickerTitle":"Dizionari fratelli con qualificatori","disablePickerDescription":"I seguenti dizionari fratelli hanno ancora qualificatori. Naviga verso ognuno per aggiornare il loro tipo."},"auditButton":{"label":"Controllare","popover":"Usa l'IA per generare e revisionare i campi"}},"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"},"qualifierSection":{"title":"Qualificador","item":"Item","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Dicionários relacionados","noSiblings":"Nenhum outro dicionário compartilha esta chave.","collectionItems":"Itens de coleção","variants":"Variantes","metaRecords":"Registros meta","itemIndex":"Item"},"typeSwitch":{"label":"Tipo","description":"O tipo controla como este dicionário é selecionado em tempo de execução.","standard":"Padrão","collection":"Coleção","variant":"Variante","meta":"Dinâmico","itemValueLabel":"Índice do item","itemValuePlaceholder":"ex. 1","variantValueLabel":"Nome da variante","variantValuePlaceholder":"ex. padrão","metaValueLabel":"Campos meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"meu-registro\\" }","variantJsonError":"JSON inválido. Por favor, corrija antes de salvar.","disablePickerTitle":"Dicionários irmãos com qualificadores","disablePickerDescription":"Os seguintes dicionários irmãos ainda têm qualificadores. Navegue para cada um para atualizar seu tipo."},"auditButton":{"label":"Auditar","popover":"Use IA para gerar e revisar campos"}},"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":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"qualifierSection":{"title":"क्वालीफायर","item":"आइटम","variant":"वेरिएंट","meta":"मेटा"},"siblingDictionaries":{"title":"संबंधित शब्दकोश","noSiblings":"कोई अन्य शब्दकोश इस कुंजी को साझा नहीं करता।","collectionItems":"संग्रह आइटम","variants":"वेरिएंट","metaRecords":"मेटा रिकॉर्ड","itemIndex":"आइटम"},"typeSwitch":{"label":"प्रकार","description":"प्रकार नियंत्रित करता है कि रनटाइम पर यह शब्दकोश कैसे चुना जाता है।","standard":"मानक","collection":"संग्रह","variant":"वेरिएंट","meta":"डायनामिक","itemValueLabel":"आइटम इंडेक्स","itemValuePlaceholder":"उदा. 1","variantValueLabel":"वेरिएंट नाम","variantValuePlaceholder":"उदा. default","metaValueLabel":"मेटा फ़ील्ड (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"अमान्य JSON। सहेजने से पहले कृपया ठीक करें।","disablePickerTitle":"क्वालीफायर के साथ सिब्लिंग शब्दकोश","disablePickerDescription":"निम्नलिखित सिब्लिंग शब्दकोशों में अभी भी क्वालीफायर हैं। प्रत्येक में जाकर उनका प्रकार अपडेट करें।"},"auditButton":{"label":"ऑडिट","popover":"फ़ील्ड उत्पन्न और समीक्षा करने के लिए AI का उपयोग करें"}},"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":"أدخل مسار ملف القاموس الخاص بك"},"qualifierSection":{"title":"المؤهل","item":"عنصر","variant":"نوع","meta":"بيانات وصفية"},"siblingDictionaries":{"title":"القواميس ذات الصلة","noSiblings":"لا توجد قواميس أخرى تشترك في هذا المفتاح.","collectionItems":"عناصر المجموعة","variants":"الأنواع","metaRecords":"سجلات البيانات الوصفية","itemIndex":"عنصر"},"typeSwitch":{"label":"النوع","description":"يتحكم النوع في كيفية تحديد هذا القاموس في وقت التشغيل.","standard":"قياسي","collection":"مجموعة","variant":"نوع","meta":"ديناميكي","itemValueLabel":"مؤشر العنصر","itemValuePlaceholder":"مثال: 1","variantValueLabel":"اسم النوع","variantValuePlaceholder":"مثال: افتراضي","metaValueLabel":"حقول البيانات الوصفية (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"JSON غير صالح. يرجى الإصلاح قبل الحفظ.","disablePickerTitle":"قواميس مرتبطة مع المؤهلات","disablePickerDescription":"لا تزال القواميس المرتبطة التالية تحتوي على مؤهلات. انتقل إلى كل منها لتحديث نوعه."},"auditButton":{"label":"التدقيق","popover":"استخدم الذكاء الاصطناعي لإنشاء الحقول ومراجعتها"}},"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":"Введите путь к файлу вашего словаря"},"qualifierSection":{"title":"Квалификатор","item":"Элемент","variant":"Вариант","meta":"Мета"},"siblingDictionaries":{"title":"Связанные словари","noSiblings":"Никакие другие словари не используют этот ключ.","collectionItems":"Элементы коллекции","variants":"Варианты","metaRecords":"Мета-записи","itemIndex":"Элемент"},"typeSwitch":{"label":"Тип","description":"Тип управляет тем, как этот словарь выбирается во время выполнения.","standard":"Стандартный","collection":"Коллекция","variant":"Вариант","meta":"Динамический","itemValueLabel":"Индекс элемента","itemValuePlaceholder":"напр. 1","variantValueLabel":"Название варианта","variantValuePlaceholder":"напр. default","metaValueLabel":"Мета-поля (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"Недопустимый JSON. Пожалуйста, исправьте перед сохранением.","disablePickerTitle":"Связанные словари с квалификаторами","disablePickerDescription":"Следующие связанные словари всё ещё имеют квалификаторы. Перейдите к каждому, чтобы обновить его тип."},"auditButton":{"label":"Отслеживание","popover":"Использовать ИИ для генерации и проверки полей"}}}}`),title:`Dictionary details form`,description:`Form labels, placeholders and descriptions for editing the details of a dictionary, including title, key, description, projects, and tags. Used in the dictionary editor component to guide users in defining dictionary metadata.`,tags:[`form content`,`dictionary editor`,`metadata input`],location:`local`,localId:`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`},LY=e=>R(zV,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:uA,...e}),RY=e=>R(zV,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:nA,...e}),zY=Hc(`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-foreground-opposite/80 rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl after:absolute after:-inset-2 after:content-['']`,{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:{neutral:`border-neutral/30 text-muted-foreground 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-foreground ring-text/20 checked:border-text checked:bg-text`,"text-inverse":`border-text-inverse/30 text-foreground-inverse ring-text-inverse/20 checked:border-text-inverse checked:bg-text-inverse`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`text`,validationStyleEnabled:`disabled`,size:`md`}}),BY=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>R(`input`,{type:`checkbox`,className:G(zY({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),VY=e=>{let{label:t,name:n,id:r}=e;return t?R(`label`,{htmlFor:r??n,className:G(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[R(BY,{id:r??n,...e}),t]}):R(BY,{id:r??n,...e})},HY={key:`pagination`,content:{nodeType:`translation`,translation:{en:{numberItemsSelector:`Items per page`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Showing {{start}} to {{end}} of {{total}} results`},selectPageSize:`Select page size`,goToNextPage:`Go to next page`,goToPreviousPage:`Go to previous page`},"en-GB":{numberItemsSelector:`Items per page`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Showing {{start}} to {{end}} of {{total}} results`},selectPageSize:`Select page size`,goToNextPage:`Go to next page`,goToPreviousPage:`Go to previous page`},fr:{numberItemsSelector:`Eléments par page`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Afficher {{start}} à {{end}} de {{total}} résultats`},selectPageSize:`Sélectionner la taille de la page`,goToNextPage:`Aller à la page suivante`,goToPreviousPage:`Aller à la page précédente`},es:{numberItemsSelector:`Items por página`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Mostrando {{start}} a {{end}} de {{total}} resultados`},selectPageSize:`Seleccionar tamaño de página`,goToNextPage:`Ir a la página siguiente`,goToPreviousPage:`Ir a la página anterior`},de:{numberItemsSelector:`Items pro Seite`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Zeigt {{start}} bis {{end}} von {{total}} Ergebnissen`},selectPageSize:`Seitegröße auswählen`,goToNextPage:`Zur nächsten Seite`,goToPreviousPage:`Zur vorherigen Seite`},ja:{numberItemsSelector:`ページあたりのアイテム数`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`{{start}} から {{end}} までの {{total}} 件の結果を表示`},selectPageSize:`ページサイズを選択`,goToNextPage:`次のページに移動`,goToPreviousPage:`前のページに移動`},ko:{numberItemsSelector:`페이지당 아이템 수`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`{{start}} 에서 {{end}} 까지의 {{total}} 개 결과 표시`},selectPageSize:`페이지 크기 선택`,goToNextPage:`다음 페이지로 이동`,goToPreviousPage:`이전 페이지로 이동`},zh:{numberItemsSelector:`每页项目数`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`显示第 {{start}} 到 {{end}} 项,共 {{total}} 个结果`},selectPageSize:`选择页面大小`,goToNextPage:`转到下一页`,goToPreviousPage:`转到上一页`},it:{numberItemsSelector:`Elementi per pagina`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Mostrando {{start}} a {{end}} di {{total}} risultati`},selectPageSize:`Seleziona una dimensione di pagina`,goToNextPage:`Vai alla pagina successiva`,goToPreviousPage:`Vai alla pagina precedente`},pt:{numberItemsSelector:`Itens por página`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Mostrando {{start}} a {{end}} de {{total}} resultados`},selectPageSize:`Selecionar um tamanho de página`,goToNextPage:`Ir para a página seguinte`,goToPreviousPage:`Ir para a página anterior`},hi:{numberItemsSelector:`पृष्ठ पर आइटम्स`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`{{start}} से {{end}} तक के {{total}} परिणाम दिखा रहे हैं`},selectPageSize:`पृष्ठ आकार चुनें`,goToNextPage:`अगली पृष्ठ पर जाएं`,goToPreviousPage:`पिछली पृष्ठ पर जाएं`},ar:{numberItemsSelector:`عدد العناصر لكل صفحة`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`عرض {{start}} إلى {{end}} من {{total}} نتائج`},selectPageSize:`اختر حجم الصفحة`,goToNextPage:`اذهب إلى الصفحة التالية`,goToPreviousPage:`اذهب إلى الصفحة السابقة`},ru:{numberItemsSelector:`Элементов на странице`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Показано {{start}}-{{end}} из {{total}} результатов`},selectPageSize:`Выберите размер страницы`,goToNextPage:`Перейти к следующей странице`,goToPreviousPage:`Перейти к предыдущей странице`}}},title:`Pagination`,description:`Content strings used for the pagination component, including labels for navigating pages and selecting items per page.`,tags:[`pagination`,`component`],location:`local`,localId:`pagination::local::../@intlayer/design-system/dist/esm/components/Pagination/pagination.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/Pagination/pagination.content.mjs`};T();var UY=Hc(`flex items-center justify-center gap-1`,{variants:{size:{sm:`gap-1`,md:`gap-2`,lg:`gap-3`},color:{text:`background-text`,neutral:`background-neutral`},variant:{default:``,bordered:`rounded-lg border border-border p-2`,ghost:`bg-transparent`}},defaultVariants:{size:`md`,variant:`default`}}),WY=(e,t,n)=>{if(t<=n)return Array.from({length:t},(e,t)=>t+1);let r=[],i=Math.floor(n/2);if(r.push(1),e<=i+2){for(let e=2;e<=Math.min(n-1,t-1);e++)r.push(e);t>n&&r.push(`ellipsis`),t>1&&r.push(t)}else if(e>=t-i-1){t>n&&r.push(`ellipsis`);for(let e=Math.max(2,t-n+2);e<=t;e++)r.push(e)}else{r.push(`ellipsis`);let n=e-i,a=e+i;for(let e=n;e<=a;e++)r.push(e);r.push(`ellipsis`),r.push(t)}return r},GY=e=>e?.getAttribute(`aria-current`)===`true`,KY=e=>e===`sm`?`icon-sm`:e===`lg`?`icon-lg`:`icon-md`,qY=e=>R(`div`,{className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/10 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),JY=({currentPage:e,totalPages:t,onPageChange:n,showFirstLast:r=!1,showPrevNext:i=!0,maxVisiblePages:a=5,disabled:o=!1,size:s=`md`,variant:c=`default`,color:l=`text`,className:u,...d})=>{let{goToNextPage:f,goToPreviousPage:p}=V(HY),m=WY(e,t,a),h=KY(s),g=e===1,_=e===t,v=P([]),y=P(null),{choiceIndicatorPosition:b,scheduleMeasurement:x}=Rk(v,{selector:GY,isHoverable:!0});if(M(()=>{let e=setTimeout(()=>{x()},300);return()=>clearTimeout(e)},[e,x]),t<=1)return null;let S=r=>{!o&&r>=1&&r<=t&&r!==e&&n(r)};return R(`div`,{className:G(UY({size:s,variant:c}),u),...d,children:R(`div`,{className:`relative flex items-center gap-1`,children:[b&&R(qY,{style:b,ref:y}),i&&R(X,{variant:`outline`,size:h,color:`text`,onClick:()=>S(e-1),disabled:o||g,label:p.value,Icon:Cs,ref:e=>{e&&(v.current[0]=e)},className:`min-w-0 px-2`}),R(`div`,{className:`flex items-center gap-1 max-md:gap-0.5`,children:m.map((t,n)=>{if(t===`ellipsis`){let e=n===m.indexOf(`ellipsis`)?`ellipsis-start`:`ellipsis-end`;return R(`div`,{className:`flex h-8 min-w-8 items-center justify-center px-1`,children:R(zs,{className:`h-4 w-4 text-muted-foreground`})},e)}let r=t===e,a=+!!i+m.slice(0,n).filter(e=>e!==`ellipsis`).length;return R(X,{variant:r?`default`:`outline`,size:h,color:`text`,onClick:()=>S(t),disabled:o,label:`Go to page ${t}`,"aria-current":r?`true`:`false`,ref:e=>{e&&(v.current[a]=e)},className:G(`flex aspect-square h-8 w-8 min-w-0 items-center justify-center p-0 text-sm`,s===`sm`&&`h-6 w-6 text-xs`,s===`lg`&&`size-10 text-base`,r&&`font-semibold`),children:t},t)})}),i&&R(X,{variant:`outline`,size:h,color:`text`,onClick:()=>S(e+1),disabled:o||_,label:f.value,Icon:Ts,ref:e=>{let t=+!!i+m.filter(e=>e!==`ellipsis`).length;e&&(v.current[t]=e)},className:`min-w-0 px-2`})]})})},YY=e=>e===void 0?``:typeof e==`string`?e:JSON.stringify(e),XY=e=>{let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`))return{variant:e,error:!1};try{return{variant:JSON.parse(t),error:!1}}catch{return{variant:e,error:!0}}},ZY={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":"Путь к файлу должен быть правильной строкой"}}}`),title:`Dictionary details validation schema`,description:`Validation schema for the dictionary details form, including error messages for fields such as title, key, description, project and tags.`,tags:[`form validation`,`dictionary schema`,`error messages`],location:`local`,localId:`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`},QY=e=>{let{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:i,keyInvalidTypeError:a,keySpaceError:o,keyMinLengthError:s,descriptionRequiredError:c,descriptionInvalidTypeError:l,requiredErrorProjectId:u,invalidTypeErrorProjectId:d,invalidTypeErrorTags:f,locationRequiredError:p,locationInvalidTypeError:m,filePathRequiredError:h,filePathInvalidTypeError:g}=V(ZY);return IG({title:BG(MG({error:e=>e.input===void 0?t.value:n.value}).check(WG(e=>e.length===0||e.length>=4,{error:r.value}))),key:HG(MG({error:e=>e.input===void 0?i.value:a.value}).check(DG(4,{error:s.value}),OG(/^[a-zA-Z0-9-_]+$/,{error:o.value})),``),description:BG(MG({error:e=>e.input===void 0?c.value:l.value})),projectIds:HG(PG(MG({error:e=>e.input===void 0?u.value:d.value})),[e]),tags:HG(PG(MG({error:()=>f.value})),[]),location:BG(RG([`local`,`remote`,`hybrid`,`plugin`],{error:e=>e.input===void 0?p.value:m.value})),importMode:BG(RG([`static`,`dynamic`,`fetch`])),filePath:BG(MG({error:e=>e.input===void 0?h.value:g.value}))})};T();var $Y=[`collection`,`variant`],eX=e=>{let t=[];return e.item!==void 0&&t.push(`collection`),e.variant!==void 0&&t.push(`variant`),t},tX=[`remote`,`local`,`hybrid`,`plugin`],nX=e=>tX.includes(e),rX=e=>e===void 0?`remote`:nX(e)?e:`plugin`,iX=({dictionary:e,mode:t,onSelectSibling:n})=>{let{session:r}=WO(),{project:i}=r??{},{data:a,isLoading:o}=uk(),{data:s}=dk(),c=a?.data??[],u=s?.data??[],d=QY(String(i?.id)),{form:f,isSubmitting:p}=SV(d,{defaultValues:{...e,location:rX(e.location)}}),{editedContent:m,setEditedDictionary:h}=DD(),{titleInput:g,keyInput:_,descriptionInput:v,projectInput:y,tagsSelect:b,locationSelect:x,importModeSelect:S,filePathInput:C,auditButton:w,qualifierSection:T,siblingDictionaries:E,typeSwitch:D}=V(IY),{mutate:O,isPending:k}=YO(),A=m?.[e.localId],{data:j,isLoading:P}=ik({keys:[e.key]},{enabled:!!e.key}),F=l(()=>(j?.data??[]).filter(t=>t.localId!==e.localId),[j,e.localId]),I=l(()=>F.filter(e=>e.item!==void 0).sort((e,t)=>(e.item??0)-(t.item??0)),[F]),L=l(()=>F.filter(e=>e.variant!==void 0),[F]),ee=l(()=>e.item===void 0?I:[e,...I].sort((e,t)=>(e.item??0)-(t.item??0)),[e,I]),te=l(()=>e.variant===void 0?L:[e,...L],[e,L]);M(()=>{f.reset({...e,tags:e.tags??[],location:rX(e.location)}),ae(eX(e)),se(e.item??1),le(YY(e.variant)),de(!1),pe(!1)},[e,f?.reset]),M(()=>{A===void 0&&f.reset({...e,tags:e.tags??[],location:rX(e.location)})},[A]);let ne=()=>{let t={...e,...A};O({fileContent:JSON.stringify(t)},{onSuccess:e=>{if(!e?.data)return;let n=e.data.fileContent,r={...t,...n,tags:n.tags??t.tags??[]};h(r),f.reset({...r,location:rX(r.location)})}})},z=Zz({control:f.control,name:`location`}),re=z===`local`||z===`hybrid`,ie=F.length>0,[B,ae]=N(()=>eX(e)),[oe,se]=N(e.item??1),[ce,le]=N(YY(e.variant)),[ue,de]=N(!1),[fe,pe]=N(!1),me=l(()=>[...I,...L],[I,L]),he=t=>{let n=[t].flat(),r=n.filter(e=>!B.includes(e)),i=B.filter(e=>!n.includes(e)),a={...e,...A??{}};for(let e of i)e===`collection`&&(a={...a,item:void 0}),e===`variant`&&(a={...a,variant:void 0});for(let e of r)if(e===`collection`){let e=ee.length>0?Math.max(...ee.map(e=>e.item??0))+1:1;se(e),a={...a,item:e}}else if(e===`variant`){let e=ce||`default`;le(e),a={...a,variant:XY(e).variant}}ae(n),h(a),de(!1),n.length===0&&me.length>0?pe(!0):pe(!1)};return R(CV,{className:`relative flex w-full flex-col gap-8`,...f,schema:d,children:[R(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[R(LY,{name:`key`,label:_.label,placeholder:_.label.value,description:_.description,disabled:p,isRequired:!0,onSave:t=>{f.setValue(`key`,t,{shouldDirty:!0}),h({...e,...A??{},key:t})}}),R(LY,{name:`title`,label:g.label,placeholder:g.placeholder.value,description:g.description,disabled:p,onSave:t=>{f.setValue(`title`,t,{shouldDirty:!0}),h({...e,...A??{},title:t})}})]}),R(RY,{name:`description`,label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:p,onSave:t=>{f.setValue(`description`,t,{shouldDirty:!0}),h({...e,...A??{},description:t})}}),R(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[R(DV,{control:f.control,name:`location`,render:({field:n})=>{let r=n.value,i=r===`local`||r===`hybrid`,a=r===`remote`||r===`hybrid`,o=t=>{if(!t&&!a)return;let r=t?a?`hybrid`:`local`:`remote`;n.onChange(r);let i=t?f.getValues(`filePath`)??e.filePath:void 0;t||f.setValue(`filePath`,void 0),h({...e,...A??{},location:r,filePath:i})},s=t=>{if(!t&&!i)return;let r=t?i?`hybrid`:`remote`:`local`;n.onChange(r),h({...e,...A??{},location:r})};return R(wV,{className:`flex flex-col gap-2 px-1`,children:[R(FV,{className:`ms-1`,children:x.label}),R(`div`,{className:`ms-2 flex items-center gap-4 py-2`,children:[R(VY,{id:`location-local`,name:`location-local`,label:x.local.value,color:`text`,checked:i,disabled:!t.includes(`local`)&&!t.includes(`remote`),onChange:e=>o(e.target.checked)}),R(VY,{id:`location-remote`,name:`location-remote`,label:x.remote.value,color:`text`,checked:a,disabled:!t.includes(`remote`)&&e.location!==`remote`&&e.location!==`hybrid`,onChange:e=>s(e.target.checked)})]}),R(AV,{children:x.testDescription}),R(jV,{})]})}}),R(pS,{mode:`wait`,children:re&&R(eC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},children:R(BV,{name:`filePath`,label:C.label.value,placeholder:C.placeholder.value,description:C.description.value,disabled:p||!re,onChange:t=>{let n=t.target.value;h({...e,...A??{},filePath:n})}})},`filePath-input`)})]}),R(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:R(JU,{name:`importMode`,label:S.label.value,description:S.description.value,onValueChange:t=>{f.setValue(`importMode`,t,{shouldDirty:!0}),h({...e,...A??{},importMode:t})},children:[R(Z.Trigger,{children:R(Z.Value,{placeholder:S.label.value})}),R(Z.Content,{children:[R(Z.Item,{value:`static`,children:S.static.value}),R(Z.Item,{value:`dynamic`,children:S.dynamic.value}),R(Z.Item,{value:`live`,children:S.live.value})]})]})}),R(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[R(KU,{name:`projectIds`,label:y.label.value,description:y.description,onValueChange:t=>{let n=[t].flat();f.setValue(`projectIds`,n,{shouldDirty:!0}),h({...e,...A??{},projectIds:n})},children:[R(WU.Trigger,{getBadgeValue:e=>c?.find(t=>String(t.id)===e)?.name??e,children:R(WU.Input,{placeholder:y.placeholder.value})}),R(WU.Content,{children:R(wk,{isLoading:o,children:R(WU.List,{children:c?.map(e=>R(WU.Item,{value:String(e.id),children:e.name},String(e.id)))})})})]}),R(KU,{name:`tags`,label:b.label.value,description:b.description,onValueChange:t=>{let n=[t].flat();f.setValue(`tags`,n,{shouldDirty:!0}),h({...e,...A??{},tags:n})},children:[R(WU.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.key)===e)?.name??e,children:R(WU.Input,{placeholder:b.placeholder.value})}),R(WU.Content,{children:R(wk,{isLoading:o,children:R(WU.List,{children:u?.map(e=>R(WU.Item,{value:String(e.key),children:e.name??e.key},String(e.key)))})})})]})]}),R(bA,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`card`,children:[R(`div`,{className:`flex flex-col gap-1`,children:[R(`p`,{className:`ms-1 font-semibold text-sm`,children:D.label}),R(`p`,{className:`ms-1 text-neutral text-xs`,children:D.description})]}),R(WU,{values:B,onValueChange:he,className:`max-w-xs`,children:[R(WU.Trigger,{getBadgeValue:e=>e===`collection`?String(D.collection):e===`variant`?String(D.variant):e,children:R(WU.Input,{placeholder:D.label.value})}),R(WU.Content,{children:R(WU.List,{children:$Y.map(e=>R(WU.Item,{value:e,children:D[e].value},e))})})]}),R(pS,{children:[B.includes(`collection`)&&R(eC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:R(`div`,{className:`flex flex-col gap-2 px-1`,children:[R(`label`,{htmlFor:`qualifier-item-value`,className:`ms-1 font-medium text-sm`,children:D.itemValueLabel}),R(Xk,{id:`qualifier-item-value`,type:`number`,min:1,value:oe,placeholder:D.itemValuePlaceholder.value,onChange:t=>{let n=parseInt(t.target.value,10);!Number.isNaN(n)&&n>=1&&(se(n),h({...e,...A??{},item:n}))}})]})},`item-input`),B.includes(`variant`)&&R(eC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:R(`div`,{className:`flex flex-col gap-2 px-1`,children:[R(`label`,{htmlFor:`qualifier-variant-value`,className:`ms-1 font-medium text-sm`,children:D.variantValueLabel}),R(Xk,{id:`qualifier-variant-value`,type:`text`,value:ce,placeholder:D.variantValuePlaceholder.value,onChange:t=>{let n=t.target.value;le(n);let{variant:r,error:i}=XY(n);de(i),i||h({...e,...A??{},variant:r})}}),ue&&R(`p`,{className:`ms-1 text-destructive text-xs`,children:D.variantJsonError})]})},`variant-input`),B.length===0&&fe&&R(eC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:R(bA,{background:`none`,border:!0,borderColor:`neutral`,roundedSize:`xl`,padding:`md`,className:`gap-3`,children:[R(`p`,{className:`font-medium text-sm`,children:D.disablePickerTitle}),R(`p`,{className:`text-muted text-xs`,children:D.disablePickerDescription}),R(`div`,{className:`flex flex-wrap gap-2`,children:me.map(e=>R(`button`,{type:`button`,onClick:()=>{n?.(e),pe(!1)},className:`cursor-pointer rounded-lg border border-border px-3 py-1 text-xs transition-colors hover:bg-text/10`,children:[e.variant!==void 0&&R(`span`,{children:[T.variant,`:`,` `,YY(e.variant)]}),e.item!==void 0&&R(`span`,{children:[T.item,`: `,e.item]})]},e.localId))})]})},`sibling-picker`)]})]}),R(bA,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`neutral`,children:[R(`p`,{className:`font-semibold text-sm`,children:E.title}),R(wk,{isLoading:P,children:[!ie&&R(`span`,{className:`m-auto text-neutral text-sm`,children:E.noSiblings}),ee.length>0&&R(`div`,{className:`flex flex-col gap-2`,children:[R(`p`,{className:`font-medium text-muted text-xs uppercase tracking-wide`,children:E.collectionItems}),R(JY,{currentPage:ee.findIndex(t=>t.localId===e.localId)+1||1,totalPages:ee.length,onPageChange:e=>{let t=ee[e-1];t&&n&&n(t)},showPrevNext:!0}),R(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:ee.map(t=>{let r=t.localId===e.localId;return R(`button`,{type:`button`,onClick:()=>!r&&n?.(t),className:G(`rounded-lg px-3 py-1 text-xs transition-colors`,r?`bg-text font-semibold text-foreground-opposite`:`cursor-pointer border border-border hover:bg-text/10`),children:[E.itemIndex,` `,t.item]},t.localId)})})]}),te.length>0&&R(`div`,{className:`flex flex-col gap-2`,children:[R(`p`,{className:`font-medium text-muted text-xs uppercase tracking-wide`,children:E.variants}),R(`div`,{className:`flex flex-wrap gap-2`,children:te.map(t=>{let r=t.localId===e.localId;return R(`button`,{type:`button`,onClick:()=>!r&&n?.(t),className:G(`rounded-lg px-3 py-1 text-xs transition-colors`,r?`bg-text font-semibold text-foreground-opposite`:`cursor-pointer border border-border hover:bg-text/10`),children:YY(t.variant)},t.localId)})})]})]})]}),R(aR,{identifier:`audit-dictionary-details`,className:`absolute top-0 right-0`,children:[R(X,{type:`button`,size:`icon-md`,label:w.label.value,Icon:Fc,variant:`outline`,color:`text`,onClick:ne,disabled:p||k,isLoading:k}),R(aR.Detail,{identifier:`audit-dictionary-details`,xAlign:`end`,children:R(bA,{padding:`sm`,roundedSize:`xl`,children:R(`span`,{className:`text-nowrap`,children:w.popover})})})]})]})},aX={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:`Копировать содержимое`}}},title:`Copy button label`,description:`Content declaration for the copy button label used to trigger the copy to clipboard action in the design system.`,tags:[`button component`,`design system`],location:`local`,localId:`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`};T();var oX=({content:e,onClick:t,...n})=>{let[r,i]=N(!1),[a,o]=N(!1),{label:s}=V(aX),c=async n=>{t?.(n);try{o(!1);let t=typeof e==`function`?await e():e;await navigator.clipboard.writeText(t),i(!0)}catch(e){console.error(`Failed to copy text: `,e),o(!0)}};M(()=>{if(r||a){let e=setTimeout(()=>{i(!1),o(!1)},1e3);return()=>clearTimeout(e)}},[r,a]);let l=()=>r?`Content copied to clipboard`:a?`Failed to copy content`:n.label??s.value;return R(X,{Icon:r?Ns:Fs,onClick:c,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:l(),...n,label:l(),"aria-describedby":r?`copy-success`:a?`copy-error`:void 0})};T();var sX=w(()=>kn(()=>import(`./dist-VBWB9uC8.js`).then(e=>({default:e.Editor})),__vite__mapDeps([5,2]))),cX=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=P(null),c=P(null),[l,u]=N({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(`
116
+ `).length>1);return R(`div`,{className:G(`relative size-full text-sm`,r&&`ms-0`),children:[i&&R(`div`,{className:`sticky top-5 z-10`,children:R(`div`,{className:G(`absolute inset-e-2 bottom-0 flex h-7 items-center`),children:R(oX,{content:e})})}),R(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:R(O,{fallback:R(wk,{}),children:R(sX,{...l,defaultLanguage:`typescript`,language:t,loading:R(wk,{}),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`})})})]})},lX=({dictionary:e,isDarkMode:t})=>{let{setEditedContent:n,editedContent:r}=DD(),i=e=>{try{return JSON.parse(e),!0}catch{return!1}},a=r?.[e.localId]?.content??e?.content;return R(cX,{language:`json`,onChange:t=>{i(t??`{}`)&&n(e.localId,JSON.parse(t??`{}`))},isDarkMode:t,children:JSON.stringify(a,null,2)})},uX=e=>{let t=Zi(e),n=ta(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?uX(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0};T();var dX=({children:e,onToggle:t,...n})=>{let[r,i]=N(!1);return R(Ok,{...n,onToggle:e=>{e&&!r&&i(!0),t?.(e)},children:r?e:null})},fX=({reorderProps:e,children:t})=>R(`div`,{...e,className:G(`group/reorder flex w-full min-w-0 items-start gap-1 rounded-lg`,`cursor-grab active:cursor-grabbing data-[dragging=true]:opacity-40`,IK),children:[R(qs,{"aria-hidden":!0,className:`mt-2.5 size-3.5 shrink-0 text-neutral opacity-0 transition-opacity group-hover/reorder:opacity-100`}),R(`div`,{className:`min-w-0 flex-1`,children:t})]}),pX=e=>Array.isArray(e)?e.map((e,t)=>String(t)):e&&typeof e==`object`&&typeof e.nodeType!=`string`?Object.keys(e):[],mX=({section:e,keyPath:t,dictionary:n})=>{let{selectedLocales:r}=ej(),{locale:i}=aa(),a=Ji(e,t,DO()??r[0]??i),{addEditedContent:o}=ED(),{setFocusedContentKeyPath:s,focusedContent:c}=kO(),{addNewElement:l,goToField:u}=V(vA),d=ta(a),f=e=>(c?.keyPath?.length??0)>0&&$n(e,c?.keyPath??[]),p=uX(a),{reorderField:m}=V(CK),{moveField:h}=gY(n),g=Array.isArray(a),{getReorderProps:_}=FK({itemIds:pX(a),orientation:`vertical`,title:m.value,onMove:(e,n)=>h(t,g?Number(e):e,g?Number(n):n)});return a?p?R(X,{label:u.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>s(t),IconRight:Ts,children:fr(t[t.length-1]?.key)}):typeof a==`object`?d===`reactNode`?R(C,{children:`React Node`}):d===`translation`?R(`div`,{className:`flex flex-col justify-between gap-2`,children:r.map(r=>R(mX,{keyPath:[...t,{type:Rr,key:r}],section:e,dictionary:n},r))}):d===`enumeration`||d===`plural`||d===`condition`?R(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(a[d]).map(r=>R(mX,{keyPath:[...t,{type:d,key:r}],section:e,dictionary:n},r))}):d===`array`?R(`div`,{className:`flex flex-col justify-between gap-2`,children:[a.map((r,i)=>{let a=[...t,{type:Gr,key:i}];return uX(r)?R(fX,{reorderProps:_(String(i)),children:R(X,{label:`${u.label.value} ${i}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>s(a),IconRight:Ts,isActive:f(a),children:[`Item `,i]})},JSON.stringify(a)):R(fX,{reorderProps:_(String(i)),children:R(dX,{label:`${u.label.value} ${i}`,header:`Item ${i}`,isActive:f(a),onClick:()=>s(a),children:R(`div`,{className:`mt-2 flex w-full max-w-full`,children:R(`div`,{className:`flex-1 ps-10`,children:R(mX,{keyPath:a,section:e,dictionary:n})})})})},JSON.stringify(a))}),R(X,{label:l.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...t,{type:Gr,key:a.length}],r=a,i=Xi(r[r.length-1])??``;o(n.localId,i,e,!1),s(e)},Icon:pc,children:l.text})]}):typeof a.nodeType==`string`?R(mX,{keyPath:[...t,{type:a.nodeType}],section:e,dictionary:n}):R(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(a).map(r=>{let i=[...t,{type:Wr,key:r}];return uX(Ji(e,i))?R(fX,{reorderProps:_(r),children:R(X,{label:`${u.label.value} ${r}`,isActive:f(i),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>s(i),IconRight:Ts,children:fr(r)})},r):R(fX,{reorderProps:_(r),children:R(dX,{label:`${u.label.value} ${r}`,isActive:f(i),onClick:()=>s(i),header:fr(r),children:R(`div`,{className:`mt-2 flex w-full max-w-full`,children:R(`div`,{className:`flex-1 ps-10`,children:R(mX,{keyPath:i,section:e,dictionary:n})})})})},r)})}):R(C,{children:[`Error loading section --`,d,`--`,JSON.stringify(a),`--`,JSON.stringify(t)]}):R(C,{})};T();var hX=({dictionary:e})=>{let{editedContent:t}=DD(),{focusedContent:r,setFocusedContentKeyPath:i}=kO(),[,a]=S(),o=n(e=>a(()=>i(e)),[i]),{content:s,key:c,localId:l}=e,u=r?.keyPath,d=t?.[l]?.content===void 0?s:t?.[l]?.content,{selectedLocales:f}=ej(),{locale:p}=aa(),m=DO()??f[0]??p,h=Ji(d,u??[],m),g=k(u),_=k(h),v=_!==h,y=uX(d),b=uX(_);return M(()=>{h===void 0&&o(r?.keyPath?.slice(0,-1)??[])},[]),R(`div`,{children:[R(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[R(mY,{dictionaryKey:c,keyPath:u??[],onClickKeyPath:o}),R(`div`,{className:`flex items-center gap-2`,children:R(YJ,{})})]}),R(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!y&&Object.keys(d).length>0&&R(bA,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:R(mX,{keyPath:[],section:d,dictionary:e})}),(b||(g??[]).length>0)&&R(`div`,{className:v?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:R(HL,{keyPath:g??[],section:_,dictionary:e})})]})]})},gX={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"discardButton":{"label":"Click to discard every unsaved change","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Discard {{count}} changes","one":"Discard {{count}} change"}}},"textWithoutCount":"Discard changes"},"saveButton":{"label":"Click to save changes","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Save {{count}} changes","one":"Save {{count}} change"}}},"textWithoutCount":"Save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"saveToFileButton":{"text":"Save to file","label":"Click to write the changes to the content declaration file"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Writes to {{filePath}}"},"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"},"discardButton":{"label":"Click to discard every unsaved change","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Discard {{count}} changes","one":"Discard {{count}} change"}}},"textWithoutCount":"Discard changes"},"saveButton":{"label":"Click to save changes","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Save {{count}} changes","one":"Save {{count}} change"}}},"textWithoutCount":"Save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"saveToFileButton":{"text":"Save to file","label":"Click to write the changes to the content declaration file"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Writes to {{filePath}}"},"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"},"discardButton":{"label":"Cliquez pour annuler toutes les modifications non enregistrées","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Annuler {{count}} modification(s)","one":"Annuler {{count}} modification"}}},"textWithoutCount":"Annuler les modifications"},"saveButton":{"label":"Cliquez pour enregistrer les modifications","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Enregistrer {{count}} modifications","one":"Enregistrer {{count}} modification"}}},"textWithoutCount":"Enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"saveToFileButton":{"text":"Enregistrer dans le fichier","label":"Cliquez pour écrire les modifications dans le fichier de déclaration de contenu"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Écrit dans {{filePath}}"},"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"},"discardButton":{"label":"Haga clic para descartar todos los cambios no guardados","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Descartar {{count}} cambios","one":"Descartar {{count}} cambio"}}},"textWithoutCount":"Descartar cambios"},"saveButton":{"label":"Haga clic para guardar cambios","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Guardar {{count}} cambios","one":"Guardar {{count}} cambio"}}},"textWithoutCount":"Guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"saveToFileButton":{"text":"Guardar en el archivo","label":"Haga clic para escribir los cambios en el archivo de declaración de contenido"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Escribe en {{filePath}}"},"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"},"discardButton":{"label":"Klicken Sie, um alle nicht gespeicherten Änderungen zu verwerfen","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"{{count}} Änderungen verwerfen","one":"{{count}} Änderung verwerfen"}}},"textWithoutCount":"Änderungen verwerfen"},"saveButton":{"label":"Klicken Sie, um Änderungen zu speichern","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"{{count}} Änderungen speichern","one":"{{count}} Änderung speichern"}}},"textWithoutCount":"Änderungen speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"saveToFileButton":{"text":"In Datei speichern","label":"Klicken Sie, um die Änderungen in die Inhaltsdeklarationsdatei zu schreiben"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Schreibt in {{filePath}}"},"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":"辞書を削除するにはクリックしてください"},"discardButton":{"label":"クリックして未保存の変更をすべて破棄","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"{{count}} 件の変更を破棄","one":"{{count}} 件の変更を破棄"}}},"textWithoutCount":"変更を破棄"},"saveButton":{"label":"変更を保存するにはクリックしてください","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"{{count}} 件の変更を保存","one":"{{count}} 件の変更を保存"}}},"textWithoutCount":"変更を保存"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"saveToFileButton":{"text":"ファイルに保存","label":"クリックして変更をコンテンツ宣言ファイルに書き込む"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"{{filePath}} に書き込みます"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"discardButton":{"label":"클릭하여 저장되지 않은 모든 변경 사항 취소","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"변경 사항 {{count}}개 취소","one":"변경 사항 {{count}}개 취소"}}},"textWithoutCount":"변경 사항 취소"},"saveButton":{"label":"변경 사항을 저장하려면 클릭하세요","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"변경 사항 {{count}}개 저장","one":"변경 사항 {{count}}개 저장"}}},"textWithoutCount":"변경 사항 저장"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"saveToFileButton":{"text":"파일에 저장","label":"클릭하여 변경 사항을 콘텐츠 선언 파일에 기록"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"{{filePath}}에 기록합니다"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"discardButton":{"label":"单击以放弃所有未保存的更改","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"放弃 {{count}} 项更改","one":"放弃 {{count}} 项更改"}}},"textWithoutCount":"放弃更改"},"saveButton":{"label":"单击保存更改","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"保存 {{count}} 项更改","one":"保存 {{count}} 项更改"}}},"textWithoutCount":"保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"saveToFileButton":{"text":"保存到文件","label":"单击将更改写入内容声明文件"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"写入 {{filePath}}"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"discardButton":{"label":"Fai clic per annullare tutte le modifiche non salvate","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Annulla {{count}} modifiche","one":"Annulla {{count}} modifiche"}}},"textWithoutCount":"Annulla modifiche"},"saveButton":{"label":"Fai clic per salvare le modifiche","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Salva {{count}} modifiche","one":"Salva {{count}} modifiche"}}},"textWithoutCount":"Salva le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"saveToFileButton":{"text":"Salva nel file","label":"Fai clic per scrivere le modifiche nel file di dichiarazione dei contenuti"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Scrive in {{filePath}}"},"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"},"discardButton":{"label":"Clique para descartar todas as alterações não salvas","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Descartar {{count}} alterações","one":"Descartar {{count}} alterações"}}},"textWithoutCount":"Descartar alterações"},"saveButton":{"label":"Clique para salvar alterações","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Salvar {{count}} alterações","one":"Salvar {{count}} alterações"}}},"textWithoutCount":"Salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"saveToFileButton":{"text":"Salvar no arquivo","label":"Clique para gravar as alterações no arquivo de declaração de conteúdo"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Grava em {{filePath}}"},"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":"शब्दकोश हटाने के लिए क्लिक करें"},"discardButton":{"label":"सभी असहेजे परिवर्तन त्यागने के लिए क्लिक करें","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"{{count}} परिवर्तन त्यागें","one":"{{count}} परिवर्तन त्यागें"}}},"textWithoutCount":"परिवर्तन त्यागें"},"saveButton":{"label":"परिवर्तनों को सहेजने के लिए क्लिक करें","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"{{count}} परिवर्तन सहेजें","one":"{{count}} परिवर्तन सहेजें"}}},"textWithoutCount":"परिवर्तनों को सहेजें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"saveToFileButton":{"text":"फ़ाइल में सहेजें","label":"परिवर्तनों को सामग्री घोषणा फ़ाइल में लिखने के लिए क्लिक करें"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"{{filePath}} में लिखता है"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"discardButton":{"label":"انقر لتجاهل جميع التغييرات غير المحفوظة","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"تجاهل {{count}} تغييرات","one":"تجاهل {{count}} تغييرات"}}},"textWithoutCount":"تجاهل التغييرات"},"saveButton":{"label":"انقر لحفظ التغييرات","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"احفظ {{count}} تغييرات","one":"احفظ {{count}} تغييرات"}}},"textWithoutCount":"احفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"saveToFileButton":{"text":"حفظ في الملف","label":"انقر لكتابة التغييرات في ملف تعريف المحتوى"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"يكتب في {{filePath}}"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"discardButton":{"label":"Нажмите, чтобы отменить все несохранённые изменения","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Отменить изменения: {{count}}","one":"Отменить изменения: {{count}}"}}},"textWithoutCount":"Отменить изменения"},"saveButton":{"label":"Нажмите, чтобы сохранить изменения","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"other":"Сохранить {{count}} изменений","one":"Сохранить {{count}} изменений"}}},"textWithoutCount":"Сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"saveToFileButton":{"text":"Сохранить в файл","label":"Нажмите, чтобы записать изменения в файл декларации контента"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Запись в {{filePath}}"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),title:`Save dictionary details`,description:`Content declarations for managing dictionary actions including saving, deleting, resetting, publishing, and downloading, with confirmation prompts for updates or overwrites.`,tags:[`dictionary management`,`dictionary editor`],location:`local`,localId:`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`};T();var _X=e=>{let[t,n]=N(e);return M(()=>{n(e??window.document.body)},[e]),t};T();var vX=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()})}};T();var yX=()=>!1,bX=e=>{let{disableScroll:t=!1,element:r,key:i=`unnamed_blocker`}=e??{},a=_X(r);M(()=>{let e=r??window.document.body;return t?vX.addBlockage(i,e):vX.removeBlockage(i,e),()=>{vX.removeBlockage(i,e)}},[t,r,i]);let o=n(()=>a?vX.isElementScrollBlocked(a):!1,[a]);return{isScrollBlocked:A(vX.subscribe,o,yX)}},xX=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,SX=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-inset-s-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,CX=({className:e,...t})=>R(`h1`,{className:G(`text-3xl`,e),...t}),wX=({className:e,...t})=>R(`h2`,{className:G(`mb-2 text-2xl`,xX,e),...t}),TX=({className:e,...t})=>R(`h3`,{className:G(`mb-2 text-xl`,xX,e),...t}),EX=({className:e,...t})=>R(`h4`,{className:G(`text-lg`,xX,e),...t}),DX=({className:e,...t})=>R(`h5`,{className:G(`text-base`,xX,e),...t}),OX=({className:e,...t})=>R(`h6`,{className:G(`ms-3 text-base`,xX,e),...t}),kX=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),AX=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},jX=(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},MX=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?kX(t):void 0;return R(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(jX(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),AX(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:G(r&&SX,n),...i,children:t})},NX=({isClickable:e,...t})=>R(CX,{...t}),PX=({isClickable:e=!1,...t})=>R(MX,{H:wX,isClickable:e,...t}),FX=({isClickable:e=!1,...t})=>R(MX,{H:TX,isClickable:e,...t}),IX=({isClickable:e=!1,...t})=>R(MX,{H:EX,isClickable:e,...t}),LX=({isClickable:e=!1,...t})=>R(MX,{H:DX,isClickable:e,...t}),RX=({isClickable:e=!1,...t})=>R(MX,{H:OX,isClickable:e,...t});T();var zX=Hc(`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`}}),BX={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`},VX=kC.create(bA),HX=({children:e,isOpen:t,container:n,onClose:r,hasCloseButton:i=!1,closeButtonColor:a=`text`,title:o,size:s=`md`,className:c,isScrollable:l=!1,disableScroll:u=!0,padding:d=`none`,...f})=>{let p=_X(n);if(bX({key:`modal`,disableScroll:t&&u}),M(()=>{let e=e=>{e.key===`Escape`&&t&&r&&r()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,r]),!p)return R(C,{});let m=!!o,h=BX[d||`none`];return D(R(kC.div,{className:`invisible fixed inset-s-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:t?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:e=>{e.stopPropagation(),r?.()},"aria-hidden":!t,children:R(VX,{onClick:e=>e.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:zX({size:s,className:c}),role:`dialog`,"aria-modal":!0,padding:`none`,...f,children:[R(`div`,{className:G(`relative flex-none px-4 pt-4`,i&&m?`flex items-start`:i?`flex justify-end`:m?`items-center`:`hidden`),children:[m&&R(FX,{className:`ms-1 mb-2 flex items-center justify-center font-bold text-lg`,children:o}),i&&R(X,{variant:`hoverable`,color:a,label:`Close modal`,className:`ms-auto`,onClick:e=>{e.stopPropagation(),r?.()},Icon:Lc,size:`icon-md`})]}),R(`div`,{className:G(`flex min-h-0 w-full flex-1 flex-col`,l===!0&&`overflow-auto`,l===`y`&&`overflow-y-auto overflow-x-hidden`,l===`x`&&`overflow-x-auto overflow-y-hidden`,!l&&`overflow-visible`),children:R(`div`,{className:G(`flex size-full flex-1 flex-col`,h),children:e})})]})}),p)},UX=(e,t)=>!!e&&JSON.stringify(e)!==JSON.stringify(t),WX=(e,t)=>e?{...e,...t}:t,GX=()=>{let{setLocaleDictionary:e}=TD(),{restoreEditedContent:t}=ED(),{mutateAsync:n,isPending:r}=ok(),{mutateAsync:i,isPending:a}=lk();return{saveDictionary:async(r,a)=>{try{if(a===`remote`){if(!await n({dictionaries:[r]}))return!1}else await i({dictionary:r})}catch{return!1}return e(r),r.localId&&t(r.localId),!0},isPushing:r,isWriting:a,isSaving:r||a}};T();var KX=[],qX=({dictionary:e,mode:t,className:n,onDelete:r,onSave:i,...a})=>{let[o,s]=N(!1),{mutate:c,isPending:u}=sk(),{saveDictionary:d,isPushing:f,isWriting:p,isSaving:m}=GX(),{editedContent:h,restoreEditedContent:g}=DD(),{deleteButton:_,discardButton:v,saveButton:y,publishButton:b,saveToFileButton:x,writesTo:S,confirmation:w}=V(gX),T=MY(),E=CD(),D=h?.[e.localId],O=l(()=>{if(T||!D)return KX;let t=(E?.internationalization?.locales??[]).map(String),n={locales:t,sourceLocale:String(E?.internationalization?.defaultLocale??t[0]??`en`)};return QG(ZL(e.content,n),ZL(D.content??e.content,n))},[T,D,e.content,E]),k=T?.changeSet??O,A=k.length,{isAuthenticated:j}=GO(),{session:P}=WO(),F=PC(),[I,L]=N(!1),ee=P?(P.permissions?.includes(`dictionary:admin`)||P.permissions?.includes(`dictionary:write`))??!1:!!F?.accessToken,te=t.includes(`remote`)&&!j&&!!F?.login,ne=ee,z=l(()=>UX(D,e),[D,e]),re=e?.id!==void 0,ie=()=>WX(e,D??e),B=async()=>{D&&await d(ie(),`local`)&&(s(!1),i?.())},ae=async()=>{await d(ie(),`remote`)&&i?.()},oe=()=>{L(!0),F?.login?.()},se=!!F?.isLoggingIn;M(()=>{I&&(j?(L(!1),ae()):se||L(!1))},[I,j,se]);let ce=()=>{e.id&&c({dictionaryId:e.id},{onSuccess:e=>{e&&r?.()}})},le=R(X,{label:y.label.value,disabled:!z||m||!ee,Icon:yc,color:`text`,className:`max-w-2xs flex-1`,isLoading:f,onClick:ae,children:A>0?y.text({count:A})(A):y.textWithoutCount}),ue=A>0?R(fz,{changeSet:k,onRevert:T?.revertChange,className:`max-w-2xs flex-1`,children:le}):le;return R(C,{children:[R(HX,{isOpen:o,title:w.title.value,size:`md`,roundedSize:`2xl`,onClose:()=>s(!1),padding:`md`,border:!0,borderColor:`neutral`,children:R(`form`,{className:`size-full`,onSubmit:e=>{e.preventDefault(),B()},children:[R(`p`,{className:`py-4 text-muted-foreground text-sm`,children:w.message}),R(`div`,{className:`mt-12 flex flex-row-reverse justify-start gap-2`,children:[R(X,{type:`submit`,label:w.confirmButton.label.value,disabled:!z||m,Icon:yc,color:`text`,className:`max-w-2xs flex-1`,isLoading:p,onClick:B,children:w.confirmButton.text}),R(X,{type:`button`,label:w.cancelButton.label.value,disabled:m,color:`text`,className:`max-w-2xs flex-1`,variant:`outline`,onClick:()=>s(!1),children:w.cancelButton.text})]})]})}),R(`form`,{className:G(`flex flex-row flex-row-reverse flex-wrap items-end justify-start gap-2`,n),...a,children:[t.includes(`remote`)&&j&&re&&z&&ue,t.includes(`local`)&&e.filePath&&R(`span`,{className:`me-auto truncate font-mono text-muted-foreground text-xs`,dir:`ltr`,children:S({filePath:e.filePath})}),te&&!re&&R(X,{label:b.label.value,disabled:m,Icon:_s,color:`text`,className:`max-w-2xs flex-1`,isLoading:I,onClick:oe,children:b.text}),t.includes(`remote`)&&j&&!re&&R(X,{label:b.label.value,disabled:m||!ee,Icon:_s,color:`text`,className:`max-w-2xs flex-1`,isLoading:f,onClick:ae,children:b.text}),t.includes(`local`)&&R(X,{label:x.label.value,disabled:!z||m,Icon:Us,color:`text`,variant:j||te?`outline`:`default`,className:`max-w-2xs flex-1`,isLoading:p,onClick:()=>s(!0),children:x.text}),z&&R(X,{label:v.label.value,disabled:!z,Icon:hc,variant:`outline`,color:`text`,className:`max-w-2xs flex-1`,onClick:()=>g(e.localId),children:A>0?v.text({count:A})(A):v.textWithoutCount}),t.includes(`remote`)&&re&&r&&j&&R(X,{label:_.label.value,Icon:Dc,color:`error`,variant:`outline`,className:`max-w-2xs flex-1`,isLoading:u,onClick:ce,disabled:!ne,children:_.text})]})]})},JX={key:`sibling-switcher`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"itemsLabel":"Collection items","variantsLabel":"Variants","baseLabel":"Base","baseDescription":"Shared content merged into every entry","inheritanceHint":"Fields not declared here are inherited from the default variant, then from the base.","defaultTag":"default","alsoAnswersTo":"Also answers to","missingKeys":"missing:","emptyPreview":"(empty)","searchItems":"Search items","incompleteOnly":"Incomplete only","noMatchingItem":"No item matches","completenessLabel":"Translation completeness","codeSnippetLabel":"Usage in code","contextLabel":"Select a variant or an item","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"item {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} items × {{variants}} variants = {{total}} combinations"}},"en-GB":{"itemsLabel":"Collection items","variantsLabel":"Variants","baseLabel":"Base","baseDescription":"Shared content merged into every entry","inheritanceHint":"Fields not declared here are inherited from the default variant, then from the base.","defaultTag":"default","alsoAnswersTo":"Also answers to","missingKeys":"missing:","emptyPreview":"(empty)","searchItems":"Search items","incompleteOnly":"Incomplete only","noMatchingItem":"No item matches","completenessLabel":"Translation completeness","codeSnippetLabel":"Usage in code","contextLabel":"Select a variant or an item","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"item {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} items × {{variants}} variants = {{total}} combinations"}},"fr":{"itemsLabel":"Éléments de la collection","variantsLabel":"Variantes","baseLabel":"Base","baseDescription":"Contenu partagé fusionné dans chaque entrée","inheritanceHint":"Les champs non déclarés ici sont hérités de la variante par défaut, puis de la base.","defaultTag":"par défaut","alsoAnswersTo":"Répond aussi à","missingKeys":"manquant :","emptyPreview":"(vide)","searchItems":"Rechercher des éléments","incompleteOnly":"Incomplets uniquement","noMatchingItem":"Aucun élément ne correspond","completenessLabel":"Avancement de la traduction","codeSnippetLabel":"Utilisation dans le code","contextLabel":"Sélectionner une variante ou un élément","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"élément {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} éléments × {{variants}} variantes = {{total}} combinaisons"}},"es":{"itemsLabel":"Elementos de la colección","variantsLabel":"Variantes","baseLabel":"Base","baseDescription":"Contenido compartido fusionado en cada entrada","inheritanceHint":"Los campos no declarados aquí se heredan de la variante predeterminada y luego de la base.","defaultTag":"predeterminada","alsoAnswersTo":"También responde a","missingKeys":"falta:","emptyPreview":"(vacío)","searchItems":"Buscar elementos","incompleteOnly":"Solo incompletos","noMatchingItem":"Ningún elemento coincide","completenessLabel":"Progreso de la traducción","codeSnippetLabel":"Uso en el código","contextLabel":"Seleccionar una variante o un elemento","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"elemento {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} elementos × {{variants}} variantes = {{total}} combinaciones"}},"de":{"itemsLabel":"Sammlungselemente","variantsLabel":"Varianten","baseLabel":"Basis","baseDescription":"Gemeinsamer Inhalt, der in jeden Eintrag übernommen wird","inheritanceHint":"Hier nicht deklarierte Felder werden von der Standardvariante und dann von der Basis geerbt.","defaultTag":"Standard","alsoAnswersTo":"Antwortet auch auf","missingKeys":"fehlt:","emptyPreview":"(leer)","searchItems":"Elemente suchen","incompleteOnly":"Nur unvollständige","noMatchingItem":"Kein passendes Element","completenessLabel":"Übersetzungsfortschritt","codeSnippetLabel":"Verwendung im Code","contextLabel":"Variante oder Element auswählen","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"Element {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} Elemente × {{variants}} Varianten = {{total}} Kombinationen"}},"ja":{"itemsLabel":"コレクションの項目","variantsLabel":"バリアント","baseLabel":"ベース","baseDescription":"すべてのエントリーにマージされる共有コンテンツ","inheritanceHint":"ここで宣言されていないフィールドは、デフォルトのバリアント、次にベースから継承されます。","defaultTag":"デフォルト","alsoAnswersTo":"次の ID にも対応","missingKeys":"不足:","emptyPreview":"(空)","searchItems":"項目を検索","incompleteOnly":"未完了のみ","noMatchingItem":"一致する項目がありません","completenessLabel":"翻訳の進捗","codeSnippetLabel":"コードでの使用方法","contextLabel":"バリアントまたは項目を選択","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"項目 {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} 項目 × {{variants}} バリアント = {{total}} 通り"}},"ko":{"itemsLabel":"컬렉션 항목","variantsLabel":"변형","baseLabel":"기본","baseDescription":"모든 항목에 병합되는 공유 콘텐츠","inheritanceHint":"여기에 선언되지 않은 필드는 기본 변형에서, 그다음 기본 콘텐츠에서 상속됩니다.","defaultTag":"기본값","alsoAnswersTo":"다음 ID에도 응답","missingKeys":"누락:","emptyPreview":"(비어 있음)","searchItems":"항목 검색","incompleteOnly":"미완료만","noMatchingItem":"일치하는 항목이 없습니다","completenessLabel":"번역 완료율","codeSnippetLabel":"코드에서 사용","contextLabel":"변형 또는 항목 선택","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"항목 {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}}개 항목 × {{variants}}개 변형 = {{total}}개 조합"}},"zh":{"itemsLabel":"集合项","variantsLabel":"变体","baseLabel":"基础","baseDescription":"合并到每个条目中的共享内容","inheritanceHint":"此处未声明的字段先从默认变体继承,再从基础内容继承。","defaultTag":"默认","alsoAnswersTo":"同时响应","missingKeys":"缺少:","emptyPreview":"(空)","searchItems":"搜索项","incompleteOnly":"仅未完成","noMatchingItem":"没有匹配的项","completenessLabel":"翻译完成度","codeSnippetLabel":"在代码中使用","contextLabel":"选择变体或项","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"第 {{item}} 项"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} 项 × {{variants}} 个变体 = {{total}} 种组合"}},"it":{"itemsLabel":"Elementi della raccolta","variantsLabel":"Varianti","baseLabel":"Base","baseDescription":"Contenuto condiviso unito a ogni voce","inheritanceHint":"I campi non dichiarati qui vengono ereditati dalla variante predefinita, poi dalla base.","defaultTag":"predefinita","alsoAnswersTo":"Risponde anche a","missingKeys":"mancante:","emptyPreview":"(vuoto)","searchItems":"Cerca elementi","incompleteOnly":"Solo incompleti","noMatchingItem":"Nessun elemento corrisponde","completenessLabel":"Completamento della traduzione","codeSnippetLabel":"Utilizzo nel codice","contextLabel":"Seleziona una variante o un elemento","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"elemento {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} elementi × {{variants}} varianti = {{total}} combinazioni"}},"pt":{"itemsLabel":"Itens da coleção","variantsLabel":"Variantes","baseLabel":"Base","baseDescription":"Conteúdo compartilhado mesclado em cada entrada","inheritanceHint":"Os campos não declarados aqui são herdados da variante padrão e depois da base.","defaultTag":"padrão","alsoAnswersTo":"Também responde a","missingKeys":"ausente:","emptyPreview":"(vazio)","searchItems":"Pesquisar itens","incompleteOnly":"Somente incompletos","noMatchingItem":"Nenhum item corresponde","completenessLabel":"Progresso da tradução","codeSnippetLabel":"Uso no código","contextLabel":"Selecionar uma variante ou um item","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"item {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} itens × {{variants}} variantes = {{total}} combinações"}},"hi":{"itemsLabel":"संग्रह आइटम","variantsLabel":"वैरिएंट","baseLabel":"बेस","baseDescription":"हर प्रविष्टि में मिलाई जाने वाली साझा सामग्री","inheritanceHint":"यहाँ घोषित न किए गए फ़ील्ड पहले डिफ़ॉल्ट वैरिएंट से, फिर बेस से लिए जाते हैं।","defaultTag":"डिफ़ॉल्ट","alsoAnswersTo":"इन पर भी लागू","missingKeys":"अनुपस्थित:","emptyPreview":"(खाली)","searchItems":"आइटम खोजें","incompleteOnly":"केवल अधूरे","noMatchingItem":"कोई मेल खाता आइटम नहीं","completenessLabel":"अनुवाद की पूर्णता","codeSnippetLabel":"कोड में उपयोग","contextLabel":"वैरिएंट या आइटम चुनें","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"आइटम {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} आइटम × {{variants}} वैरिएंट = {{total}} संयोजन"}},"ar":{"itemsLabel":"عناصر المجموعة","variantsLabel":"المتغيرات","baseLabel":"الأساس","baseDescription":"محتوى مشترك يُدمج في كل إدخال","inheritanceHint":"الحقول غير المعرّفة هنا تُورث من المتغير الافتراضي ثم من الأساس.","defaultTag":"افتراضي","alsoAnswersTo":"يستجيب أيضًا لـ","missingKeys":"مفقود:","emptyPreview":"(فارغ)","searchItems":"البحث في العناصر","incompleteOnly":"غير المكتملة فقط","noMatchingItem":"لا يوجد عنصر مطابق","completenessLabel":"اكتمال الترجمة","codeSnippetLabel":"الاستخدام في الكود","contextLabel":"اختر متغيرًا أو عنصرًا","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"العنصر {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} عناصر × {{variants}} متغيرات = {{total}} تركيبة"}},"ru":{"itemsLabel":"Элементы коллекции","variantsLabel":"Варианты","baseLabel":"Основа","baseDescription":"Общий контент, объединяемый с каждой записью","inheritanceHint":"Поля, не объявленные здесь, наследуются от варианта по умолчанию, затем от основы.","defaultTag":"по умолчанию","alsoAnswersTo":"Также отвечает на","missingKeys":"нет:","emptyPreview":"(пусто)","searchItems":"Поиск элементов","incompleteOnly":"Только незавершённые","noMatchingItem":"Нет подходящих элементов","completenessLabel":"Готовность перевода","codeSnippetLabel":"Использование в коде","contextLabel":"Выберите вариант или элемент","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"элемент {{item}}"},"combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} элементов × {{variants}} вариантов = {{total}} комбинаций"}}}}`),title:`Sibling switcher`,description:`Labels of the switcher selecting a collection item or a variant of a dictionary key.`,location:`local`,localId:`sibling-switcher::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SiblingSwitcher/siblingSwitcher.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SiblingSwitcher/siblingSwitcher.content.mjs`},YX=`default`,XX=e=>[...new Set(e.map(e=>e.item).filter(e=>e!==void 0))].sort((e,t)=>e-t),ZX=e=>{let t=new Map;for(let n of e){if(n.variant===void 0)continue;let e=YY(n.variant);if(t.has(e))continue;let[r,...i]=Array.isArray(n.variant)?n.variant:[n.variant];t.set(e,{identity:e,primaryValue:r??e,aliases:i,isStructured:typeof r==`object`,isDefault:r===YX})}return[...t.values()]},QX=e=>e.find(e=>e.item===void 0&&e.variant===void 0),$X=(e,{item:t,variant:n})=>{if(t!==null||n!==null)return e.find(e=>(t===null||e.item===t)&&(n===null||YY(e.variant)===n))},eZ=e=>({item:e.item??null,variant:e.variant===void 0?null:YY(e.variant)}),tZ=e=>ta(e)===`object`?Object.keys(e):[],nZ=e=>{let t=new Map;for(let n of e){if(n.item===void 0)continue;let e=t.get(n.item)??new Set;for(let t of tZ(n.content))e.add(t);t.set(n.item,e)}let n=new Set;for(let e of t.values())for(let t of e)n.add(t);let r={};for(let[e,i]of t){let t=[...n].filter(e=>!i.has(e));t.length>0&&(r[e]=t)}return r},rZ=(e,t,n)=>{let r=ZL(e,{locales:t,sourceLocale:n}),i=``,a={},o=0;for(let e of r)if(e.kind===`leaf`){if(!i){let t=(e.cells[n]??e.cells[`*`])?.value;typeof t==`string`&&t.trim()!==``&&(i=t)}if(e.isLocalized){o++;for(let n of t){let t=e.cells[n];t===void 0||t.isMissing||typeof t.value==`string`&&t.value.trim()===``||(a[n]=(a[n]??0)+1)}}}let s=Object.fromEntries(t.map(e=>[e,o===0?1:(a[e]??0)/o]));return{preview:i,completenessByLocale:s}},iZ=e=>typeof e==`string`?`'${e}'`:`{ ${Object.entries(e).map(([e,t])=>`${e}: ${typeof t==`string`?`'${t}'`:t}`).join(`, `)} }`,aZ=(e,t,n)=>{let r=[...n?[`variant: ${iZ(n.primaryValue)}`]:[],...t===null?[]:[`item: ${t}`]];return r.length===0?`useIntlayer('${e}')`:`useIntlayer('${e}', { ${r.join(`, `)} })`};T();var oZ=8,sZ=e=>{let t=Object.values(e.completenessByLocale);return t.length===0?1:t.reduce((e,t)=>e+t,0)/t.length},cZ=(e,t)=>e.localId!==void 0&&t?.[e.localId]!==void 0,lZ=e=>`${Math.round(e*100)}%`,uZ=()=>R(`span`,{"aria-hidden":!0,className:`inline-block size-1.5 shrink-0 rounded-full bg-warning`}),dZ=({dictionaryKey:e,siblings:t,selectedItem:n,selectedVariant:r,onSelect:i,isCompact:a=!1,className:o})=>{let s=V(JX),c=CD(),{editedContent:u}=DD(),[d,f]=N(``),[p,m]=N(!1),h=l(()=>(c?.internationalization?.locales??[]).map(String),[c]),g=String(c?.internationalization?.defaultLocale??h[0]??`en`),_=l(()=>XX(t),[t]),v=l(()=>ZX(t),[t]),y=l(()=>QX(t),[t]),b=l(()=>nZ(t),[t]),x=l(()=>_.map(e=>{let n=t.filter(t=>t.item===e),i=rZ((n.find(e=>r!==null&&e.variant!==void 0&&YY(e.variant)===r)??n[0])?.content,h,g);return{item:e,summary:i,completeness:sZ(i),missingKeys:b[e]??[],hasUnsavedChanges:n.some(e=>cZ(e,u))}}),[_,t,r,h,g,b,u]);if(_.length===0&&v.length===0)return null;let S=v.find(e=>e.identity===r),C=aZ(e,n,S),w=x.length>oZ,T=d.trim().toLowerCase(),E=x.filter(e=>(!p||e.completeness<1||e.missingKeys.length>0)&&(T===``||String(e.item).includes(T)||e.summary.preview.toLowerCase().includes(T))),D=e=>i({item:e,variant:r}),O=e=>i({item:n,variant:e}),k=e=>t.find(t=>t.variant!==void 0&&YY(t.variant)===e.identity&&(n===null||t.item===n)),A=e=>R(`span`,{className:G(`flex items-center gap-1.5`,e.isStructured&&`font-mono`),dir:e.isStructured?`ltr`:void 0,children:[typeof e.primaryValue==`string`?e.primaryValue:JSON.stringify(e.primaryValue),e.isDefault&&R(`span`,{className:`font-normal opacity-70`,children:[`(`,s.defaultTag,`)`]})]}),j=[e,...S?[typeof S.primaryValue==`string`?S.primaryValue:JSON.stringify(S.primaryValue)]:[],...n===null?[]:[String(s.itemLabel({item:String(n)}))]].join(` · `),M=(e,t)=>y&&R(`button`,{type:`button`,onClick:e,"aria-pressed":t,className:G(`flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-start text-sm transition-colors`,t?`bg-text/10 font-semibold`:`hover:bg-text/5`),children:[R(`span`,{className:`font-medium`,children:s.baseLabel}),R(`span`,{className:`truncate text-neutral text-xs`,children:s.baseDescription}),cZ(y,u)&&R(uZ,{})]}),P=(e,t)=>{let r=n===e.item,i=Object.entries(e.summary.completenessByLocale).map(([e,t])=>`${e}: ${lZ(t)}`).join(` · `);return R(`button`,{type:`button`,onClick:t,"aria-pressed":r,className:G(`flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-start text-sm transition-colors`,r?`bg-text/10`:`hover:bg-text/5`),children:[R(`span`,{className:`w-8 shrink-0 font-mono text-neutral text-xs`,dir:`ltr`,children:[`#`,e.item]}),R(`span`,{className:G(`min-w-0 flex-1 truncate`,r&&`font-semibold`,!e.summary.preview&&`text-neutral italic`),dir:`auto`,children:e.summary.preview||s.emptyPreview}),e.hasUnsavedChanges&&R(uZ,{}),e.missingKeys.length>0&&R(_R,{color:`warning`,size:`xs`,className:`shrink-0`,children:[s.missingKeys,` `,e.missingKeys.join(`, `)]}),!a&&R(`span`,{className:`flex w-24 shrink-0 items-center gap-2`,title:`${s.completenessLabel.value} — ${i}`,children:[R(`span`,{className:`h-1 flex-1 overflow-hidden rounded-full bg-neutral/20`,children:R(`span`,{className:G(`block h-full rounded-full`,e.completeness>=1?`bg-success`:`bg-warning`),style:{width:lZ(e.completeness)}})}),R(`span`,{className:`w-8 text-end text-neutral text-xs`,children:lZ(e.completeness)})]})]},e.item)},F=(e,t)=>{let n=r===e.identity,i=k(e);return R(`div`,{className:`flex flex-col gap-0.5`,children:[R(X,{variant:n?`default`:`outline`,size:`sm`,color:`text`,label:e.identity,"aria-pressed":n,onClick:t,children:R(`span`,{className:`flex items-center gap-1.5`,children:[A(e),i&&cZ(i,u)&&R(uZ,{})]})}),e.aliases.length>0&&R(`span`,{className:`px-1 text-neutral text-xs`,children:[s.alsoAnswersTo,` `,R(`span`,{className:`font-mono`,dir:`ltr`,children:e.aliases.map(e=>typeof e==`string`?e:JSON.stringify(e)).join(`, `)})]})]},e.identity)};if(a){let t=`sibling-switcher-${e}`;return R(`div`,{className:G(`rounded-xl border border-text text-foreground transition-colors`,o),children:R(mq,{identifier:t,children:[R(mq.Trigger,{identifier:t,label:s.contextLabel.value,color:`text`,variant:`hoverable`,roundedSize:`xl`,children:R(`span`,{className:`flex w-full items-center justify-between gap-2`,children:[R(`span`,{className:`truncate font-mono text-xs`,dir:`ltr`,children:j}),R(sc,{className:`shrink-0`,size:16})]})}),R(mq.Panel,{identifier:t,isOverable:!0,isFocusable:!0,align:`start`,children:R(bA,{className:`flex max-h-[60vh] w-72 flex-col gap-3 overflow-y-auto p-2`,transparency:`xs`,border:!0,roundedSize:`xl`,borderColor:`text`,children:[x.length>0&&R(`div`,{className:`flex flex-col gap-1`,children:[R(`span`,{className:`px-2 font-medium text-neutral text-xs`,children:s.itemsLabel}),M(()=>D(null),n===null),x.map(e=>P(e,()=>D(e.item)))]}),v.length>0&&R(`div`,{className:`flex flex-col gap-1`,children:[R(`span`,{className:`px-2 font-medium text-neutral text-xs`,children:s.variantsLabel}),R(`div`,{className:`flex flex-wrap gap-1 px-1`,children:v.map(e=>F(e,()=>O(r===e.identity?null:e.identity)))})]})]})})]})})}return R(`div`,{className:G(`flex flex-col gap-4`,o),children:[v.length>0&&R(`div`,{className:`flex flex-col gap-2`,children:[R(`span`,{className:`font-medium text-neutral text-xs`,children:s.variantsLabel}),R(`div`,{className:`flex flex-wrap items-start gap-1`,children:[x.length===0&&y&&R(X,{variant:r===null?`default`:`outline`,size:`sm`,color:`text`,label:s.baseLabel.value,"aria-pressed":r===null,onClick:()=>O(null),children:s.baseLabel}),v.map(e=>F(e,()=>O(r===e.identity?null:e.identity)))]}),S&&!S.isDefault&&R(`span`,{className:`text-neutral text-xs`,children:s.inheritanceHint})]}),x.length>0&&R(`div`,{className:`flex flex-col gap-2`,children:[R(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[R(`span`,{className:`font-medium text-neutral text-xs`,children:s.itemsLabel}),v.length>0&&R(`span`,{className:`text-neutral text-xs`,children:s.combinations({items:String(x.length),variants:String(v.length),total:String(x.length*v.length)})})]}),w&&R(`div`,{className:`flex flex-wrap items-center gap-3`,children:[R(`div`,{className:`min-w-48 flex-1`,children:R(qK,{value:d,onChange:e=>f(e.target.value),placeholder:s.searchItems.value,"aria-label":s.searchItems.value})}),R(VY,{name:`sibling-switcher-incomplete-only`,label:s.incompleteOnly,checked:p,onChange:e=>m(e.target.checked),size:`sm`})]}),R(`div`,{className:`flex max-h-72 flex-col gap-0.5 overflow-y-auto`,children:[M(()=>D(null),n===null),E.map(e=>P(e,()=>D(e.item))),E.length===0&&R(`span`,{className:`px-3 py-2 text-neutral text-sm`,children:s.noMatchingItem})]})]}),R(`div`,{className:`flex flex-wrap items-center gap-2`,children:[R(`span`,{className:`text-neutral text-xs`,children:s.codeSnippetLabel}),R(FY,{text:C,className:`text-xs`,size:12,children:R(`code`,{className:`font-mono text-xs`,dir:`ltr`,children:C})})]})]})},fZ={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:`Добавить новый узел`}}}},title:`Structure view`,description:`Interface content for managing nodes within a structured view, including actions to add, remove, and identify nodes by key.`,tags:[`form`,`dictionary editor`,`structure management`],location:`local`,localId:`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`};T();var pZ=({section:e,onValueChange:t})=>{let{multilingual:n,text:r,number:i,boolean:a,node:o,array:s,enumeration:c,plural:l,triggerPlaceHolder:u,nest:d,gender:f,select:p,condition:m,markdown:h,insertion:g,reactNode:_,file:v}=V(jK),y=ta(e),[b,x]=N(y);return R(Z,{value:b,onValueChange:e=>{x(e),t(e)},children:[R(Z.Trigger,{children:R(Z.Value,{placeholder:u})}),R(Z.Content,{children:[R(Z.Item,{value:Rr,children:n}),R(Z.Item,{value:Qr,children:r}),R(Z.Item,{value:$r,children:i}),R(Z.Item,{value:ei,children:a}),R(Z.Item,{value:Wr,children:o}),R(Z.Item,{value:Gr,children:s}),R(Z.Item,{value:zr,children:c}),R(Z.Item,{value:Br,children:l}),R(Z.Item,{value:ti,children:f}),R(Z.Item,{value:ni,children:p}),R(Z.Item,{value:Hr,children:g}),R(Z.Item,{value:Xr,children:h}),R(Z.Item,{value:Kr,children:d}),R(Z.Item,{value:Vr,children:m}),R(Z.Item,{value:qr,disabled:!0,children:_}),R(Z.Item,{value:Ur,children:v})]})]})},mZ=({section:e,dictionaryLocalId:t,keyPath:n,onNodeTypeChange:r})=>{let i=CD()?.internationalization?.locales??[],a=ta(e),o=Zi(e),s=e=>{r(Yi(a,i,e))};if(a===`translation`||a===`condition`||a===`gender`||a===`select`||a===`enumeration`||a===`plural`){let c=Object.keys(e[a])[0],l=[...n,{type:a,key:c}];return R(`div`,{className:`flex w-full flex-col gap-1`,children:[R(pZ,{section:e,onValueChange:e=>r(Yi(e,i))}),R(mZ,{section:o,keyPath:l,dictionaryLocalId:t,onNodeTypeChange:s})]})}if(a===`array`){let c=[...n,{type:a,key:0}];return R(`div`,{className:`flex w-full flex-col gap-1`,children:[R(pZ,{section:e,onValueChange:e=>r(Yi(e,i))}),R(mZ,{section:o,keyPath:c,dictionaryLocalId:t,onNodeTypeChange:s})]})}return a===`object`?R(C,{children:[R(pZ,{section:e,onValueChange:e=>r(Yi(e,i))}),R(`div`,{className:`ms-10 mt-6`,children:R(_Z,{keyPath:n,section:e,dictionaryLocalId:t})})]}):R(pZ,{section:e,onValueChange:e=>r(Yi(e,i))})},hZ=({sectionKey:e,section:t,keyPath:n,dictionaryLocalId:r})=>{let{focusedContent:i,setFocusedContentKeyPath:a}=kO(),{renameEditedContent:o,addEditedContent:s}=ED(),{titleInput:c,deleteButton:l}=V(fZ),u=e=>{o(r,e,n);let t=n.slice(0,-1),i=n[n.length-1],s=[...t,{...i,key:e}];a(s)};return R(bA,{transparency:`xl`,roundedSize:`2xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":$n(n,i?.keyPath??[]),onClick:()=>a(n),children:R(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof e==`string`&&R(`div`,{className:`w-full`,children:[R(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[R(uA,{name:`key`,"aria-label":`Key`,placeholder:c.placeholder.value,defaultValue:e,onSave:e=>u(e),variant:`invisible`}),R(X,{label:l.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Dc,onClick:()=>{s(r,void 0,n);let e=n.slice(0,-1);a(e)}})]}),R(`span`,{className:`ms-3 text-muted-foreground text-sm`,children:[`( `,fr(e),` )`]})]}),R(mZ,{keyPath:n,dictionaryLocalId:r,section:t,onNodeTypeChange:e=>{s(r,e,n)}})]})})},gZ=({section:e,keyPath:t,dictionaryLocalId:n})=>{let{addNodeButton:r}=V(fZ),{reorderField:i}=V(CK),{setFocusedContentKeyPath:a}=kO(),{addEditedContent:o}=ED(),{getDragHandleProps:s,getDropZoneProps:c}=FK({itemIds:e&&typeof e==`object`?Object.keys(e):[],orientation:`vertical`,title:i.value,onMove:(r,i)=>o(n,hY(e,r,i),t)});return!e||typeof e!=`object`?R(`div`,{children:`Not an object`}):R(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[R(`ul`,{className:`me-auto flex flex-col gap-4`,children:Object.keys(e).map(r=>R(`li`,{...c(r),className:G(`group/reorder flex w-full items-start gap-1 rounded-lg`,IK),children:[R(X,{...s(r),label:i.value,Icon:qs,iconClassName:`size-3.5`,variant:`none`,color:`neutral`,size:`custom`,roundedSize:`sm`,className:`mt-2 cursor-grab p-0.5 opacity-40 transition-opacity hover:bg-text/10 focus-visible:opacity-100 active:cursor-grabbing group-hover/reorder:opacity-100 data-[dragging=true]:opacity-40`}),R(hZ,{sectionKey:r,section:e?.[r],keyPath:[...t,{type:Wr,key:r}],dictionaryLocalId:n})]},`${JSON.stringify(t)}-object-${r}`))}),R(X,{label:r.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:pc,className:`flex-1`,onClick:()=>{let e=[...t,{type:Wr,key:`newKey`}];o(n,``,e),a(e)},children:r.text})]})},_Z=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?R(hZ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):R(gZ,{section:e,keyPath:t,dictionaryLocalId:n}),vZ=({dictionary:e})=>{let{content:t,localId:n}=e,{editedContent:r}=DD();return R(hZ,{section:r?.[n]?.content===void 0?t:r?.[n]?.content,keyPath:[],dictionaryLocalId:n})};T();var yZ=e=>{M(()=>{if(!e||typeof window>`u`)return;let t=e=>{e.preventDefault(),e.returnValue=``};return window.addEventListener(`beforeunload`,t),()=>window.removeEventListener(`beforeunload`,t)},[e])};T();var bZ=`intlayer:dictionary-editor:tab`,xZ=`intlayer:dictionary-editor:view`,SZ=[`grid`,`tree`,`structure`,`json`],CZ=()=>{let{changeSet:e}=oK();return yZ(e.length>0),null},wZ=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:i,onSave:a,showReturnButton:o=!0,rightContent:s,lockedLocales:c,siblings:u,tab:d,onTabChange:f,view:p,onViewChange:m})=>{let h=CD(),{returnToDictionaryList:g,contentTab:_,detailsTab:v,viewSwitcherLabel:y,documentView:b,gridView:x,treeView:S,structureView:w,jsonView:T}=V(NY),{setFocusedContent:E}=kO(),{setLocaleDictionary:D}=TD(),{containerRef:O,isNarrow:k}=nY(),A=r.includes(`remote`),[j,P]=ZA(bZ,`content`),F=d??(A&&j===`details`?`details`:`content`),I=e=>{f?.(e),P(e)},[L,ee]=N(e);M(()=>{ee(e)},[e]);let te=e.item!==void 0||e.variant!==void 0,{data:ne}=ik({keys:[e.key]},{enabled:!u&&!!e.key&&(A||te)}),z=l(()=>u??ne?.data??[],[u,ne]),re=eZ(L),ie=t=>{let n=t.item===null&&t.variant===null?QX(z)??e:$X(z,t);n&&n.localId!==L.localId&&(ee(n),E({dictionaryKey:n.key,dictionaryLocalId:n.localId,keyPath:[]}),D(n))},B=tR(L.content),[ae,oe,,se]=ZA(xZ,void 0),ce=SZ.find(e=>e===ae),[le,ue]=N(),de=p??le??ce??(B?`document`:`grid`);M(()=>{E(t=>t?.dictionaryKey===e.key&&t?.dictionaryLocalId===e.localId?t:{...t??{},dictionaryKey:e.key,dictionaryLocalId:e.localId}),D(e)},[e.key,e.localId]);let fe=e=>{m?.(e),e===`document`?(ue(`document`),se()):(ue(void 0),oe(e))},pe=[...B?[{content:b.value,value:`document`}]:[],{content:x.value,value:`grid`},{content:S.value,value:`tree`},{content:w.value,value:`structure`},{content:T.value,value:`json`}],me=`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`;return R(tj,{availableLocales:h?.internationalization?.locales??[],children:R(sK,{dictionary:L,lockedLocales:c,children:[R(CZ,{}),R(`div`,{ref:O,className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[o&&R(X,{onClick:t,variant:`hoverable`,className:`z-10 ms-5 me-auto mb-6 shrink-0`,color:`text`,Icon:ps,label:g.label.value,children:g.text}),R(dZ,{className:`mx-3 mb-3 shrink-0`,dictionaryKey:e.key,siblings:z,selectedItem:re.item,selectedVariant:re.variant,onSelect:ie,isCompact:k}),R(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[R(`div`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-16 gap-y-3 rounded-xl bg-background/20 p-3 pb-4`,children:[A&&R(QJ,{selectedChoice:F,tabs:[R(`button`,{className:me,"data-active":F===`content`,onClick:()=>I(`content`),type:`button`,children:_},`content`),R(`button`,{className:me,"data-active":F===`details`,onClick:()=>I(`details`),type:`button`,children:v},`details`)],hoverable:!0,color:`text`,className:`w-auto`}),F===`content`&&R(`div`,{title:y.value,className:`overflow-x-auto`,children:R(QJ,{selectedChoice:de,tabs:pe.map(({content:e,value:t})=>R(`button`,{className:me,"data-active":de===t,onClick:()=>fe(t),type:`button`,children:e},t)),hoverable:!0,color:`text`,className:`w-auto`})}),R(`div`,{className:`ms-auto flex items-center justify-end`,children:s})]}),R(`div`,{className:G(`min-h-0 flex-1 p-6`,F===`content`&&de===`grid`?`flex min-h-0 flex-col overflow-hidden`:`overflow-y-auto`),children:R(`div`,{className:G(`flex w-full min-w-0 flex-col items-stretch gap-6`,F===`content`&&de===`grid`&&`h-full min-h-0 flex-1`),children:[A&&F===`details`&&R(iX,{dictionary:L,mode:r}),F===`content`&&R(C,{children:[de===`document`&&R(jY,{}),de===`grid`&&R(yY,{dictionary:L}),de===`tree`&&R(hX,{dictionary:L}),de===`structure`&&R(vZ,{dictionary:L}),de===`json`&&R(lX,{dictionary:L,isDarkMode:n})]})]})})]}),R(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:R(bA,{color:`card`,roundedSize:`2xl`,padding:`sm`,className:`w-full shrink-0 flex-row flex-wrap items-center justify-end gap-x-10 gap-y-2 bg-background/20 md:bottom-0`,children:[L.id&&R(FY,{text:L.id,className:`text-nowrap font-mono text-muted-foreground text-sm`,size:9,children:L.id}),R(qX,{dictionary:L,mode:r,className:`flex-1`,onDelete:()=>{E(null),i?.()},onSave:a})]})})]})]})})},TZ={key:`push-dictionaries-progress`,content:{nodeType:`translation`,translation:{en:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dictionaries pushed`},pushing:`Pushing:`,failed:`Failed:`},"en-GB":{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dictionaries pushed`},pushing:`Pushing:`,failed:`Failed:`},fr:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dictionnaires envoyés`},pushing:`Envoi en cours :`,failed:`Échecs :`},es:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} diccionarios enviados`},pushing:`Enviando:`,failed:`Fallidos:`},de:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} Wörterbücher gesendet`},pushing:`Wird gesendet:`,failed:`Fehlgeschlagen:`},ja:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} 件の辞書をプッシュ済み`},pushing:`プッシュ中:`,failed:`失敗:`},ko:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`사전 {{settled}}/{{total}}개 푸시됨`},pushing:`푸시 중:`,failed:`실패:`},zh:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`已推送 {{settled}}/{{total}} 个字典`},pushing:`正在推送:`,failed:`失败:`},it:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dizionari inviati`},pushing:`Invio in corso:`,failed:`Non riusciti:`},pt:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dicionários enviados`},pushing:`Enviando:`,failed:`Falharam:`},hi:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} शब्दकोश भेजे गए`},pushing:`भेजा जा रहा है:`,failed:`विफल:`},ar:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`تم إرسال {{settled}}/{{total}} قواميس`},pushing:`جارٍ الإرسال:`,failed:`فشل:`},ru:{pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`Отправлено словарей: {{settled}}/{{total}}`},pushing:`Отправка:`,failed:`Ошибки:`}}},location:`local`,localId:`push-dictionaries-progress::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/PushDictionariesProgress/pushDictionariesProgress.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/PushDictionariesProgress/pushDictionariesProgress.content.mjs`},EZ=({progress:e,className:t})=>{let n=V(TZ),{totalCount:r,settledCount:i,pushingKeys:a,failedKeys:o}=e,s=r===0?100:Math.round(i/r*100);return R(`div`,{className:G(`flex flex-col gap-2 text-sm`,t),children:[R(`span`,{className:`font-medium`,children:n.pushedCount({settled:i,total:r})}),R(`div`,{className:`h-1 w-full overflow-hidden rounded-full bg-neutral/20`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":i,children:R(`div`,{className:`h-full rounded-full bg-text transition-[width]`,style:{width:`${s}%`}})}),a.length>0&&R(`div`,{className:`flex flex-col gap-1`,children:[R(`span`,{className:`text-neutral`,children:n.pushing}),R(`ul`,{className:`max-h-40 list-inside list-disc overflow-y-auto`,children:a.map(e=>R(`li`,{className:`truncate`,children:e},e))})]}),o.length>0&&R(`div`,{className:`flex flex-col gap-1 text-error`,children:[R(`span`,{children:n.failed}),R(`ul`,{className:`max-h-40 list-inside list-disc overflow-y-auto`,children:o.map(e=>R(`li`,{className:`truncate`,children:e},e))})]})]})},DZ={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:`Закрыть панель`}}},title:`Right Drawer`,description:`Localized UI strings for the Right Drawer component (labels: "Go back" and "Close Drawer").`,tags:[`component`,`right-drawer`,`ui`,`localization`],location:`local`,localId:`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`},OZ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,isDisabled:i=!1,className:a,...o})=>{let s=t&&!i;return R(`div`,{className:G(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-[grid-template-columns] duration-500 ease-in-out`,s?``:`grid-cols-[1fr]`,a),"aria-hidden":s,inert:s?!0:void 0,...o,children:R(`div`,{style:{minWidth:`${n}px`},className:G(r===`right`&&`ms-auto`),children:e})})},kZ=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};T();var AZ=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;isOpen=e=>!!this.drawers[e];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={open:AZ.open,close:AZ.close,set:AZ.set},MZ=()=>!1,NZ=()=>jZ,PZ=e=>{let t=n(()=>AZ.isOpen(e),[e]);return A(AZ.subscribe,t,MZ)};T();var FZ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=V(DZ),{isMobile:d}=oq(`md`),f=P(null),p=P(null),m=_X(l),{open:h,close:g}=NZ(),_=PZ(t),v=_,[y,b]=N(!1);M(()=>{if(!v){b(!1);return}let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>b(!0))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[v]);let x=v&&y;bX({disableScroll:v,key:t?`right_drawer_${t}`:`right_drawer`}),M(()=>{if(!v)return;let e=e=>{try{if(!f.current)return;let n=a,r=e.target&&!f.current.contains(e.target),i=kZ(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[v,g,c,a,t]);let S=P(c);return M(()=>{S.current=c},[c]),M(()=>{s!==void 0&&s!==_&&(s?h(t):(g(t),S.current?.()))},[s,_,t,h,g]),m?D(R(`div`,{className:`fixed inset-e-0 top-0 z-50 flex h-full justify-end`,children:R(OZ,{isHidden:!x,align:`right`,children:R(bA,{className:`relative flex h-screen w-screen flex-col border-s text-foreground md:w-100`,ref:f,roundedSize:`none`,borderColor:`neutral`,children:[R(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[R(`div`,{className:`flex justify-between gap-3`,children:[R(`div`,{children:o&&R(X,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:Cs,children:o?.text})}),R(`div`,{children:R(hR,{identifier:`close-drawer`,children:[R(X,{variant:`hoverable`,color:`text`,label:`Close`,className:`ms-auto`,onClick:()=>{g(t),c?.()},Icon:Lc,size:`icon-md`}),R(hR.Detail,{identifier:`close-drawer`,children:R(`div`,{className:`flex items-center gap-2 p-2`,children:[R(`span`,{className:`whitespace-nowrap text-muted-foreground text-xs`,children:u.closeDrawer}),R(fq,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&R(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),R(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:R(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(g(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(g(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&R(`div`,{className:`shrink-0`,children:i})]})})}),m):R(C,{})};p();var IZ=e=>{let t=P(e??void 0);return e!=null&&(t.current=e),t.current},LZ=`dictionaryList`;p();var RZ=e=>`dictionary_edition_${e}`,zZ=e=>{let t=RZ(e),{open:r,close:i}=NZ(),a=PZ(t),{getEditedContentValue:o}=ED(),{focusedContent:s,setFocusedContent:c}=kO();return M(()=>{s?.dictionaryKey&&r(t)},[s?.dictionaryKey,r,t]),{isOpen:a,focusedContent:s,getEditedContentValue:o,close:n(()=>{i(t),c(e=>e?.dictionaryKey?{...e,keyPath:[]}:e??null)},[i,t,c])}};p();var BZ=({dictionaryKey:e,isDarkMode:t})=>{let{backButtonText:n,openDictionaryEditor:r,modalTitle:i,noDictionaryFocused:a,focusedDictionaryNotFound:o}=V(Sk),s=RZ(e),{focusedContent:c,close:l}=zZ(e),{setFocusedContent:u}=kO(),{open:d}=NZ(),f=()=>d(LZ),{data:p}=ck(),m=p,h=()=>{l(),u(null),f()},[g,_]=N(!1),v=()=>{_(!1),h()},y=IZ(c?.dictionaryLocalId);if(!y)return R(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:a});let b=m?.[e]?.find(e=>e.localId===y);return b?R(FZ,{identifier:s,backButton:{onBack:h,text:n.value},onClose:()=>{l(),u(null)},header:R(C,{children:[R(`header`,{className:`mb-5 flex w-full px-3`,children:[R(`h3`,{className:`w-full text-center text-lg`,children:b.title?b.title:b.key}),R(hR,{identifier:`open-dictionary-editor`,children:[R(X,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:lc,label:r.label.value,onClick:()=>_(!0)}),R(hR.Detail,{identifier:`open-dictionary-editor`,children:R(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:r.popoverContent})})]})]}),R(`div`,{className:`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dotted pb-3`,children:[R(_R,{color:`text`,roundedSize:`full`,size:`xs`,children:b.key}),b.filePath&&R(_R,{color:`neutral`,roundedSize:`full`,size:`xs`,children:b.filePath.split(`/`).pop()}),b.id&&R(_R,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]})]}),footer:R(qX,{dictionary:b,mode:[`local`,`remote`],className:`mb-4 flex-col px-3`,onDelete:h}),children:[R(HX,{isOpen:g,onClose:()=>_(!1),hasCloseButton:!0,title:i,size:`xl`,transparency:`lg`,className:`h-full`,children:R(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:R(wZ,{dictionary:b,onClickDictionaryList:v,isDarkMode:t,mode:[`local`,`remote`],onDelete:()=>{_(!1),h()},onSave:()=>{_(!1)}})})}),R(_A,{dictionary:b})]}):R(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:o})},VZ=({isDarkMode:e})=>{let{focusedContent:t}=kO(),n=IZ(t?.dictionaryKey);return n?R(BZ,{dictionaryKey:n,isDarkMode:e}):R(C,{})},HZ={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}}`}}}}},location:`local`,localId:`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`,filePath:`client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`};T();var UZ=e=>{let{minChars:t=3,debounceMs:n=300,trim:r=!0,defaultValue:i,onSearch:a,onClear:o}=e??{},s=P(``),c=P(null),[l,u]=N(i??``),d=()=>{c.current&&=(clearTimeout(c.current),null)};return M(()=>()=>{d()},[]),{setSearch:e=>{s.current=e;let i=r?e.trim():e;d(),i.length<t?(u(``),o?.()):c.current=setTimeout(()=>{let e=r?s.current.trim():s.current;e.length>=t?(u(e),a?.(e)):(u(``),o?.())},n)},search:l,hasMinChars:l.length>=t}},WZ={key:`push-dictionaries-button`,content:{nodeType:`translation`,translation:{en:{label:{fields:[`count`],nodeType:`insertion`,insertion:`Push the {{count}} dictionaries to the CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} not in the CMS yet`},awaitingLogin:`Sign in to the CMS in the opened tab, the push starts right after.`},"en-GB":{label:{fields:[`count`],nodeType:`insertion`,insertion:`Push the {{count}} dictionaries to the CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} not in the CMS yet`},awaitingLogin:`Sign in to the CMS in the opened tab, the push starts right after.`},fr:{label:{fields:[`count`],nodeType:`insertion`,insertion:`Envoyer les {{count}} dictionnaires vers le CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} absents du CMS`},awaitingLogin:`Connectez-vous au CMS dans l’onglet ouvert, l’envoi démarre juste après.`},es:{label:{fields:[`count`],nodeType:`insertion`,insertion:`Enviar los {{count}} diccionarios al CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} aún no están en el CMS`},awaitingLogin:`Inicia sesión en el CMS en la pestaña abierta, el envío empieza justo después.`},de:{label:{fields:[`count`],nodeType:`insertion`,insertion:`Die {{count}} Wörterbücher an das CMS senden`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} noch nicht im CMS`},awaitingLogin:`Melden Sie sich im geöffneten Tab beim CMS an, danach startet das Senden.`},ja:{label:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} 件の辞書を CMS にプッシュ`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`CMS 未登録: {{count}} 件`},awaitingLogin:`開いたタブで CMS にサインインすると、すぐにプッシュが始まります。`},ko:{label:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}}개의 사전을 CMS에 푸시`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`CMS에 아직 없음: {{count}}개`},awaitingLogin:`열린 탭에서 CMS에 로그인하면 바로 푸시가 시작됩니다.`},zh:{label:{fields:[`count`],nodeType:`insertion`,insertion:`将 {{count}} 个字典推送到 CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} 个尚未在 CMS 中`},awaitingLogin:`请在打开的标签页中登录 CMS,随后将立即开始推送。`},it:{label:{fields:[`count`],nodeType:`insertion`,insertion:`Invia i {{count}} dizionari al CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} non ancora nel CMS`},awaitingLogin:`Accedi al CMS nella scheda aperta, l’invio parte subito dopo.`},pt:{label:{fields:[`count`],nodeType:`insertion`,insertion:`Enviar os {{count}} dicionários para o CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} ainda não estão no CMS`},awaitingLogin:`Entre no CMS na aba aberta, o envio começa logo em seguida.`},hi:{label:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} शब्दकोशों को CMS पर भेजें`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} अभी CMS में नहीं हैं`},awaitingLogin:`खुले टैब में CMS में साइन इन करें, उसके तुरंत बाद भेजना शुरू होगा।`},ar:{label:{fields:[`count`],nodeType:`insertion`,insertion:`إرسال {{count}} قواميس إلى نظام إدارة المحتوى`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} غير موجودة في نظام إدارة المحتوى بعد`},awaitingLogin:`سجّل الدخول إلى نظام إدارة المحتوى في التبويب المفتوح، ويبدأ الإرسال مباشرة بعد ذلك.`},ru:{label:{fields:[`count`],nodeType:`insertion`,insertion:`Отправить {{count}} словарей в CMS`},missingCount:{fields:[`count`],nodeType:`insertion`,insertion:`Ещё нет в CMS: {{count}}`},awaitingLogin:`Войдите в CMS в открывшейся вкладке, отправка начнётся сразу после.`}}},location:`local`,localId:`push-dictionaries-button::local::client/src/components/Editor/PushDictionariesButton/pushDictionariesButton.content.ts`,filePath:`client/src/components/Editor/PushDictionariesButton/pushDictionariesButton.content.ts`};p();var GZ=()=>{let e=vk(),t=!!e?.auth,r=!!e?.isLoggingIn,{localeDictionaries:i,setLocaleDictionary:a}=wD(),{editedContent:o,restoreEditedContent:s}=DD(),{mutate:c,isPending:u,progress:d}=ok(),{data:f}=ak({enabled:t}),[p,m]=N(null),h=l(()=>FC(Object.values(i??{})).map(e=>{let t=o?.[e.localId];return t?{...e,...t}:e}),[i,o]),g=l(()=>{let e=f?.data;if(!t||!e)return h;let n=new Set(e);return h.filter(e=>!n.has(e.key))},[t,f,h]),_=n(e=>{e.length!==0&&c({dictionaries:e},{onSuccess:t=>{let n=new Set((t.data?.error??[]).map(({localId:e})=>e));for(let t of e){let e=t.localId;!n.has(e)&&o?.[e]&&(a(t),s(e))}}})},[c,o,a,s]),v=n(n=>{t||!e?_(n):(m(n),e.login())},[t,e,_]);return M(()=>{p&&(t?(m(null),_(p)):r||m(null))},[p,t,r,_]),{localDictionaries:h,missingDictionaries:g,push:v,isPushing:u||p!==null,isAwaitingLogin:p!==null,progress:d}},KZ=({identifier:e})=>{let t=V(WZ),{localDictionaries:n,missingDictionaries:r,push:i,isPushing:a,isAwaitingLogin:o,progress:s}=GZ();if(n.length===0)return null;let c=(s?.failedKeys.length??0)>0,l=!o&&(a||c);return R(aR,{identifier:e,children:[R(X,{label:t.label({count:n.length}).value,onClick:()=>i(n),isLoading:a,disabled:a,variant:`hoverable`,color:`text`,size:`icon-sm`,Icon:jc}),R(aR.Detail,{identifier:e,xAlign:`end`,isHidden:!a&&void 0,children:R(bA,{className:`flex min-w-64 flex-col gap-2 p-3 text-sm`,children:[o&&R(`p`,{children:t.awaitingLogin}),l&&s&&R(EZ,{progress:s}),!o&&!l&&R(C,{children:[R(`p`,{children:t.label({count:n.length})}),r.length>0&&R(`p`,{className:`text-neutral`,children:t.missingCount({count:r.length})})]})]})})]})};p();var qZ=()=>{let{drawerTitle:e,buttonLabel:t}=V(HZ),{set:n}=NZ(),{localeDictionaries:r}=wD(),{editedContent:i}=DD(),{setFocusedContent:a}=kO(),{setSearch:o,search:s}=UZ(),c=l(()=>Object.values(r??{}),[r]),u=l(()=>new VJ(c,{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[c]),d=l(()=>{let e=s?.trim()??``;return e===``?c:u.search(e).map(e=>e.item)},[s,u,c]),f=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[LZ]:!1,[RZ(e.key)]:!0})},p=l(()=>new Set(Object.keys(i??{})),[i]);return R(FZ,{title:e.label.value,identifier:LZ,children:[R(`div`,{className:`flex items-center gap-2 p-3 pb-4`,children:[R(qK,{placeholder:`Search dictionaries`,onChange:e=>o(e.currentTarget.value),type:`search`}),R(KZ,{identifier:`push-dictionaries-drawer`})]}),R(`ul`,{className:`flex flex-col gap-1`,children:d.map(e=>R(`li`,{className:`w-full`,children:R(X,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>f(e),variant:`hoverable`,color:`text`,IconRight:Ts,size:`md`,isFullWidth:!0,Icon:p.has(e.localId)?dc:void 0,children:R(`div`,{className:`flex items-center gap-2 py-1`,children:R(`div`,{className:`flex max-w-full flex-col gap-1`,children:[R(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[R(_R,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&R(_R,{color:`neutral`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&R(_R,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]}),R(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},JZ={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} to edit the {{dictionaryKey}} dictionary`},longPress:`Long press`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + click`}},"en-GB":{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} to edit the {{dictionaryKey}} dictionary`},longPress:`Long press`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + click`}},fr:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} pour modifier le dictionnaire {{dictionaryKey}}`},longPress:`Appui long`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clic`}},es:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} para editar el diccionario {{dictionaryKey}}`},longPress:`Pulsación larga`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clic`}},de:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}}, um das Wörterbuch {{dictionaryKey}} zu bearbeiten`},longPress:`Lange drücken`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + Klick`}},ja:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} で {{dictionaryKey}} 辞書を編集`},longPress:`長押し`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + クリック`}},ko:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}}: {{dictionaryKey}} 사전 편집`},longPress:`길게 누르기`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + 클릭`}},zh:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} 以编辑 {{dictionaryKey}} 字典`},longPress:`长按`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + 点击`}},it:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} per modificare il dizionario {{dictionaryKey}}`},longPress:`Pressione prolungata`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clic`}},pt:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} para editar o dicionário {{dictionaryKey}}`},longPress:`Pressão longa`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clique`}},hi:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{dictionaryKey}} डिक्शनरी संपादित करने के लिए {{longPress}} / {{modifierClick}}`},longPress:`देर तक दबाएँ`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + क्लिक`}},ar:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} لتعديل القاموس {{dictionaryKey}}`},longPress:`ضغط مطوّل`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + نقرة`}},ru:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}}, чтобы редактировать словарь {{dictionaryKey}}`},longPress:`Долгое нажатие`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + клик`}}}},location:`local`,localId:`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`,filePath:`client/src/components/Editor/LongPressMessage/index.content.ts`},YZ=({children:e,className:t,...n})=>R(`span`,{...n,className:G(`mx-1 whitespace-nowrap rounded-md border border-neutral px-1.5 font-semibold`,t),children:e}),XZ=()=>{let{message:e,longPress:t,modifierClick:n}=V(JZ),{isMac:r}=oq(),i=CO(ID.INTLAYER_HOVERED_CONTENT_CHANGED,null);return R(bA,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:G(`ml-1 p-1 pr-2 text-sm text-text transition-opacity duration-100`,i?.dictionaryKey?`opacity-100`:`opacity-0`),children:R(`p`,{className:`text-sm text-text/50 leading-6`,children:i?.dictionaryKey?e({longPress:R(YZ,{children:t}),modifierClick:R(YZ,{children:n({modifierKey:r?`⌘`:`Ctrl`})}),dictionaryKey:R(YZ,{className:`wrap-break-word mx-1`,children:i.dictionaryKey})}):``})})},ZZ=({children:e})=>R(`div`,{className:`relative size-full bg-card p-3`,children:[e,R(`div`,{className:`absolute inset-e-2 bottom-2`,children:R(XZ,{})}),R(VZ,{}),R(qZ,{})]}),QZ=3e3,$Z=async e=>{try{return await fetch(e,{method:`HEAD`,mode:`no-cors`,cache:`no-store`}),{isRunning:!0}}catch(e){return{isRunning:!1,errorMessage:e instanceof Error?e.message:String(e)}}},eQ=e=>{let{data:t,isPending:n,refetch:r}=Wt({queryKey:[`application-status`,e],queryFn:()=>$Z(e),enabled:!!e,retry:!1,staleTime:0,refetchOnWindowFocus:!0,refetchInterval:QZ});return{isChecking:n,isRunning:t?.isRunning===!0,errorMessage:t?.isRunning===!1?t.errorMessage:void 0,retry:r}};p();var tQ,nQ=()=>(tQ??=fetch(`/api/config`).then(e=>e.json()).then(e=>e.data).catch(e=>{throw tQ=void 0,e}),tQ),rQ=()=>{let[e,t]=N();return M(()=>{nQ().then(t)},[]),e},iQ={key:`application-not-running-view`,content:{nodeType:`translation`,translation:{en:{title:`Your application is not accessible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`The editor could not reach {{applicationUrl}}. Start your application, the editor will connect automatically.`},configurationTip:"If your application runs on another URL, update the `editor.applicationURL` field of your configuration.",retry:`Retry`,checkingApplicationStatus:`Checking application status`},"en-GB":{title:`Your application is not accessible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`The editor could not reach {{applicationUrl}}. Start your application, the editor will connect automatically.`},configurationTip:"If your application runs on another URL, update the `editor.applicationURL` field of your configuration.",retry:`Retry`,checkingApplicationStatus:`Checking application status`},fr:{title:`Votre application n'est pas accessible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`L'éditeur n'a pas pu joindre {{applicationUrl}}. Démarrez votre application, l'éditeur se connectera automatiquement.`},configurationTip:"Si votre application tourne sur une autre URL, mettez à jour le champ `editor.applicationURL` de votre configuration.",retry:`Réessayer`,checkingApplicationStatus:`Vérification de l'état de l'application`},es:{title:`Tu aplicación no está accesible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`El editor no pudo acceder a {{applicationUrl}}. Inicie su aplicación, el editor se conectará automáticamente.`},configurationTip:"Si su aplicación se ejecuta en otra URL, actualice el campo `editor.applicationURL` de su configuración.",retry:`Reintentar`,checkingApplicationStatus:`Verificando el estado de la aplicación`},de:{title:`Ihre Anwendung ist nicht zugänglich`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`Der Editor konnte {{applicationUrl}} nicht erreichen. Starten Sie Ihre Anwendung, der Editor verbindet sich automatisch.`},configurationTip:"Wenn Ihre Anwendung unter einer anderen URL läuft, aktualisieren Sie das Feld `editor.applicationURL` Ihrer Konfiguration.",retry:`Erneut versuchen`,checkingApplicationStatus:`Status der Anwendung wird geprüft`},ja:{title:`アプリケーションにアクセスできません`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`エディターは {{applicationUrl}} に接続できませんでした。アプリケーションを起動すると、エディターが自動的に接続します。`},configurationTip:"アプリケーションが別の URL で実行されている場合は、設定の `editor.applicationURL` フィールドを更新してください。",retry:`再試行`,checkingApplicationStatus:`アプリケーションの状態を確認しています`},ko:{title:`애플리케이션에 접근할 수 없습니다`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`에디터가 {{applicationUrl}}에 연결할 수 없습니다. 애플리케이션을 시작하면 에디터가 자동으로 연결됩니다.`},configurationTip:"애플리케이션이 다른 URL에서 실행 중이라면 설정의 `editor.applicationURL` 필드를 업데이트하세요.",retry:`다시 시도`,checkingApplicationStatus:`애플리케이션 상태를 확인하고 있습니다`},zh:{title:`您的应用程序无法访问`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`编辑器无法访问 {{applicationUrl}}。启动您的应用程序后,编辑器将自动连接。`},configurationTip:"如果您的应用程序运行在其他 URL 上,请更新配置中的 `editor.applicationURL` 字段。",retry:`重试`,checkingApplicationStatus:`正在检查应用程序状态`},it:{title:`La tua applicazione non è accessibile`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`L'editor non è riuscito a raggiungere {{applicationUrl}}. Avvia la tua applicazione, l'editor si connetterà automaticamente.`},configurationTip:"Se la tua applicazione è in esecuzione su un altro URL, aggiorna il campo `editor.applicationURL` della configurazione.",retry:`Riprova`,checkingApplicationStatus:`Controllo dello stato dell'applicazione`},pt:{title:`Sua aplicação não está acessível`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`O editor não conseguiu acessar {{applicationUrl}}. Inicie sua aplicação, o editor se conectará automaticamente.`},configurationTip:"Se sua aplicação roda em outra URL, atualize o campo `editor.applicationURL` da sua configuração.",retry:`Tentar novamente`,checkingApplicationStatus:`Verificando o estado da aplicação`},hi:{title:`आपका एप्लिकेशन उपलब्ध नहीं है`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`एडिटर {{applicationUrl}} तक नहीं पहुँच सका। अपना एप्लिकेशन शुरू करें, एडिटर अपने आप कनेक्ट हो जाएगा।`},configurationTip:"यदि आपका एप्लिकेशन किसी अन्य URL पर चल रहा है, तो अपने कॉन्फ़िगरेशन का `editor.applicationURL` फ़ील्ड अपडेट करें।",retry:`पुनः प्रयास करें`,checkingApplicationStatus:`एप्लिकेशन की स्थिति की जांच हो रही है`},ar:{title:`تطبيقك غير متاح`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`تعذر على المحرر الوصول إلى {{applicationUrl}}. شغّل تطبيقك، وسيتصل المحرر تلقائيًا.`},configurationTip:"إذا كان تطبيقك يعمل على عنوان URL آخر، فحدّث الحقل `editor.applicationURL` في الإعدادات.",retry:`إعادة المحاولة`,checkingApplicationStatus:`جارٍ التحقق من حالة التطبيق`},ru:{title:`Ваше приложение недоступно`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`Редактору не удалось подключиться к {{applicationUrl}}. Запустите приложение, и редактор подключится автоматически.`},configurationTip:"Если приложение работает по другому URL, обновите поле `editor.applicationURL` в конфигурации.",retry:`Повторить`,checkingApplicationStatus:`Проверка состояния приложения`}}},title:`Application not running view`,description:`Shown by the standalone editor when the configured application URL does not answer.`,location:`local`,localId:`application-not-running-view::local::client/src/components/Editor/ApplicationNotRunningView/applicationNotRunningView.content.ts`,filePath:`client/src/components/Editor/ApplicationNotRunningView/applicationNotRunningView.content.ts`},aQ=({applicationURL:e,errorMessage:t,onRetry:n})=>{let{title:r,description:i,configurationTip:a,retry:o}=V(iQ);return R(`div`,{className:`flex size-full items-center justify-center p-4`,children:R(bA,{className:`flex max-w-xl flex-col gap-4 text-sm`,padding:`xl`,roundedSize:`3xl`,border:!0,borderColor:`neutral`,children:[R(FX,{className:`text-lg`,children:r}),R(`p`,{className:`text-neutral`,children:i({applicationUrl:R(`strong`,{children:e})})}),t&&R(`code`,{className:`rounded-lg border border-error p-2 text-neutral text-xs`,children:t}),R(`p`,{className:`text-neutral`,children:a}),R(X,{label:o.value,onClick:n,color:`text`,className:`ms-auto`,children:o})]})})};p();var oQ=({children:e,iframeRef:t})=>{let r=rQ(),i=r?.editor.applicationURL,{isChecking:a,isRunning:o,errorMessage:s,retry:c}=eQ(i),u=n(e=>{t.current?.contentWindow?.postMessage(e,i)},[t,i]),d=l(()=>[i],[i]);return!r||i&&a?R(wk,{}):i&&!o?R(Dr,{children:R(aQ,{applicationURL:i,errorMessage:s,onRetry:()=>c()})}):R(xO,{postMessage:u,allowedOrigins:d,configuration:r,children:e})};p();var sQ=[`vscode-webview:`],cQ=()=>{if(typeof window>`u`||window.parent===window)return null;let e=window.location.ancestorOrigins?.[0];return e&&sQ.some(t=>e.startsWith(t))?e:null},lQ=()=>{let{focusedContent:e}=kO();return M(()=>{let t=cQ();t&&window.parent.postMessage({type:ID.INTLAYER_FOCUSED_CONTENT_CHANGED,data:e},t)},[e]),null},uQ={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:`Включить редактор`}}},location:`local`,localId:`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`,filePath:`client/src/components/Editor/iframeController.content.ts`},dQ={key:`browser`,content:{nodeType:`translation`,translation:{en:{ariaLabel:`Embedded browser`,urlLabel:`URL address bar`,urlPlaceholder:`https://example.com`,errorMessage:`Invalid URL. Try a path like "/page" or a full URL.`,domainRestrictionError:`URL must match the application domain.`,backButtonLabel:`Go back`,forwardButtonLabel:`Go forward`,iframeTitle:`Embedded web page`,sitemapButtonLabel:`Scan sitemap`,sitemapSearchPlaceholder:`Filter URLs…`,sitemapSearchAriaLabel:`Search sitemap URLs`,sitemapLoading:`Scanning sitemap…`,sitemapEmpty:`No URLs found`,sitemapError:`Could not load sitemap`},"en-GB":{ariaLabel:`Embedded browser`,urlLabel:`URL address bar`,urlPlaceholder:`https://example.com`,errorMessage:`Invalid URL. Try a path like "/page" or a full URL.`,domainRestrictionError:`URL must match the application domain.`,backButtonLabel:`Go back`,forwardButtonLabel:`Go forward`,iframeTitle:`Embedded web page`,sitemapButtonLabel:`Scan sitemap`,sitemapSearchPlaceholder:`Filter URLs…`,sitemapSearchAriaLabel:`Search sitemap URLs`,sitemapLoading:`Scanning sitemap…`,sitemapEmpty:`No URLs found`,sitemapError:`Could not load sitemap`},fr:{ariaLabel:`Navigateur intégré`,urlLabel:`Barre d'adresse URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL invalide. Essayez un chemin comme "/page" ou une URL complète.`,domainRestrictionError:`L'URL doit correspondre au domaine de l'application.`,backButtonLabel:`Retour`,forwardButtonLabel:`Avancer`,iframeTitle:`Page web intégrée`,sitemapButtonLabel:`Scanner le sitemap`,sitemapSearchPlaceholder:`Filtrer les URLs…`,sitemapSearchAriaLabel:`Rechercher les URLs du sitemap`,sitemapLoading:`Scan du sitemap en cours…`,sitemapEmpty:`Aucune URL trouvée`,sitemapError:`Impossible de charger le sitemap`},es:{ariaLabel:`Navegador integrado`,urlLabel:`Barra de direcciones URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL no válida. Intente una ruta como "/page" o una URL completa.`,domainRestrictionError:`La URL debe coincidir con el dominio de la aplicación.`,backButtonLabel:`Atrás`,forwardButtonLabel:`Adelante`,iframeTitle:`Página web integrada`,sitemapButtonLabel:`Escanear sitemap`,sitemapSearchPlaceholder:`Filtrar URLs…`,sitemapSearchAriaLabel:`Buscar URLs del sitemap`,sitemapLoading:`Escaneando sitemap…`,sitemapEmpty:`No se encontraron URLs`,sitemapError:`No se pudo cargar el sitemap`},de:{ariaLabel:`Eingebetteter Browser`,urlLabel:`URL-Adressleiste`,urlPlaceholder:`https://example.com`,errorMessage:`Ungültige URL. Versuchen Sie einen Pfad wie "/page" oder eine vollständige URL.`,domainRestrictionError:`Die URL muss mit der Anwendungsdomäne übereinstimmen.`,backButtonLabel:`Zurück`,forwardButtonLabel:`Vorwärts`,iframeTitle:`Eingebettete Webseite`,sitemapButtonLabel:`Sitemap scannen`,sitemapSearchPlaceholder:`URLs filtern…`,sitemapSearchAriaLabel:`Sitemap-URLs durchsuchen`,sitemapLoading:`Sitemap wird gescannt…`,sitemapEmpty:`Keine URLs gefunden`,sitemapError:`Sitemap konnte nicht geladen werden`},ja:{ariaLabel:`埋め込みブラウザ`,urlLabel:`URLアドレスバー`,urlPlaceholder:`https://example.com`,errorMessage:`無効なURL。"/page"のようなパスまたは完全なURLを試してください。`,domainRestrictionError:`URLはアプリケーションドメインと一致する必要があります。`,backButtonLabel:`戻る`,forwardButtonLabel:`進む`,iframeTitle:`埋め込みウェブページ`,sitemapButtonLabel:`サイトマップをスキャン`,sitemapSearchPlaceholder:`URLを絞り込む…`,sitemapSearchAriaLabel:`サイトマップURLを検索`,sitemapLoading:`サイトマップをスキャン中…`,sitemapEmpty:`URLが見つかりません`,sitemapError:`サイトマップを読み込めませんでした`},ko:{ariaLabel:`임베디드 브라우저`,urlLabel:`URL 주소 표시줄`,urlPlaceholder:`https://example.com`,errorMessage:`잘못된 URL입니다. "/page"와 같은 경로 또는 전체 URL을 시도하십시오.`,domainRestrictionError:`URL은 애플리케이션 도메인과 일치해야 합니다.`,backButtonLabel:`뒤로 가기`,forwardButtonLabel:`앞으로 가기`,iframeTitle:`임베디드 웹페이지`,sitemapButtonLabel:`사이트맵 스캔`,sitemapSearchPlaceholder:`URL 필터링…`,sitemapSearchAriaLabel:`사이트맵 URL 검색`,sitemapLoading:`사이트맵 스캔 중…`,sitemapEmpty:`URL을 찾을 수 없습니다`,sitemapError:`사이트맵을 불러올 수 없습니다`},zh:{ariaLabel:`嵌入式浏览器`,urlLabel:`URL地址栏`,urlPlaceholder:`https://example.com`,errorMessage:`无效的URL。尝试像"/page"这样的路径或完整的URL。`,domainRestrictionError:`URL必须与应用程序域名匹配。`,backButtonLabel:`后退`,forwardButtonLabel:`前进`,iframeTitle:`嵌入式网页`,sitemapButtonLabel:`扫描网站地图`,sitemapSearchPlaceholder:`过滤URL…`,sitemapSearchAriaLabel:`搜索网站地图URL`,sitemapLoading:`正在扫描网站地图…`,sitemapEmpty:`未找到URL`,sitemapError:`无法加载网站地图`},it:{ariaLabel:`Browser incorporato`,urlLabel:`Barra degli indirizzi URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL non valido. Prova un percorso come "/page" o un URL completo.`,domainRestrictionError:`L'URL deve corrispondere al dominio dell'applicazione.`,backButtonLabel:`Indietro`,forwardButtonLabel:`Avanti`,iframeTitle:`Pagina web incorporata`,sitemapButtonLabel:`Scansiona sitemap`,sitemapSearchPlaceholder:`Filtra URL…`,sitemapSearchAriaLabel:`Cerca URL del sitemap`,sitemapLoading:`Scansione sitemap in corso…`,sitemapEmpty:`Nessun URL trovato`,sitemapError:`Impossibile caricare il sitemap`},pt:{ariaLabel:`Navegador incorporado`,urlLabel:`Barra de endereços URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL inválido. Tente um caminho como "/page" ou uma URL completa.`,domainRestrictionError:`A URL deve corresponder ao domínio da aplicação.`,backButtonLabel:`Voltar`,forwardButtonLabel:`Avançar`,iframeTitle:`Página web incorporada`,sitemapButtonLabel:`Escanear sitemap`,sitemapSearchPlaceholder:`Filtrar URLs…`,sitemapSearchAriaLabel:`Pesquisar URLs do sitemap`,sitemapLoading:`Escaneando sitemap…`,sitemapEmpty:`Nenhuma URL encontrada`,sitemapError:`Não foi possível carregar o sitemap`},hi:{ariaLabel:`एम्बेडेड ब्राउज़र`,urlLabel:`URL पता बार`,urlPlaceholder:`https://example.com`,errorMessage:`अमान्य URL। "/page" जैसा पथ या पूर्ण URL प्रयास करें।`,domainRestrictionError:`URL एप्लिकेशन डोमेन से मेल खाना चाहिए।`,backButtonLabel:`वापस जाएं`,forwardButtonLabel:`आगे जाएं`,iframeTitle:`एम्बेडेड वेब पेज`,sitemapButtonLabel:`साइटमैप स्कैन करें`,sitemapSearchPlaceholder:`URL फ़िल्टर करें…`,sitemapSearchAriaLabel:`साइटमैप URL खोजें`,sitemapLoading:`साइटमैप स्कैन हो रहा है…`,sitemapEmpty:`कोई URL नहीं मिला`,sitemapError:`साइटमैप लोड नहीं हो सका`},ar:{ariaLabel:`متصفح مدمج`,urlLabel:`شريط عنوان URL`,urlPlaceholder:`https://example.com`,errorMessage:`رابط غير صالح. جرب مسارًا مثل "/page" أو رابطًا كاملاً.`,domainRestrictionError:`يجب أن يتطابق الرابط مع نطاق التطبيق.`,backButtonLabel:`رجوع`,forwardButtonLabel:`إلى الأمام`,iframeTitle:`صفحة ويب مدمجة`,sitemapButtonLabel:`مسح خريطة الموقع`,sitemapSearchPlaceholder:`تصفية الروابط…`,sitemapSearchAriaLabel:`ابحث في روابط خريطة الموقع`,sitemapLoading:`جارٍ مسح خريطة الموقع…`,sitemapEmpty:`لم يتم العثور على روابط`,sitemapError:`تعذّر تحميل خريطة الموقع`},ru:{ariaLabel:`Встроенный браузер`,urlLabel:`Адресная строка URL`,urlPlaceholder:`https://example.com`,errorMessage:`Неверный URL. Попробуйте путь вроде "/page" или полный URL.`,domainRestrictionError:`URL должен соответствовать домену приложения.`,backButtonLabel:`Назад`,forwardButtonLabel:`Вперёд`,iframeTitle:`Встроенная веб-страница`,sitemapButtonLabel:`Сканировать карту сайта`,sitemapSearchPlaceholder:`Фильтр URL…`,sitemapSearchAriaLabel:`Поиск URL карты сайта`,sitemapLoading:`Сканирование карты сайта…`,sitemapEmpty:`URL не найдены`,sitemapError:`Не удалось загрузить карту сайта`}}},title:`Embedded browser component`,description:`Content declaration for the embedded browser UI component, including ARIA labels, URL placeholder, and error messages for displaying web pages within an iframe.`,tags:[`UI component`,`embedded browser`,`iframe`],location:`local`,localId:`browser::local::../@intlayer/design-system/dist/esm/components/Browser/Browser.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/Browser/Browser.content.mjs`};T();var fQ=({url:e})=>{let t=pQ(e).split(`/`).filter(Boolean);return t.length===0?R(`span`,{children:`/`}):t.flatMap((e,t,n)=>[R(`span`,{children:e},`part-${t}`),t<n.length-1&&R(`span`,{className:`mx-2 text-neutral`,children:`/`},`sep-${t}`)])},pQ=e=>{try{let{pathname:t,search:n,hash:r}=new URL(e);return`${t}${n}${r}`||`/`}catch{return e}},mQ=({initialUrl:e=`https://example.com`,path:t,className:n,style:i,size:a=`md`,"aria-label":o,sandbox:s=`allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads`,ref:c,domainRestriction:u,toolbarActions:d,...f})=>{let[p,m]=N(e),[h,g]=N(e),[_,v]=N([e]),[y,b]=N(0),[x,S]=N(null),[C,w]=N(!1),T=P(null),[E,D]=N(!1),[O,k]=N([]),[A,j]=N(``),[F,I]=N(!1),L=P(!1),[ee,te]=N(!1),ne=P(null);r(c,()=>T.current,[]);let z=V(dQ);M(()=>{m(e),g(e),v([e]),b(0),S(null),w(!1),D(!1),k([]),j(``),L.current=!1,te(!1)},[e]),M(()=>{if(t)try{let n=`${new URL(u??e).origin}${t}`;m(n);let r=!1;if(T.current?.contentWindow)try{let e=T.current.contentWindow.location.href;new URL(e).href===new URL(n).href&&(r=!0)}catch{}_[y]!==n&&(v(e=>{let t=e.slice(0,y+1);return t.push(n),t}),b(e=>e+1)),r||g(n),S(null)}catch{}},[t,u,e]),M(()=>{let e=T.current;e&&e.src!==h&&(e.src=h)},[h]);let re=e=>{try{let t=le(e);if(t===h){oe();return}g(t),m(t),S(null);let n=_.slice(0,y+1);n.push(t),v(n),b(n.length-1)}catch(e){e instanceof Error&&e.message===`URL does not match allowed domain`&&u?S(z.domainRestrictionError?.value??`Only URLs from ${u} are allowed.`):S(z.errorMessage.value)}},ie=()=>{if(y>0){let e=y-1,t=_[e]??``;b(e),g(t),m(t),S(null)}},B=()=>{if(y<_.length-1){let e=y+1,t=_[e]??``;b(e),g(t),m(t),S(null)}},ae=e=>{e.preventDefault(),w(!0),re(p)},oe=()=>{let e=T.current;if(!e)return;let t=e.src;e.src=``,setTimeout(()=>{T.current&&(T.current.src=t)},50)},se=e=>e===`localhost`||/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[a-f0-9:]+$/i.test(e)?!0:!(!/^[a-z0-9.-]+$/i.test(e)||/^[-.]/.test(e)||/[-.]$/.test(e)||e.includes(`..`)||!e.includes(`.`)),ce=()=>{if(!u)return null;try{return new URL(u)}catch{return null}},le=e=>{let t=e.trim();if(!t||/\s/.test(t))throw Error(`Invalid`);let n=ce();if(t.startsWith(`/`)&&!t.startsWith(`//`))return n?new URL(`${n.origin}${t}`).toString():new URL(`${new URL(h).origin}${t}`).toString();let r=/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t)?t:`https://${t}`,i=new URL(r);if(i.protocol!==`http:`&&i.protocol!==`https:`)throw Error(`Only http(s) is allowed`);if(!se(i.hostname))throw Error(`Invalid host`);if(n&&(i.hostname!==n.hostname||i.protocol!==n.protocol||n.port!==``&&i.port!==n.port&&i.host!==n.host))throw Error(`URL does not match allowed domain`);return i.toString()},ue=async()=>{if(!L.current){L.current=!0,I(!0),te(!1);try{let{extractUrlFromSitemap:e}=await kn(async()=>{let{extractUrlFromSitemap:e}=await import(`./extractUrlFromSitemap-Chj1JVpo.js`);return{extractUrlFromSitemap:e}},[]);k(await e(h))}catch{te(!0)}finally{I(!1)}}},de=()=>{let e=!E;D(e),e&&(ue(),setTimeout(()=>ne.current?.focus(),50))},fe=l(()=>{let e=A.trim().toLowerCase();return e?O.filter(t=>t.toLowerCase().includes(e)):O},[O,A]),pe=C&&!!x,me=y>0,he=y<_.length-1;return R(`section`,{className:G(`flex w-full flex-col overflow-hidden rounded-xl bg-background shadow-[0_4px_12px_rgba(0,0,0,0.4),0_0_1px_rgba(0,0,0,0.2)]`,n),style:i,"aria-label":o??z.ariaLabel.value,children:[R(`div`,{className:`relative z-10 flex shrink-0 items-center gap-3 rounded-t-xl border-b bg-card px-4 py-2`,children:[R(`div`,{className:`flex items-center gap-1`,children:[R(X,{type:`button`,onClick:ie,disabled:!me,variant:`hoverable`,size:`icon-md`,label:z.backButtonLabel.value,Icon:ps}),R(X,{type:`button`,onClick:B,disabled:!he,variant:`hoverable`,size:`icon-md`,label:z.forwardButtonLabel.value,Icon:hs})]}),R(`form`,{onSubmit:ae,noValidate:!0,className:G(Yk(),`flex w-full gap-2 rounded-xl p-0.5! supports-[corner-shape:squircle]:rounded-2xl`,`bg-neutral/10 text-foreground/50 placeholder:text-neutral/80`),children:[R(`label`,{htmlFor:`browser-url`,className:`sr-only`,children:z.urlLabel}),R(Xk,{id:`browser-url`,type:`text`,inputMode:`url`,spellCheck:!1,autoCapitalize:`off`,variant:`invisible`,className:`ms-3 p-0!`,size:`sm`,autoCorrect:`off`,value:p,onChange:e=>{m(e.target.value),pe&&S(null)},placeholder:z.urlPlaceholder.value,"aria-label":z.urlLabel.value,"aria-invalid":pe,"aria-describedby":pe?`browser-url-error`:void 0}),R(X,{type:`button`,onClick:oe,variant:`hoverable`,size:`icon-md`,className:`p-1!`,label:`content.reloadButtonTitle.value`,Icon:_c}),R(`button`,{type:`submit`,className:`sr-only absolute`,tabIndex:-1})]}),d,R(KK,{onClickOutSide:()=>D(!1),disabled:!E,role:`none`,children:R(mq,{identifier:`sitemap-explorer`,onMouseEnter:ue,onFocus:ue,children:[R(mq.Trigger,{identifier:`sitemap-explorer-trigger`,type:`button`,color:`text`,onClick:de,variant:`hoverable`,size:`icon-md`,label:z.sitemapButtonLabel.value,Icon:xc}),R(mq.Panel,{identifier:`sitemap-explorer`,isHidden:!E,align:`end`,isFocusable:!0,isOverable:!0,children:R(bA,{className:`w-80 max-w-[calc(100cqw-2rem)] rounded-md!`,roundedSize:`2xl`,border:!0,borderColor:`neutral`,children:[R(`div`,{className:`p-2`,children:R(Xk,{type:`search`,ref:ne,"aria-label":z.sitemapSearchAriaLabel.value,placeholder:z.sitemapSearchPlaceholder.value,onChange:e=>j(e.target.value),value:A,size:`sm`})}),R(`ul`,{className:`max-h-64 divide-y divide-dotted divide-neutral/30 overflow-y-auto p-1 text-center`,"aria-label":z.sitemapButtonLabel.value,children:F?R(`li`,{className:`px-3 py-4 text-center text-muted-foreground text-xs`,children:z.sitemapLoading}):ee||!F&&fe.length===0?R(`li`,{className:`px-3 py-4 text-center text-muted-foreground text-xs`,children:ee?z.sitemapError:z.sitemapEmpty}):fe.map(e=>R(`li`,{className:`py-0.5`,children:R(X,{variant:`hoverable`,color:`text`,size:`sm`,className:`w-full text-start`,label:e,onClick:()=>{re(e),D(!1)},children:R(`span`,{className:`block truncate text-start text-base`,children:R(fQ,{url:e})})})},e))})]})})]})}),pe&&R(`div`,{className:`absolute inset-s-4 top-full z-20 mt-1`,children:R(`p`,{id:`browser-url-error`,role:`alert`,"aria-live":`assertive`,className:`rounded-md bg-red-900/90 px-3 py-1.5 text-red-100 text-xs shadow-md backdrop-blur-sm`,children:x})})]}),R(`div`,{className:`relative z-0 flex min-h-0 w-full flex-1 flex-col overflow-hidden rounded-b-xl bg-background`,children:R(`iframe`,{ref:T,src:h,title:z.iframeTitle.value,className:`size-full flex-1`,sandbox:s??void 0,loading:`lazy`,"aria-live":`polite`,...f})})]})},hQ={key:`frame-connection-error`,content:JSON.parse('{"nodeType":"translation","translation":{"en":{"title":"The application could not be displayed","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} did not connect to the editor. Check that:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"its Content-Security-Policy `frame-ancestors` directive (or `X-Frame-Options` header) allows {{editorOrigin}}"},"editorEnabledCause":"the visual editor is enabled in its Intlayer configuration (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"The visual editor is disabled in the Intlayer configuration of {{applicationUrl}}."},"editorDisabledHint":"Set `editor.enabled: true` in its Intlayer configuration file, then restart the application.","providerCause":"the page renders the Intlayer provider of your framework","retry":"Retry","dismiss":"Show the page anyway"},"en-GB":{"title":"The application could not be displayed","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} did not connect to the editor. Check that:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"its Content-Security-Policy `frame-ancestors` directive (or `X-Frame-Options` header) allows {{editorOrigin}}"},"editorEnabledCause":"the visual editor is enabled in its Intlayer configuration (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"The visual editor is disabled in the Intlayer configuration of {{applicationUrl}}."},"editorDisabledHint":"Set `editor.enabled: true` in its Intlayer configuration file, then restart the application.","providerCause":"the page renders the Intlayer provider of your framework","retry":"Retry","dismiss":"Show the page anyway"},"fr":{"title":"L\'application n\'a pas pu être affichée","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} ne s\'est pas connectée à l\'éditeur. Vérifiez que :"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"sa directive Content-Security-Policy `frame-ancestors` (ou son en-tête `X-Frame-Options`) autorise {{editorOrigin}}"},"editorEnabledCause":"l\'éditeur visuel est activé dans sa configuration Intlayer (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"L\'éditeur visuel est désactivé dans la configuration Intlayer de {{applicationUrl}}."},"editorDisabledHint":"Définissez `editor.enabled: true` dans son fichier de configuration Intlayer, puis redémarrez l\'application.","providerCause":"la page affiche le provider Intlayer de votre framework","retry":"Réessayer","dismiss":"Afficher la page quand même"},"es":{"title":"No se pudo mostrar la aplicación","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} no se conectó al editor. Compruebe que:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"su directiva Content-Security-Policy `frame-ancestors` (o la cabecera `X-Frame-Options`) permite {{editorOrigin}}"},"editorEnabledCause":"el editor visual está activado en su configuración de Intlayer (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"El editor visual está desactivado en la configuración de Intlayer de {{applicationUrl}}."},"editorDisabledHint":"Establezca `editor.enabled: true` en su archivo de configuración de Intlayer y reinicie la aplicación.","providerCause":"la página renderiza el provider de Intlayer de su framework","retry":"Reintentar","dismiss":"Mostrar la página de todos modos"},"de":{"title":"Die Anwendung konnte nicht angezeigt werden","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} hat sich nicht mit dem Editor verbunden. Prüfen Sie, dass:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"seine Content-Security-Policy-Direktive `frame-ancestors` (oder der Header `X-Frame-Options`) {{editorOrigin}} erlaubt"},"editorEnabledCause":"der visuelle Editor in der Intlayer-Konfiguration aktiviert ist (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"Der visuelle Editor ist in der Intlayer-Konfiguration von {{applicationUrl}} deaktiviert."},"editorDisabledHint":"Setzen Sie `editor.enabled: true` in der Intlayer-Konfigurationsdatei und starten Sie die Anwendung neu.","providerCause":"die Seite den Intlayer-Provider Ihres Frameworks rendert","retry":"Erneut versuchen","dismiss":"Seite trotzdem anzeigen"},"ja":{"title":"アプリケーションを表示できませんでした","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} がエディターに接続しませんでした。次の点を確認してください:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"Content-Security-Policy の `frame-ancestors` ディレクティブ(または `X-Frame-Options` ヘッダー)が {{editorOrigin}} を許可している"},"editorEnabledCause":"Intlayer 設定でビジュアルエディターが有効になっている(`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} の Intlayer 設定でビジュアルエディターが無効になっています。"},"editorDisabledHint":"Intlayer 設定ファイルで `editor.enabled: true` を設定し、アプリケーションを再起動してください。","providerCause":"ページがフレームワークの Intlayer プロバイダーをレンダリングしている","retry":"再試行","dismiss":"それでもページを表示"},"ko":{"title":"애플리케이션을 표시할 수 없습니다","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}}이(가) 에디터에 연결되지 않았습니다. 다음을 확인하세요:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"Content-Security-Policy의 `frame-ancestors` 지시어(또는 `X-Frame-Options` 헤더)가 {{editorOrigin}}을(를) 허용하는지"},"editorEnabledCause":"Intlayer 설정에서 비주얼 에디터가 활성화되어 있는지 (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}}의 Intlayer 설정에서 비주얼 에디터가 비활성화되어 있습니다."},"editorDisabledHint":"Intlayer 설정 파일에서 `editor.enabled: true`로 설정한 후 애플리케이션을 다시 시작하세요.","providerCause":"페이지가 프레임워크의 Intlayer 프로바이더를 렌더링하는지","retry":"다시 시도","dismiss":"그래도 페이지 표시"},"zh":{"title":"无法显示应用程序","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} 未连接到编辑器。请检查:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"其 Content-Security-Policy 的 `frame-ancestors` 指令(或 `X-Frame-Options` 头)允许 {{editorOrigin}}"},"editorEnabledCause":"其 Intlayer 配置中已启用可视化编辑器(`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} 的 Intlayer 配置中已禁用可视化编辑器。"},"editorDisabledHint":"在其 Intlayer 配置文件中设置 `editor.enabled: true`,然后重启应用程序。","providerCause":"页面渲染了您框架的 Intlayer provider","retry":"重试","dismiss":"仍然显示页面"},"it":{"title":"Impossibile visualizzare l\'applicazione","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} non si è connessa all\'editor. Verifica che:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"la sua direttiva Content-Security-Policy `frame-ancestors` (o l’header `X-Frame-Options`) consente {{editorOrigin}}"},"editorEnabledCause":"l\'editor visuale è abilitato nella sua configurazione Intlayer (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"L\'editor visuale è disabilitato nella configurazione Intlayer di {{applicationUrl}}."},"editorDisabledHint":"Imposta `editor.enabled: true` nel file di configurazione Intlayer, quindi riavvia l\'applicazione.","providerCause":"la pagina renderizza il provider Intlayer del tuo framework","retry":"Riprova","dismiss":"Mostra comunque la pagina"},"pt":{"title":"Não foi possível exibir a aplicação","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} não se conectou ao editor. Verifique se:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"sua diretiva Content-Security-Policy `frame-ancestors` (ou o cabeçalho `X-Frame-Options`) permite {{editorOrigin}}"},"editorEnabledCause":"o editor visual está ativado na configuração do Intlayer (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"O editor visual está desativado na configuração do Intlayer de {{applicationUrl}}."},"editorDisabledHint":"Defina `editor.enabled: true` no arquivo de configuração do Intlayer e reinicie a aplicação.","providerCause":"a página renderiza o provider Intlayer do seu framework","retry":"Tentar novamente","dismiss":"Mostrar a página mesmo assim"},"hi":{"title":"एप्लिकेशन प्रदर्शित नहीं किया जा सका","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} एडिटर से कनेक्ट नहीं हुआ। जाँचें कि:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"इसका Content-Security-Policy `frame-ancestors` निर्देश (या `X-Frame-Options` हेडर) {{editorOrigin}} को अनुमति देता है"},"editorEnabledCause":"इसके Intlayer कॉन्फ़िगरेशन में विज़ुअल एडिटर सक्षम है (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} के Intlayer कॉन्फ़िगरेशन में विज़ुअल एडिटर अक्षम है।"},"editorDisabledHint":"इसकी Intlayer कॉन्फ़िगरेशन फ़ाइल में `editor.enabled: true` सेट करें, फिर एप्लिकेशन को पुनः आरंभ करें।","providerCause":"पेज आपके फ़्रेमवर्क का Intlayer provider रेंडर करता है","retry":"पुनः प्रयास करें","dismiss":"फिर भी पेज दिखाएँ"},"ar":{"title":"تعذر عرض التطبيق","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"لم يتصل {{applicationUrl}} بالمحرر. تحقق من أن:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"توجيه `frame-ancestors` في Content-Security-Policy (أو ترويسة `X-Frame-Options`) يسمح بـ {{editorOrigin}}"},"editorEnabledCause":"المحرر المرئي مفعّل في إعدادات Intlayer الخاصة به (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"المحرر المرئي معطّل في إعدادات Intlayer الخاصة بـ {{applicationUrl}}."},"editorDisabledHint":"اضبط `editor.enabled: true` في ملف إعدادات Intlayer، ثم أعد تشغيل التطبيق.","providerCause":"الصفحة تعرض موفّر Intlayer الخاص بإطار العمل لديك","retry":"إعادة المحاولة","dismiss":"عرض الصفحة على أي حال"},"ru":{"title":"Не удалось отобразить приложение","description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} не подключилось к редактору. Убедитесь, что:"},"framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"его директива Content-Security-Policy `frame-ancestors` (или заголовок `X-Frame-Options`) разрешает {{editorOrigin}}"},"editorEnabledCause":"визуальный редактор включён в его конфигурации Intlayer (`editor.enabled`)","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"Визуальный редактор отключён в конфигурации Intlayer приложения {{applicationUrl}}."},"editorDisabledHint":"Укажите `editor.enabled: true` в файле конфигурации Intlayer и перезапустите приложение.","providerCause":"страница рендерит провайдер Intlayer вашего фреймворка","retry":"Повторить","dismiss":"Всё равно показать страницу"}}}'),title:`Frame connection error`,description:`Overlay shown when the application framed by the visual editor never connects to it.`,location:`local`,localId:`frame-connection-error::local::../@intlayer/design-system/dist/esm/components/FrameConnectionError/FrameConnectionError.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/FrameConnectionError/FrameConnectionError.content.mjs`},gQ=()=>[...new Set([window.location.origin,...Array.from(window.location.ancestorOrigins??[])])],_Q=({applicationURL:e,onRetry:t,onDismiss:n,isEditorDisabled:r=!1})=>{let{title:i,description:a,framingCause:o,editorEnabledCause:s,editorDisabledDescription:c,editorDisabledHint:l,providerCause:u,retry:d,dismiss:f}=V(hQ);return R(`div`,{className:`absolute inset-0 z-10 flex overflow-auto bg-background/90 p-2 sm:p-4`,children:R(bA,{className:`m-auto flex w-full min-w-0 max-w-xl flex-col gap-3 px-4 py-4 text-sm sm:gap-4 sm:px-8 sm:py-6`,roundedSize:`3xl`,border:!0,borderColor:`neutral`,role:`alert`,children:[R(FX,{className:`text-base sm:text-lg`,children:i}),r?R(C,{children:[R(`p`,{className:`wrap-anywhere text-neutral`,children:c({applicationUrl:R(`strong`,{children:e})})}),R(`p`,{className:`wrap-anywhere text-neutral`,children:l})]}):R(C,{children:[R(`p`,{className:`wrap-anywhere text-neutral`,children:a({applicationUrl:R(`strong`,{children:e})})}),R(`ul`,{className:`wrap-anywhere list-outside list-disc space-y-2 ps-5 text-neutral`,children:[R(`li`,{children:o({editorOrigin:R(`strong`,{children:gQ().join(`, `)})})}),R(`li`,{children:s}),R(`li`,{children:u})]})]}),R(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[R(X,{label:f.value,onClick:n,variant:`outline`,color:`text`,children:f}),R(X,{label:d.value,onClick:t,color:`text`,children:d})]})]})})},vQ=(e,t,n,r)=>{let{internationalization:i,routing:a}=r,o=Object.keys(a?.domains??{}).length>0;if(a?.mode===`no-prefix`&&!o)return null;let s=new URL(t,e).href;return xr(s,n,{locales:i.locales,defaultLocale:i.defaultLocale,mode:a?.mode,rewrite:a?.rewrite,domains:a?.domains})},yQ=({iframeRef:e,applicationURL:t,applicationPath:n})=>{let r=CD(),i=SD(),a=DO(),o=wO(),s=r?.internationalization.locales??[];return!r||s.length<2?null:R(WJ,{locale:a,localeList:s,setLocale:a=>{i?.requestLocaleChange(a);let s=o??n,c=vQ(t,s,a,r),l=new URL(s,t).href,u=e.current;c&&u&&c!==l&&(u.src=c)},fullLocaleName:!1,size:`sm`,variant:`outline`,color:`text`,border:!0,borderColor:`neutral`,roundedSize:`2xl`})},bQ={key:`editor-profile`,content:{nodeType:`translation`,translation:{en:{login:{label:`Log in to the Intlayer CMS (runs intlayer login)`,title:`Login`,pending:`Waiting for the browser…`},logout:{label:`Log out of the intlayer login session`,title:`Logout`},profileLabel:`Open the profile menu`,sessionAuth:`Signed in with intlayer login`,accessKeyAuth:`Signed in with an access key`,project:`Project`},"en-GB":{login:{label:`Log in to the Intlayer CMS (runs intlayer login)`,title:`Login`,pending:`Waiting for the browser…`},logout:{label:`Log out of the intlayer login session`,title:`Logout`},profileLabel:`Open the profile menu`,sessionAuth:`Signed in with intlayer login`,accessKeyAuth:`Signed in with an access key`,project:`Project`},fr:{login:{label:`Se connecter au CMS Intlayer (exécute intlayer login)`,title:`Connexion`,pending:`En attente du navigateur…`},logout:{label:`Se déconnecter de la session intlayer login`,title:`Déconnexion`},profileLabel:`Ouvrir le menu du profil`,sessionAuth:`Connecté avec intlayer login`,accessKeyAuth:`Connecté avec une clé d'accès`,project:`Projet`},es:{login:{label:`Iniciar sesión en el CMS de Intlayer (ejecuta intlayer login)`,title:`Iniciar sesión`,pending:`Esperando al navegador…`},logout:{label:`Cerrar la sesión de intlayer login`,title:`Cerrar sesión`},profileLabel:`Abrir el menú del perfil`,sessionAuth:`Sesión iniciada con intlayer login`,accessKeyAuth:`Sesión iniciada con una clave de acceso`,project:`Proyecto`},de:{login:{label:`Beim Intlayer-CMS anmelden (führt intlayer login aus)`,title:`Anmelden`,pending:`Warten auf den Browser…`},logout:{label:`Von der intlayer login-Sitzung abmelden`,title:`Abmelden`},profileLabel:`Profilmenü öffnen`,sessionAuth:`Mit intlayer login angemeldet`,accessKeyAuth:`Mit einem Zugriffsschlüssel angemeldet`,project:`Projekt`},ja:{login:{label:`Intlayer CMS にログイン(intlayer login を実行)`,title:`ログイン`,pending:`ブラウザを待っています…`},logout:{label:`intlayer login セッションからログアウト`,title:`ログアウト`},profileLabel:`プロフィールメニューを開く`,sessionAuth:`intlayer login でサインイン中`,accessKeyAuth:`アクセスキーでサインイン中`,project:`プロジェクト`},ko:{login:{label:`Intlayer CMS에 로그인 (intlayer login 실행)`,title:`로그인`,pending:`브라우저를 기다리는 중…`},logout:{label:`intlayer login 세션에서 로그아웃`,title:`로그아웃`},profileLabel:`프로필 메뉴 열기`,sessionAuth:`intlayer login으로 로그인됨`,accessKeyAuth:`액세스 키로 로그인됨`,project:`프로젝트`},zh:{login:{label:`登录 Intlayer CMS(运行 intlayer login)`,title:`登录`,pending:`正在等待浏览器…`},logout:{label:`退出 intlayer login 会话`,title:`退出登录`},profileLabel:`打开个人资料菜单`,sessionAuth:`已通过 intlayer login 登录`,accessKeyAuth:`已通过访问密钥登录`,project:`项目`},it:{login:{label:`Accedi al CMS Intlayer (esegue intlayer login)`,title:`Accedi`,pending:`In attesa del browser…`},logout:{label:`Esci dalla sessione intlayer login`,title:`Esci`},profileLabel:`Apri il menu del profilo`,sessionAuth:`Accesso effettuato con intlayer login`,accessKeyAuth:`Accesso effettuato con una chiave di accesso`,project:`Progetto`},pt:{login:{label:`Entrar no CMS Intlayer (executa intlayer login)`,title:`Entrar`,pending:`Aguardando o navegador…`},logout:{label:`Sair da sessão do intlayer login`,title:`Sair`},profileLabel:`Abrir o menu do perfil`,sessionAuth:`Conectado com intlayer login`,accessKeyAuth:`Conectado com uma chave de acesso`,project:`Projeto`},hi:{login:{label:`Intlayer CMS में लॉग इन करें (intlayer login चलाता है)`,title:`लॉग इन`,pending:`ब्राउज़र की प्रतीक्षा…`},logout:{label:`intlayer login सत्र से लॉग आउट करें`,title:`लॉग आउट`},profileLabel:`प्रोफ़ाइल मेनू खोलें`,sessionAuth:`intlayer login से साइन इन किया गया`,accessKeyAuth:`एक्सेस की से साइन इन किया गया`,project:`प्रोजेक्ट`},ar:{login:{label:`تسجيل الدخول إلى Intlayer CMS (يشغّل intlayer login)`,title:`تسجيل الدخول`,pending:`في انتظار المتصفح…`},logout:{label:`تسجيل الخروج من جلسة intlayer login`,title:`تسجيل الخروج`},profileLabel:`فتح قائمة الملف الشخصي`,sessionAuth:`تم تسجيل الدخول باستخدام intlayer login`,accessKeyAuth:`تم تسجيل الدخول باستخدام مفتاح وصول`,project:`المشروع`},ru:{login:{label:`Войти в CMS Intlayer (запускает intlayer login)`,title:`Войти`,pending:`Ожидание браузера…`},logout:{label:`Выйти из сеанса intlayer login`,title:`Выйти`},profileLabel:`Открыть меню профиля`,sessionAuth:`Вход выполнен через intlayer login`,accessKeyAuth:`Вход выполнен с ключом доступа`,project:`Проект`}}},location:`local`,localId:`editor-profile::local::client/src/components/Editor/EditorProfile/editorProfile.content.ts`,filePath:`client/src/components/Editor/EditorProfile/editorProfile.content.ts`};T();var xQ=(e,t=` `)=>e?(t===` `?e.trim().split(/\s+/):e.split(t)).filter(Boolean).map(e=>e.charAt(0).toUpperCase()):[],SQ=({isClickable:e,onClick:t,...n})=>e&&t?R(`button`,{...n,onClick:t,type:`button`}):R(`div`,{...n,role:n.tabIndex!==void 0||n[`aria-label`]?`img`:void 0}),CQ=({fullname:e,className:t,isLoading:n=!1,isLoggedIn:r=!0,src:i,onClick:a,size:o=`md`,alt:s,focusable:c=!1,hoverable:u=!1,...d})=>{let f=!!i,p=(e??``).length>0,m=e?xQ(e):void 0,h=n,g=r&&!h&&f,_=r&&!h&&!g&&p,v=r&&!h&&!g&&!_,y=a!==void 0,b=l(()=>{let t={};return g&&s?t[`aria-label`]=s:g&&e?t[`aria-label`]=`Avatar of ${e}`:_&&e?t[`aria-label`]=`Avatar initials for ${e}`:v?t[`aria-label`]=`Default user avatar`:h&&(t[`aria-label`]=`Loading avatar`,t[`aria-busy`]=!0),!y&&c&&(t.tabIndex=0),y&&(t[`aria-describedby`]=`avatar-description`),t},[g,_,v,h,s,e,y,c]);return R(SQ,{isClickable:y,className:G(`rounded-full border-[1.3px] border-text p-0.5 ring-offset-0 transition-ring duration-200`,o===`sm`&&`size-7 border-[1px] p-0.25`,o===`md`&&`size-9`,o===`lg`&&`size-12`,o===`xl`&&`size-16`,o===`2xl`&&`size-24`,y&&`cursor-pointer hover:opacity-80 focus:outline-none focus:ring-3 focus:ring-text/50 focus:ring-offset-2`,u&&`hover:opacity-80 hover:ring-4 hover:ring-text/30 hover:ring-offset-2`,!y&&c&&`focus:outline-none focus:ring-3 focus:ring-text/50 focus:ring-offset-2`,h&&`animate-pulse`,t),dir:`ltr`,onClick:a,...b,...d,children:R(`div`,{className:`relative flex aspect-square size-full flex-row items-center justify-center`,children:R(`div`,{className:`absolute inset-s-0 top-0 flex aspect-square size-full flex-col items-center justify-center rounded-full bg-text text-foreground-opposite`,children:[h&&R(wk,{className:`w-3/4`,"aria-label":`Loading user avatar`}),g&&R(`img`,{className:`size-full rounded-full object-cover`,src:i,srcSet:i,alt:s??`Avatar of ${e}`,width:59,height:59,loading:`lazy`,draggable:!1}),_&&R(`div`,{className:G(`flex size-full items-center justify-center gap-[0.1rem] font-bold max-md:py-1`,o===`sm`&&`text-xs`,o===`md`&&`text-sm`,o===`lg`&&`text-base`,o===`xl`&&`text-lg`,o===`2xl`&&`text-xl`),children:m?.map((e,t)=>R(`span`,{children:e},`${e}-${t}`))}),v&&R(Nc,{size:G(o===`sm`&&14,o===`md`&&25,o===`lg`&&30,o===`xl`&&40),"aria-label":`Default user icon`})]})})})},wQ=`editor-profile`,TQ=()=>{let e=V(bQ),t=vk();if(!t)return null;let{auth:n,isLoggingIn:r,login:i,logout:a,isLoggingOut:o}=t;if(!n)return R(X,{label:e.login.label.value,onClick:i,isLoading:r,variant:`outline`,color:`text`,size:`custom`,className:`min-h-0 px-1.5 py-0.5 text-xs`,roundedSize:`full`,Icon:tc,iconClassName:`size-3`,children:r?e.login.pending:e.login.title});let{user:s,project:c,authType:l}=n,u=s?.name??s?.email??c?.name??``;return R(mq,{identifier:wQ,children:[R(mq.Trigger,{identifier:wQ,label:e.profileLabel.value,size:`icon-sm`,variant:`outline`,color:`text`,roundedSize:`full`,className:`border-none p-0!`,children:R(CQ,{fullname:u,src:s?.image??void 0,size:`sm`})}),R(mq.Panel,{identifier:wQ,isFocusable:!0,isOverable:!0,align:`end`,children:R(bA,{className:`min-w-56 p-4`,transparency:`xs`,roundedSize:`2xl`,border:!0,borderColor:`neutral`,children:R(`div`,{className:`flex flex-col gap-3`,children:[s?.name&&R(`span`,{className:`whitespace-nowrap font-bold`,children:s.name}),s?.email&&R(`span`,{className:`whitespace-nowrap text-sm`,children:s.email}),c?.name&&R(`span`,{className:`whitespace-nowrap text-sm`,children:[e.project,`: `,c.name]}),R(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:l===`session`?e.sessionAuth:e.accessKeyAuth}),l===`session`&&R(X,{label:e.logout.label.value,onClick:a,isLoading:o,variant:`outline`,color:`text`,size:`sm`,Icon:$s,children:e.logout.title})]})})})]})},EQ={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:`Смотрите, как настроить редактор`}}}},location:`local`,localId:`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`,filePath:`client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`},DQ=()=>{let{title:e,description:t,documentationLink:n}=V(EQ);return R(`div`,{className:`flex flex-col gap-6`,children:[R(FX,{className:`mb-8`,children:e}),R(`strong`,{className:`block text-neutral`,children:t}),R(sY,{label:n.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ms-auto`,isExternalLink:!0,children:n.text})]})};p();var OQ=({iframeRef:e,applicationPath:t,isBrowserVisible:r=!1})=>{let i=V(uQ),{editor:a}=CD()??{},o=rQ()?.isApplicationEditorEnabled??!0,{enabled:s}=OD(),c=kD(),{isConnectionFailed:l,handleFrameLoad:u,dismiss:d}=jO();EO();let f=n(()=>{let t=e.current;if(!t)return;let{src:n}=t;t.src=n},[e]);PO({applicationURL:a?.applicationURL,isDisconnected:l,reloadFrame:f});let[p,m]=N(!0),h=wO();if(M(()=>{typeof h==`string`&&window.history.replaceState({},``,`${h}${window.location.search}`)},[h]),!a?.applicationURL)return R(bA,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:R(DQ,{})});let g=l&&R(_Q,{applicationURL:a.applicationURL,onRetry:f,onDismiss:d,isEditorDisabled:!o}),_=!s&&R(`div`,{className:`fixed inset-e-4 bottom-4`,children:R(X,{label:i.enableEditor.value,onClick:c,color:`text`,children:i.enableEditor})}),v=R(`div`,{className:`flex shrink-0 items-center gap-2`,children:[R(yQ,{iframeRef:e,applicationURL:a.applicationURL,applicationPath:t}),R(KZ,{identifier:`push-dictionaries-toolbar`}),R(TQ,{})]});return r?R(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[R(mQ,{initialUrl:`${a.applicationURL}${t}`,path:h,domainRestriction:a.applicationURL,className:`size-full`,sandbox:`allow-scripts allow-same-origin`,ref:e,onLoad:u,toolbarActions:v}),g,_]}):R(`div`,{className:`flex size-full flex-col gap-2`,children:[R(`div`,{className:`flex justify-end`,children:v}),R(`div`,{className:`relative min-h-0 w-full flex-1 overflow-hidden rounded-lg`,children:[R(wk,{isLoading:p}),R(`iframe`,{src:`${a.applicationURL}${t}`,title:i.intlayerApplication.value,sandbox:`allow-scripts allow-same-origin`,className:G(`size-full`,p&&`hidden`),ref:e,onLoad:()=>{m(!1),u()}}),g,_]})]})};p();var kQ=`theme`,AQ=e=>e===`light`||e===`dark`,jQ=()=>{let e=new URLSearchParams(window.location.search).get(kQ);return AQ(e)?e:void 0},MQ=()=>{let[e,t]=N(jQ);return M(()=>{let e=cQ();if(!e)return;let n=n=>{n.origin===e&&n.source===window.parent&&n.data?.type===ID.INTLAYER_HOST_THEME_CHANGED&&AQ(n.data.theme)&&t(n.data.theme)};return window.addEventListener(`message`,n),()=>window.removeEventListener(`message`,n)},[]),e};p();var NQ=`browser`,PQ=()=>{let e=new URLSearchParams(window.location.search).get(NQ);return e!==null&&e!==`false`},FQ=()=>{let e=P(null),[t]=N(()=>window.location.pathname),[n]=N(PQ);return R(oQ,{iframeRef:e,children:[R(lQ,{}),R(Dr,{children:R(ZZ,{children:R(OQ,{iframeRef:e,applicationPath:t,isBrowserVisible:n})})})]})},IQ=()=>R(bn,{forcedTheme:MQ(),hasBootstrapScript:!1,children:R(xk,{children:R(FQ,{})})});u();var LQ=document.getElementById(`root`);LQ&&e(R(IQ,{}),LQ);export{bA as A,jc as B,HN as C,VN as D,zN as E,KO as F,K as G,Tc as H,HO as I,kn as J,G as K,ul as L,X as M,wk as N,UN as O,ZO as P,R as Q,Hc as R,JN as S,KN as T,xs as U,Dc as V,ys as W,Wt as X,Gt as Y,ue as Z,hR as _,IX as a,BN as b,oX as c,QJ as d,FU as f,oU as g,mU as h,FX as i,Dk as j,ZA as k,JY as l,fU as m,NX as n,LX as o,EU as p,V as q,PX as r,RX as s,HX as t,sY as u,Z as v,WN as w,RN as x,GN as y,Vc as z};