intlayer-editor 9.8.2 → 9.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,74 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-CshktxqS.js","assets/MarkDownRender-C8q_YS26.js","assets/compat-CQl9dCnI.js","assets/MarkdownEditor-BaCiZXdM.js","assets/shikiBundle-BdVAgyt2.js","assets/dist-Drz9gF2m.js"])))=>i.map(i=>d[i]);
2
- import{C as e,D as t,E as n,F as r,I as i,L as a,M as o,N as s,O as c,R as l,S as u,T as d,_ as f,a as p,b as m,c as h,f as g,g as _,h as v,i as y,j as b,k as x,m as S,n as C,o as w,p as T,r as E,s as D,t as O,v as k,w as A,x as j,y as M,z as N}from"./compat-CQl9dCnI.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)}})(),n(),r();var P=Symbol.for(`pv`),F=0;Array.isArray;function I(e,t,n,r,i,o){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:P,__v:--F,__i:-1,__u:0};return(i||o)&&(u.__source=i,u.__self=o),a.vnode&&a.vnode(u),u}S();var L=s(!0),ee=()=>t(L);S();var te=1,R=9e5,ne=0,z=()=>(ne=(ne+1)%(2**53-1),ne.toString()),B=new Map,re=e=>{if(B.has(e))return;let t=setTimeout(()=>{B.delete(e),se({type:`REMOVE_TOAST`,toastId:e})},R);B.set(e,t)},ie=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,te)};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?re(n):e.toasts.forEach(e=>{re(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)}}},ae=[],oe={toasts:[]},se=e=>{oe=ie(oe,e),ae.forEach(e=>{e(oe)})},ce=({...e})=>{let t=z(),n=e=>se({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>se({type:`DISMISS_TOAST`,toastId:t});return se({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},le=()=>{let[e,t]=d(oe);return M(()=>(ae.push(t),()=>{let e=ae.indexOf(t);e>-1&&ae.splice(e,1)}),[e]),{...e,toast:ce,dismiss:e=>se({type:`DISMISS_TOAST`,toastId:e})}};S();var ue=s(void 0),de=e=>{let n=t(ue);if(e)return e;if(!n)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return n},fe=({client:e,children:t})=>(M(()=>(e.mount(),()=>{e.unmount()}),[e]),I(ue.Provider,{value:e,children:t})),pe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},me=new class{#e=pe;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 he(e){setTimeout(e,0)}var ge=typeof window>`u`||`Deno`in globalThis;function _e(){}function ve(e,t){return typeof e==`function`?e(t):e}function ye(e){return typeof e==`number`&&e>=0&&e!==1/0}function be(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xe(e,t){return typeof e==`function`?e(t):e}function Se(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==we(o,t.options))return!1}else if(!Ee(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 Ce(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Te(t.options.mutationKey)!==Te(a))return!1}else if(!Ee(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function we(e,t){return(t?.queryKeyHashFn||Te)(e)}function Te(e){return JSON.stringify(e,(e,t)=>je(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Ee(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(!Ee(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Ee(e[r],t[r]))return!1;return!0}return!1}var De=Object.prototype.hasOwnProperty;function Oe(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ae(e)&&Ae(t);if(!r&&!(je(e)&&je(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:De.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Oe(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ke(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!De.call(t,n)||e[n]!==t[n])return!1;return!0}function Ae(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function je(e){if(!Me(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!(!Me(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Me(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ne(e){return new Promise(t=>{me.setTimeout(t,e)})}function Pe(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Oe(e,t)}function Fe(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function Ie(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var Le=Symbol();function Re(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Le?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ze(e,t){return typeof e==`function`?e(...t):!!e}var Be=Symbol();function Ve(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[Be]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var He=()=>ge,Ue=()=>He(),We=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(){}},Ge=new class extends We{#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 Ke(e){let t;if(e.then(e=>(t=e,e),_e)?.catch?.(_e),t!==void 0)return{data:t}}function qe(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function Je(e,t,n){let r=e.promise?.then(t).catch(e=>n?.(e)===!1?Promise.reject(e):Promise.reject(Error(`redacted`)));return r?.catch(_e),r}function Ye(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:Je(e,t,n)},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function Xe(e){return e.state.isPaused}function Ze(e){return e.state.status===`success`}function Qe(e,t={}){let n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??Xe,r=e.getMutationCache().getAll().flatMap(e=>n(e)?[qe(e)]:[]),i=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??Ze,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)?[Ye(e,o,a)]:[])}}function $e(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?Ke(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(_e)})}var et=he;function tt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=et,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 nt=tt(),rt=new class extends We{#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 it(e){return Math.min(1e3*2**e,3e4)}function at(e){return(e??`online`)!==`online`||rt.isOnline()}var ot=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function st(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(_e);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new ot(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Ge.isFocused()&&(e.networkMode===`always`||rt.isOnline())&&e.canRun(),p=()=>at(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??(Ue()?0:3),a=e.retryDelay??it,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),Ne(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)}}function ct(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=>{Ve(e,()=>t.signal,()=>n=!0,l[Be])},d=Re(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?Ie:Fe;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?ut:lt,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]:lt(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 lt(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 ut(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var dt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ye(this.gcTime)&&(this.#e=me.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ue()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(me.clearTimeout(this.#e),this.#e=void 0)}},ft=class extends dt{#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=ht(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=ht(this.options);e.data!==void 0&&(this.setState(mt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Pe(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(_e).catch(_e):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=>xe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Le||!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=>xe(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:!be(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,{[Be]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Re(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`?ct(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=st({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ot&&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 ot){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,...pt(t.data,this.options),fetchMeta:e.meta??null};case`success`:{let n={...t,...mt(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 n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:`idle`,status:`error`,isInvalidated:!0}}case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),nt.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function pt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:at(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function mt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ht(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 gt=class extends We{#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),vt(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yt(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 xe(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&&!ke(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&bt(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||xe(this.options.enabled,this.#t)!==xe(t.enabled,this.#t)||xe(this.options.staleTime,this.#t)!==xe(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||xe(this.options.enabled,this.#t)!==xe(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 ke(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(_e)),t}#h(e){return!Ue()&&xe(this.options.enabled,this.#t)!==!1&&ye(e)}#g(){this.#b();let e=xe(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=be(this.#r.dataUpdatedAt,e)+1;this.#u=me.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return xe(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=me.setInterval(()=>{(this.options.refetchIntervalInBackground||Ge.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(me.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(me.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&&vt(e,t),o=i&&bt(e,n,t,r);(a||o)&&(l={...l,...pt(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=Pe(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=Pe(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=i?.error===f?i.errorUpdatedAt: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:xt(e,t),refetch:this.refetch,isEnabled:xe(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),ke(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})();nt.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 _t(e,t){return xe(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||xe(t.retryOnMount,e)!==!1)}function vt(e,t){return _t(e,t)||e.state.data!==void 0&&yt(e,t,t.refetchOnMount)}function yt(e,t,n){if(xe(t.enabled,e)!==!1&&xe(t.staleTime,e)!==`static`){let r=xe(n,e);return r===`always`||r!==!1&&xt(e,t)}return!1}function bt(e,t,n,r){return(e!==t||xe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&xt(e,n)}function xt(e,t){return xe(t.enabled,e)!==!1&&e.isStaleByTime(xe(t.staleTime,e))}var St=class extends dt{#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||Ct(),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=st({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),nt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ct(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var wt=class extends We{#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 St({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=Tt(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=Tt(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=Tt(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=Tt(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){nt.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=>Ce(t,e))}findAll(e={}){return this.getAll().filter(t=>Ce(e,t))}notify(e){nt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return nt.batch(()=>Promise.all(e.map(e=>e.continue().catch(_e))))}};function Tt(e){return e.options.scope?.id}var Et=class extends We{#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),ke(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Te(t.mutationKey)!==Te(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??Ct();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){nt.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)})})}},Dt=class extends We{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??we(r,t),a=this.get(i);return a||(a=new ft({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(){nt.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=>Se(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Se(e,t)):t}notify(e){nt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ot=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Dt,this.#t=e.mutationCache||new wt,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Ge.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=rt.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(xe(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=ve(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return nt.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;nt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return nt.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=nt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(_e).catch(_e)}invalidateQueries(e,t={}){return nt.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=nt.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(_e)),r?Promise.resolve():t}));return Promise.all(r).then(_e)}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(xe(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(xe(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_e).catch(_e)}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(_e).catch(_e)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return rt.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(Te(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Ee(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Te(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Ee(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||=we(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===Le&&(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()}};S();var kt=s(!1),At=()=>t(kt),jt=kt.Provider;S();function Mt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Nt=s(Mt()),Pt=()=>t(Nt);S();var Ft=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?ze(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},It=e=>{M(()=>{e.clearReset()},[e])},Lt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ze(n,[e.error,r])),Rt=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))}},zt=(e,t)=>e?.suspense&&t.isPending,Bt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});S();function Vt(e,t,n){let r=At(),i=Pt(),a=de(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Rt(o),Ft(o,i,s),It(i);let[l]=d(()=>new t(a,o)),u=l.getOptimisticResult(o);M(()=>{l.setOptions(o)},[o,l]);let f=!r&&c;if(h(A(e=>{let t=f?l.subscribe(nt.batchCalls(e)):_e;return l.updateResult(),t},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),zt(o,u))throw Bt(o,l,i);if(Lt({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Ht(e,t){return Vt(e,gt,t)}S();function Ut(e,t){let n=de(t),[r]=d(()=>new Et(n,e));M(()=>{r.setOptions(e)},[r,e]);let i=h(A(e=>r.subscribe(nt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=A((...e)=>{r.mutate(e[0],e[1]).catch(_e)},[r]);if(i.error&&ze(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Wt(){}var Gt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Kt=new class{#e=Gt;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 qt(e,{interval:t=1e3,onError:n=Wt}={}){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=>Kt.setTimeout(e,t));for(;Date.now()<r;)await new Promise(e=>Kt.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:Wt,restoreClient:()=>Promise.resolve(void 0),removeClient:Wt}},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();$e(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:Qe(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()}}S();var en=({children:e,persistOptions:t,onSuccess:n,onError:r,...i})=>{let[a,o]=d(!0),s=u({persistOptions:t,onSuccess:n,onError:r}),c=u(!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]),I(fe,{...i,children:I(jt,{value:a,children:e})})};S();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()};me.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}=le();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=u({onSuccess:r,onError:n});i.current={onSuccess:r,onError:n};let a=u(t??null);a.current||=new Ot({defaultOptions:rn,mutationCache:new wt});let o=u(!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`?I(fe,{client:a.current,children:e}):I(en,{client:a.current,persistOptions:{persister:an,maxAge:tn,buster:nn,dehydrateOptions:{shouldDehydrateQuery:e=>e.state.status===`success`}},children:e})};S();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:m,vn=s(void 0),yn=({storageKey:e=`theme`,nonce:t,hasBootstrapScript:n=!0,forcedTheme:r,children:i})=>{let[a,o]=d(`system`),[s,c]=d(void 0),l=r??(a===`system`?s:a);_n(()=>{let t=window.matchMedia(dn);o(hn(e)),c(t.matches?`dark`:`light`);let n=e=>c(e.matches?`dark`:`light`),r=t=>{t.key===e&&o(hn(e))};return t.addEventListener(`change`,n),window.addEventListener(`storage`,r),()=>{t.removeEventListener(`change`,n),window.removeEventListener(`storage`,r)}},[e]),_n(()=>{if(!l)return;let e=document.documentElement;if(e.getAttribute(un)===l)return;let n=gn(t);e.setAttribute(un,l),e.style.colorScheme=l,n()},[l,t]);let u=A(t=>{o(t);try{localStorage.setItem(e,t)}catch{}},[e]),f=x(()=>({theme:a,resolvedTheme:l,setTheme:u}),[a,l,u]);return I(vn.Provider,{value:f,children:[n&&I(`script`,{suppressHydrationWarning:!0,nonce:fn?t:``,type:fn?void 0:`text/plain`,dangerouslySetInnerHTML:{__html:mn(e)}}),i]})},bn=({children:e,...n})=>t(vn)?I(b,{children:e}):I(yn,{...n,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)=>{let i=a=>{e.removeEventListener(`load`,i),e.removeEventListener(`error`,i),a.type===`error`?r(Error(`Unable to preload CSS for ${t}`)):n(a)};e.addEventListener(`load`,i),e.addEventListener(`error`,i)})})}).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`;r(),n();var Er=s({get locale(){return tr()??xn?.defaultLocale},setLocale:()=>null}),Dr=({locale:e,defaultLocale:t,variant:n,children:r,setLocale:i,isCookieEnabled:a})=>{let{defaultLocale:o,locales:s}=xn??{},[c,l]=d(()=>e??tr()??t??o);M(()=>{pr()},[]);let u=e??c,f=A(e=>{u.toString()!==e.toString()&&(s?.map(String).includes(e)?(l(e),nr(e,a??!0)):console.error(`Locale ${e} is not available`))},[u,s,a]),p=i??f,m=Sr(u),h=x(()=>({locale:m,setLocale:p,variant:n,isCookieEnabled:a}),[m,p,n,a]);return I(Er.Provider,{value:h,children:r})},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),Lr?.push({dictionary:e,cacheKey:t,content:n}),n},Lr=null,Rr=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},zr=`translation`,Br=`enumeration`,Vr=`plural`,Hr=`condition`,Ur=`insertion`,Wr=`file`,Gr=`object`,Kr=`array`,qr=`nested`,Jr=`reactNode`,Yr=`preactNode`,Xr=`solidNode`,Zr=`markdown`,Qr=`html`,$r=`text`,ei=`number`,ti=`boolean`,ni=`gender`,ri=`select`,ii=`null`,ai=`unknown`,oi=(e,t,n)=>({...e,children:t,keyPath:[...e.keyPath,n]}),si=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,si);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)=>si(e,oi(t,e,{type:Kr,key:n})));let n={};for(let r in e){let i={type:Gr,key:r};t.eager?n[r]=si(e[r],oi(t,e[r],i)):Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:function(){let n=si(e[r],oi(t,e[r],i));return Object.defineProperty(this,r,{value:n,enumerable:!0,configurable:!0}),n}})}return n},ci=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),li=(e,t,n)=>e[Jn(`PluralRules`,n).select(t)]??e.other,ui=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)},di=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e)||!ui(e)||!ui(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`?di(a,i):a;o!==a&&(n===e&&(n={...e}),n[r]=o)}return n},fi=(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)=>di(e,t))},pi=e=>{if(typeof e!=`object`||!e||!(`nodeType`in e))return!1;let{nodeType:t}=e;return!1},mi=e=>{if(typeof e==`string`)return e;if(pi(e))return e.nodeType===`html`?e[Qr]:e[Zr]},hi=(e,t)=>{if(typeof e==`string`)return t;if(pi(e)){let n=e.nodeType===`html`?Qr:Zr;return{...e,[n]:t}}return e},gi=(e,t,n,r,i)=>{let a=hi(e,ci(mi(e),t));return i(a,{...n,plugins:r,children:a})},_i={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},vi=e=>{if(typeof e!=`function`)return!1;let{value:t}=e;return t===void 0||typeof t==`function`},yi=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?_i:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a=fi(n.translation??{},e,t);return i(a,{...r,children:a,keyPath:[...r.keyPath,{type:zr,key:e}]})}},bi=_i,xi=e=>({}).INTLAYER_NODE_TYPE_PLURAL===`false`?_i:{id:`plural-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`plural`,transform:(t,n,r)=>{let i=t[Vr],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`||pi(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(pi(e))return n=>gi(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=ci(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:Vr,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=li(a,n,l);return vi(r)?r(t):r}}},Si={}.INTLAYER_NODE_TYPE_CONDITION===`false`?_i:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r=e[Hr],i={};for(let e in r){let a=r[e];i[e]=n(a,{...t,children:a,keyPath:[...t.keyPath,{type:Hr,key:e}]})}return e=>{let t=typeof e==`boolean`?e:e.value,n=Rr(i,t);return vi(n)&&typeof e==`object`?n(e):n}}},Ci={}.INTLAYER_NODE_TYPE_INSERTION===`false`?_i:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:Ur}],i=e[Ur],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||pi(e),transform:(e,n,r)=>{if(pi(e))return i=>gi(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=ci(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return Ei(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}},wi=[Br,Hr,Vr,ni,ri],Ti=(e,t,n,r=!1)=>{let i=e?.nodeType;if(typeof t!=`function`||!i||!wi.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&&vi(i)?i(n):i}},Ei=(e,t)=>typeof t==`function`&&wi.includes(e?.nodeType??``)?n=>Ti(e,t,n):t,Di=_i,Oi=_i,ki=e=>_i,Ai=_i,ji=(e,t=!0)=>[yi(e??xn.defaultLocale,t?xn.defaultLocale:void 0),bi,xi(e??xn.defaultLocale),Si,Ci,ki(e??xn.defaultLocale),Ai,Di,Oi].filter(e=>e!==_i),Mi=(e,t,n=[])=>si(e,{...t,plugins:n}),Ni=new WeakSet,Pi=(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??ji(a),l=e,u=e=>{let t={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:c,nestedDictionaries:e.nestedDictionaries,eager:!Ni.has(e)};Ni.add(e);try{return Mi(e.content,t,c)}finally{t.eager&&Ni.delete(e)}};return l===null?Ir(e,o,null):Array.isArray(l)?Ir(e,o,l.map(u)):Ir(e,o,u(l))};r();var Fi=({children:e,value:t,additionalProps:n})=>Object.setPrototypeOf({...l(e)?e:i(b,{},e),value:t,...n},Qn(t));r(),S();var Ii=null,Li=null,Ri={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,t)=>Fi({value:t.children,children:t.children})},zi=_i,Bi=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,Vi=(e,t)=>{if(!Object.values(t).some(Bi))return e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString());let n=[],r=0,a=/\{\{\s*(.*?)\s*\}\}/g,o=a.exec(e);for(;o!==null;){o.index>r&&n.push(e.substring(r,o.index));let i=o[1]?.trim(),s=i&&t[i];s!=null&&n.push(typeof s==`number`?String(s):s),r=o.index+o[0].length,o=a.exec(e)}return r<e.length&&n.push(e.substring(r)),i(b,null,...n.map((e,t)=>i(b,{key:t},e)))},Hi={}.INTLAYER_NODE_TYPE_INSERTION===`false`?_i:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:Ur}],i=e[Ur],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||pi(e),transform:(e,n,r)=>{if(pi(e))return i=>gi(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=Vi(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return Ei(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}};_(()=>Ii.then(e=>({default:e.MarkdownRendererPlugin}))),_(()=>Ii.then(e=>({default:e.MarkdownMetadataRenderer})));var Ui=_i;_(()=>Li.then(e=>({default:e})));var Wi=_i,Gi=new Map,Ki=(e,t=!0)=>{let n=Un(e),r=`${n}_${t}`;if(Gi.has(r))return Gi.get(r);let i=[Ri,yi(n,t?xn.defaultLocale:void 0),bi,xi(n),Si,ki(n),Ai,Di,Oi,zi,Hi,Ui,Wi].filter(e=>e!==_i);return Gi.set(r,i),i},qi=(e,t)=>Pi(e,t,Ki(typeof t==`object`&&t?t.locale:t)),Ji=(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}},Yi=(e,t,n)=>{let r=e;for(let e of t){for(;r?.nodeType===`translation`&&e.type!==`translation`;){let e=r[zr];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 structuredClone(r)},Xi=(e,t,n)=>{let r=structuredClone(n);switch(e){case zr:return{nodeType:zr,[zr]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case Br:return{nodeType:Br,[Br]:{1:r??``}};case Vr:return{nodeType:Vr,[Vr]:{one:r??``,other:r??``}};case Hr:return{nodeType:Hr,[Hr]:{true:r??``,false:r??``}};case ni:return{nodeType:ni,[ni]:{male:r??``,female:r??``,fallback:r??``}};case ri:return{nodeType:ri,[ri]:{case1:r??``,fallback:r??``}};case Ur:return{nodeType:Ur,[Ur]:{insertion:r??``}};case qr:return{nodeType:qr,[qr]:{dictionaryKey:``}};case Zr:return{nodeType:Zr,[Zr]:r??``};case Qr:return{nodeType:Qr,[Qr]:r??``,customComponents:[]};case Wr:return{nodeType:Wr,[Wr]:r??``};case Gr:return{newKey:r??``};case Kr:return[r??``];case $r:return r??``;case ei:return r??0;case ti:return r??!0;default:return r??``}},Zi=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`?Zi(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?Zi(n):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(Zi);let t=Object.entries(e).map(([e,t])=>[e,Zi(t)]);return Object.fromEntries(t)},Qi=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},$i=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,ea={[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,[ai]:!0},ta=e=>Object.hasOwn(ea,e),na=e=>{if(typeof e==`string`)return $r;if($i(e)){let t=e.nodeType;return ta(t)?t:ai}return Array.isArray(e)?Kr:er(e)?Jr:typeof e==`number`?ei:typeof e==`boolean`?ti:e&&typeof e==`object`?Gr:e===null?ii:ai},ra=(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};n();var V=(e,n)=>{let{locale:r,variant:i}=t(Er)??{},a=n??r,o=a;return x(()=>qi(e,a),[e.key,o])};n();var{defaultLocale:ia,locales:aa}=xn??{},oa=({isCookieEnabled:e,onLocaleChange:n}={})=>{let{locale:r,setLocale:i,isCookieEnabled:a}=t(Er)??{};return{locale:r,defaultLocale:ia,availableLocales:aa,setLocale:t=>{aa?.map(String).includes(t)?(i(t),nr(t,e??a??!0),n?.(t)):console.error(`Locale ${t} is not available`)}}};S();var sa=({value:e,defaultValue:t,onChange:n})=>{let[r,i]=d(t),a=e!==void 0,o=a?e:r,s=u(o);return s.current=o,[o,e=>{Object.is(e,s.current)||(s.current=e,a||i(e),n?.(e))}]};S();var ca=e=>{let{animationName:t,display:n}=getComputedStyle(e);return n!==`none`&&!!t&&t!==`none`},la=e=>{let[t,n]=d(e),[r,i]=d(null);return e&&!t&&n(!0),m(()=>{if(e||!t)return;if(!r||!ca(r)){n(!1);return}let i=e=>{e.target===r&&n(!1)};return r.addEventListener(`animationend`,i),r.addEventListener(`animationcancel`,i),()=>{r.removeEventListener(`animationend`,i),r.removeEventListener(`animationcancel`,i)}},[e,t,r]),{isMounted:e||t,ref:i}},ua=2048,da=8192,fa=2048,pa=1024,ma=2048,ha=-2128831035,ga=16777619,_a=Array.isArray,va=e=>{if(!e)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return``+e;let t=``;if(_a(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:va(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},ya=(e,t)=>{let n=[];for(let r=0;r<e;r++)n.push(t);return n},ba=`line`in Error(),xa=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Sa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ca=/\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$/,wa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ta=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ea=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Da=Number,Oa=Number.isNaN,ka=Number.isInteger,Aa=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ja=(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(Aa(e.charCodeAt(1))){let t=2;for(;t<r-1;){let n=e.charCodeAt(t);if(Aa(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},Ma=null,Na=-1,Pa=``,Fa=``,Ia=e=>{if(e===Ma)return;Ma=e;let t=ja(e,91,93);Na=t,t>0?(Pa=e.slice(1,t),Fa=e.slice(t+1,e.length-1)):t===0&&(Fa=e.slice(1,-1))},La=null,Ra=-1,za=``,Ba=e=>{if(e===La)return;La=e;let t=ja(e,40,41);Ra=t,t>0&&(za=e.slice(1,t))},Va=e=>xa.test(e),H=e=>!!e&&!Oa(Da(e)),Ha=e=>!!e&&ka(Da(e)),Ua=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),Wa=e=>Sa.test(e),Ga=()=>!0,Ka=e=>Ca.test(e)&&!wa.test(e),qa=()=>!1,Ja=e=>Ta.test(e),Ya=e=>Ea.test(e),Xa=e=>!U(e)&&!W(e),Za=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))},Qa=e=>mo(e,vo,qa),U=e=>(Ia(e),Na>=0),$a=e=>mo(e,yo,Ka),eo=e=>mo(e,bo,H),to=e=>mo(e,So,Ga),no=e=>mo(e,xo,qa),ro=e=>mo(e,go,qa),io=e=>mo(e,_o,Ya),ao=e=>mo(e,Co,Ja),W=e=>(Ba(e),Ra>=0),oo=e=>ho(e,yo),so=e=>ho(e,xo),co=e=>ho(e,go),lo=e=>ho(e,vo),uo=e=>ho(e,_o),fo=e=>ho(e,Co,!0),po=e=>ho(e,So,!0),mo=(e,t,n)=>(Ia(e),Na<0?!1:Na>0?t(Pa):n(Fa)),ho=(e,t,n=!1)=>(Ba(e),Ra<0?!1:Ra>0?t(za):n),go=e=>e===`position`||e===`percentage`,_o=e=>e===`image`||e===`url`,vo=e=>e===`length`||e===`size`||e===`bg-size`,yo=e=>e===`length`,bo=e=>e===`number`,xo=e=>e===`family-name`,So=e=>e===`number`||e===`weight`,Co=e=>e===`shadow`,wo=new Map([[U,1],[Qa,1],[$a,1],[eo,1],[to,1],[no,1],[ro,1],[io,1],[ao,1],[W,2],[oo,2],[so,2],[co,2],[lo,2],[uo,2],[fo,2],[po,2],[Va,4],[H,4],[Ha,4],[Ua,4],[Wa,4],[Za,4],[Ga,7],[Xa,7]]),To=(e,t)=>({classGroupId:e,validator:t,shapeMask:wo.get(t)??7}),Eo=()=>({nextPart:new Map,validators:null,classGroupId:void 0}),Do=[],Oo=e=>{let{theme:t,classGroups:n}=e,r=Eo();for(let e in n)ko(n[e],r,e,t);return r},ko=(e,t,n,r)=>{for(let i=0;i<e.length;i++)Ao(e[i],t,n,r)},Ao=(e,t,n,r)=>{typeof e==`string`?jo(e,t,n):typeof e==`function`?Mo(e,t,n):Fo(e)?ko(r[e.themeGroupId]||Do,t,n,r):No(e,t,n,r)},jo=(e,t,n)=>{let r=e===``?t:Po(t,e);r.classGroupId=n},Mo=(e,t,n)=>{t.validators===null&&(t.validators=[]),t.validators.push(To(n,e))},No=(e,t,n,r)=>{let i=Object.entries(e);for(let e=0;e<i.length;e++){let[a,o]=i[e];ko(o,Po(t,a),n,r)}},Po=(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=Eo(),n.nextPart.set(t,i)),n=i}return n},Fo=e=>`themeGroupId`in e&&typeof e.themeGroupId==`string`,Io=(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},Lo=[],Ro=e=>{let t=Oo(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 Vo(e);let r=e.split(`-`);return Bo(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?Io(i,t):t}return i||zo},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 Lo;let t=[];for(let n=0;n<e.length;n++)t.push(o.get(e[n]));return t},u=ya(c,Lo),d=ya(c,Lo),f=ya(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}},zo=[],Bo=(e,t,n)=>{if(t===e.length)return n.classGroupId;let r=n.nextPart.get(e[t]);if(r){let n=Bo(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}},Vo=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},Ho=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),Uo=[];Object.freeze(Uo);var Wo=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 Ho(t===null?Uo:t,l,c,d)},Go=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}},Ko=(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},qo={classId:-1,conflictStart:0,conflictEnd:0},Jo=e=>{let t=Go(e),n=Yo(e),{getClassGroupId:r,groupIndexes:i,groupCount:a,groupNames:o,conflictRowsBase:s,conflictRowsPostfix:c}=Ro(e),l=new Int32Array(256),u=0,d=new Int32Array(64),f=new Int32Array(64),p=new Int32Array(64),m=fa,h=m-1,g=h,_=ya(fa,null),v=ya(fa,null),y=new Int32Array(fa*4),b=new Int32Array(fa*4),x=0,S=0,C=()=>{let e=_,t=y,n=m;m=n*2,h=m-1,_=ya(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):(_=ya(m,null),y=new Int32Array(m*4)),x=0},T=()=>{m=fa,h=m-1,g=h,_=ya(fa,null),v=ya(fa,null),y=new Int32Array(fa*4),b=new Int32Array(fa*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=ha),i=Math.imul(i^s,ga)}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,ee=new Map,te=(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=ee.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,ee.set(p,m)}return{classId:u,conflictStart:m,conflictEnd:m+f}},R=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?te(t,``,!1):qo}let{isExternal:o,modifiers:s,hasImportantModifier:c,baseClassName:l,maybePostfixModifierPosition:u}=Wo(e);if(o)return qo;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 qo;d=!1}let p=s.length===0?``:s.length===1?s[0]:t(s).join(`:`),m=c?p+`!`:p;return te(f,m,d)},ne=ya(pa,null),z=new Int32Array(pa),B=0,re=0,ie=0,ae=0,oe=(e,t)=>{let n=0,r=0,i=0,a=ha;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],ga))}if(ie=n,ae=i,n===1||(B=a&1023,re=a,z[B]!==a))return null;let o=ne[B];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[B]=e,z[B]=re},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=Ko(e,t,i),r=R(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=ya(16,ce),_e=new Int32Array(16),ve=()=>{A.clear(),j.clear(),M.clear(),ee.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=ba&&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=Ko(e,t,a);let n=R(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(ie===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=ya(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(ie===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}}},Yo=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},Xo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Zo(n))&&(i&&(i+=` `),i+=r);return i},Zo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++){let i=e[r];i&&(t=Zo(i))&&(n&&(n+=` `),n+=t)}return n},Qo=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=ua,c=ua*2,l=8191,u=4096,d=new Uint8Array(da),f=new Uint8Array(da),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=Jo(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(Xo(...e));return E.mergeString=x,E.peekString=w,E.mergeParts2=S,E.mergeParts3=C,E.mergeParts=T,E},$o=e=>({themeGroupId:e}),es=Qo(()=>{let e=$o(`color`),t=$o(`font`),n=$o(`text`),r=$o(`font-weight`),i=$o(`tracking`),a=$o(`leading`),o=$o(`breakpoint`),s=$o(`container`),c=$o(`spacing`),l=$o(`radius`),u=$o(`shadow`),d=$o(`inset-shadow`),f=$o(`text-shadow`),p=$o(`drop-shadow`),m=$o(`blur`),h=$o(`perspective`),g=$o(`aspect`),_=$o(`ease`),v=$o(`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=()=>[Va,`full`,`auto`,...w()],E=()=>[Ha,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,Ha,W,U]},Ha,W,U],O=()=>[Ha,`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=()=>[Va,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,Va,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Va,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,W,U],L=()=>[...b(),co,ro,{position:[W,U]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,lo,Qa,{size:[W,U]}],R=()=>[Ua,oo,$a],ne=()=>[``,`none`,`full`,l,W,U],z=()=>[``,H,oo,$a],B=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[H,Ua,co,ro],ae=()=>[``,`none`,m,W,U],oe=()=>[`none`,H,W,U],se=()=>[`none`,H,W,U],ce=()=>[H,W,U],le=()=>[Va,`full`,...w()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Wa],breakpoint:[Wa],color:[Ga],container:[Wa],"drop-shadow":[Wa],ease:[`in`,`out`,`in-out`],font:[Xa],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Wa],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Wa],shadow:[Wa],spacing:[`px`,H],text:[Wa],"text-shadow":[Wa],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Va,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[Za],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:[Ha,`auto`,W,U]}],basis:[{basis:[Va,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,Va,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Ha,`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,oo,$a]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,po,to]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ua,U]}],"font-family":[{font:[so,no,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,eo]}],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:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,$a]}],"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:[Ha,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:ee()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ha,W,U],radial:[``,W,U],conic:[``,Ha,W,U]},uo,io]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"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:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`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:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,oo,$a]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,fo,ao]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,fo,ao]}],"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,$a]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,fo,ao]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"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":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"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":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"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":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"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":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"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":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"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":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"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":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"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":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"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":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,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,fo,ao]}],"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:[Ha,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,oo,$a,eo]}],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`]}}),ts=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},ns=[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(ma).fill(-1),u=ya(ma,``),d=ya(ma,ns),f=new Int32Array(ma),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&&ts(t),t),w=e=>{for(let t=0,n=e.length;t<n;t++){let n=e[t];n&&typeof n!=`string`&&(e[t]=va(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,va(n)):t(e):e?A(va(e),n):n?t(typeof n==`string`?n:va(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=ba?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,va(r)):A(e,n):n?P(e,va(n),r):r?typeof r==`string`?A(e,r):A(e,va(r)):t(e):e?P(va(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=ba?(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:va(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)}})(es),rs=(e,t)=>{if(typeof e==`function`){let n=e(t);return typeof n==`function`?n:void 0}e&&(e.current=t)},is=(...e)=>t=>{let n=e.map(e=>rs(e,t));return()=>{e.forEach((e,t)=>{let r=n[t];r?r():rs(e,null)})}},as=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function os(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:as(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ss=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},cs=e=>{let t=ss(e);return t.charAt(0).toUpperCase()+t.slice(1)},ls=(...e)=>{let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of n.split(/\s+/))e&&t.add(e);return[...t].join(` `)},us={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 ds(e){return e!=null}function fs(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??us.width,a=e.size??e.height??us.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?ls(...c):ls(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??us[`stroke-width`])*Number(e.size??e.width??us.width)/Number(t.size??t.width??us.width):t.strokeWidth??us[`stroke-width`];return[`svg`,{...Object.entries(us).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&ds(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&ds(t.width)&&{[r(`width`)]:t.width},...`height`in t&&ds(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 ps(e,t={}){return fs(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ms=e=>{if(typeof e!=`object`||!e)return!1;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith(`aria-`)||t===`role`||t===`title`)&&e[t]!=null)return!0;return!1};S();var hs=s({}),gs=()=>t(hs);S();var _s=v(({color:e,size:t,width:n,height:r,strokeWidth:a,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=``}=gs()??{},b=!!l||ms(f),[x,S,C=[]]=ps(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:ls(y,c),hasA11yProp:b,attributes:f});return i(x,{ref:p,...S},[...C.map(([e,t])=>i(e,t)),...Array.isArray(l)?l:[l]])});S();function K(e,t=[],n=[]){let r=typeof e==`string`?os(e,t,n):e,a=v(({className:e,...t},n)=>i(_s,{ref:n,icon:r,className:e,...t}));return r.name&&(a.displayName=cs(r.name)),a}var vs={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};vs.node;var ys=K(vs),bs={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};bs.node;var xs=K(bs),Ss={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`}]]};Ss.node;var Cs=K(Ss),ws={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};ws.node;var Ts=K(ws),Es={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Es.node;var Ds=K(Es),Os={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Os.node;var ks=K(Os),As={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};As.node;var js=K(As),Ms={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Ms.node;var Ns=K(Ms),Ps={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`}]]};Ps.node;var Fs=K(Ps),Is={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`]};Is.node;var Ls=K(Is),Rs={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`}]]};Rs.node;var zs=K(Rs),Bs={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`}]]};Bs.node;var Vs=K(Bs),Hs={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`}]]};Hs.node;var Us=K(Hs),Ws={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`}]]};Ws.node;var Gs=K(Ws),Ks={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`}]]};Ks.node;var qs=K(Ks),Js={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`}]]};Js.node;var Ys=K(Js),Xs={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`}]]};Xs.node;var Zs=K(Xs),Qs={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`}]]};Qs.node;var $s=K(Qs),ec={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`}]]};ec.node;var tc=K(ec),nc={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`}]]};nc.node;var rc=K(nc),ic={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`}]]};ic.node;var ac=K(ic),oc={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`}]]};oc.node;var sc=K(oc),cc={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};cc.node;var lc=K(cc),uc={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`}]]};uc.node;var dc=K(uc),fc={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`}]]};fc.node;var pc=K(fc),mc={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`}]]};mc.node;var hc=K(mc),gc={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};gc.node;var _c=K(gc),vc={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`}]]};vc.node;var yc=K(vc),bc={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`}]]};bc.node;var xc=K(bc),Sc={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`}]]};Sc.node;var Cc=K(Sc),wc={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`}]]};wc.node;var Tc=K(wc),Ec={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Ec.node;var Dc=K(Ec),Oc={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`]};Oc.node;var kc=K(Oc),Ac={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`]};Ac.node;var jc=K(Ac),Mc={name:`triangle-exclamation-point`,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`,`triangle-alert`]};Mc.node;var Nc=K(Mc),Pc={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`}]]};Pc.node;var Fc=K(Pc),Ic={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`}]]};Ic.node;var Lc=K(Ic),Rc={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`]};Rc.node;var zc=K(Rc),Bc={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Bc.node;var Vc=K(Bc);function Hc(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=Hc(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Uc(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hc(e))&&(r&&(r+=` `),r+=t);return r}var Wc=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Gc=Uc,Kc=(e,t)=>n=>{if(t?.variants==null)return Gc(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=Wc(t)||Wc(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 Gc(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)};S();var qc=5e3,Jc=50,Yc=10,Xc=s({duration:qc,swipeThreshold:Jc,isPaused:!1,setIsViewportActive:()=>{}}),Zc=s({close:()=>{}}),Qc=({children:e,duration:t=qc,swipeThreshold:n=Jc})=>{let[r,i]=d(!1),[a,o]=d(!1);return M(()=>{let e=()=>o(!0),t=()=>o(!1);return window.addEventListener(`blur`,e),window.addEventListener(`focus`,t),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`focus`,t)}},[]),I(Xc.Provider,{value:{duration:t,swipeThreshold:n,isPaused:r||a,setIsViewportActive:i},children:e})},$c=({className:e,onPointerEnter:n,onPointerLeave:r,onFocus:i,onBlur:a,...o})=>{let{setIsViewportActive:s}=t(Xc),c=u(!1),l=u(!1),d=()=>s(c.current||l.current);return I(`ol`,{"aria-label":`Notifications`,"aria-live":`polite`,"aria-relevant":`additions`,tabIndex:-1,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),onPointerEnter:e=>{n?.(e),c.current=!0,d()},onPointerLeave:e=>{r?.(e),c.current=!1,d()},onFocus:e=>{i?.(e),l.current=!0,d()},onBlur:e=>{a?.(e),l.current=e.currentTarget.contains(e.relatedTarget),d()},...o})},el=Kc(`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 data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out pointer-events-auto relative flex w-full touch-pan-y 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-(--toast-swipe-end-x) data-[swipe=move]:translate-x-(--toast-swipe-move-x) 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`}}),tl=({className:e,variant:n,open:r,defaultOpen:i=!0,onOpenChange:a,duration:o,ref:s,onKeyDown:c,onPointerDown:l,onPointerMove:d,onPointerUp:f,onPointerCancel:p,onClickCapture:m,...h})=>{let g=t(Xc),_=o??g.duration,[v,y]=sa({value:r,defaultValue:i,onChange:a}),{isMounted:b,ref:x}=la(v),S=u(null),C=u(_),w=u(null),T=u(!1),E=()=>y(!1);if(M(()=>{if(!v||g.isPaused||!Number.isFinite(_))return;let e=Date.now(),t=setTimeout(E,C.current);return()=>{clearTimeout(t),C.current-=Date.now()-e}},[v,g.isPaused,_]),!b)return null;let D=(e,t,n)=>{let r=S.current;r&&(r.setAttribute(`data-swipe`,e),t&&r.style.setProperty(t,`${n}px`))},O=e=>{l?.(e),e.button===0&&(w.current={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,deltaX:0,isSwiping:!1})},k=e=>{d?.(e);let t=w.current;if(!t||t.pointerId!==e.pointerId)return;let n=e.clientX-t.startX,r=e.clientY-t.startY;if(!t.isSwiping){if(Math.abs(n)<Yc||!(Math.abs(n)>Math.abs(r)))return;t.isSwiping=!0,e.currentTarget.setPointerCapture?.(e.pointerId)}t.deltaX=Math.max(0,n),D(`move`,`--toast-swipe-move-x`,t.deltaX)},A=e=>{let t=w.current;w.current=null,t?.isSwiping&&(T.current=!0,t.deltaX>=g.swipeThreshold?(D(`end`,`--toast-swipe-end-x`,t.deltaX),E()):D(`cancel`),e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return I(Zc.Provider,{value:{close:E},children:I(`li`,{ref:is(s,S,x),"aria-atomic":!0,"data-state":v?`open`:`closed`,className:G(el({variant:n}),e),onKeyDown:e=>{c?.(e),e.defaultPrevented||e.key!==`Escape`||(e.preventDefault(),E())},onPointerDown:O,onPointerMove:k,onPointerUp:e=>{f?.(e),A(e)},onPointerCancel:e=>{p?.(e),A(e)},onClickCapture:e=>{m?.(e),T.current&&(T.current=!1,e.preventDefault(),e.stopPropagation())},...h})})},nl=({className:e,onClick:n,...r})=>{let{close:i}=t(Zc);return I(`button`,{type:`button`,"aria-label":`Close`,className:G(`absolute inset-e-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.error]:text-red-300 hover:text-foreground/80 group-[.error]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-hidden group-[.error]:focus:ring-red-400 group-[.error]:focus:ring-offset-red-600`,e),onClick:e=>{n?.(e),e.defaultPrevented||i()},...r,children:I(Vc,{className:`size-5`})})},rl=(e,t)=>{t?.(e),e.stopPropagation()},il=({className:e,onPointerDown:t,...n})=>I(`div`,{className:G(`cursor-text text-sm font-semibold wrap-break-word select-text [&+div]:text-xs`,e),onPointerDown:e=>rl(e,t),...n}),al=({className:e,onPointerDown:t,...n})=>I(`div`,{className:G(`max-h-60 cursor-text overflow-y-auto text-sm wrap-break-word opacity-90 select-text`,e),onPointerDown:e=>rl(e,t),...n}),ol=()=>{let{toasts:e}=le();return I(Qc,{children:[e.map(({id:e,title:t,description:n,action:r,...i})=>I(tl,{...i,children:[I(`div`,{className:`grid gap-1`,children:[t&&I(il,{children:t}),n&&I(al,{children:n})]}),r,I(nl,{})]},e)),I($c,{})]})};S();var sl=s({});S();function cl(e){let t=u(null);return t.current===null&&(t.current=e()),t.current}var ll=typeof window<`u`;S();var ul=ll?m:M;S();var dl=s(null);function fl(e,t){e.indexOf(t)===-1&&e.push(t)}function pl(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var ml=(e,t,n)=>n>t?t:n<e?e:n,hl={},gl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_l=e=>typeof e==`object`&&!!e,vl=e=>/^0[^.\s]+$/u.test(e);function yl(e){let t;return()=>(t===void 0&&(t=e()),t)}var bl=e=>e,xl=(...e)=>e.reduce((e,t)=>n=>t(e(n))),Sl=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},Cl=class{constructor(){this.subscriptions=[]}add(e){return fl(this.subscriptions,e),()=>this.remove(e)}remove(e){pl(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}},wl=e=>e*1e3,Tl=e=>e/1e3,El=(e,t)=>t?1e3/t*e:0,Dl=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function Ol(e,t,n,r){return e===t&&n===r?bl:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=Dl(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(Dl(s+1e-7,e,n)-i-r)}return Dl(s,t,r)}}var kl=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Al=e=>t=>1-e(1-t),jl=Ol(.33,1.53,.69,.99),Ml=Al(jl),Nl=kl(Ml),Pl=e=>e>=1?1:(e*=2)<1?.5*Ml(e):.5*(2-2**(-10*(e-1))),Fl=e=>1-Math.sin(Math.acos(e)),Il=Al(Fl),Ll=kl(Fl),Rl=Ol(.42,0,1,1),zl=Ol(0,0,.58,1),Bl=Ol(.42,0,.58,1),Vl=e=>Array.isArray(e)&&typeof e[0]!=`number`,Hl=e=>Array.isArray(e)&&typeof e[0]==`number`,Ul={linear:bl,easeIn:Rl,easeInOut:Bl,easeOut:zl,circIn:Fl,circInOut:Ll,circOut:Il,backIn:Ml,backInOut:Nl,backOut:jl,anticipate:Pl},Wl=e=>typeof e==`string`,Gl=e=>{if(Hl(e)){let[t,n,r,i]=e;return Ol(t,n,r,i)}return Wl(e)?Ul[e]:e},Kl={delta:0,timestamp:0,isProcessing:!1},ql;function Jl(){ql=void 0}var Yl={now:()=>(ql===void 0&&Yl.set(Kl.isProcessing||hl.useManualTiming?Kl.timestamp:performance.now()),ql),set:e=>{ql=e,queueMicrotask(Jl)}},Xl=e=>Math.round(e*1e5)/1e5,Zl=e=>t=>typeof t==`string`&&t.startsWith(e),Ql=Zl(`--`),$l=Zl(`var(--`),eu=e=>$l(e)?tu.test(e.split(`/*`)[0].trim()):!1,tu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nu(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var ru={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},iu={...ru,transform:e=>ml(0,1,e)},au={...ru,default:1},ou=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function su(e){return e==null}var cu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lu=(e,t)=>n=>!!(typeof n==`string`&&cu.test(n)&&n.startsWith(e)||t&&!su(n)&&Object.prototype.hasOwnProperty.call(n,t)),uu=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ou);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},du=e=>ml(0,255,e),fu={...ru,transform:e=>Math.round(du(e))},pu={test:lu(`rgb`,`red`),parse:uu(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+fu.transform(e)+`, `+fu.transform(t)+`, `+fu.transform(n)+`, `+Xl(iu.transform(r))+`)`},mu=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function hu(e){let t=e.length>5?2:1,n=mu(e,3,t);return{red:parseInt(mu(e,0,t),16),green:parseInt(mu(e,1,t),16),blue:parseInt(mu(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var gu={test:lu(`#`),parse:hu,transform:pu.transform},_u=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),vu=_u(`deg`),yu=_u(`%`),q=_u(`px`),bu=_u(`vh`),xu=_u(`vw`),Su={...yu,parse:e=>yu.parse(e)/100,transform:e=>yu.transform(e*100)},Cu={test:lu(`hsl`,`hue`),parse:uu(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+yu.transform(Xl(t))+`, `+yu.transform(Xl(n))+`, `+Xl(iu.transform(r))+`)`},wu={test:e=>pu.test(e)||gu.test(e)||Cu.test(e),parse:e=>pu.test(e)?pu.parse(e):Cu.test(e)?Cu.parse(e):gu.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?pu.transform(e):Cu.transform(e),getAnimatableNone:e=>{let t=wu.parse(e);return t.alpha=0,wu.transform(t)}},Tu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Eu=new RegExp(ou.source),Du=new RegExp(Tu.source,`i`);function Ou(e){return isNaN(e)&&typeof e==`string`&&(Eu.test(e)||Du.test(e))}var ku=`number`,Au=`color`,ju=`var`,Mu=`var(`,Nu="${}",Pu=/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 Fu(e){let t=e.toString();return Eu.test(t)||Du.test(t)}function Iu(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Pu,e=>(wu.test(e)?(r.color.push(a),i.push(Au),n.push(wu.parse(e))):e.startsWith(Mu)?(r.var.push(a),i.push(ju),n.push(e)):(r.number.push(a),i.push(ku),n.push(parseFloat(e))),++a,Nu)).split(Nu),indexes:r,types:i}}function Lu(e){return Iu(e).values}function Ru({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===ku?Xl(r[a]):e===Au?wu.transform(r[a]):r[a]}return i}}function zu(e){return Ru(Iu(e))}var Bu=e=>typeof e==`number`?0:wu.test(e)?wu.getAnimatableNone(e):e,Vu=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Bu(e);function Hu(e){let t=Iu(e);return Ru(t)(t.values.map((e,n)=>Vu(e,t.split[n])))}var Uu={test:Ou,parse:Lu,createTransformer:zu,getAnimatableNone:Hu};function Wu(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 Gu({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=Wu(s,r,e+1/3),a=Wu(s,r,e),o=Wu(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Ku(e,t){return n=>n>0?t:e}var qu=(e,t,n)=>e+(t-e)*n,Ju=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Yu=[gu,pu,Cu],Xu=e=>Yu.find(t=>t.test(e));function Zu(e){let t=Xu(e);if(!t)return!1;let n=t.parse(e);return t===Cu&&(n=Gu(n)),n}var Qu=(e,t)=>{let n=Zu(e),r=Zu(t);if(!n||!r)return Ku(e,t);let i={...n};return e=>(i.red=Ju(n.red,r.red,e),i.green=Ju(n.green,r.green,e),i.blue=Ju(n.blue,r.blue,e),i.alpha=qu(n.alpha,r.alpha,e),pu.transform(i))},$u=new Set([`none`,`hidden`]);function ed(e,t){return $u.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function td(e,t){return n=>qu(e,t,n)}function nd(e){return typeof e==`number`?td:typeof e==`string`?eu(e)?Ku:wu.test(e)?Qu:od:Array.isArray(e)?rd:typeof e==`object`?wu.test(e)?Qu:id:Ku}function rd(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nd(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function id(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=nd(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function ad(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 od=(e,t)=>{let n=Iu(e),r=Iu(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?$u.has(e)&&!r.values.length||$u.has(t)&&!n.values.length?ed(e,t):xl(rd(ad(n,r),r.values),Ru(r)):Ku(e,t)},sd=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function cd(e,t){let n=sd.exec(e);if(!n)return;let r=sd.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Xl(qu(a,o,e))+i}function ld(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return qu(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=cd(e,t);if(n)return n}return nd(e)(e,t)}var ud=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function dd(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 fd=40;function pd(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=ud.reduce((e,t)=>(e[t]=dd(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=hl.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,fd),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:ud.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<ud.length;t++)o[ud[t]].cancel(e)},state:n,steps:o}}var{schedule:md,cancel:hd,steps:gd}=pd(typeof requestAnimationFrame<`u`?requestAnimationFrame:bl,!0,Kl),_d=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>md.update(t,e),stop:()=>hd(t),now:()=>Kl.isProcessing?Kl.timestamp:Yl.now()}},vd=(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)})`},yd=2e4;function bd(e,t=50,n=yd,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 xd(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(bd(o),yd);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:Tl(s)}}var Sd=100,Cd=10,wd=1,Td=800,Ed=.3,Dd=.3,Od=.01,kd=2,Ad=.005,jd=.5,Md=.01,Nd=10,Pd=.05,Fd=e=>e<0?1/Math.max(1+e,Pd):Math.max(1-e,Pd);function Id(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 zd(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Ld(e,t){return e*Math.sqrt(1-t*t)}var Rd=12;function zd(e,t,n){let r=n;for(let n=1;n<Rd;n++)r-=e(r)/t(r);return r}var Bd=.001;function Vd({duration:e=Td,bounce:t=Ed}){let n,r,i=Fd(t);e=ml(Md,Nd,Tl(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Ld(t,i),o=Math.exp(-r);return Bd-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Ld(t*t,i);return(-n(t)+Bd>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=zd(n,r,a),s=o*Id(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:wl(e)}}var Hd=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Ud(e,t){if(Hd(e,t))return e}function Wd(e){let t=Ud(e.stiffness),n=Ud(e.damping,!0),r=Ud(e.mass),i={...e,stiffness:t??Sd,damping:n??Cd,mass:r??wd,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Fd(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Id(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Vd(i)),i.isResolvedFromDuration=!0;Hd(i.stiffness)&&Hd(i.damping,!0)||(i.stiffness=Sd,i.damping=Cd)}return i}function Gd(e=Dd,t=Ed){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}=Wd({...n}),f=e=>u?0:-Tl(e),p=s/(2*Math.sqrt(o*c)),m=Tl(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?Od:kd),g.restDelta=n.restDelta||(e?Ad:jd)};_();let v,y,b;if(p<1){let e=Ld(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=>wl(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=wl(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(bd(S),yd),t=vd(t=>S.next(e*t).value,e,30);return e+`ms `+t}};return S}var Kd=Object.assign(Gd,{applyToOptions:e=>{let t=xd(e,100,Gd);return e.ease=t.ease,e.duration=wl(t.duration),e.type=`keyframes`,e}});function qd({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=Kd({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 Jd(e,t,n){let r=[],i=hl.mix||ld,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=xl(Array.isArray(t)?t[o]||bl:t,a)),r.push(a)}return r}function Yd(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=Jd(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=Sl(e[r],e[r+1],n);return s[r](i)};return n?t=>l(ml(e[0],e[a-1],t)):l}function Xd(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Sl(0,t,r);e.push(qu(n,1,i))}}function Zd(e){let t=[0];return Xd(t,e.length-1),t}function Qd(e,t){return e.map(e=>e*t)}function $d(e,t){return e.map(()=>t||Bl).splice(0,e.length-1)}function ef({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=Vl(r)?r.map(Gl):Gl(r)||Bl,s={done:!1,value:t[0]},c=-1;if(!a){for(let e=1;e<t.length;e++)if(t[e]!==t[e-1]){if(c>=0){c=-2;break}c=e-1}}if(c>=0){let r=n&&n.length===t.length?n:Zd(t),i=r[c]*e,a=r[c+1]*e,l=t[c],u=t[c+1],d=Array.isArray(o)?o[c]:o,f=(hl.mix||ld)(l,u),p=t.length-2;return{calculatedDuration:e,next:t=>(s.value=c&&t<i?f(0):c<p&&(t>=a||!e)?typeof u==`number`?u:f(1):f(d(t>=a||!e?1:t<=i?0:(t-i)/(a-i))),s.done=t>=e,s)}}let l=Yd(Qd(n&&n.length===t.length?n:Zd(t),e),t,{ease:Array.isArray(o)?o:$d(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}var tf=5;function nf(e,t,n){let r=Math.max(t-tf,0);return El(n-e(r),t-r)}function rf(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):nf(t=>e.next(t).value,t,e.next(t).value)}function af(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a,o,s=0;for(let t=0;t<e.length;t++){let n=e[t];n!==null&&(s++||(a=n),o=n)}let c=i<0||t&&n!==`loop`&&t%2==1?0:s-1;return!c||r===void 0?c?o:a:r}var of={decay:qd,inertia:qd,tween:ef,keyframes:ef,spring:Kd};function sf(e){typeof e.type==`string`&&(e.type=of[e.type])}var cf=40,lf=(e,t)=>t-e>cf&&!hl.useManualTiming?t:e;function uf(e,t){return{kind:e,animation:t,timestamp:Yl.now(),frameTimestamp:Kl.timestamp,frameIsProcessing:Kl.isProcessing}}function df(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...uf(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function ff(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...uf(`layout-animation-start`,e),node:t})}catch{}}var pf=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)}},mf=e=>e/100,hf=e=>Math.round(e*1e4)/1e4,gf=class extends pf{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,t=Yl.now();e&&e.updatedAt!==t&&this.tick(e.updatedAt=t),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),df(this,this.options)}initAnimation(){let{options:e}=this;sf(e);let{type:t=ef,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||ef;this.mixKeyframes=void 0,s!==ef&&typeof o[0]!=`number`&&(this.mixKeyframes=xl(mf,e.mixer?.(o[0],o[1])||ld(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=bd(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=lf(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!==qd&&(f.value=af(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??hf((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!==qd?af(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=ml(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 Tl(this.calculatedDuration)}get iterationDuration(){return this.duration+Tl(this.options.delay??0)}get time(){return Tl(this.currentTime)}set time(e){this.state===`finished`&&this.updateFinished(),e=wl(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 rf(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(Yl.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Tl(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=_d,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(Yl.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)}},_f=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function vf(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ou)||[];if(!r)return e;let i=n.replace(r,``),a=+!!_f.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var yf=/\b([a-z-]*)\(.*?\)/gu,bf={...Uu,getAnimatableNone:e=>{let t=e.match(yf);return t?t.map(vf).join(` `):e}},xf={...Uu,getAnimatableNone:e=>{let t=Uu.parse(e);return Uu.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Sf={...ru,transform:Math.round},Cf={rotate:vu,pathRotation:vu,rotateX:vu,rotateY:vu,rotateZ:vu,scale:au,scaleX:au,scaleY:au,scaleZ:au,skew:vu,skewX:vu,skewY:vu,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:iu,originX:Su,originY:Su,originZ:q},wf={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,...Cf,zIndex:Sf,fillOpacity:iu,strokeOpacity:iu,numOctaves:Sf},Tf={...wf,color:wu,backgroundColor:wu,outlineColor:wu,fill:wu,stroke:wu,borderColor:wu,borderTopColor:wu,borderRightColor:wu,borderBottomColor:wu,borderLeftColor:wu,filter:bf,WebkitFilter:bf,mask:xf,WebkitMask:xf},Ef=e=>Tf[e],Df=new Set([bf,xf]),Of,kf,Af;function jf(e,t){if(e===Of&&t===kf)return Af;let n=Ef(e);return Df.has(n)||(n=Uu),Af=n.getAnimatableNone?n.getAnimatableNone(t):void 0,Of=e,kf=t,Af}function Mf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Nf=e=>e*180/Math.PI,Pf=e=>If(Nf(Math.atan2(e[1],e[0]))),Ff={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:Pf,rotateZ:Pf,skewX:e=>Nf(Math.atan(e[1])),skewY:e=>Nf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},If=e=>(e%=360,e<0&&(e+=360),e),Lf=Pf,Rf=e=>Math.hypot(e[0],e[1]),zf=e=>Math.hypot(e[4],e[5]),Bf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Rf,scaleY:zf,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(Rf(e)+zf(e))/2,rotateX:e=>If(Nf(Math.atan2(e[6],e[5]))),rotateY:e=>If(Nf(Math.atan2(-e[2],e[0]))),rotateZ:Lf,rotate:Lf,skewX:e=>Nf(Math.atan(e[4])),skewY:e=>Nf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vf(e){return+!!e.includes(`scale`)}function Hf(e,t){if(!e||e===`none`)return Vf(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return Vf(t);let r=(n[1]?Bf:Ff)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var Uf=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Hf(n,t)},Wf=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Gf=new Set([...Wf,`pathRotation`]),Kf=e=>e===ru||e===q,qf=new Set([`x`,`y`,`z`]),Jf=Wf.filter(e=>!qf.has(e));function Yf(e){let t=[];return Jf.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 Xf=new Set([`bottom`,`right`]);function Zf(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 Qf=({transform:e})=>Hf(e,`x`),$f=({transform:e})=>Hf(e,`y`),ep={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Zf(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Zf(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:Qf,y:$f,translateX:Qf,translateY:$f},tp=new Set,np=!1,rp=!1,ip=!1;function ap(){if(rp){let e=[],t=new Set,n=new Set;tp.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Xf.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Yf(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)})}rp=!1,np=!1,tp.forEach(e=>e.complete(ip)),tp.clear()}function op(){tp.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rp=!0)})}function sp(){ip=!0,op(),ap(),ip=!1}function cp(e,t,n){if(typeof e==`string`){if(gl(e)||vl(e))return parseFloat(e);if(!Uu.test(e)&&Uu.test(n))return jf(t,n)}return e??void 0}var lp=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?(tp.add(this),np||(np=!0,md.read(op),md.resolveKeyframes(ap))):(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=cp(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])}Mf(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),tp.delete(this)}cancel(){this.state===`scheduled`&&(tp.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},up=e=>e.startsWith(`--`);function dp(e,t,n){up(t)?e.style.setProperty(t,n):e.style[t]=n}var fp={};function pp(e,t){let n=yl(e);return()=>fp[t]??n()}var mp=pp(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),hp=pp(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),gp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,_p={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:gp([0,.65,.55,1]),circOut:gp([.55,0,1,.45]),backIn:gp([.31,.01,.66,-.59]),backOut:gp([.33,1.53,.69,.99])};function vp(e,t){if(e)return typeof e==`function`?hp()?vd(e,t):`ease-out`:Hl(e)?gp(e):Array.isArray(e)?e.map(e=>vp(e,t)||_p.easeOut):_p[e]}function yp(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=vp(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 bp(e){return typeof e==`function`&&`applyToOptions`in e}function xp({type:e,...t}){return bp(e)&&hp()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Sp=class extends pf{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=xp(e);this.animation=yp(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!i){let e=af(r,this.options,o,this.speed);this.updateMotionValue?.(e),dp(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},df(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;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.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 Tl(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Tl(e)}get time(){return Tl(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=wl(e),t&&(this.animation.pause(),this.updateFinished())}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=this.onFinish=null,e&&mp()?(this.animation.timeline=e,t?.(this.animation),bl):n(this)}},Cp={anticipate:Pl,backInOut:Nl,circInOut:Ll};function wp(e){return e in Cp}function Tp(e){typeof e.ease==`string`&&wp(e.ease)&&(e.ease=Cp[e.ease])}var Ep=class extends Sp{constructor(e){Tp(e),sf(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Yl.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 gf({...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?ml(0,10,a):0,s=this.sample(a);n&&r&&dp(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},Dp=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Uu.test(e)||e===`0`)&&!e.startsWith(`url(`));function Op(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 kp(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=Dp(i,t),s=Dp(a,t);return!o||!s?!1:Op(e)||(n===`spring`||bp(n))&&r}function Ap(e){e.duration=0,e.type=`keyframes`}var jp=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Mp=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Np(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Mp.test(e[t]))return!0;return!1}var Pp=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),Fp=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Ip=()=>!hl.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function Lp(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(jp.has(n)||Fp.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 Ip()&&(jp.has(n)||Fp.has(n)&&Np(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!Pp(e)}var Rp=(e,t)=>t&&typeof e==`number`?t.transform(e):e,zp={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Bp=Wf.length,Vp={},Hp=(e,t,n=Rp(t,Cf[e]))=>(Vp[e]||(Vp[e]=(zp[e]||e)+`(`))+n+`)`,Up=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function Wp(e,t,n){let r=``;for(let i=0;i<Bp;i++){let a=Wf[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=Rp(o,wf[a]));Up(a,o)||(r+=Hp(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Hp(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Gp=new WeakMap,Kp=200,qp=.001,Jp=.1,Yp=.001,Xp=100,Zp=100,Qp=new Set([`linear`,`easeIn`,`easeOut`,`easeInOut`]),$p=e=>Qp.has(e),em=new WeakMap,tm=(e,t)=>{let n=em.get(e);return n?.[0]!==t&&(n=[t,`linear(`+Zd(Array(t+1)).map(t=>hf(e(t))+` `+hf(t*100)+`%`)+`)`],em.set(e,n)),n[1]},nm=(e,t)=>Math.min(Kp,Math.max(2,Math.ceil((t-e)/10))),rm=(e,t)=>Math.abs(e-t)<=qp,im=(e,t)=>e-t,am=(e,t,n)=>Zd(Array(n+1)).map(n=>qu(e,t,n)),om=e=>e.motionValue.owner,sm=e=>Gp.get(e),cm=({state:e})=>e===`idle`||e===`finished`,lm=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),um=({name:e,motionValue:t})=>e&&Wf.includes(e)&&t?.owner?.current instanceof HTMLElement&&Ip()&&hp();function dm(e){let t=om(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(lm(t,`transform`)||`none`)===`none`&&!lm(t,`pathRotation`)&&!t.projection?.isProjecting()&&!Pp(e)}var fm=class{constructor(e,t,n,r){this.element=e,this.update=t,this.makeDriver=n,this.animation=r}get js(){return this.driver||=this.makeDriver(this.update)}now(){return this.driver||this.makeDriver!==_d?this.js.now():Kl.isProcessing?Kl.timestamp:Yl.now()}start(e=!0){let t=sm(this.element);!t||t.isJS?this.js.start(e):t.schedule(!1,!e)}stopJS(){this.driver?.stop()}stop(){this.stopJS();let e=sm(this.element);e&&!e.isFinishing&&e.release(this.animation)}},pm,mm=class extends gf{constructor(e){let t=om(e).current,{driver:n=_d}=e,r,i=dm(e);e.driver=e=>new fm(t,e,n,r),super(e),r=this;let a=this.driver;a&&(a.animation=this),this.canAccelerate=i;let{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}offsets(){let{keyframes:e,times:t}=this.options;return t||(this.offsetsOf!==e&&(this.offsetsOf=e,this.cachedOffsets=Zd(e)),this.cachedOffsets)}get group(){return sm(om(this.options).current)}get js(){return this.driver?.js}stopJS(){this.driver?.stopJS()}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(Yl.now()):void 0}tween(){let{keyframes:e,type:t,repeat:n,delay:r=0}=this.options,i=-1;if(n||t!==ef||this.holdTime!==null)return;for(let t=1;t<e.length;t++)if(e[t]!==e[t-1]){if(i>=0)return;i=t-1}let{ease:a}=this.options;Vl(a)&&(a=a[i]);let o=this.offsets(),s=e=>this.startTime+(r+o[e]*this.totalDuration)/this.speed;if(i>=0){let e=Hl(a)?gp(a):$p(a)?_p[a]:Gl(a);return[s(i),s(i+1),typeof e==`string`||rm(e(0),0)&&rm(e(1),1)?e:void 0]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,type:u}=a,d=(u||ef)===ef?this.offsets():[0,1],f=n+o/r,p=[];if(this.holdTime!==null||!(i>0))return p;for(let n=Math.max(0,Math.floor((e-f)*r/i));n<=s;n++){let a=f+n*i/r;if(a>t)break;for(let o of d){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&p.push(s)}}return p}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=Yl.now(),t=this.sampleAt(e,!0);this.options.motionValue.setWithVelocity(this.holdTime===null?this.sampleAt(e-10,!0):t,t,10)}play(){this.isStopped||((this.group||_m(om(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&this.group.schedule(!1)}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.tick(Yl.now())}get time(){return this.isAccelerated()?Tl(ml(0,this.totalDuration,this.at(Yl.now())-(this.options.delay||0))):super.time}set time(e){(pm??=Object.getOwnPropertyDescriptor(gf.prototype,`time`).set).call(this,e)}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}},hm,gm=e=>{hm||queueMicrotask(()=>{let e=hm;hm=void 0,e.forEach(e=>e())}),(hm||=[]).push(e)};function _m(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,m=1/0,h,g=e=>{for(let t of n)if(t.name===e)return!0},_=(t,n)=>{let o={};for(let s of t===void 0?Wf:a){let a=r.get(s),c=t===void 0?lm(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},v=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&Up(r,i)||(n+=Hp(r,i)+` `)}return(t?n.trim():n)||`none`},y=(e,t)=>v(_(e,t)),b=(e=_())=>{t.style.transform=v(e,!0)},x=e=>{e.onfinish=e.oncancel=null,e.cancel()},S=(e=!0)=>{clearTimeout(p),m=1/0,h=void 0,e&&b(),s.forEach(({animation:e})=>x(e)),s=[]},C=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),w=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=Yl.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(x(e),s=s.filter(e=>e!==r)),F.schedule(!1)}),e.oncancel=()=>s.includes(r)&&F.demote(),s.push(r)},T=(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]:[]},E=(e,t,n,r)=>{let i=nm(t,n);if(r.length*4>i)return;let a;for(let r of e){let e=r.numberAt(t),i=(r.numberAt((t+n)/2)-e)/(r.numberAt(n)-e);if(i===i){if(a===void 0)a=i;else if(!rm(i,a))return}}let o=am(t,n,i).concat(r).sort(im),s=e=>Sl(t,n,e),c,l;for(let n of e){let e=n.numberAt(t),r=o.map(t=>n.numberAt(t)-e),i=r[r.length-1],a=r.some(e=>Math.abs(e)*qp>Math.abs(i))?0:i,s=r.map(e=>a?e/a:e);if(a&&!c)c=s,l=t=>(n.numberAt(t)-e)/a;else if(s.some((e,t)=>!rm(e,a&&c[t])))return}if(!c||c.every((e,t)=>rm(e,s(o[t]))))return`linear`;let u=[],d=(e,t=l(e))=>u.push(hf(t)+` `+hf(s(e)*100)+`%`);return c.forEach((e,t)=>{t&&Math.abs(e-c[t-1])>.2&&T(l,o[t-1],o[t]).forEach(e=>d(e)),d(o[t],e)}),`linear(`+u+`)`},D=(e,t,n,r)=>{let i=[t],a=[],o=n,s=t;for(let r of e){let e=r.tween();if(e?.[2]!==`linear`){let[i,c]=r.timing(),[l,u]=e||[t,c?n:i];o=Math.min(o,l),s=Math.max(s,u),a.push(r)}}o=Math.max(t,o),s=Math.min(n,s);let c=(e,t)=>a.every(n=>!(Math.abs(n.numberAt((e+t)/2)-(n.numberAt(e)+n.numberAt(t))/2)>(n.name.startsWith(`scale`)?Yp:Jp))),l=(t,n,r)=>{if(n-t<1||c(t,n))i.push(n);else if(r<4)l(t,(t+n)/2,r+1),l((t+n)/2,n,r+1);else{for(let r of e)i.push(...T(e=>r.numberAt(e),t,n));i.push(n)}},u=s>o?am(o,s,Math.ceil((s-o)/100)):[];u.push(n);for(let e of r)u.push(e,Math.min(e+.01,n));let d=t;for(let e of u.sort(im))e>d&&l(d,e,0),d=e;return i.sort(im)},O=e=>{let t;for(let n of e){let e=n.tween();if(!e||t&&(Math.abs(e[0]-t[0])>1||Math.abs(e[1]-t[1])>1))return;t=[e[0],e[1],!t||e[2]===t[2]?e[2]:void 0]}return t},k=(e,t,n,r,i={fill:`both`},a)=>{let o=r?[]:e.flatMap(e=>e.boundaries(t,n)),s=r||E(e,t,n,o),c=s?[t,n]:D(e,t,n,o),l=c.map(e=>y(e,a)),u={transform:l};return s||(u.offset=c.map(e=>Sl(t,n,e))),l.every(e=>e===l[0])&&(b(_(t,a)),u=null),C(u,{...i,duration:n-t,easing:s||`linear`})},A=e=>{let t=Yl.now()+e;t<m&&(clearTimeout(p),m=t,p=setTimeout(()=>{m=1/0,F.schedule(!1)},e))},j=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){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=Wf.filter(t=>{if(r.has(t))return!0;let n=i[t]=lm(e,t);return n!==void 0&&!Up(t,n)}),S(!1);let m=!l&&O(d);try{if(c>t){let e;if(m&&m[1]>t){let[n,r,i]=m;if(n-t>Zp)return d.forEach(e=>e.sync()),A(h=n-t-Zp),!0;e=typeof i==`string`?i:i?tm(i,nm(n,r)):E(d,n,r,[]),e&&w(k(d,n,r,e,{fill:`both`,endDelay:c-r}),n-t,c-n)}e||w(k(d,t,c),0,c-t),p.forEach(e=>e<c-1&&w(C(null,{duration:e-t}),0,e-t))}if(l){let e=u+Math.floor((c-u)/l)*l;w(k(f,e,e+l,void 0,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||S(),!0},M=(e,t)=>{let r,i=0;for(let t of n){let n=o.get(t);if(!n)return!1;let[a,c,l]=n,u=t.at(e),d=t.timing()[0]===1/0;if(l){if(d&&(u===a||!s.length))continue;return!1}let f=(u-a)/c,p=d?0:t.speed/c;if(r===void 0)r=f,i=p;else if(Math.abs(f-r)>1||p!==i)return!1}if(r===void 0)return!0;if(!s.length){if(h===void 0||t&&i)return!1;if(i){let e=(h-r)/i;if(e<1)return!1;A(e)}return!0}for(let{offset:e,end:n,isDone:i}of s){let a=r-e;if(n<1/0&&(i?a<n-1:a<0&&(t||e<=0)||a>=n))return!1}for(let{animation:t,offset:n,isDone:a}of s){if(a)continue;let o=r-n;i&&t.updatePlaybackRate&&t.playState===`running`&&Math.abs(Number(t.currentTime)-o)<20?t.playbackRate!==i&&t.updatePlaybackRate(i):i?(t.playbackRate!==i&&(t.playbackRate=i),t.startTime=e-o/i):(t.startTime=null,t.currentTime=o)}return!0},N=()=>!n.size&&(u=!0,sm(t)===F&&Gp.delete(t),F.isJS||S(),!0),P=()=>{let t=Yl.now();if(F.isJS||(F.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]=lm(e,n.name),o.has(n)||(c=!0))}),F.isFinishing=!1),l=!1,u||(n.forEach(e=>cm(e)&&n.delete(e)),N()))return;for(let e of n)if(!e.canAccelerate)return F.demote(!0);F.isJS&&(F.isJS=!1,c=!0,n.forEach(e=>e.stopJS()));let r=c,a=d;if(c=d=!1,r||!M(t,a)){if(a){if(t-f<Xp)return F.demote();f=t}if(!j(t))return F.demote()}else if(h!==void 0&&!a)return;n.forEach(e=>e.timing()[0]===1/0&&e.sync())},F={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,Kl.isProcessing?md.render(P,!1,!0):gm(P)))},release(e){cm(e)&&n.delete(e),N()||F.schedule(!0)},check(){if(!F.isJS){for(let t in i)if(lm(e,t)!==i[t]&&!g(t))return F.schedule(!0,!0)}},demote(e){if(!(F.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),F.isJS=!0,o=new Map,S(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return Gp.set(t,F),F}var vm=class extends pf{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Yl.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||lp;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=Yl.now();let u=kp(e,i,a,o);u||((hl.instantAnimations||!s)&&l?.(af(e,n,t)),e[0]=e[e.length-1],Ap(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Lp(n),p=!f&&um(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=lf(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new Ep(n)}catch{m=new gf(n)}}else m=p?new mm(n):new gf(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(),sp()),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 ym(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 bm=30,xm=e=>!isNaN(parseFloat(e)),Sm={current:void 0},Cm=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Yl.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=Yl.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=xm(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 Cl)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new Cl,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(){md.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=Yl.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(){Sm.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=Yl.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bm)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,bm);return El(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return new Promise(t=>this.run(e,t))}run(e,t){this.stop(),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 wm(e,t){return new Cm(e,t)}function Tm(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Em(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Tm(n,e)}var Dm={type:`spring`,stiffness:500,damping:25,restSpeed:10},Om=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),km={type:`keyframes`,duration:.8},Am={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},jm=(e,{keyframes:t})=>t.length>2?km:Gf.has(e)?e.startsWith(`scale`)?Om(t[1]):Dm:Am,Mm=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function Nm(e){for(let t in e)if(!Mm.has(t))return!0;return!1}var Pm=(e,t,n,r={},i,a)=>o=>{let s=Em(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=wl(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};Nm(s)||Object.assign(u,jm(e,u)),u.duration&&=wl(u.duration),u.repeatDelay&&=wl(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ap(u),u.delay===0&&(d=!0)),(hl.instantAnimations||hl.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Ap(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=af(u.keyframes,s);if(e!==void 0){md.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new gf(u):new vm(u)},Fm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Im(e){let t=Fm.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Lm(e,t,n=1){let[r,i]=Im(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return gl(e)?parseFloat(e):e}return eu(i)?Lm(i,t,n+1):i}function Rm(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function zm(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Rm(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Bm(e,t,n){return zm(e.getProps(),t,n,e)}var Vm=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Hm=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Wf]),Um=e=>Array.isArray(e);function Wm(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wm(n))}function Gm(e){return Um(e)?e[e.length-1]||0:e}function Km(e,t){let{transitionEnd:n={},transition:r={},...i}=Bm(e,t)||{};i={...i,...n};for(let t in i)Wm(e,t,Gm(i[t]))}var qm=e=>!!(e&&e.getVelocity);function Jm(e){return!!(qm(e)&&e.add)}function Ym(e,t){let n=e.getValue(`willChange`);if(Jm(n))return n.add(t);if(!n&&hl.WillChange){let n=new hl.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var Xm=`data-framer-appear-id`;function Zm(e){return e.props[Xm]}var Qm=typeof window<`u`;function $m({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function eh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Tm(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&&$m(f,t))continue;let o={delay:n,...Em(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){md.update(()=>r.set(i));continue}let p=!1;if(Qm&&window.MotionHandoffAnimation){let n=Zm(e);if(n){let e=window.MotionHandoffAnimation(n,t,md);e!==null&&(o.startTime=e,p=!0)}}Ym(e,t);let m=l??e.shouldReduceMotion;r.run(Pm(t,r,i,m&&Hm.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>md.update(()=>{o&&Km(e,o)});d.length?Promise.all(d).then(t):t()}return d}function th(e,t,n={}){let r=Bm(e,t,Vm(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?eh(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(th(e,t,{...n,delay:r+(typeof o==`function`?0:o)+ym(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 nh(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>th(e,t,n))):typeof t==`string`?th(e,t,n):Promise.all(eh(e,Bm(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var rh={test:e=>e===`auto`,parse:e=>e},ih=e=>t=>t.test(e),ah=[ru,q,yu,vu,xu,bu,rh],oh=e=>ah.find(ih(e));function sh(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||vl(e)}var ch=new Set([`auto`,`none`,`0`]);function lh(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!ch.has(t)&&Fu(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=jf(n,i))}var uh=class extends lp{constructor(e,t,n,r,i){super(e,t,n,r,i,!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(nu(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(),eu(r))){let i=Lm(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Hm.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=oh(r),o=oh(i);if(nu(r)!==nu(i)&&ep[n])this.needsMeasurement=!0;else if(a!==o){if(Kf(a)&&Kf(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else ep[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||sh(e[t]))&&n.push(t);n.length&&lh(e,n,t)}measure(){let{element:e,name:t}=this;return ep[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()}},dh=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function fh(e){return _l(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function ph(e){return _l(e)&&`ownerSVGElement`in e}var mh={};function hh(e){return mh.current?.add(e),e}var gh=e=>mh.current?mh.current.bind(e):e;function _h(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:mh.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function vh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function yh(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(Gf.has(e))o=!0;else if(Ql(e))i[e]=n;else{let t=Rp(n,wf[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Wp(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 bh={offset:`stroke-dashoffset`,array:`stroke-dasharray`},xh={offset:`strokeDashoffset`,array:`strokeDasharray`};function Sh(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?bh:xh;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Ch=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function wh(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(yh(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 Ch)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&&Sh(d,i,a,o,!1)}function Th({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Eh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Dh(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 Oh(e){return e===void 0||e===1}function kh({scale:e,scaleX:t,scaleY:n}){return!Oh(e)||!Oh(t)||!Oh(n)}var Ah=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function jh(e){return kh(e)||Nh(e)||Mh(e)}function Mh(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function Nh(e){return Ph(e.x)||Ph(e.y)}function Ph(e){return e&&e!==`0%`}function Fh(e,t,n){return n+t*(e-n)}function Ih(e,t,n,r,i){return i!==void 0&&(e=Fh(e,i,r)),Fh(e,n,r)+t}function Lh(e,t=0,n=1,r,i){e.min=Ih(e.min,t,n,r,i),e.max=Ih(e.max,t,n,r,i)}function Rh(e,{x:t,y:n}){Lh(e.x,t.translate,t.scale,t.originPoint),Lh(e.y,n.translate,n.scale,n.originPoint)}var zh=.999999999999,Bh=1.0000000000001;function Vh(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&&(Hh(e.x,-a.scroll.offset.x),Hh(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Rh(e,o)),r&&(r.path?.[s]||r)!==a&&jh(a.latestValues)&&Gh(e,a.latestValues,a.layout?.layoutBox));t.x<Bh&&t.x>zh&&(t.x=1),t.y<Bh&&t.y>zh&&(t.y=1)}function Hh(e,t){e.min+=t,e.max+=t}function Uh(e,t,n,r,i=.5){Lh(e,t,n,qu(e.min,e.max,i),r)}function Wh(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Gh(e,t,n){let r=n??e;Uh(e.x,Wh(t.x,r.x),t.scaleX,t.scale,t.originX),Uh(e.y,Wh(t.y,r.y),t.scaleY,t.scale,t.originY)}function Kh(e,t){return Th(Dh(e.getBoundingClientRect(),t))}function qh(e,t,n){let r=Kh(e,n),{scroll:i}=t;return i&&(Hh(r.x,i.offset.x),Hh(r.y,i.offset.y)),r}var Jh=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:Yh,cancel:Xh}=pd(queueMicrotask,!1);function Zh(e,t,n){let r=qm(e)?e:wm(e);return r.run(Pm(``,r,t,n)),r.animation}var Qh={},$h={value:null,addProjectionMetrics:null,countProjection:void 0};function eg(e,t){let n=Yl.now();e=gh(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(hd(r),e(a-t))};return md.setup(r,!0),hh(()=>hd(r))}function tg(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function ng(e){return ph(e)&&e.tagName===`svg`}function rg(e){return qm(e)?e.get():e}var ig=e=>typeof e==`number`?e:parseFloat(e),ag=dh.length,og=e=>typeof e==`number`||q.test(e);function sg(e,t,n,r,i,a){i?(e.opacity=qu(0,n.opacity??1,lg(r)),e.opacityExit=qu(t.opacity??1,0,ug(r))):a&&(e.opacity=qu(t.opacity??1,n.opacity??1,r));for(let i=0;i<ag;i++){let a=dh[i],o=cg(t,a),s=cg(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||og(o)===og(s)?(e[a]=Math.max(qu(ig(o),ig(s),r),0),(yu.test(s)||yu.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<Ah.length;i++){let a=Ah[i];(t[a]||n[a])&&(e[a]=qu(t[a]||0,n[a]||0,r))}}function cg(e,t){return e[t]===void 0?e.borderRadius:e[t]}var lg=dg(0,.5,Il),ug=dg(.5,.95,bl);function dg(e,t,n){return r=>r<e?0:r>t?1:n(Sl(e,t,r))}var fg=(e,t,{x:n,y:r})=>{let i=e*e+t*t;return i<1?0:-1e3*(n*e+r*t)/i},pg=(e,t=300)=>{let n=ml(.25,2,t/300),{stiffness:r,damping:i}=Wd({...e,duration:e.duration&&wl(e.duration)});return{...e,stiffness:r,damping:i*Math.sqrt(n),mass:n}};function mg(e,t){e.min=t.min,e.max=t.max}function hg(e,t){mg(e.x,t.x),mg(e.y,t.y)}function gg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var _g=.9999,vg=1.0001,yg=-.01,bg=.01;function xg(e){return e.max-e.min}function Sg(e,t,n){return Math.abs(e-t)<=n}function Cg(e,t,n,r=.5){e.origin=r,e.originPoint=qu(t.min,t.max,e.origin),e.scale=xg(n)/xg(t),e.translate=qu(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_g&&e.scale<=vg||isNaN(e.scale))&&(e.scale=1),(e.translate>=yg&&e.translate<=bg||isNaN(e.translate))&&(e.translate=0)}function wg(e,t,n,r){Cg(e.x,t.x,n.x,r?.originX),Cg(e.y,t.y,n.y,r?.originY)}function Tg(e,t,n,r=0){e.min=(r?qu(n.min,n.max,r):n.min)+t.min,e.max=e.min+xg(t)}function Eg(e,t,n,r){Tg(e.x,t.x,n.x,r?.x),Tg(e.y,t.y,n.y,r?.y)}function Dg(e,t,n,r=0){let i=r?qu(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+xg(t)}function Og(e,t,n,r){Dg(e.x,t.x,n.x,r?.x),Dg(e.y,t.y,n.y,r?.y)}function kg(e,t,n,r,i){return e-=t,e=Fh(e,1/n,r),i!==void 0&&(e=Fh(e,1/i,r)),e}function Ag(e,t=0,n=1,r=.5,i,a=e,o=e){if(yu.test(t)&&(t=parseFloat(t),t=qu(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=qu(a.min,a.max,r);e===a&&(s-=t),e.min=kg(e.min,t,n,s,i),e.max=kg(e.max,t,n,s,i)}function jg(e,t,[n,r,i],a,o){Ag(e,t[n],t[r],t[i],t.scale,a,o)}var Mg=[`x`,`scaleX`,`originX`],Ng=[`y`,`scaleY`,`originY`];function Pg(e,t,n,r){jg(e.x,t,Mg,n?.x,r?.x),jg(e.y,t,Ng,n?.y,r?.y)}var Fg=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ig=Fg(`applewebkit/`)&&!Fg(`chrome/`)?Math.round:bl;function Lg(e){e.min=Ig(e.min),e.max=Ig(e.max)}function Rg(e){Lg(e.x),Lg(e.y)}var zg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bg=()=>({x:zg(),y:zg()}),Vg=()=>({min:0,max:0}),Hg=()=>({x:Vg(),y:Vg()});function Ug(e){return e.translate===0&&e.scale===1}function Wg(e){return Ug(e.x)&&Ug(e.y)}function Gg(e,t){return e.min===t.min&&e.max===t.max}function Kg(e,t){return Gg(e.x,t.x)&&Gg(e.y,t.y)}function qg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Jg(e,t){return qg(e.x,t.x)&&qg(e.y,t.y)}function Yg(e){return xg(e.x)/xg(e.y)}function Xg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Zg=class{constructor(){this.members=[]}add(e){fl(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||(pl(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(pl(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 Qg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var $g={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(q.test(e))e=parseFloat(e);else return e}return`${Qg(e,t.target.x)}% ${Qg(e,t.target.y)}%`}},e_={borderRadius:Object.assign({},$g,{applyTo:dh.slice()}),borderTopLeftRadius:$g,borderTopRightRadius:$g,borderBottomLeftRadius:$g,borderBottomRightRadius:$g,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Uu.parse(e);if(i.length>5)return r;let a=Uu.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=qu(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 t_(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<Ah.length;e++){let t=Ah[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:r||t.x===1&&t.y===1||(r=`scale(1, 1)`);return r||`none`}function n_(e){return[e(`x`),e(`y`)]}var r_=(e,t)=>e.depth-t.depth,i_=class{constructor(){this.children=[],this.isDirty=!1}add(e){fl(this.children,e),this.isDirty=!0}remove(e){pl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(r_),this.isDirty=!1,this.children.forEach(e)}},a_={hasAnimatedSinceResize:!0,hasEverUpdated:!1},o_=[`z`,`skew`,`skewZ`],s_=1e3,c_=0;function l_(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var u_=e=>e.instance&&Gp.get(e.instance)?.demote()&&e.resetSkewAndRotation();function d_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Zm(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,md,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&d_(r)}function f_(e){if(e)return e.options.allowProjection===!1?f_(e.parent):e.projection}function p_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Qh,{...e_,...Qh}),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:f_(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&tg(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=c_++,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(g_),this.nodes.forEach(D_),this.nodes.forEach(O_),this.nodes.forEach(__),$h.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 i_)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Cl),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=ph(t)&&!ng(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;md.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=eg(i,250),a_.hasAnimatedSinceResize&&(a_.hasAnimatedSinceResize=!1,this.nodes.forEach(E_)))})}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()||F_,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!Jg(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={...Em(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||E_(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,hd(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(k_),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&&d_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;u_(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,u_(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(b_),this.nodes.forEach(y_);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(x_);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(C_),this.nodes.forEach(w_),this.nodes.forEach(T_),this.nodes.forEach(m_),this.nodes.forEach(h_)):this.nodes.forEach(x_),this.clearAllSnapshots();let e=Yl.now();Kl.delta=ml(0,1e3/60,e-Kl.timestamp),Kl.timestamp=e,Kl.isProcessing=!0,gd.update.process(Kl),gd.preRender.process(Kl),gd.render.process(Kl),Kl.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(v_),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,md.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){md.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!xg(this.snapshot.measuredBox.x)&&!xg(this.snapshot.measuredBox.y)&&(this.snapshot=void 0),this.snapshot)){let{visualElement:e}=this.options,t=this.currentAnimation?.state===`running`,n=t&&this.animationEdges;t&&this.relativeTarget&&(this.snapshot.relativeVelocity=this.relativeVelocity?.slice()||[]);let r=n&&this.motionValue?.getVelocity()||0,i=[0,1,2,3,4,5].map(t=>(t<4?n&&(this.edgeValues?this.edgeVelocity(t):-n[t]*r/1e3):e?.getValue(t<5?`x`:`y`)?.getVelocity())||0);i.some(Boolean)&&(this.snapshot.velocity=i)}}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||=Hg(),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&&u_(this);let t=this.projectionDelta&&!Wg(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||jh(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)),Rg(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Hg();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(R_))){let{scroll:e}=this.root;e&&(Hh(t.x,e.offset.x),Hh(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Hg();if(hg(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&&hg(t,e),Hh(t.x,i.offset.x),Hh(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||Hg();hg(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&&(Hh(a.x,-n.scroll.offset.x),Hh(a.y,-n.scroll.offset.y)),jh(n.latestValues)&&Gh(a,n.latestValues,n.layout?.layoutBox)}return!r&&jh(this.latestValues)&&Gh(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=Hg();hg(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!jh(n.latestValues))continue;let r;n.instance&&(kh(n.latestValues)&&n.updateSnapshot(),r=Hg(),hg(r,n.measurePageBox())),Pg(t,n.latestValues,n.snapshot?.layoutBox,r)}return jh(this.latestValues)&&Pg(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!==Kl.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=Kl.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=Hg(),this.targetWithTransforms=Hg()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Eg(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):hg(this.target,this.layout.layoutBox),Rh(this.target,this.targetDelta)):hg(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),$h.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||kh(this.parent.latestValues)||Nh(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=Hg(),this.relativeTargetOrigin=Hg(),Og(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),hg(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===Kl.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;hg(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Vh(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=Hg());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gg(this.prevProjectionDelta.x,this.projectionDelta.x),gg(this.prevProjectionDelta.y,this.projectionDelta.y)),wg(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Xg(this.projectionDelta.x,this.prevProjectionDelta.x)&&Xg(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),$h.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=Bg(),this.projectionDelta=Bg(),this.projectionDeltaWithTransform=Bg()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Bg();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Hg(),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(P_));this.animationProgress=0;let f,p=n?.interpolateProjection(e),m=this.layout?.layoutBox,h=m&&[m.x.min,m.x.max,m.y.min,m.y.max].map((t,n)=>{let{translate:r,scale:i,originPoint:a}=e[n<2?`x`:`y`];return(t-a)*(i-1)+r});h?.every(isFinite)||(h=void 0),this.animationEdges=h,this.edgeValues=this.startVelocity=this.impulse=this.relativeVelocity=this.relativeStart=void 0;let g=r?.velocity,_=r?.relativeVelocity||g;if(_?.slice(0,4).some(Boolean)&&this.getClosestProjectingParent()&&(this.relativeStart=_),g&&h){let t=g.slice(0,4).map((e,t)=>e+(c?g[4+(t>>1)]:0));t.some(Boolean)&&(this.startVelocity=p?fg(e.x.translate,e.y.translate,{x:(t[0]+t[1])/2,y:(t[2]+t[3])/2}):t)}this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n),l=this.edgeValues;for(let t=0;t<2;t++){let r=t?`y`:`x`;l?A_(o[r],e[r],this.layout.layoutBox[r],l[t*2],l[t*2+1]):j_(o[r],e[r],n)}if(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){Og(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0);let e=this.relativeTargetOrigin,t=s;if(N_(this.relativeTarget,e,t,n),this.isSpringLayout){let e=this.relativeTarget,t=this.impulse||0,n=this.relativeStart,r=Yl.now(),i=(r-this.relativeTime)/1e3;this.relativeTime=r;let a=this.relativeVelocity||=[0,0,0,0];for(let r=0;r<4;r++){let o=r<2?`x`:`y`,s=r&1?`max`:`min`;n&&(e[o][s]+=n[r]*t),f&&i>0&&(a[r]=(e[o][s]-f[o][s])/i)}}f&&Kg(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Hg(),hg(f,this.relativeTarget)}c&&(this.animationValues=a,sg(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`);let t=this.isSpringLayout=e.type===`spring`;this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.resumingFrom&&(this.resumingFrom.edgeValues=void 0),this.pendingAnimation&&=(hd(this.pendingAnimation),void 0),this.pendingAnimation=md.update(()=>{a_.hasAnimatedSinceResize=!0,this.motionValue||=wm(0),this.motionValue.jump(0,!1);let n=this.startVelocity;this.startVelocity=void 0;let r=e,i=0;if(t){if(e.mass===`auto`){let t=this.layout?.layoutBox;r=pg(e,t&&Math.sqrt(xg(t.x)*xg(t.y)))}let t=this.relativeStart;if((n||t)&&!e.repeat){if(typeof n==`number`)i=n;else{let e=n&&this.animationEdges;r={...r,type:r=>{let i=[r.velocity,...n||[]].map((t,n)=>Kd({...r,keyframes:n?[e[n-1],0]:r.keyframes,velocity:t})),a=i.length;t&&i.push(Kd({...r,keyframes:[0,0],velocity:1e3,restDelta:.5,restSpeed:5}));let o=0,s=[],c={calculatedDuration:null,next:t=>{o=t;let n=i[0].next(t),r=n.done;for(let e=1;e<i.length;e++){let{value:n,done:o}=i[e].next(t);e<a?s[e-1]=n:this.impulse=n/1e3,r&&=o}return e&&(this.edgeValues=s),n.done=r,n}};return c.calculatedDuration=bd(c),c.next(0),this.edgeVelocity=e=>i[e+1].velocity(o),c}}}}}let a=Zh(this.motionValue,[0,1e3],{...r,velocity:i,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}});this.currentAnimation=a,ff(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=this.edgeValues=this.edgeVelocity=this.impulse=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.edgeValues=this.impulse=void 0,this.mixTargetDelta?.(s_),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&&L_(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||Hg(),I_(i.x,t.x,e.x),I_(i.y,t.y,e.y)}hg(t,i),Gh(t,r),wg(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Zg),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(!Mh(t))return;let n={};for(let t=0;t<o_.length;t++)l_(o_[t],e,n,this.animationValues);for(let t=0;t<Ah.length;t++)l_(Ah[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=rg(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=rg(t?.pointerEvents)||``),this.hasProjected&&!jh(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=t_(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 Qh){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Qh[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?rg(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(y_),this.root.sharedNodes.clear()}}}function m_(e){e.updateLayout(),S_(e)}function h_(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`)n_(e=>{let t=xg(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`;mg(r[e],a[e])}else L_(i,t.layoutBox,n)&&n_(t=>{let n=xg(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=Bg();wg(c,n,t.layoutBox);let l=Bg();wg(l,a?e.applyTransform(r,!0):n,s);let u=!Wg(c),d=!1,f=e.getClosestProjectingParent();if((!a||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=Hg();Og(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=Hg();Og(l,n,i.layoutBox,s),a&&o(c,l),Jg(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 g_(e){$h.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 __(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function v_(e){e.clearSnapshot()}function y_(e){e.clearMeasurements()}function b_(e){e.isLayoutDirty=!0,e.updateLayout()}function x_(e){e.isLayoutDirty=!1}function S_(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;n_(e=>Hh(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function C_(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function w_(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function T_(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function E_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function D_(e){e.resolveTargetDelta()}function O_(e){e.calcProjection()}function k_(e){e.resetSkewAndRotation()}function A_(e,t,n,r,i){let a=n.max-n.min,o=a?Math.max(0,(a+i-r)/a):1,s=e.originPoint=t.originPoint;e.origin=t.origin,e.scale=o,e.translate=n.min+r-(s+(n.min-s)*o)}function j_(e,t,n){e.translate=qu(t.translate,0,n),e.scale=qu(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function M_(e,t,n,r){e.min=qu(t.min,n.min,r),e.max=qu(t.max,n.max,r)}function N_(e,t,n,r){M_(e.x,t.x,n.x,r),M_(e.y,t.y,n.y,r)}function P_(e){return e.animationValues?.opacityExit!==void 0}var F_={duration:.45,ease:[.4,0,.1,1]};function I_(e,t,n){e.max=xg(n)+(e.min=t.min)}function L_(e,t,n){return e===`position`||e===`preserve-aspect`&&!Sg(Yg(t),Yg(n),.2)}function R_(e){return e!==e.root&&e.scroll?.wasRoot}function z_(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var B_=p_({attachResizeListener:(e,t)=>z_(e,`resize`,t),measureScroll:Jh,checkIsScrollRoot:()=>!0}),V_={current:void 0},H_=p_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!V_.current){let e=new B_({});e.mount(window),e.setOptions({layoutScroll:!0}),V_.current=e}return V_.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),U_=new WeakMap;function W_(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function G_(e){return typeof e==`string`||Array.isArray(e)}var K_=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`whilePinch`,`exit`],q_=[`initial`].concat(K_);function J_(e){if(W_(e.animate))return!0;for(let t=0;t<q_.length;t++)if(G_(e[q_[t]]))return!0;return!1}function Y_(e){return!!(J_(e)||e.variants)}function X_(e,t,n){for(let r in t){let i=t[r],a=n[r];if(qm(i))e.addValue(r,i);else if(qm(a))e.addValue(r,wm(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,wm(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Z_={current:null},Q_={current:!1},$_=typeof window<`u`;function ev(){if(Q_.current=!0,$_){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Z_.current=e.matches;e.addEventListener(`change`,t),t()}else Z_.current=!1}}var tv=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],nv={};function rv(e){nv=e}function iv(){return nv}var av=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=lp,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=Yl.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,md.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=J_(t),this.isVariantNode=Y_(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&&qm(t)&&t.set(c[e])}}mount(e){let t=this.presenceContext;if(this.hasBeenMounted&&t?.isPresent!==!1&&!t?.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,U_.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:(Q_.current||ev(),this.shouldReduceMotion=Z_.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),hd(this.notifyUpdate),hd(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&&jp.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Sp({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:wl(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Gf.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&md.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Gp.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 nv){let t=nv[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):Hg()}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)&&Gp.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tv.length;t++){let n=tv[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=X_(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=wm(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`&&(gl(n)||vl(n))?n=parseFloat(n):typeof n!=`number`&&!Uu.test(n)&&Uu.test(t)&&(n=jf(e,t)),this.setBaseTarget(e,qm(n)?n.get():n)),qm(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new Cl)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){Yh.render(this.render)}},ov=class extends av{constructor(){super(...arguments),this.KeyframeResolver=uh}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;qm(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function sv(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 cv(e,{layout:t,layoutId:n}){return Gf.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Qh[e]||e===`opacity`)}function lv(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(qm(r[t])||i&&qm(i[t])||cv(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function uv(e){return window.getComputedStyle(e)}var dv=class extends ov{constructor(){super(...arguments),this.type=`html`,this.renderInstance=sv}mount(e){super.mount(e)}readValueFromInstance(e,t){if(Gf.has(t))return this.projection?.isProjecting?Vf(t):Uf(e,t);{let n=uv(e),r=(Ql(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Kh(e,t)}build(e,t,n){yh(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return lv(e,t,n)}},fv=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function pv(e){return{point:{x:e.pageX,y:e.pageY}}}var mv=e=>t=>fv(t)&&e(t,pv(t));function hv(e,t,n,r){return z_(e,t,mv(n),r)}var gv=new WeakMap,_v,vv=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:ph(r)&&`getBBox`in r?r.getBBox()[t]:r[n],yv=vv(`inline`,`width`,`offsetWidth`),bv=vv(`block`,`height`,`offsetHeight`);function xv({target:e,borderBoxSize:t}){gv.get(e)?.forEach(n=>{n(e,{get width(){return yv(e,t)},get height(){return bv(e,t)}})})}function Sv(e){e.forEach(xv)}function Cv(){typeof ResizeObserver<`u`&&(_v=new ResizeObserver(Sv))}function wv(e,t){_v||Cv();let n=_h(e);return n.forEach(e=>{let n=gv.get(e);n||(n=new Set,gv.set(e,n)),n.add(t),_v?.observe(e)}),()=>{n.forEach(e=>{let n=gv.get(e);n?.delete(t),n?.size||_v?.unobserve(e)})}}var Tv=new Set,Ev;function Dv(){Ev=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Tv.forEach(t=>t(e))},window.addEventListener(`resize`,Ev)}function Ov(e){return Tv.add(e),Ev||Dv(),()=>{Tv.delete(e),!Tv.size&&typeof Ev==`function`&&(window.removeEventListener(`resize`,Ev),Ev=void 0)}}function kv(e,t){return hh(typeof e==`function`?Ov(e):wv(e,t))}var Av=(e,t)=>Math.abs(e-t);function jv(e,t){let n=Av(e.x,t.x),r=Av(e.y,t.y);return Math.sqrt(n**2+r**2)}var Mv=new Set([`auto`,`scroll`]),Nv=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){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=Fv(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Lv(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=jv(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Yl.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=Fv(t,this.transformPagePoint),this.hasPendingMove=!0,md.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=Lv(e.type===`pointercancel`?this.lastMoveEventInfo:Fv(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!fv(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=pv(e),l=Fv(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:Yl.now()}];let{onSessionStart:d}=t;d&&d(e,Lv(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=xl(hv(this.contextWindow,`pointermove`,this.handlePointerMove,f),hv(this.contextWindow,`pointerup`,this.handlePointerUp,f),hv(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Mv.has(e.overflowX)||Mv.has(e.overflowY))&&this.scrollPositions.set(t,Pv(t)),t=t.parentElement}this.scrollPositions.set(window,Pv(window)),this.removeScrollListeners=xl(z_(window,`scroll`,this.onElementScroll,{capture:!0}),z_(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=Pv(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),md.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),hd(this.updatePoint)}},Pv=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Fv(e,t){return t?{point:t(e.point)}:e}function Iv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lv({point:e},t){return{point:e,delta:Iv(e,zv(t)),offset:Iv(e,Rv(t)),velocity:Bv(t,.1)}}function Rv(e){return e[0]}function zv(e){return e[e.length-1]}function Bv(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=zv(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>wl(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>wl(t)*2&&(r=e[1]);let a=Tl(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 Vv=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Hv(e){return Vv.has(e.tagName)||e.isContentEditable===!0}var Uv=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Wv(e){return Uv.has(e.tagName)||e.isContentEditable===!0}var Gv={x:!1,y:!1};function Kv(){return Gv.x||Gv.y}function qv(e){return e===`x`||e===`y`?Gv[e]?null:(Gv[e]=!0,()=>{Gv[e]=!1}):Gv.x||Gv.y?null:(Gv.x=Gv.y=!0,()=>{Gv.x=Gv.y=!1})}function Jv(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qu(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qu(n,e,r.max):Math.min(e,n)),e}function Yv(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 Xv(e,{top:t,left:n,bottom:r,right:i}){return{x:Yv(e.x,n,i),y:Yv(e.y,t,r)}}function Zv(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 Qv(e,t){return{x:Zv(e.x,t.x),y:Zv(e.y,t.y)}}function $v(e,t){let n=.5,r=xg(e),i=xg(t);return i>r?n=Sl(t.min,t.max-r,e.min):r>i&&(n=Sl(e.min,e.max-i,t.min)),ml(0,1,n)}function ey(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 ty=.35;function ny(e=ty){return e===!1?e=0:e===!0&&(e=ty),{x:ry(e,`left`,`right`),y:ry(e,`top`,`bottom`)}}function ry(e,t,n){return{min:iy(e,t),max:iy(e,n)}}function iy(e,t){return typeof e==`number`?e:e[t]||0}function ay(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 oy=new WeakMap,sy=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=Hg(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=qv(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),n_(e=>{let t=this.getAxisMotionValue(e).get()||0;if(eu(t)&&(t=Lm(t,this.visualElement.current)||0),q.test(t))t=parseFloat(t);else if(yu.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=xg(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&md.update(()=>a(e,t),!1,!0),Ym(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(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=py(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&&md.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new Nv(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,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&&md.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||!fy(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=Jv(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;cy(e)?this.constraints&&this.scroll===ay(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?Xv(r.layoutBox,e):!1,this.elastic=ny(t),i!==this.constraints&&!cy(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&n_(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ey(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!cy(e))return!1;let n=ly(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=ay(r);let i=qh(n,r.root,this.visualElement.getTransformPagePoint()),a=Qv(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(Eh(a));this.hasMutatedConstraints=!!e,e&&(a=Th(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)&&fy(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=n_(e=>{if(!fy(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 Ym(this.visualElement,e),n.start(Pm(e,n,0,t,this.visualElement,!1))}stopAnimation(){n_(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();n_(e=>{if(!fy(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-qu(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!cy(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};n_(e=>{let t=this.getAxisMotionValue(e).get();i[e]=$v({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(),n_(t=>{let n=this.getAxisMotionValue(t);if(!fy(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(qu(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;oy.set(this.visualElement,this);let e=this.visualElement.current,t=hv(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Wv(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=cy(t)&&ly(t);r&&(this.constraints=this.resolveRefConstraints(),n||=dy(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),md.read(r);let o=z_(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(n_(t=>{if(!fy(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=ty,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function cy(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var ly=e=>`current`in e?e.current:e;function uy(e){let t=!0;return()=>{t?t=!1:e()}}function dy(e,t,n){let r=kv(e,uy(n)),i=kv(t,uy(n));return()=>{r(),i()}}function fy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function py(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function my(e,t){let n=_h(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},hh(()=>r.abort())]}function hy(e){return!(e.pointerType===`touch`||Kv())}function gy(e,t,n={}){t=gh(t);let[r,i,a]=my(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(!hy(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 _y=(e,t)=>t?e===t||_y(e,t.parentElement):!1,vy=new WeakSet;function yy(e){return t=>{t.key===`Enter`&&e(t)}}function by(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var xy=(e,t)=>{let n=!1,r=yy(()=>{n||vy.has(e)||(n=!0,by(e,`down`))}),i=yy(()=>{n&&(n=!1,by(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&by(e,`cancel`)},{...t,once:!0})};function Sy(e){return fv(e)&&!Kv()}var Cy=new WeakSet,wy=100,Ty=8,Ey=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,Dy=e=>e.preventDefault();function Oy(e,t,n={}){t=gh(t);let[r,i,a]=my(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!Sy(e)||Cy.has(e))return;n.stopPropagation&&Cy.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=Yl.now(),d=wl(c),f=wl(s),p=o.get(r);p?.expire(Ey(p.event,e,wy))?p=void 0:p&&(hd(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(vy.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=wl(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return hd(w);let e=Math.min(1-(S-Yl.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),e<1||(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):hd(w))},T={...i,capture:!0},E=(t,n)=>{if(fv(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,Dy),hd(w),vy.delete(r),Kv()&&(n=!1),n&&!h){let n=Yl.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||Yl.now()-n>f)return hd(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),md.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||_y(r,e.target))},O=e=>{E(e,!1)},k=t=>{fv(t)&&((l||!_)&&Ey(e,t,Ty)||a>1&&Kv())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(md.update(w,!0),r.addEventListener(`contextmenu`,Dy,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),fh(e)&&(e.addEventListener(`focus`,()=>xy(e,i),i),!Hv(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var ky=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Ay=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`]),jy=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function My(e,t,n,r){sv(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Ay.has(n)?n:vh(n),t.attrs[n])}function Ny(e,t,n){let r=lv(e,t,n);for(let n in e)if(n!==`children`&&(qm(e[n])||qm(t[n]))){let t=Wf.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Py=class extends ov{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Hg}getBaseTargetFromProps(e,t){return Gf.has(t)?super.getBaseTargetFromProps(e,t)??Vf(t):e[t]}getDefaultValue(e){return Gf.has(e)?this.latestValues[e]??Vf(e):void 0}readValueFromInstance(e,t){if(Gf.has(t)){let e=Ef(t);return e&&e.default||0}if(Ch.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Ay.has(t)?t:vh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ny(e,t,n)}build(e,t,n){wh(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){My(e,t,n,r)}mount(e){this.isSVGTag=jy(e.tagName),super.mount(e)}};function Fy(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 Iy=[...K_].reverse(),Ly=e=>e?.out===!0?e:e?.out;function Ry(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>nh(e,t,n))),n=By(),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`&&Bm(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&&Ly(f(l??(g&&g.props.initial))?.transition);if(Iy.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?G_(f)||f===!1?f:void 0:l,y=G_(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||W_(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=zy(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}=Bm(e,n,Vm(e,t))||{};E={...E,...a,...i},D=Ly(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)?!Fy(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=Bm(s,n)?.transition?.delayChildren;r.delay=ym(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&&!qm(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=By(),i=!0}}}function zy(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Fy(t,e):!1}function By(){let e={};for(let t of K_)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}S();var Vy=s({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});S();function Hy(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Uy(...e){return t=>{let n=!1,r=e.map(e=>{let r=Hy(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():Hy(e[t],null)}}}}function Wy(...e){return A(Uy(...e),e)}S();var Gy=e=>{let{width:t,height:n}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,n/e?.offsetHeight||1]},Ky=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]=Gy(r);t+=e*a,n+=i*o}if(getComputedStyle(r).position===`fixed`)break}let[i,a]=Gy(e.offsetParent);return[t/i,n/a]},qy=class extends N{getSnapshotBeforeUpdate(e){let t=this.props.getElement();if(fh(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=fh(e)&&e.offsetWidth||0,r=fh(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=Ky(t)}return null}componentDidUpdate(){}render(){return this.props.children}};function Jy({children:e,isPresent:n,anchorX:r,anchorY:i,root:a,pop:o,popNode:s}){let c=j(),l=u(null),d=u({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=t(Vy),m=Wy(l,o===!1?void 0:e.props?.ref??e?.ref),h=()=>l.current||s?.current?.current,_=e=>{let{width:t,height:n,top:a,left:o,right:s,bottom:l,direction:u}=d.current,f=u===`rtl`,p=r===`left`?f?`right:${s}`:`left:${o}`:f?`left:${o}`:`right:${s}`,m=i===`bottom`?`bottom:${l}`:`top:${a}`;e?.insertRule(`[data-motion-pop-id="${c}"]{position:absolute!important;width:${t}px!important;height:${n}px!important;${p}px!important;${m}px!important}`)};return p(()=>{let{width:e,height:t}=d.current,r=h();if(n||o===!1||!r||!e||!t)return;r.dataset.motionPopId=c;let i=r.ownerDocument,s=i.createElement(`style`);f&&(s.nonce=f);let l=a??i.head;l.appendChild(s),_(s.sheet);let u=0,p=0;return Yh.setup(()=>{let[e,t]=Ky(r);u=d.current.point[0]-e,p=d.current.point[1]-t}),Yh.read(()=>{let{sheet:e}=s;if(!e||!u&&!p)return;let t=d.current;t.left+=u,t.right-=u,t.top+=p,t.bottom-=p,e.deleteRule(0),_(e)}),()=>{r.removeAttribute(`data-motion-pop-id`),l.contains(s)&&l.removeChild(s)}},[n]),I(qy,{isPresent:n,getElement:h,sizeRef:d,pop:o,children:o===!1?e:g(e,{ref:m})})}S();var Yy=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let d=cl(Xy),f=j(),p=u(),m=u(n),h=u(r);ul(()=>{m.current=n,h.current=r});let g=!0,_=x(()=>(g=!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&&g&&(_={..._}),x(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),M(()=>{!n&&!d.size&&r&&r()},[n]),e=I(Jy,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:p,children:e}),I(dl.Provider,{value:_,children:e})};function Xy(){return new Map}S();function Zy(e=!0){let n=t(dl);if(n===null)return[!0,null];let{isPresent:r,onExitComplete:i,register:a}=n,o=j();M(()=>{if(e)return a(o)},[e]);let s=A(()=>e&&i&&i(o),[o,i,e]);return!r&&i?[!1,s]:[!0]}S();var Qy=e=>e.key||``;function $y(e){let t=[];return C.forEach(e,e=>{f(e)&&t.push(e)}),t}S();var eb=({children:e,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o=`sync`,propagate:s=!1,anchorX:c=`left`,anchorY:l=`top`,root:f})=>{let[p,m]=Zy(s),h=x(()=>$y(e),[e]),g=s&&!p?[]:h.map(Qy),_=u(!0),v=cl(()=>new Map),y=u(new Set),[S,C]=d(h),[w,T]=d(h);ul(()=>{s&&!p&&!w.length&&m?.()},[p,s,w.length,m]);let E=u();M(()=>()=>{let e=E.current;E.current=void 0,e?.()},[w]),ul(()=>{_.current=!1;for(let e=0;e<w.length;e++){let t=Qy(w[e]);g.includes(t)?(v.delete(t),y.current.delete(t)):v.get(t)!==!0&&v.set(t,!1)}},[w,g.length,g.join(`-`)]);let D=[];if(h!==S){let e=[...h],t=0;for(let n of w){let r=g.indexOf(Qy(n));r===-1?(e.splice(t++,0,n),D.push(n)):t=r+D.length+1}return D.every(e=>v.get(Qy(e)))?e=h:o===`wait`&&(e=D),T($y(e)),C(h),null}let{forceRender:O}=t(sl);return I(b,{children:w.map(e=>{let t=Qy(e),u=s&&!p?!1:h===w||g.includes(t);return I(Yy,{isPresent:u,initial:!_.current||r?void 0:!1,custom:n,presenceAffectsLayout:a,mode:o,root:f,onExitComplete:u?void 0:()=>{if(y.current.has(t))return;if(v.has(t))y.current.add(t),v.set(t,!0);else return;let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(O?.(),C([]),s&&m?.(),E.current=i)},anchorX:c,anchorY:l,children:e},t)})})};S();var tb=s({strict:!1}),nb={animation:[`variants`,...K_],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`]},rb=!1;function ib(){if(rb)return;let e={};for(let t in nb)e[t]={isEnabled:e=>nb[t].some(t=>!!e[t])};rv(e),rb=!0}function ab(){return ib(),iv()}function ob(e){let t=ab();for(let n in e)t[n]={...t[n],...e[n]};rv(t)}S();function sb({children:e,features:t,strict:n=!1}){let[,r]=d(!cb(t)),i=u(void 0);if(!cb(t)){let{renderer:e,...n}=t;i.current=e,ob(n)}return M(()=>{cb(t)&&t().then(({renderer:e,...t})=>{ob(t),i.current=e,w(()=>r(!0))})},[]),I(tb.Provider,{value:{renderer:i.current,strict:n},children:e})}function cb(e){return typeof e==`function`}S();var lb=s({});function ub(e,t){if(J_(e)){let{initial:t,animate:n}=e;return{initial:t===!1||G_(t)?t:void 0,animate:G_(n)?n:void 0}}return e.inherit===!1?{}:t}S();function db(e){let{initial:n,animate:r}=ub(e,t(lb));return x(()=>({initial:n,animate:r}),[fb(n),fb(r)])}function fb(e){return Array.isArray(e)?e.join(` `):e}var pb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});S();function mb(e,t,n){for(let r in t)!qm(t[r])&&!cv(r,n)&&(e[r]=t[r])}function hb({transformTemplate:e},t){return x(()=>{let n=pb();return yh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function gb(e,t){let n=e.style||{},r={};return mb(r,n,e),Object.assign(r,hb(e,t)),r}function _b(e,t){let n={},r=gb(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 vb=()=>({...pb(),attrs:{}});S();function yb(e,t,n,r){let i=x(()=>{let n=vb();return wh(n,t,jy(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return mb(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var bb=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.tap.propagate.ignoreStrict.viewport.pinch`.split(`.`));function xb(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||bb.has(e)}function Sb(e,t){return e.startsWith(`on`)?!xb(e):t?.(e)??!xb(e)}function Cb(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||qm(e[a])||(a===`fx`?e.fx&&(i.fx=``):(Sb(a,r)||n===!0&&xb(a)||!t&&!xb(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var wb=[`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 Tb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(wb.indexOf(e)>-1||/[A-Z]/u.test(e))}S();function Eb(e,t,n,{latestValues:r},a,o=!1,s,c){let l=(s??Tb(e)?yb:_b)(t,r,a,e),u=Cb(t,typeof e==`string`,o,c),d=e===b?{}:{...u,...l,ref:n},{children:f}=t,p=x(()=>qm(f)?f.get():f,[f]);return i(e,{...d,children:p})}S();function Db({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ob(n,r,i,e),renderState:t()}}function Ob(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=rg(a[e]);let{initial:o,animate:s}=e,c=J_(e),l=Y_(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`&&!W_(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=zm(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 kb=e=>(n,r)=>{let i=t(lb),a=t(dl),o=()=>Db(e,n,i,a);return r?o():cl(o)},Ab=kb({scrapeMotionValuesFromProps:lv,createRenderState:pb}),jb=kb({scrapeMotionValuesFromProps:Ny,createRenderState:vb}),Mb=Symbol.for(`motionComponentSymbol`);S();function Nb(e,t,n){let r=u(n);p(()=>{r.current=n});let i=u(null);return A(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}S();var Pb=s({});S();function Fb(e,n,r,i,a,o){let{visualElement:s}=t(lb),c=t(tb),l=t(dl),d=t(Vy),f=d.reducedMotion,m=d.skipAnimations,h=u(null),g=u(!1);i||=c.renderer,!h.current&&i&&(h.current=i(e,{visualState:n,parent:s,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:f,skipAnimations:m,isSVG:o}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let _=h.current,v=t(Pb);_&&!_.projection&&a&&(_.type===`html`||_.type===`svg`)&&a.create(_,r,v),p(()=>{_&&_.props!==r&&_.update(r,l)});let y=r[Xm],b=u(!!y&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return ul(()=>{g.current&&_&&(_.animationState?.animateChanges(),_.enteringChildren=void 0)},[]),ul(()=>{g.current=!0,_&&(window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),b.current&&_.animationState&&_.animationState.animateChanges())}),M(()=>{_&&(!b.current&&_.animationState&&_.animationState.animateChanges(),b.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),!1),_.enteringChildren=void 0)}),_}S();function Ib(e,{forwardMotionProps:n=!1,type:r}={},i,a){i&&ob(i);let o=r?r===`svg`:Tb(e),s=o?jb:Ab;function c(r,c){let l,u=Lb(r);cl(()=>!!V_.current?.sharedNodes.get(u)?.lead&&r.initial)&&(r={...r,initial:!1});let d={...t(Vy),...r,layoutId:u},{isStatic:f,isValidProp:p}=d,m=db(r),h=s(r,f);if(!f&&typeof window<`u`){Rb(d,i);let t=zb(d);m.visualElement=Fb(e,h,d,a,t.ProjectionNode,o),(t.isEnabled||m.visualElement?.projection?.options.layoutId)&&(l=t.MeasureLayout)}return I(lb.Provider,{value:m,children:[l&&m.visualElement?I(l,{visualElement:m.visualElement,...d}):null,Eb(e,r,Nb(h,m.visualElement,c),h,f,n,o,p)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=v(c);return l[Mb]=e,l}function Lb({layoutId:e}){let n=t(sl).id;return n&&e!==void 0?n+`-`+e:e}function Rb(e,n){t(tb).strict}function zb(e){let{drag:t,layout:n}=ab();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function Bb(e,t){if(typeof Proxy>`u`)return Ib;let n=new Map,r=(n,r)=>Ib(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ib(a,void 0,e,t)),n.get(a))})}var Vb=Bb();S();var Hb=(e,t)=>t.isSVG??Tb(e)?new Py(t):new dv(t,{allowProjection:e!==b}),Ub=class extends ky{constructor(e){super(e),e.animationState||=Ry(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();W_(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?.()}},Wb=0,Gb={animation:{Feature:Ub},exit:{Feature:class extends ky{constructor(){super(...arguments),this.id=Wb++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Bm(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},Kb=class extends ky{constructor(e){super(e),this.removeGroupControls=bl,this.removeListeners=bl,this.controls=new sy(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bl}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()}},qb=e=>(t,n)=>{e&&md.update(()=>e(t,n),!1,!0)},Jb=class extends ky{constructor(){super(...arguments),this.removePointerDownListener=bl}onPointerDown(e){this.session=new Nv(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:qb(e),onStart:qb(t),onMove:qb(n),onEnd:(e,t)=>{delete this.session,r&&md.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=hv(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}};S();var Yb=!1,Xb=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Zb=(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)}},Qb=class extends N{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),Yb&&i.root.didUpdate(),i.options.layoutId!==r&&Zb(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Xb(this.props),onExitComplete:()=>this.safeToRemove()})),a_.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(),Zb(o,n)),o.setOptions({...o.options,...Xb(this.props)}),Yb=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||md.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),Yh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Yb=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function $b(e){let[n,r]=Zy(),i=t(sl);return I(Qb,{...e,layoutGroup:i,switchLayoutGroup:t(Pb),isPresent:n,safeToRemove:r})}var ex={pan:{Feature:Jb},drag:{Feature:Kb,ProjectionNode:H_,MeasureLayout:$b}};function tx(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&md.postRender(()=>s(t,pv(t)))}var nx=class extends ky{mount(){let{current:e}=this.node;e&&(this.unmount=gy(e,(e,t)=>(tx(this.node,t,`Hover`,`Start`),e=>tx(this.node,e,`Hover`,`End`))))}unmount(){}},rx=class extends ky{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=xl(z_(this.node.current,`focus`,()=>this.onFocus()),z_(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function ix(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||tx(e,t,`Tap`,n,r)}var ax=class extends ky{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=Oy(e,(e,t)=>(ix(this.node,t,`Start`),{onComplete:(e,{success:t})=>ix(this.node,e,t?``:`Cancel`),onRepeat:()=>ix(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},ox=new WeakMap,sx=new WeakMap,cx=e=>{let t=ox.get(e.target);t&&t(e)},lx=e=>{e.forEach(cx)};function ux({root:e,...t}){let n=e||document;sx.has(n)||sx.set(n,{});let r=sx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lx,{root:e,...t})),r[i]}function dx(e,t,n){let r=ux(t);return ox.set(e,n),r.observe(e),()=>{ox.delete(e),r.unobserve(e)}}var fx={some:0,all:1},px=class extends ky{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:fx[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=dx(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(mx(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function mx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var hx={inView:{Feature:px},tap:{Feature:ax},focus:{Feature:rx},hover:{Feature:nx}},gx=Bb(Object.assign({},Gb,hx,ex,{layout:{ProjectionNode:H_,MeasureLayout:$b}}),Hb),_x=Object.assign({renderer:Hb},Gb,hx),vx=({children:e})=>I(sb,{features:_x,children:e});S();var yx=s(null),bx=({value:e,children:t})=>I(yx.Provider,{value:e,children:t}),xx=()=>t(yx),Sx=(e,t=`local`)=>e.filter(e=>(e.location??t)!==`local`),Cx=()=>typeof process>`u`?void 0:{}.INTLAYER_BACKEND_INTERNAL_URL?.trim()||void 0,wx=(e,t=Cn.backendURL)=>{let n=Cx();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}},Tx=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}},Ex={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},Dx=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),Ox=e=>e.reduce((e,t)=>{let n=e??{},r=Dx(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),J=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=Ox([Ex,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=Ox([Ex.headers,...t.map(e=>e.headers)]),s=Ox(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=Ox(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=wx(`${e}${r}`),d=await fetch(u,l);if(!d.ok){let e=await d.json().catch(()=>void 0);throw new Tx(JSON.stringify(e?.error)??`An error occurred`,{status:d.status,code:e?.error?.code,data:e?.error})}return await d.json()},kx=(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])=>kx(e,t.prefix,n.path,r),Ax={prefix:`/oauth2`},jx={getOAuth2AccessToken:{method:`POST`,path:`/token`},extendOAuth2Token:{method:`POST`,path:`/token/extend`}},Mx={prefix:`/api/cli-session`},Nx={createCliSessionToken:{method:`POST`,path:`/`},getCliSessionMe:{method:`GET`,path:`/me`}},Px=(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,Ax,jx.getOAuth2AccessToken),{},e,{method:jx.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,Mx,Nx.createCliSessionToken),e,t,{method:Nx.createCliSessionToken.method}),getCliSessionMe:async(t={})=>await J(Y(n,Mx,Nx.getCliSessionMe),e,t,{method:Nx.getCliSessionMe.method})}};function Fx(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 Ix(e,t,n=`.`,r){if(!Fx(t))return Ix(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]]:Fx(a)&&Fx(i[t])?Ix(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function Lx(e){return(...t)=>t.reduce((t,n)=>Ix(t,n,``,e),{})}var Rx=Lx(),zx=class extends Error{payload;constructor(e){super(JSON.stringify(e)),this.name=`ServerSentEventError`,this.payload=e}},Bx=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error(`No reader available`);let r=new TextDecoder,i=``,a=`message`,o=e=>{if(e===``){a=`message`;return}if(e.startsWith(`event:`)){a=e.slice(6).trim();return}if(!e.startsWith(`data:`))return;let n=e.slice(5).trimStart(),r;try{r=JSON.parse(n)}catch{if(a===`error`)throw new zx({message:n});console.error(`Failed to parse SSE data:`,n);return}if(a===`error`)throw new zx(r);t(r)};try{for(;;){let{done:e,value:t}=await n.read();if(e)break;i+=r.decode(t,{stream:!0});let a=i.split(`
19
- `);i=a.pop()??``;for(let e of a)o(e.replace(/\r$/,``))}i+=r.decode(),i!==``&&o(i.replace(/\r$/,``))}catch(e){throw await n.cancel().catch(()=>void 0),e}},Vx={prefix:`/api/ai`},Hx={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`},getAICredits:{method:`GET`,path:`/credits`},getAICreditUsage:{method:`GET`,path:`/credits/usage`}},Ux=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{customQuery:async(t,r={})=>await J(Y(n,Vx,Hx.customQuery),e,r,{method:Hx.customQuery.method,body:t}),translateJSON:async(t,r={})=>await J(Y(n,Vx,Hx.translateJSON),e,r,{method:Hx.translateJSON.method,body:t}),auditContentDeclaration:async(t,r={})=>await J(Y(n,Vx,Hx.auditContentDeclaration),e,r,{method:Hx.auditContentDeclaration.method,body:t}),auditContentDeclarationField:async(t,r={})=>await J(Y(n,Vx,Hx.auditContentDeclarationField),e,r,{method:Hx.auditContentDeclarationField.method,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await J(Y(n,Vx,Hx.auditContentDeclarationMetadata),e,r,{method:Hx.auditContentDeclarationMetadata.method,body:t}),auditTag:async(t,r={})=>await J(Y(n,Vx,Hx.auditTag),e,r,{method:Hx.auditTag.method,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onReasoning:a,onDone:o,...s}=t,c=new AbortController;try{let t=await fetch(Y(n,Vx,Hx.ask),{method:Hx.ask.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)}await Bx(t,e=>{e.reasoning&&a?.(e.reasoning),e.chunk&&i?.(e.chunk),e.done&&e.response&&o?.(e.response)})}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,Vx,Hx.chat),{method:Hx.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)}await Bx(t,e=>{e.chunk&&i?.(e.chunk),e.action&&o?.(e.action),e.done&&e.response&&a?.(e.response)})}catch(e){throw console.error(`Error in chat:`,e),e}},autocomplete:async(t,r={})=>await J(Y(n,Vx,Hx.autocomplete),e,r,{method:Hx.autocomplete.method,body:t}),getDiscussions:async(t,r={})=>await J(Y(n,Vx,Hx.getDiscussions),e,r,{method:Hx.getDiscussions.method,params:t}),getAIStats:async(t={})=>await J(Y(n,Vx,Hx.getAIStats),e,t,{method:Hx.getAIStats.method}),getAICredits:async(t={})=>await J(Y(n,Vx,Hx.getAICredits),e,t,{method:Hx.getAICredits.method}),getAICreditUsage:async(t,r={})=>await J(Y(n,Vx,Hx.getAICreditUsage),e,r,{method:Hx.getAICreditUsage.method,params:t})}},Wx={prefix:`/api/assets`},Gx={getAssets:{method:`GET`,path:`/`},getAssetById:{method:`GET`,path:`/:assetId`},uploadAsset:{method:`POST`,path:`/`},updateAsset:{method:`PATCH`,path:`/:assetId`},deleteAsset:{method:`DELETE`,path:`/:assetId`}},Kx=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getAssets:async(t,r,i={})=>await J(Y(n,Wx,Gx.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,Wx,Gx.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,Wx,Gx.uploadAsset),{method:Gx.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,Wx,Gx.updateAsset,{assetId:String(t)}),e,i,{method:Gx.updateAsset.method,body:r}),deleteAsset:async(t,r={})=>await J(Y(n,Wx,Gx.deleteAsset,{assetId:String(t)}),e,r,{method:Gx.deleteAsset.method})}},qx={prefix:`/api/dictionary`},Jx={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`}},Yx=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getDictionaries:async(t,r={})=>await J(Y(n,qx,Jx.getDictionaries),e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await J(Y(n,qx,Jx.getDictionariesKeys),e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await J(Y(n,qx,Jx.getDictionariesUpdateTimestamp),e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await J(Y(n,qx,Jx.getDictionary,{dictionaryKey:t}),e,i,{params:r?{version:r.toString()}:void 0}),getDictionariesByKeys:async(t,r,i={})=>await J(Y(n,qx,Jx.getDictionariesByKeys),e,i,{cache:`no-store`,params:{keys:t.join(`,`),version:r?.toString()}}),pushDictionaries:async(t,r={})=>await J(Y(n,qx,Jx.pushDictionaries),e,r,{method:Jx.pushDictionaries.method,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await J(Y(n,qx,Jx.addDictionary),e,r,{method:Jx.addDictionary.method,body:t}),updateDictionary:async(t,r={})=>await J(Y(n,qx,Jx.updateDictionary,{dictionaryId:String(t.id)}),e,r,{method:Jx.updateDictionary.method,body:t}),deleteDictionary:async(t,r={})=>await J(Y(n,qx,Jx.deleteDictionary,{dictionaryId:String(t)}),e,r,{method:Jx.deleteDictionary.method})}},Xx=(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})}},Zx={prefix:`/api/project`},X={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`}},Qx=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getProjects:async(t,r={})=>await J(Y(n,Zx,X.getProjects),e,r,{cache:`no-store`,method:X.getProjects.method,params:t}),getProjectInsights:async(t={})=>await J(Y(n,Zx,X.getProjectInsights),e,t,{cache:`no-store`,method:X.getProjectInsights.method}),addProject:async(t,r={})=>await J(Y(n,Zx,X.addProject),e,r,{method:X.addProject.method,body:t}),updateProject:async(t,r={})=>await J(Y(n,Zx,X.updateProject),e,r,{method:X.updateProject.method,body:t}),updateProjectMembers:async(t,r={})=>await J(Y(n,Zx,X.updateProjectMembers),e,r,{method:X.updateProjectMembers.method,body:t}),pushProjectConfiguration:async(t,r={})=>await J(Y(n,Zx,X.pushProjectConfiguration),e,r,{method:X.pushProjectConfiguration.method,body:t}),deleteProject:async(t={})=>await J(Y(n,Zx,X.deleteProject),e,t,{method:X.deleteProject.method}),deleteProjectByIdAdmin:async(t,r={})=>J(Y(n,Zx,X.deleteProjectByIdAdmin,{projectId:t}),e,r,{method:X.deleteProjectByIdAdmin.method}),selectProject:async(t,r={})=>await J(Y(n,Zx,X.selectProject,{projectId:String(t)}),e,r,{method:X.selectProject.method}),unselectProject:async(t={})=>await J(Y(n,Zx,X.unselectProject),e,t,{method:X.unselectProject.method}),addNewAccessKey:async(t,r={})=>await J(Y(n,Zx,X.addNewAccessKey),e,r,{method:X.addNewAccessKey.method,body:t}),deleteAccessKey:async(t,r={})=>await J(Y(n,Zx,X.deleteAccessKey),e,r,{method:X.deleteAccessKey.method,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await J(Y(n,Zx,X.refreshAccessKey),e,r,{method:X.refreshAccessKey.method,body:{clientId:t}}),triggerBuild:async(t={})=>await J(Y(n,Zx,X.triggerBuild),e,t,{method:X.triggerBuild.method}),triggerWebhook:async(t,r={})=>await J(Y(n,Zx,X.triggerWebhook),e,r,{method:X.triggerWebhook.method,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await J(Y(n,Zx,X.getCIConfiguration),e,t,{method:X.getCIConfiguration.method}),pushCIConfig:async(t={})=>await J(Y(n,Zx,X.pushCIConfiguration),e,t,{method:X.pushCIConfiguration.method}),updateMemberAccess:async(t,r,i={})=>await J(Y(n,Zx,X.updateMemberAccess,{userId:t}),e,i,{method:X.updateMemberAccess.method,body:r})}},$x={prefix:`/api/tag`},eS={getTags:{method:`GET`,path:`/`},addTag:{method:`POST`,path:`/`},updateTag:{method:`PUT`,path:`/:tagId`},deleteTag:{method:`DELETE`,path:`/:tagId`}},tS=(e={},t)=>{let n=t?.editor?.backendURL??Cn.backendURL??`https://back.intlayer.org`;return{getTags:async(t,r={})=>await J(Y(n,$x,eS.getTags),e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await J(Y(n,$x,eS.addTag),e,r,{method:eS.addTag.method,body:t}),updateTag:async(t,r,i={})=>await J(Y(n,$x,eS.updateTag,{tagId:String(t)}),e,i,{method:eS.updateTag.method,body:r}),deleteTag:async(t,r={})=>await J(Y(n,$x,eS.deleteTag,{tagId:String(t)}),e,r,{method:eS.deleteTag.method})}};function nS(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var rS=nS({ORIGIN_NOT_CONFIGURED:"Passkey origin is not configured. Set the `origin` option of the passkey plugin or configure `baseURL`.",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`}),iS=`1.7.26`;function aS(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 oS(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 sS(){return cS.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var cS={stubThis:e=>e};function lS(e){let{id:t}=e;return{...e,id:oS(t),transports:e.transports}}function uS(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 dS=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 fS({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 dS({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 dS({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 dS({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 dS({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 dS({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new dS({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 dS({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new dS({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(!uS(t))return new dS({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new dS({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 dS({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 dS({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 pS=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}}},mS=[`cross-platform`,`platform`];function hS(e){if(e&&!(mS.indexOf(e)<0))return e}async function gS(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(!sS())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:oS(t.challenge),user:{...t.user,id:oS(t.user.id)},excludeCredentials:t.excludeCredentials?.map(lS)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=pS.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw fS({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){_S(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=aS(e))}catch(e){_S(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=aS(c.getAuthenticatorData())}catch(e){_S(`getAuthenticatorData()`,e)}return{id:o,rawId:aS(s),response:{attestationObject:aS(c.attestationObject),clientDataJSON:aS(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:hS(a.authenticatorAttachment)}}function _S(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 vS(){if(!sS())return yS.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?yS.stubThis(new Promise(e=>e(!1))):yS.stubThis(e.isConditionalMediationAvailable())}var yS={stubThis:e=>e};function bS({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 dS({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new dS({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!uS(t))return new dS({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new dS({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 dS({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 xS(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(!sS())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(lS));let a={...t,challenge:oS(t.challenge),allowCredentials:i},o={};if(n){if(!await vS())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=pS.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw bS({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=aS(u.userHandle)),{id:c,rawId:aS(l),response:{authenticatorData:aS(u.authenticatorData),clientDataJSON:aS(u.clientDataJSON),signature:aS(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:hS(s.authenticatorAttachment)}}var SS=`1.7.26`,CS=Symbol.for(`better-auth:broadcast-channel`),wS=()=>Math.floor(Date.now()/1e3),TS=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:wS()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=window,t=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 e.addEventListener(`storage`,t),()=>{e.removeEventListener(`storage`,t)}}};function ES(e=`better-auth.message`){return globalThis[CS]||(globalThis[CS]=new TS(e)),globalThis[CS]}var DS=[],OS=0,kS=null,AS=4,jS=globalThis.nanostoresGlobal||={epoch:0},MS=()=>{let e;for(OS=0;OS<DS.length;OS+=AS)try{DS[OS](DS[OS+1].value,DS[OS+2],DS[OS+3])}catch(t){e=t}if(DS.length=0,e)throw e},NS=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=OS+AS;t<DS.length;)DS[t]===e?DS.splice(t,AS):t+=AS;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){jS.epoch++;let i=!DS.length&&!0;for(let i of t)kS?.has(i)||(kS?.add(i),DS.push(i,n,e,r));i&&MS()},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},PS=2,FS=5,IS=6,LS=10,RS=(e,t,n,r)=>(e.events=e.events||{},e.events[n+LS]||(e.events[n+LS]=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+LS](),delete e.events[n+LS])}),zS=(e,t)=>RS(e,t,PS,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}}),BS=1e3,VS=(e,t)=>RS(e,n=>{let r=t(n);r&&e.events[IS].push(r)},FS,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[IS]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[IS])t();e.events[IS]=[]}},BS)},()=>{e.listen=n,e.off=r}});function HS(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function US(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(!US(e[n],t[n]))return!1;return!0}if(HS(e)&&HS(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)||!US(e[r],t[r]))return!1;return!0}return!1}function WS(e,t){return zS(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var GS=Symbol.for(`better-auth:focus-manager`),KS=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,t=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return e.addEventListener(`visibilitychange`,t,!1),()=>{e.removeEventListener(`visibilitychange`,t,!1)}}};function qS(){return globalThis[GS]||(globalThis[GS]=new KS),globalThis[GS]}var JS=Symbol.for(`better-auth:online-manager`),YS=class{listeners=new Set;isOnline=globalThis.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=window,t=()=>this.setOnline(!0),n=()=>this.setOnline(!1);return e.addEventListener(`online`,t,!1),e.addEventListener(`offline`,n,!1),()=>{e.removeEventListener(`online`,t,!1),e.removeEventListener(`offline`,n,!1)}}};function XS(){return globalThis[JS]||(globalThis[JS]=new YS),globalThis[JS]}var ZS=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,QS={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},$S=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function eC(e){return e instanceof Date&&!isNaN(e.getTime())}function tC(e){let t=$S.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 eC(f)?f:null}function nC(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 QS)return QS[s];if(!ZS.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=tC(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function rC(e,t={strict:!0}){return nC(e,t)}var iC=Symbol.for(`better-auth:auth-query`);function aC(e){let t=NS(e);return Object.defineProperty(t,iC,{value:!0}),t}var oC=()=>typeof window>`u`;function sC(e,t){return US(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}var cC=(e,t,n,r)=>{let i=aC({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>o(e)});VS(i,()=>WS(i,sC));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&&US(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 VS(i,()=>{if(oC())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},lC=()=>Math.floor(Date.now()/1e3),uC=5;function dC(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||XS().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=lC(),t();else if(e?.event===`visibilitychange`){if(lC()-c.lastSessionRequest<uC)return;c.lastSessionRequest=lC(),t()}else t()}},d=e=>{ES().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=ES().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=qS().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=XS().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,g(),typeof window<`u`&&(f(),p(),m(),h(),c.cleanupBroadcastSetup=ES().setup(),c.cleanupFocusSetup=qS().setup(),c.cleanupOnlineSetup=XS().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 fC=()=>`Deno`in globalThis,pC=()=>`Bun`in globalThis,mC=Object.create(null),hC=e=>({}),gC=new Proxy(mC,{get(e,t){return hC()[t]??mC[t]},has(e,t){return t in hC()||t in mC},set(e,t,n){let r=hC(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=hC(!0);return delete n[t],!0},ownKeys(){let e=hC(!0);return Object.keys(e)}});gC.NODE_ENV;function _C(e,t){return typeof process<`u`?{}[e]??t:fC()?Deno.env.get(e)??t:pC()?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return _C(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return _C(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return _C(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return _C(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return _C(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return _C(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return _C(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function vC(){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 yC(e){let t=e.split(`
20
- at `);return t.length<=1?e:(t.splice(1,1),t.join(`
21
- at `))}function bC(e,t){class n extends e{#e;constructor(...e){if(vC()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=yC(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 xC={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};bC(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:xC[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 SC=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},CC=47;function wC(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===CC;)t--;return t===e.length?e:e.slice(0,t)}function TC(e){try{return(wC(new URL(e).pathname)||`/`)!==`/`}catch{throw new SC(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function EC(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new SC(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof SC?t:new SC(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function DC(e,t=`/api/auth`){if(EC(e),TC(e))return e;let n=wC(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function OC(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 kC(e,t,n,r,i){if(e)return DC(e,t);if(r!==!1){let e=gC.BETTER_AUTH_URL||gC.NEXT_PUBLIC_BETTER_AUTH_URL||gC.PUBLIC_BETTER_AUTH_URL||gC.NUXT_PUBLIC_BETTER_AUTH_URL||gC.NUXT_PUBLIC_AUTH_URL||(gC.BASE_URL===`/`?void 0:gC.BASE_URL);if(e)return DC(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&OC(o,`proto`)&&OC(a,`host`))try{return DC(`${o}://${a}`,t)}catch{}if(n){let e=AC(n.url);if(!e)throw new SC(`Could not get origin from request. Please provide a valid base URL.`);return DC(e,t)}if(typeof window<`u`&&window.location)return DC(window.location.origin,t)}function AC(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var jC=[`javascript:`,`data:`,`vbscript:`];function MC(e){let t;try{t=new URL(e)}catch{return!0}return!jC.includes(t.protocol)}var NC={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&MC(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},PC=()=>typeof window>`u`,FC=BS;function IC(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 LC(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function RC(e){return!e||e.session===null&&e.user===null?null:e}function zC(e,t){return US(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function BC(e,t){let n=NS(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=aC({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});WS(s,zC);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}=LC(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,body:{},signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=LC(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=RC(i),u=s.value,d=u.data!=null&&l!=null&&US(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()+FC,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 VS(s,()=>{let e;PC()||(e=setTimeout(()=>{d()},0));let r=dC({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 VC=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)}},HC=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}},UC=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}},WC=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 GC(e){if(typeof e==`number`)return new UC({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new UC(e);case`exponential`:return new WC(e);default:throw Error(`Invalid retry strategy`)}}var KC=[`get`,`post`,`put`,`patch`,`delete`];function qC(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return KC.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var JC=/^[a-z][a-z\d+.-]*:\/\/[^/?#]+/i,YC=/^\/+/;function XC(e){let t=e.length;for(;t>0&&e[t-1]===`/`;)t--;return e.slice(0,t)}function ZC(e,t){let n=e.indexOf(t);return n===-1?[e,void 0]:[e.slice(0,n),e.slice(n+1)]}var QC=e=>e===`.`||e===`..`,$C=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function ew(e,t){let n=t.get(e);if(n===void 0)return $C(e);if(QC(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function tw(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 nw(e,t){let n=tw(e,t);return e.split(`/`).map(e=>ew(e,n)).join(`/`)}function rw(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 iw(e,t){if(!t)return e;let n=`${XC(t)}/`;return e.startsWith(n)?e.slice(n.length):e}function aw(e,t,n,r){let[i]=ZC(e,`#`),[a,o=``]=ZC(i,`?`),s=t.replace(YC,``),c=rw(`${o}&${n??``}`,r),l=`${XC(a)}/${s}${c}`;return JC.test(l)?new URL(l):l}function ow(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},{path:a}=qC(e),o=a===e?e:`/${a}`,s=o.match(JC)?.[0],[c,l]=ZC(s?o.slice(s.length):iw(o,n),`?`),u=nw(c,r);return aw(s??n??``,u,l,i)}var sw=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},cw=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function lw(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 cw.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function uw(e){try{return JSON.parse(e),!0}catch{return!1}}function dw(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 fw(e){try{return JSON.parse(e)}catch{return e}}function pw(e){return typeof e==`function`}function mw(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&pw(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&pw(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function hw(e){return e?[`POST`,`PUT`,`PATCH`,`DELETE`].includes(e.toUpperCase()):!1}function gw(...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 _w(e){let t=new Headers(gw(e?.headers,await sw(e)));if(!t.has(`content-type`)){let n=vw(e?.body);n&&t.set(`content-type`,n)}return t}function vw(e){return dw(e)?`application/json`:null}function yw(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function bw(e,t){let{body:n}=e;return n?!dw(n)||typeof n==`string`?n:yw(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function xw(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=qC(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function Sw(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var Cw=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function ww(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new Cw(n.issues);return n.value}function Tw(e){"@babel/helpers - typeof";return Tw=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},Tw(e)}function Ew(e,t){if(Tw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Tw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Dw(e){var t=Ew(e,`string`);return Tw(t)==`symbol`?t:t+``}function Ow(e,t,n){return(t=Dw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kw(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 Aw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kw(Object(n),!0).forEach(function(t){Ow(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jw=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await HC(e,t),o=mw(a),s=new AbortController,c=a.signal??s.signal,l=ow(i,a),u=await _w(a),d=bw(a,u),f=xw(i,a),p=Aw(Aw({},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}=Sw(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(Aw(Aw({},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=lw(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??fw)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await ww(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e(Aw(Aw({},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??fw,b=await h.text(),x=uw(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:Aw(Aw({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e(Aw(Aw({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=GC(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 jw(e,Aw(Aw({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new VC(h.status,h.statusText,x?S:b);return{data:null,error:Aw(Aw({},S),{},{status:h.status,statusText:h.statusText})}},Mw=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=Aw(Aw({},n),e.query!==void 0&&{query:Aw(Aw({},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}=qC(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 ww(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=Aw(Aw(Aw(Aw({},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 ww(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=Aw({},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=Aw(Aw({},t),i.query)}i=Aw(Aw({},i),{},{body:o.input?await ww(o.input,n?.body):n?.body,params:o.params?await ww(o.params,n?.params):n?.params})}return{url:t,options:i}}}return Aw({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),Nw=e=>{async function t(t,n){let r=Aw(Aw(Aw({},e),n),{},{headers:gw(e?.headers,n?.headers),plugins:[...e?.plugins||[],Mw(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await jw(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 jw(t,r)}return t},Pw=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{}}},Fw=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`,Iw=(e,t)=>{let n=`credentials`in Request.prototype,r=kC(e?.baseURL,e?.basePath,void 0,t)??Pw(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=Nw({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?rC(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[NC],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=BC(d,e),h=!1,g=e=>{h||e===null||(h=!0,IC(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:Fw,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=Rx(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 Lw(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function Rw(e){return e.charAt(0).toUpperCase()+e.slice(1)}var zw=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,Bw=/['\u2019]/g;function Vw(e){return e.replace(Bw,``).match(zw)??[]}function Hw(e){return Vw(e).map(e=>e.toLowerCase()).join(`-`)}function Uw(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`||Lw(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(Hw).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=n[c]||m.method||(Object.keys(p).length>0?`POST`:`GET`);return await t(c,{...m,body:hw(h)?{...p,...m?.body||{}}:void 0,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 Ww(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,atomListeners:o,$store:s}=Iw(e),c={};for(let[e,t]of Object.entries(r))c[`use${Rw(e)}`]=t;return Uw({...n,...c,hydrateSession:i,$fetch:a,$store:s},a,t,r,o)}var Gw=(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 xS({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof dS?e.code:`AUTH_CANCELLED`,message:rS.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:rS.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 gS({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 dS?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:rS.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:rS.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:rS.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),Kw=()=>{let e=NS();return{id:`passkey`,version:iS,$InferServerPlugin:{},getActions:(t,n)=>Gw(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:cC(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:rS}},qw=`1.7.26`,Jw=e=>({id:`sso-client`,version:qw,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}});function Yw(e){if(e.indexOf(`%`)===-1)return e;try{return decodeURIComponent(e)}catch{return e}}var Xw=/^[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E\x5F\x60\x61-\x7A\x7C\x7E]+$/,Zw=/^[\x20\x21\x23-\x3A\x3C-\x5B\x5D-\x7E]*$/;function Qw(e){return e.length<2||!e.startsWith(`"`)||!e.endsWith(`"`)?e:e.slice(1,-1)}function $w(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 eT(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=$w(n.slice(0,e)),i=Qw($w(n.slice(e+1)));Xw.test(r)&&Zw.test(i)&&t.set(r,Yw(i))}return t}function tT(e){return typeof document>`u`?null:eT(document.cookie).get(e)??null}var nT=(e={})=>{let t=e.cookieName||`better-auth.last_used_login_method`;return{id:`last-login-method-client`,version:SS,getActions(){return{getLastUsedLoginMethod:()=>tT(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=>tT(t)===e}}}},rT=()=>({id:`magic-link`,version:SS,$InferServerPlugin:{}}),iT=nS({INVALID_SESSION_TOKEN:`Invalid session token`}),aT=()=>({id:`multi-session`,version:SS,$InferServerPlugin:{},atomListeners:[{matcher(e){return e===`/multi-session/set-active`},signal:`$sessionSignal`}],$ERROR_CODES:iT}),oT=nS({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`}),sT=e=>({id:`two-factor`,version:SS,$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`&&MC(e.twoFactorPage)&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:oT}),cT=e=>Ww({baseURL:wx(e,e),withCredentials:!0,plugins:[sT({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}}),Kw(),rT(),Jw(),aT(),nT()]}),lT=e=>{let t=e?.editor?.backendURL??Cn?.backendURL;t||(t=rr,console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=cT(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)}};S();var uT=s(null),dT=({children:e,manager:t})=>I(uT.Provider,{value:t,children:e}),fT=()=>t(uT);S();var pT=()=>{let e=fT(),[t,n]=d(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};S();var mT=()=>{let e=fT(),[t,n]=d(e?.localeDictionaries.value??{});return M(()=>{if(!e)return;let t=e=>n(e.detail??{});return e.localeDictionaries.addEventListener(`change`,t),()=>e.localeDictionaries.removeEventListener(`change`,t)},[e]),{localeDictionaries:t,setLocaleDictionaries:A(t=>e?.localeDictionaries.set(t),[e]),setLocaleDictionary:A(t=>e?.setLocaleDictionary(t),[e])}},hT=()=>{let{setLocaleDictionaries:e,setLocaleDictionary:t}=mT();return{setLocaleDictionaries:e,setLocaleDictionary:t}};S();var gT=()=>{let e=fT();return x(()=>({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])},_T=()=>{let e=fT(),[t,n]=d(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,...gT()}};S();var vT=()=>{let e=fT(),[t,n]=d(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}},yT=()=>{let e=fT();return A(()=>e?.pingClient(),[e])},bT=`__intlayer_editor_manager__`,xT=`__intlayer_editor_manager_events__`,ST=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[xT]||(e[xT]=new EventTarget),e[xT]},CT=()=>typeof window>`u`?null:window[bT]??null,wT=e=>{if(typeof window<`u`){let t=window;t[bT]=e}ST().dispatchEvent(new CustomEvent(`change`,{detail:e}))},TT=e=>{let t=ST(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},ET=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}({}),DT=.3,OT=[`mouseup`,`touchend`,`touchcancel`],kT=e=>{let t=e.focusedContent.value,n=()=>{for(let e of OT)document.removeEventListener(e,n,!0);setTimeout(()=>{e.focusedContent.value===t&&e.focusedContent.set(null)})};for(let e of OT)document.addEventListener(e,n,!0)},AT=e=>e.parentElement??e.getRootNode().host??null,jT=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)},MT=e=>{let t=0;for(let n=e;n;n=AT(n)){let e=getComputedStyle(n);Number.parseFloat(e.opacity)<1&&(t+=jT(e))}return t},NT=new Map,PT=(e,t)=>{let n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_DISCONNECTED?!0:!!(n&Node.DOCUMENT_POSITION_FOLLOWING)},FT=()=>{let e=null;for(let t of NT.keys())t.isConnected&&(e&&PT(t,e)||(e=t));let t=e?NT.get(e):void 0;NT.clear(),t?.()},IT=(e,t)=>{NT.size===0&&queueMicrotask(FT),NT.set(e,t)},LT=typeof HTMLElement<`u`?HTMLElement:class{},RT=class extends LT{_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=CT();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!==zr)}_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[zr][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,NT.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?IT(this,()=>this._scrollIntoViewIfNeeded()):this._isSelected||NT.delete(this)}_scrollIntoViewIfNeeded(){let e=this._selector?.shadowRoot?.querySelector(`.wrapper`);if(!e)return;let t=e.getBoundingClientRect(),n=t.top-MT(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*DT,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=CT();e&&this._setupManagerSubscriptions(e),this._unsubManager=TT(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=CT();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),CT()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),CT()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,null)}_handleClickOutside(e){if(e.stopPropagation(),e.target!==this._selector||!this._isSelected)return;let t=CT();if(!t)return;let n=(e.detail?.originalEvent?.composedPath()??[]).filter(e=>e instanceof HTMLElement&&e.tagName===`INTLAYER-CONTENT-SELECTOR-WRAPPER`);n.some(e=>e.dictionaryKey===this._dictionaryKey&&$n(e.filteredKeyPath,this._getFilteredKeyPath()))?this._selector?.setAttribute(`is-selecting`,``):n.length>0?kT(t):t.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}},zT=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,RT))},BT=new WeakSet,VT=e=>{BT.add(e)},HT=e=>BT.has(e),UT=[`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(`,`),WT=`intlayer-`,GT=e=>{if(e.localName.startsWith(WT))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host.localName.startsWith(WT)},KT=e=>{let t=e.composedPath().filter(e=>e instanceof Element),n=t.findLastIndex(GT);return t.some((e,t)=>GT(e)?!1:e.matches(UT)?!0:t>n&&getComputedStyle(e).cursor===`pointer`)},qT=250,JT=`
22
- :host {
23
- display: contents;
24
- }
25
-
26
- .wrapper {
27
- display: inline-block;
28
- cursor: pointer;
29
- user-select: none;
30
- border-radius: 0.375rem;
31
- outline-width: 2px;
32
- outline-offset: 4px;
33
- outline-style: solid;
34
- outline-color: transparent;
35
- transition: all 100ms 50ms ease-in-out;
36
- }
37
-
38
- .wrapper[data-active] {
39
- outline-color: inherit;
40
- }
41
-
42
- /*
43
- * Text content wraps over several lines: an outline would frame the whole
44
- * block, so each line fragment gets its own ring instead. The padding keeps
45
- * the ring 4px away from the text, the negative margin cancels its layout.
46
- */
47
- .wrapper[data-text] {
48
- display: inline;
49
- outline: none;
50
- padding: 4px;
51
- margin: -4px;
52
- box-shadow: 0 0 0 2px transparent;
53
- -webkit-box-decoration-break: clone;
54
- box-decoration-break: clone;
55
- }
56
-
57
- .wrapper[data-text][data-active] {
58
- box-shadow: 0 0 0 2px currentColor;
59
- }
60
- `,YT=e=>{let t=e.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>e.nodeType===Node.TEXT_NODE)},XT=typeof HTMLElement<`u`?HTMLElement:class{},ZT=class extends XT{_isSelecting=!1;_pressDuration=qT;_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=JT,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`,YT(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?qT: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(HT(e))return;let t=e.metaKey||e.ctrlKey;this._isSelecting||this._isSelectingState||t?(e.preventDefault(),e.stopPropagation(),t&&this._select()):KT(e)||(VT(e),this._select())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},QT=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,ZT),zT())},$T=(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}},eE=()=>Math.random().toString(36).slice(2),tE=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;_warnedRejectedOrigins=new Set;constructor(e){this._config=e,this.senderId=eE()}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:eE()};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=>$T(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)}},nE=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)}},rE=()=>{for(let e of[`mousedown`,`click`])window.dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window}))},iE=class{_messenger;_clickHandler=null;_unsubscribeMerge=null;constructor(e){this._messenger=e}startInterceptor(){typeof window<`u`&&(this._clickHandler=e=>{HT(e)||this._messenger.send(`INTLAYER_IFRAME_CLICKED`)},window.addEventListener(`click`,this._clickHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(`INTLAYER_IFRAME_CLICKED`,rE)}stopInterceptor(){this._clickHandler&&=(window.removeEventListener(`click`,this._clickHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},aE=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)}}},oE=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)}}},sE=3e3,cE=1e4,lE=e=>typeof e==`object`&&!!e&&typeof e.isActivated==`boolean`,uE=aE(`edited_content`),dE=aE(`focused_content`),fE=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 tE(e.messenger),this.editorEnabled=new nE(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new nE(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new nE(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new nE(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new nE(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new nE(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this.displayedDictionaryKeys=new nE(`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`,initialValue:e.mode===`client`?[]:void 0}),this._urlManager=new oE(this.messenger),this._iframeInterceptor=new iE(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,uE,e=>Object.keys(e).length>0),this._syncWithSharedState(this.focusedContent,dE)],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(;Yi(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=Ji(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=ra(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=Ji(structuredClone(n[e]?.content??r),t,Yi(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!==zr),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:Yi(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=Yi(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(!lE(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>cE;this.editorEnabled.value&&e&&this.editorEnabled.set(!1),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)},sE)}_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)}}};S();var pE=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=u(null);i.current||=new fE({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return M(()=>(QT(),wT(a),a.start(),()=>{a.stop(),wT(null)}),[a]),M(()=>{a&&t&&Object.keys(t).length!==0&&a.configuration.set(t)},[a,t]),I(dT,{manager:a,children:e})};S();var mE=()=>{let e=fT(),[t,n]=d(e?.focusedContent.value??null);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.focusedContent.addEventListener(`change`,t),()=>e.focusedContent.removeEventListener(`change`,t)},[e]),{focusedContent:t,setFocusedContent:A(t=>e?.focusedContent.set(t),[e]),setFocusedContentKeyPath:A(t=>e?.setFocusedContentKeyPath(t),[e])}};S();var hE=(e,t)=>{let n=fT(),[r,i]=d(t);return M(()=>n?.messenger.subscribe(`${e}/post`,e=>i(()=>e)),[n,e]),r},gE=()=>hE(ET.INTLAYER_URL_CHANGE,void 0);S();var _E=`INTLAYER_EDITED_CONTENT_CHANGED`,vE=()=>{let{editedContent:e,setEditedContentState:t}=_T();M(()=>{if(e!==void 0)return;let n=localStorage.getItem(_E);if(n)try{t(JSON.parse(n))}catch(e){console.error(e)}},[]),M(()=>{e!==void 0&&localStorage.setItem(_E,JSON.stringify(e))},[e])};S();var yE=()=>{let e=fT(),[t,n]=d(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};S();var bE=(e,t,n)=>{for(let r of t)try{if(Yi(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},xE=()=>{let{localeDictionaries:e}=mT(),t=yE(),{setFocusedContent:n,setFocusedContentKeyPath:r,focusedContent:i}=mE();return{focusedContent:x(()=>{if(!i||!e||i.dictionaryLocalId)return i;let n=Object.values(e).filter(e=>e.key===i.dictionaryKey),r=bE(i.keyPath??[],n,t);return{...i,...r}},[i,e,t]),setFocusedContent:n,setFocusedContentKeyPath:r}};S();var SE=5e3,CE=(e=SE)=>{let{enabled:t}=vT(),[n,r]=d(0),[i,a]=d(!1);M(()=>{if(t||n===0)return;let r=setTimeout(()=>a(!0),e);return()=>clearTimeout(r)},[t,n,e]);let o=A(()=>{a(!1),r(e=>e+1)},[]),s=A(()=>a(!1),[]);return{isConnectionFailed:i&&!t,handleFrameLoad:o,dismiss:s}};S();var wE=3e3,TE=e=>fetch(e,{method:`HEAD`,mode:`no-cors`,cache:`no-store`}).then(()=>!0).catch(()=>!1),EE=({applicationURL:e,isDisconnected:t,reloadFrame:n,intervalMs:r=wE})=>{let i=u(!1),a=u(n);a.current=n,M(()=>{if(!t){i.current=!1;return}if(!e)return;let n=!1,o=async()=>{let t=await TE(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])},DE=e=>{let t=pT(),{locale:n}=oa(),r=xx(),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}},OE=e=>{let t=pT();return lT(e?.intlayerConfiguration??t)},kE=e=>{let{options:t,resolvedConfig:n}=DE(e);return Qx(t,n)},AE=e=>{let{options:t,resolvedConfig:n}=DE(e);return Yx(t,n)},jE=e=>{let{options:t,resolvedConfig:n}=DE(e);return Ux(t,n)},ME=e=>{let{options:t,resolvedConfig:n}=DE(e);return tS(t,n)},NE=e=>{let{options:t,resolvedConfig:n}=DE(e);return Xx(t,n)},PE=e=>{let{options:t,resolvedConfig:n}=DE(e);return Kx(t,n)},FE=e=>{let t=Rx(e,pT(),{editor:Cn}),n=Px(void 0,t),r=ee(),{data:i}=Ht({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}},IE=(e,t)=>{let n=pT(),r=t??n??{editor:Cn},i=de(),a=ee(),{data:o,isFetched:s,refetch:c}=Ht({queryKey:[`session`],queryFn:async()=>(await lT(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}},LE=({session:e,intlayerConfiguration:t}={})=>{let{session:n,fetchSession:r,revalidateSession:i,setSession:a}=IE(e,t),{oAuth2AccessToken:o}=FE(t),s=xx();return{session:n,fetchSession:r,setSession:a,revalidateSession:i,oAuth2AccessToken:o,isAuthenticated:!!(n?.user||o||s?.accessToken)}},RE=({requireUser:e,requireProject:t,requireOrganization:n})=>{let{oAuth2AccessToken:r,session:i}=LE({intlayerConfiguration:pT()}),a=xx(),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)}},zE=e=>{let{requireUser:t,requireProject:n,requireOrganization:r,...i}=e,{enable:a}=RE({requireUser:t,requireProject:n,requireOrganization:r});return Ht({enabled:i?.enabled!==!1&&a,...i})},BE=[`ai`,`credits`],VE=()=>{let e=jE();return Ut({mutationKey:[`ai-translateJSON`],meta:{invalidateQueries:[BE]},mutationFn:t=>e.translateJSON(t)})},HE=()=>{let e=jE();return Ut({mutationKey:[`ai-auditContentDeclarationMetadata`],meta:{invalidateQueries:[BE]},mutationFn:t=>e.auditContentDeclarationMetadata(t)})},UE=()=>{let e=jE();return Ut({mutationKey:[`ai-auditContentDeclarationField`],meta:{invalidateQueries:[BE]},mutationFn:t=>e.auditContentDeclarationField(t)})},WE=()=>{let e=jE();return Ut({mutationKey:[`ai-customQuery`],meta:{invalidateQueries:[BE]},mutationFn:t=>e.customQuery(t)})},GE=[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]],KE=()=>{let e=OE(),t=de();return Ut({mutationKey:[`logout`],mutationFn:()=>e.signOut({}),onSettled:()=>{GE.forEach(e=>{t.removeQueries({queryKey:e})})}})},qE={newDictionaries:[],updatedDictionaries:[],upToDateDictionaries:[],error:[]},JE=(e,t)=>({newDictionaries:[...e.newDictionaries,...t.newDictionaries],updatedDictionaries:[...e.updatedDictionaries,...t.updatedDictionaries],upToDateDictionaries:[...e.upToDateDictionaries,...t.upToDateDictionaries],error:[...e.error,...t.error]}),YE=e=>e instanceof Error?e.message:String(e),XE=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)=>JE(e,t instanceof Error?{...qE,error:(c[n]??[]).map(e=>({key:e.key,localId:e.localId,message:YE(t)}))}:{...qE,...t.data}),qE),f=l.find(e=>!(e instanceof Error)&&!e.success);return{success:!u&&!f,status:f?.status??200,data:d,...f?.error&&{error:f.error}}};S();var ZE=(e,t)=>{let n=AE();return zE({queryKey:[`dictionaries`,e],queryFn:({signal:t})=>n.getDictionaries(e,{signal:t}),requireUser:!0,requireOrganization:!0,requireProject:!0,...t})},QE=e=>{let t=AE();return zE({queryKey:[`dictionariesKeys`],queryFn:()=>t.getDictionariesKeys(),requireUser:!0,requireOrganization:!0,requireProject:!0,...e})},$E=()=>{let e=AE(),[t,n]=d(null);return{...Ut({mutationKey:[`dictionaries`],mutationFn:t=>XE(t.dictionaries,t=>e.pushDictionaries(t),{onProgress:n}),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}}),progress:t}},eD=()=>{let e=AE();return Ut({mutationKey:[`dictionaries`],mutationFn:t=>e.deleteDictionary(t.dictionaryId),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}})},tD=()=>{let e=NE();return Ht({queryKey:[`editor`,`dictionaries`],queryFn:()=>e.getDictionaries()})},nD=()=>{let e=NE();return Ut({mutationKey:[`editor`,`dictionaries`],mutationFn:t=>e.writeDictionary(t)})},rD=(e,t)=>{let n=kE();return zE({queryKey:[`projects`,e],queryFn:({signal:t})=>n.getProjects(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},iD=(e,t)=>{let n=ME();return zE({queryKey:[`tags`,e],queryFn:({signal:t})=>n.getTags(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},aD=()=>{let{session:e,revalidateSession:t,setSession:n}=LE(),{mutate:r}=KE(),i=e?.user?`authenticated`:`unauthenticated`;return{isAuthenticated:i===`authenticated`,isUnauthenticated:i===`unauthenticated`,user:e?.user,revalidateSession:t,logout:async()=>{n(null),r()}}};r(),n();var oD=2e3,sD=3e4,cD=2**31-1,lD=[`editorAuth`],uD=s(null),dD=()=>t(uD),fD=async()=>(await(await fetch(`/api/auth`)).json()).data,pD=({children:e})=>{let t=de(),[n,r]=d(!1),[i,a]=d(0),[o,s]=d(!1),[c,l]=d(!1),{data:u}=Ht({queryKey:lD,queryFn:fD,refetchInterval:e=>e.state.data?.isLoginPending?oD:!1,refetchOnWindowFocus:!0}),f=u?.auth??null;M(()=>{if(!f?.expiresAt)return;let e=new Date(f.expiresAt).getTime()-Date.now();if(e>cD)return;let n=setTimeout(()=>t.invalidateQueries({queryKey:lD}),Math.max(e,0));return()=>clearTimeout(n)},[f?.expiresAt,t]);let p=!!u?.isLoginPending;M(()=>{if(s(!1),!p)return;let e=setTimeout(()=>s(!0),sD);return()=>clearTimeout(e)},[p,i]);let m=A(()=>{r(!0),a(e=>e+1),fetch(`/api/auth/login`,{method:`POST`}).then(()=>t.invalidateQueries({queryKey:lD})).finally(()=>r(!1))},[t]),h=A(()=>{l(!0),fetch(`/api/auth/logout`,{method:`POST`}).then(e=>e.json()).then(e=>t.setQueryData(lD,e.data)).finally(()=>l(!1))},[t]),g=n||p&&!o,_=x(()=>({accessToken:f?.accessToken??null,user:f?.user,organization:f?.organization,project:f?.project,login:m,isLoggingIn:g}),[f,m,g]),v=x(()=>({auth:f,isLoggingIn:g,login:m,logout:h,isLoggingOut:c}),[f,g,m,h,c]);return I(uD.Provider,{value:v,children:I(bx,{value:_,children:e})})},mD=({children:e})=>I(vx,{children:I(ln,{children:I(pD,{children:[I(ol,{}),e]})})}),hD={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`},gD=({className:e,strokeWidth:t=4})=>I(`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:I(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[I(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[I(`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`}),I(`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`})]}),I(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[I(`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`}),I(`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`})]})]})}),_D=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>I(b,{children:t&&n?I(`div`,{className:`relative size-full`,children:[I(`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:I(gD,{className:`size-10 max-h-full max-w-full`})}),e]}):t?I(`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:I(gD,{className:`size-10 max-h-full max-w-full`})}):e??I(b,{})}),vD=Kc(`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`}}),yD=Kc(`inline-flex rtl-mirror-icons 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 ring-card-500/20 text-card *: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 resize-none rounded-2xl text-base shadow-none outline-none select-text 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}}),Z=({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`,E=f??(a?`left`:`center`);return E===`center`&&r&&!i&&!a&&!T?I(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:yD({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:E,className:h}),...w,...x,children:I(`span`,{className:`flex min-w-0 grow items-center`,children:[I(`span`,{className:`flex flex-1 basis-0 justify-end`,children:I(_D,{className:vD({size:t,className:G(`me-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),I(`span`,{className:`min-w-0 truncate whitespace-nowrap`,children:r}),I(`span`,{className:`flex-1 basis-0`,"aria-hidden":`true`})]})}):I(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:yD({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:E,className:h}),...w,...x,children:[i&&!s&&I(i,{className:vD({size:t,className:G(!T&&`me-3`,o)}),"aria-hidden":`true`}),I(`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:I(_D,{className:vD({size:t,className:G(!T&&`me-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&I(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&I(`span`,{className:`sr-only`,children:m}),a&&I(a,{className:vD({size:t,className:G(!T&&`ms-3`,o)}),"aria-hidden":`true`})]})},bD=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>I(`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:I(`div`,{style:{minHeight:`${a}px`},className:G(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})});S();var xD=({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:f,iconClassName:p,color:m=`text`,...h})=>{let g=n!==void 0,[_,v]=d(r),y=j(),b=g?n:_,x=!b,S=l??`${y}-accordion-content`,C=e=>{if(o)return;let t=!b;g||v(t),i?.(t),a?.(e)};return I(`div`,{className:G(`w-full`,f),children:[I(Z,{variant:`hoverable`,color:m,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:Ds,iconClassName:G(`size-3.5 transform transition-transform duration-300 ease-in-out`,b?`rotate-0`:`-rotate-180`,p),"aria-expanded":b,"aria-controls":S,"aria-label":u,role:`button`,...h,children:t}),I(bD,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:s,role:`region`,"aria-labelledby":S,children:e})]})},SD=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>I(`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:I(xD,{isOpen:a,label:t,header:I(`div`,{className:`flex w-full`,children:[I(`div`,{className:`flex w-full items-center justify-between`,children:[I(`span`,{className:G(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&I(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&I(`p`,{className:`text-card-foreground ps-3 text-sm`,children:n})]}),children:I(`div`,{className:`size-full px-2`,children:r})})}),CD=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:Kr},s=[...t,o];return I(SD,{level:t.length,title:`${a}`,description:``,isSelected:$n(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:I(lO,{...e,keyPath:s,section:n})},JSON.stringify(n))})},wD=new Set,TD=null,ED=()=>{TD=null;let e=[...wD];wD.clear();for(let t of e)t()},DD=e=>typeof requestAnimationFrame>`u`?()=>{}:(wD.add(e),TD??=requestAnimationFrame(ED),()=>{wD.delete(e),wD.size===0&&TD!==null&&(cancelAnimationFrame(TD),TD=null)});S();var OD=e=>e?.getAttribute(`aria-selected`)===`true`,kD=[`aria-selected`,`data-active`,`data-indicator`],AD=150,jD=(e,{selector:t=OD,isHoverable:n=!1,orientation:r=`horizontal`}={selector:OD,isHoverable:!1,orientation:`horizontal`})=>{let[i,a]=d(null),o=u(null),s=u(null),c=u(null),l=u(null),f=u(t);f.current=t;let p=u(r);p.current=r;let m=e.current.length,h=A(()=>{let t=o.current??e.current.find(f.current)??null;o.current&&s.current&&(clearTimeout(s.current),s.current=null);let n=p.current===`vertical`;if(!t){if(c.current?.opacity===0)return;let e=n?{top:c.current?.top??0,height:c.current?.height??0,opacity:0}:{left:c.current?.left??0,width:c.current?.width??0,opacity:0};a(e),c.current=e;return}if(n){let e=t.offsetTop,n=t.offsetHeight,r=c.current;if(r?.top===e&&r.height===n&&r.opacity===1)return;let i={top:e,height:n,opacity:1};a(i),c.current=i;return}let r=t.offsetLeft,i=t.offsetWidth,l=c.current;if(l?.left===r&&l.width===i&&l.opacity===1)return;let u={left:r,width:i,opacity:1};a(u),c.current=u},[e]),g=A(()=>{l.current===null&&(l.current=DD(()=>{l.current=null,h()}))},[h]),_=A(()=>{l.current?.(),l.current=null,h()},[h]);return M(()=>{window.addEventListener(`resize`,g,{passive:!0});let t=e.current.filter(Boolean),r=new MutationObserver(g),i=new ResizeObserver(_),a=e=>{s.current&&=(clearTimeout(s.current),null),o.current=e.currentTarget,g()},c=()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=null,g()},AD)};for(let e of t)r.observe(e,{attributes:!0,attributeFilter:kD}),i.observe(e),n&&(e.addEventListener(`mouseenter`,a,{passive:!0}),e.addEventListener(`mouseleave`,c,{passive:!0}));return()=>{if(l.current?.(),l.current=null,s.current&&=(clearTimeout(s.current),null),window.removeEventListener(`resize`,g),r.disconnect(),i.disconnect(),n)for(let e of t)e.removeEventListener(`mouseenter`,a),e.removeEventListener(`mouseleave`,c)}},[e,m,n,r,g,_]),{choiceIndicatorPosition:i,calculatePosition:h,scheduleMeasurement:g,orientation:r}};S();var MD=({choices:e=[],value:t,defaultValue:n,onChange:r,hoverable:i=!0,disabled:a=!1},o)=>{let[s,c]=d(t??n??e[0].value),[l,f]=d(null),p=u([]),m=u(null),{choiceIndicatorPosition:h}=jD(p,{selector:e=>e?.getAttribute(`data-indicator`)===`true`,isHoverable:!1,orientation:o}),g=e.findIndex(e=>e.value===s),_=i&&l!==null?l:g;return M(()=>{t!==void 0&&c(t)},[t]),{valueState:s,hoveredIndex:l,setHoveredIndex:f,optionsRefs:p,indicatorRef:m,choiceIndicatorPosition:h,selectedIndex:g,indicatorIndex:_,handleChange:e=>{c(e),r?.(e)},disabled:a}};S();var ND=[{content:`Off`,value:!1},{content:`On`,value:!0}],PD=Kc(`p-0.38 flex h-fit w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px]`,{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}}),FD=Kc(`z-1 flex-1 cursor-pointer text-sm font-medium whitespace-nowrap 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`}}),ID=Kc(`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`}}}),LD=e=>{let{choices:t=ND,color:n=`text`,size:r=`md`,className:a,itemClassName:o}=e,{selectedIndex:s,indicatorIndex:c,handleChange:l,optionsRefs:u,indicatorRef:d,choiceIndicatorPosition:f,setHoveredIndex:p,disabled:m}=MD({choices:t,value:e.value,defaultValue:e.defaultValue,onChange:e.onChange,hoverable:e.hoverable,disabled:e.disabled},`horizontal`);return I(`div`,{className:PD({color:n,disabled:m,className:a}),role:`tablist`,"aria-disabled":m?`true`:void 0,children:I(`div`,{className:`relative flex size-full flex-row items-center justify-center`,children:[t.map((e,t)=>{let{content:n,value:a,...d}=e,f=typeof a==`string`||typeof a==`number`,h=t===s,g=t===c;return i(`button`,{...d,type:`button`,className:G(FD({size:r}),m&&`cursor-not-allowed`,o),key:f?a:t,role:`tab`,onClick:()=>l(a),"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&&I(`div`,{className:G(ID({color:n})),style:f,ref:d})]})})},RD=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Yi(n,e,yE());if(a!==void 0&&typeof a!=`boolean`)return I(b,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=a??t;return I(`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:I(LD,{value:s,onChange:t=>r({keyPath:e,newValue:String(t)})})})};S();var zD=e=>{let{keyPath:t,section:n}=e;return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[Hr]).map(r=>{let a={type:Hr,key:r},o=[...t,a],s=n[Hr][r];return I(b,{children:[I(`span`,{className:`flex items-center font-bold`,children:r}),i(lO,{...e,key:r,keyPath:o,section:s})]})})})};S();var BD=e=>{let{keyPath:t,section:n}=e;return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[Br]).map(r=>{let a={type:Br,key:r},o=[...t,a],s=n[Br][r];return I(b,{children:[I(`span`,{className:`flex items-center font-bold`,children:r}),i(lO,{...e,key:r,keyPath:o,section:s})]})})})},VD=(...e)=>e.filter(Boolean).join(` `),HD=Kc(`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 ring-0 outline-none`},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`}}),UD=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>I(`input`,{className:VD(HD({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),WD=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>I(`textarea`,{className:G(`resize-none`,HD({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r});S();var GD=24,KD=12,qD=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=u(null);c(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=GD*r+KD;n.height=`${Math.max(Math.min(i,a),36)}px`};return m(()=>{(a.value??a.defaultValue)&&s()},[a.value,a.defaultValue,t,r]),I(WD,{ref:e=>{o.current=e},onChange:e=>{n?.(e),s()},className:G(`overflow-y-auto`,t&&`resize-none`,e),...a})};S();var JD=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=d(!1),l=u(null),f=e=>{e.stopPropagation(),c(!1),n()},p=e=>{e.stopPropagation(),c(!1),t()},m=!e||e===``?`-`:e,h=A(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return M(()=>(s?document.addEventListener(`click`,h):document.removeEventListener(`click`,h),()=>document.removeEventListener(`click`,h)),[h,s]),I(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[I(`div`,{className:G(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,I(Z,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:Ts,onClick:f,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),I(Z,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Vc,onClick:p,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),I(`div`,{className:G(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[I(`span`,{className:`ms-2 flex w-full p-1 text-sm leading-6 whitespace-pre-wrap`,children:m}),I(Z,{label:`Edit`,Icon:hc,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`invisible !text-current group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})};S();var YD=({onSave:e,onCancel:t,ref:n,...r})=>{let i=u(null);return c(n,()=>i.current),I(JD,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:I(qD,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},XD=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:i,onFocusKeyPath:a,renderSection:o})=>{let s=yE(),c=r??Yi(n,e,s);if(c&&typeof c!=`string`)return I(b,{children:`Error loading section - Edited content Incoherence with the original content format`});let l=e.length,u=String(c??t);return I(`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):I(YD,{"aria-label":`Editable field`,defaultValue:u,onSave:t=>i({keyPath:e,newValue:t}),onCancel:()=>null})})},ZD=e=>{let{keyPath:t,section:n}=e,{addEditedContent:r}=_T(),i=Yi(e.editedContent,t),a=n[Wr],{content:o}=n,s=[...t,{type:Wr}];return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:[I(`span`,{className:`text-sm text-neutral`,children:[a,` `]}),I(XD,{...e,keyPath:s,section:o,editedContentValue:i?.content,onContentChange:i=>{r(e.dictionary.localId,{...n,content:i.newValue},t)}})]})};S();var QD=e=>{let{keyPath:t,section:n}=e,r=n[ni];return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:ni,key:n},a=[...t,i];return I(b,{children:[I(`span`,{className:`flex items-center font-bold`,children:n}),I(lO,{...e,keyPath:a,section:r[n]})]},n)})})},$D=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Qr}],i=n[Qr];return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:I(lO,{...e,keyPath:r,section:i})})},eO=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Ur}],i=n[Ur];return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:I(lO,{...e,keyPath:r,section:i})})},tO=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Zr}],i=n[Zr];return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:I(lO,{...e,keyPath:r,section:i})})};S();var nO=O(e=>{let{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:i}=e;return x(()=>Object.keys(n??{}).filter(e=>!cO.includes(e)),[n]).map(a=>{let o={key:a,type:Gr},s=[...t,o],c=$n(s,r);return I(SD,{level:t.length,title:fr(a),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),i(c?[]:s)},children:I(lO,{...e,keyPath:s,section:n[a]})},a)})});S();var rO=({onSave:e,onCancel:t,ref:n,...r})=>{let i=u(null);return c(n,()=>i.current),I(JD,{value:x(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:I(UD,{ref:i,...r})})},iO=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Yi(n,e,yE());if(a!==void 0&&typeof a!=`number`)return I(b,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=String(a??t);return I(`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:I(rO,{"aria-label":`Editable number field`,type:`number`,defaultValue:s,onSave:t=>r({keyPath:e,newValue:t}),onCancel:()=>null})})};S();var aO=e=>{let{keyPath:t,section:n}=e,r=n[Vr];return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:Vr,key:n},a=[...t,i];return I(b,{children:[I(`span`,{className:`flex items-center font-bold`,children:n}),I(lO,{...e,keyPath:a,section:r[n]})]},n)})})};S();var oO=e=>{let{keyPath:t,section:n}=e,r=n[ri];return I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let a={type:ri,key:n},o=[...t,a];return I(b,{children:[I(`span`,{className:`flex items-center font-bold`,children:n}),i(lO,{...e,key:n,keyPath:o,section:r[n]})]})})})},sO=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:zr,key:r},a=[...t,i],o=n[zr][r];return I(lO,{...e,keyPath:a,section:o})};S();var cO=[`filePath`,`id`,`nodeType`],lO=O(e=>{let t=yE(),n=x(()=>Yi(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=x(()=>na(n),[n]);if(typeof n==`object`)return r===`reactNode`?I(`span`,{className:`text-xs text-neutral`,children:`React node not editable`}):r===`nested`?I(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):I(r===`markdown`?tO:r===`html`?$D:r===`translation`?sO:r===`enumeration`?BD:r===`plural`?aO:r===`gender`?QD:r===`select`?oO:r===`condition`?zD:r===`insertion`?eO:r===`array`?CD:r===`file`?ZD:nO,{...e,section:n});if(typeof n==`string`)return I(XD,{...e,section:n});if(typeof n==`number`)return I(iO,{...e,section:n});if(typeof n==`boolean`)return I(RD,{...e,section:n})});S();var uO=({dictionary:e,...t})=>{let n=yE(),{editedContent:r,addEditedContent:a}=_T(),{focusedContent:o,setFocusedContentKeyPath:s}=xE();return I(`div`,{className:`flex flex-col gap-2`,children:i(lO,{...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=>{a(e.localId,t.newValue,t.keyPath)},onFocusKeyPath:s})})},dO={key:`navigation-view`,content:{nodeType:`translation`,translation:{en:{addNewElement:{label:`Click to add element`,text:`Add new element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},addNewSelectCase:{label:`Click to add a select case`,text:`Add new case`},goToField:{label:`Go to field`},removeElement:{label:`Click to remove element`,text:`Remove element`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`},removeSelectCase:{label:`Click to remove the select case`,text:`Remove case`},tsxNotEditable:`React node is not editable`},"en-GB":{addNewElement:{label:`Click to add element`,text:`Add new element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},addNewSelectCase:{label:`Click to add a select case`,text:`Add new case`},goToField:{label:`Go to field`},removeElement:{label:`Click to remove element`,text:`Remove element`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`},removeSelectCase:{label:`Click to remove the select case`,text:`Remove case`},tsxNotEditable:`React node is not editable`},fr:{addNewElement:{label:`Cliquez pour ajouter un élément`,text:`Ajouter un nouvel é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`},goToField:{label:`Aller au champ`},removeElement:{label:`Cliquez pour supprimer un élément`,text:`Supprimer l’élément`},removeEnumeration:{label:`Cliquez pour supprimer une énumération`,text:`Supprimer l’énumération`},removeSelectCase:{label:`Cliquez pour supprimer le cas de sélection`,text:`Supprimer le cas`},tsxNotEditable:`Node React non éditable`},es:{addNewElement:{label:`Haga clic para agregar un elemento`,text:`Agregar nuevo 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`},goToField:{label:`Ir al campo`},removeElement:{label:`Haga clic para eliminar un elemento`,text:`Eliminar elemento`},removeEnumeration:{label:`Haga clic para eliminar una enumeración`,text:`Eliminar enumeración`},removeSelectCase:{label:`Haga clic para eliminar el caso de selección`,text:`Eliminar caso`},tsxNotEditable:`Nodo React no editable`},de:{addNewElement:{label:`Klicken Sie, um ein Element hinzuzufügen`,text:`Neues Element hinzufügen`},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`},goToField:{label:`Zum Feld gehen`},removeElement:{label:`Klicken Sie, um ein Element zu entfernen`,text:`Element entfernen`},removeEnumeration:{label:`Klicken Sie, um eine Aufzählung zu entfernen`,text:`Aufzählung entfernen`},removeSelectCase:{label:`Klicken Sie, um den Auswahlfall zu entfernen`,text:`Fall entfernen`},tsxNotEditable:`React-Knoten ist nicht bearbeitbar`},ja:{addNewElement:{label:`要素を追加するにはクリック`,text:`新しい要素を追加`},addNewEnumeration:{label:`列挙を追加するにはクリック`,text:`新しい列挙を追加`},addNewSelectCase:{label:`選択ケースを追加するにはクリック`,text:`新しいケースを追加`},goToField:{label:`フィールドに移動`},removeElement:{label:`要素を削除するにはクリック`,text:`要素を削除`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`},removeSelectCase:{label:`選択ケースを削除するにはクリック`,text:`ケースを削除`},tsxNotEditable:`編集できないReactノードです`},ko:{addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},addNewSelectCase:{label:`선택 케이스를 추가하려면 클릭하세요`,text:`새 케이스 추가`},goToField:{label:`필드로 이동`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`},removeSelectCase:{label:`선택 케이스를 제거하려면 클릭하세요`,text:`케이스 제거`},tsxNotEditable:`편집할 수 없는 React 노드입니다`},zh:{addNewElement:{label:`点击添加元素`,text:`添加新元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},addNewSelectCase:{label:`点击添加选择分支`,text:`添加新分支`},goToField:{label:`转到字段`},removeElement:{label:`点击删除元素`,text:`删除元素`},removeEnumeration:{label:`点击删除枚举`,text:`删除枚举`},removeSelectCase:{label:`点击删除选择分支`,text:`删除分支`},tsxNotEditable:`不可编辑的 React 节点`},it:{addNewElement:{label:`Clicca per aggiungere un elemento`,text:`Aggiungi nuovo 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`},goToField:{label:`Vai al campo`},removeElement:{label:`Clicca per rimuovere un elemento`,text:`Rimuovi elemento`},removeEnumeration:{label:`Clicca per rimuovere un'enumerazione`,text:`Rimuovi enumerazione`},removeSelectCase:{label:`Clicca per rimuovere il caso di selezione`,text:`Rimuovi caso`},tsxNotEditable:`Node React non modificabile`},pt:{addNewElement:{label:`Clique para adicionar um elemento`,text:`Adicionar novo 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`},goToField:{label:`Ir para o campo`},removeElement:{label:`Clique para remover um elemento`,text:`Remover elemento`},removeEnumeration:{label:`Clique para remover uma enumeração`,text:`Remover enumeração`},removeSelectCase:{label:`Clique para remover o caso de seleção`,text:`Remover caso`},tsxNotEditable:`Nó React não editável`},hi:{addNewElement:{label:`तत्व जोड़ने के लिए क्लिक करें`,text:`नया तत्व जोड़ें`},addNewEnumeration:{label:`सूची जोड़ने के लिए क्लिक करें`,text:`नया सूची जोड़ें`},addNewSelectCase:{label:`चयन केस जोड़ने के लिए क्लिक करें`,text:`नया केस जोड़ें`},goToField:{label:`फ़ील्ड पर जाएं`},removeElement:{label:`तत्व निकालने के लिए क्लिक करें`,text:`तत्व निकालें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`},removeSelectCase:{label:`चयन केस निकालने के लिए क्लिक करें`,text:`केस निकालें`},tsxNotEditable:`सम्पादित न करने योग्य React नोड`},ar:{addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},addNewSelectCase:{label:`انقر لإضافة حالة تحديد`,text:`أضف حالة جديدة`},goToField:{label:`اذهب إلى الحقل`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`},removeSelectCase:{label:`انقر لإزالة حالة التحديد`,text:`إزالة الحالة`},tsxNotEditable:`عقدة React غير قابلة للتحرير`},ru:{addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},addNewSelectCase:{label:`Нажмите, чтобы добавить вариант выбора`,text:`Добавить новый вариант`},goToField:{label:`Перейти к полю`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`},removeSelectCase:{label:`Нажмите, чтобы удалить вариант выбора`,text:`Удалить вариант`},tsxNotEditable:`React-узел не редактируемый`}}},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`},fO=Kc(`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! focus:bg-opacity-10! aria-selected:bg-opacity-15! hover:backdrop-blur focus:backdrop-blur 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`}]}),pO=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>I(`div`,{className:G(fO({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});S();var mO=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let[o,s]=d(e),[c,l]=d(0),u=o!==e,f=()=>{s(e),l(e=>e+1)},p=()=>{t(o)},m=e=>{s(e.currentTarget.value)},h=e=>{e.key===`Enter`&&!n&&g?(e.preventDefault(),p()):e.key===`Escape`&&(e.preventDefault(),f())};M(()=>{s(e),l(e=>e+1)},[e]);let g=r?.(o)??!0;return I(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[I(UD,{onChange:m,onKeyDown:h,"aria-label":`Editable input value`,"aria-describedby":u||i?`content-editor-input-actions`:void 0,"aria-invalid":!g,variant:`invisible`,className:`size-full`,defaultValue:e,disabled:n,...a},c),(u||i)&&I(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[u&&I(b,{children:[I(Z,{Icon:Ts,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:`validation-error`}),I(Z,{Icon:Vc,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:f,disabled:n})]}),i]})]},String(e))};S();var hO=`​`,gO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(hO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===hO?``:t.split(hO).join(``)}).join(`
61
- `)},_O=e=>{let t=e.split(`
62
- `);return t.length===0?[``]:t},vO=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null})(),yO=(e,t)=>{if(t<=0)return 0;if(vO){let n=[...vO.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},bO=(e,t)=>{if(t>=e.length)return e.length;if(vO){let n=[...vO.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},xO=(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},SO=(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},CO=(e,t)=>e.slice(0,t).lastIndexOf(`
63
- `)+1,wO=(e,t)=>{let n=e.indexOf(`
64
- `,t);return n===-1?e.length:n},TO=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=d(()=>_O(i)),s=u(null),c=u(null),l=e!==void 0,f=u(a);f.current=a,M(()=>{l&&e!==void 0&&o(_O(e))},[e,l]);let p=()=>f.current.join(`
65
- `),h=()=>{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},g=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`),r=f.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(`
66
- `).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},_=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)}};m(()=>{c.current&&s.current&&(_(c.current),c.current=null)});let v=e=>{let t=f.current,n=0;for(let r=0;r<e.line;r++)n+=(t[r]?.length??0)+1;return n+e.offset},y=(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}},b=()=>{let e=h();return e?v(e):0},x=(e,t)=>{let r=_O(e);c.current=y(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:p,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=h(),t=gO(s.current),i=_O(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=g();if(!t)return;let r=f.current.join(`
67
- `);if(t.hasSelection){let e=r.slice(0,t.start)+r.slice(t.end);x(e,t.start)}else if(n===`deleteContentBackward`){if(t.start===0)return;let e=yO(r,t.start),n=r.slice(0,e)+r.slice(t.start);x(n,e)}else{if(t.start>=r.length)return;let e=bO(r,t.start),n=r.slice(0,t.start)+r.slice(e);x(n,t.start)}}else if(n===`insertReplacementText`){e.preventDefault();let n=g();if(!n)return;let r=f.current.join(`
68
- `),i=t.data??t.dataTransfer?.getData(`text/plain`)??``,a=r.slice(0,n.start)+i+r.slice(n.end);x(a,n.start+i.length)}else if(n===`insertText`&&t.data){e.preventDefault();let n=g();if(!n)return;let r=f.current.join(`
69
- `),i=t.data,a=r.slice(0,n.start)+i+r.slice(n.end);x(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=g();if(!t)return;let n=f.current.join(`
70
- `);if(e.key===`Enter`){e.preventDefault();let r=`${n.slice(0,t.start)}\n${n.slice(t.end)}`;x(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);x(e,t.start)}else{if(t.start===0)return;let r;r=e.metaKey?CO(n,t.start):e.altKey?xO(n,t.start):yO(n,t.start);let i=n.slice(0,r)+n.slice(t.start);x(i,r)}}else if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection){let e=n.slice(0,t.start)+n.slice(t.end);x(e,t.start)}else{if(t.start>=n.length)return;let r;r=e.metaKey?wO(n,t.start):e.altKey?SO(n,t.start):bO(n,t.start);let i=n.slice(0,t.start)+n.slice(r);x(i,t.start)}}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=g();if(!t?.hasSelection)return;let n=f.current.join(`
71
- `),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i);let a=n.slice(0,t.start)+n.slice(t.end);x(a,t.start)},handlePaste:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=e.clipboardData.getData(`text/plain`);if(!t)return;let n=g();if(!n)return;let i=f.current.join(`
72
- `),a=i.slice(0,n.start)+t+i.slice(n.end);x(a,n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:h,setCaretPosition:_,getCursorOffset:b,caretFromFlatOffset:y}},EO=({index:e,text:t,isLast:n,ghostText:r})=>I(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[I(`span`,{"data-editable":!0,children:t||`​`}),r&&I(`span`,{"data-ghost":!0,className:`pointer-events-none text-neutral select-none`,"aria-hidden":`true`,children:r}),!n&&I(`br`,{})]}),DO=24,OO=12,kO=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:l=!1,variant:d,ghostText:f,ghostLine:p,ghostOffset:h,onClick:g,className:_,dir:v=`auto`,ref:y,...b})=>{let{lines:x,containerRef:S,getText:C,handleInput:w,handleBeforeInput:T,handleKeyDown:E,handleCut:D,handlePaste:O,handleDrop:k,handleDragOver:A,getCursorOffset:j,setCaretPosition:M,caretFromFlatOffset:N}=TO({value:e,defaultValue:t,onChange:n,disabled:i}),P=u(null),F=e=>{P.current=e,S.current=e};c(y,()=>({getContainer:()=>P.current,getText:C,focus:()=>P.current?.focus(),getCursorOffset:j,setCursorAtOffset:e=>{M(N(e,x))}})),m(()=>{if(!s||!P.current)return;let e=P.current,t=DO*o+OO,n=DO*a+OO;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`},[x,s,o,a]);let L=x.length===1&&x[0]===``,ee=f&&p!==void 0&&h!==void 0;return I(`div`,{className:`relative w-full`,children:[L&&r&&I(`div`,{className:`pointer-events-none absolute inset-0 px-2 py-3 text-base leading-[1.5rem] text-neutral-400 select-none md:py-2 md:text-sm`,"aria-hidden":`true`,children:r}),I(`div`,{...b,ref:F,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":ee?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:v,onInput:w,onBeforeInput:T,onKeyDown:E,onCut:D,onPaste:O,onDrop:k,onDragOver:A,onClick:g,className:G(`resize-none wrap-break-word whitespace-pre-wrap outline-none`,HD({variant:d,validationStyleEnabled:l?`enabled`:`disabled`}),s&&`overflow-y-auto`,_),children:x.map((e,t)=>I(EO,{index:t,text:e,isLast:t===x.length-1,ghostText:ee&&p===t?f:void 0},t))})]})};S();var AO=({isActive:e=!0,suggestion:t,...n})=>{let r=String(n.value??n.defaultValue??``),[i,a]=d(r),[o,s]=d(``),c=u(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)},f=e?t??(o||void 0):void 0,p=i.split(`
73
- `);return I(kO,{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:f,ghostLine:t?p.length-1:void 0,ghostOffset:t?p[p.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`]})};S();var jO=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let{isAuthenticated:o}=aD(),[s,c]=d(e),[l,u]=d(0),f=s!==e,p=()=>{c(e),u(e=>e+1)},m=()=>{t(s)},h=e=>c(e.currentTarget.value??``),g=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!n&&_?(e.preventDefault(),m()):e.key===`Escape`&&(e.preventDefault(),p())};M(()=>{c(e),u(e=>e+1)},[e]);let _=r?.(s)??!0;return I(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[I(AO,{onChange:h,onKeyDown:g,variant:`invisible`,className:`size-full`,value:e,isActive:o,disabled:n,"aria-label":`Editable textarea content`,"aria-describedby":f||i?`content-editor-textarea-actions`:void 0,"aria-invalid":!_,...a},l),(f||i)&&I(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&I(b,{children:[I(Z,{Icon:Ts,label:`Save changes${_?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:n||!_,onClick:m,"aria-describedby":_?void 0:`textarea-validation-error`}),I(Z,{Icon:Vc,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:p,disabled:n})]}),i]})]},e)},MO=(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},NO=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>I(`label`,{className:G(`text-sm leading-none font-medium select-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&&I(`span`,{className:`ms-1 text-error`,"aria-hidden":`true`,title:`This field is required`,children:`*`})]});S();var PO=new Map,FO=new Map,IO=e=>{try{return localStorage.getItem(e)}catch{return null}},LO=(e,t)=>{try{t===null?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}},RO=e=>{let t=PO.has(e)?PO.get(e):IO(e);return t===`undefined`?null:t},zO=e=>{for(let t of FO.get(e)??[])t()},BO=(e,t)=>{PO.set(e,t),LO(e,t),zO(e)},VO=e=>{let t=e.key===null?[...FO.keys()]:[e.key];for(let e of t)PO.delete(e),zO(e)},HO=(e,t)=>{FO.size===0&&window.addEventListener(`storage`,VO);let n=FO.get(e)??new Set;return n.add(t),FO.set(e,n),()=>{n.delete(t),n.size===0&&FO.delete(e),FO.size===0&&window.removeEventListener(`storage`,VO)}},UO=(e,t)=>{if(e===null)return t;try{return JSON.parse(e)}catch(e){return console.error(e),t}},WO=(e,t)=>{let[n]=d(t),r=A(t=>HO(e,t),[e]),i=h(r,()=>RO(e),()=>null),a=x(()=>UO(i,n),[i,n]),o=A(t=>{let r=typeof t==`function`?t(UO(RO(e),n)):t;r!==void 0&&BO(e,JSON.stringify(r))},[e,n]),s=A(()=>{PO.delete(e),zO(e)},[e]),c=A(()=>BO(e,null),[e]);return x(()=>[a,o,s,c],[a,o,s,c])},GO=(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)};S();var KO=s({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),qO=()=>t(KO),JO=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{let{locale:r}=oa(),[i,a]=WO(`locale-content-selector-selected-locales`,t??[r]),o=x(()=>GO(i,e,t,r),[i,e,t,r]);return M(()=>{e.length&&JSON.stringify(o)!==JSON.stringify(i)&&a(o)},[e,o,i,a]),I(KO,{value:x(()=>({availableLocales:e,selectedLocales:o,setSelectedLocales:a}),[e,o,a]),children:n})},YO=(e,t,n)=>{if(!t||e.length===0)return-1;let r=t.charAt(0),i=[...t].every(e=>e===r),a=(i?r:t).toLowerCase(),o=i||n<0?1:0;for(let t=0;t<e.length;t++){let r=(Math.max(n,-1)+o+t+e.length)%e.length;if(e[r]?.toLowerCase().startsWith(a))return r}return-1};S();var XO=384,ZO=8,QO=1e3,$O=16,ek=50,tk=`[role="option"]:not([data-disabled])`,nk=()=>{let e=new Map,t=new Set,n=()=>{for(let e of t)e()};return{get:t=>e.get(t),entries:()=>[...e.entries()],set:(t,r)=>{e.set(t,r),n()},delete:(t,r)=>{e.get(t)===r&&(e.delete(t),n())},subscribe:e=>(t.add(e),()=>{t.delete(e)})}},rk=s(null),ik=()=>{let e=t(rk);if(!e)throw Error(`Select parts must be rendered inside <Select>`);return e},ak=()=>{let e=u(``),t=u(void 0);return M(()=>()=>clearTimeout(t.current),[]),{hasSearch:()=>e.current.length>0,append:n=>(e.current+=n,clearTimeout(t.current),t.current=setTimeout(()=>{e.current=``},QO),e.current)}},ok=e=>e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey,sk=e=>e===void 0||e===``,ck=({children:e,value:t,defaultValue:n,onValueChange:r,open:i,defaultOpen:a=!1,onOpenChange:o,disabled:s=!1,name:c,required:l=!1,dir:f})=>{let[p,m]=sa({value:t,defaultValue:n,onChange:e=>{e!==void 0&&r?.(e)}}),[h,g]=sa({value:i,defaultValue:a,onChange:o}),_=u(null),[v]=d(nk),y=j();return I(rk.Provider,{value:{value:p,setValue:m,open:h,setOpen:e=>g(e&&!s),disabled:s,required:l,dir:f,contentId:y,triggerRef:_,itemStore:v},children:[e,c&&I(`input`,{type:`hidden`,name:c,value:p??``})]})},lk=e=>I(`div`,{role:`group`,...e}),uk=({placeholder:e,children:t,style:n,...r})=>{let{value:i,itemStore:a}=ik(),o=h(a.subscribe,()=>sk(i)?void 0:a.get(i)?.label,()=>void 0);return I(`span`,{style:{pointerEvents:`none`,...n},...r,children:t??(sk(i)?e:o)})},dk=({validationStyleEnabled:e=!1,className:t,children:n,ref:r,onClick:i,onKeyDown:a,disabled:o,...s})=>{let c=ik(),l=ak(),u=c.disabled||o;return I(`button`,{ref:is(r,c.triggerRef),type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-autocomplete":`none`,"aria-required":c.required||void 0,dir:c.dir,disabled:u,"data-state":c.open?`open`:`closed`,"data-placeholder":sk(c.value)?``:void 0,suppressHydrationWarning:!0,className:G(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`text-base shadow-none outline-none select-text 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),onClick:e=>{i?.(e),e.defaultPrevented||c.setOpen(!c.open)},onKeyDown:e=>{if(a?.(e),!(e.defaultPrevented||c.open)){if(ok(e)&&(e.key!==` `||l.hasSearch())){let t=c.itemStore.entries().filter(([,e])=>!e.disabled),n=t[YO(t.map(([,e])=>e.textValue),l.append(e.key),t.findIndex(([e])=>e===c.value))]?.[0];n!==void 0&&c.setValue(n)}else[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(e.key)&&(e.preventDefault(),c.setOpen(!0))}},...s,children:[n,I(Fs,{"aria-hidden":!0,className:`size-4 opacity-50`})]})},fk=({direction:e,viewportRef:t})=>{let n=u(void 0),r=()=>clearInterval(n.current);return M(()=>r,[]),I(`div`,{"aria-hidden":!0,className:`flex shrink-0 cursor-default items-center justify-center py-1`,onPointerEnter:()=>{r(),n.current=setInterval(()=>{t.current?.scrollBy({top:e===`up`?-16:$O})},ek)},onPointerLeave:r,children:I(e===`up`?Ns:Ds,{})})},pk=(e,t,n)=>{let r=e.getBoundingClientRect(),i=getComputedStyle(e).direction===`rtl`,a=n.scrollHeight+(t.offsetHeight-n.clientHeight),o=window.innerHeight-r.bottom-ZO,s=r.top-ZO,c=a<=o||o>=s?`bottom`:`top`;return{side:c,style:{"--select-trigger-width":`${r.width}px`,...c===`bottom`?{top:r.bottom}:{bottom:window.innerHeight-r.top},...i?{right:window.innerWidth-r.right}:{left:r.left},maxHeight:Math.min(XO,c===`bottom`?o:s),maxWidth:i?r.right-ZO:window.innerWidth-r.left-ZO}}},mk=e=>{e&&(e.focus({preventScroll:!0}),e.scrollIntoView?.({block:`nearest`}))},hk=({className:e,children:t,style:n,presenceRef:r,onKeyDown:i,...a})=>{let o=ik(),s=ak(),c=u(null),l=u(null),[f,p]=d(null),[h,g]=d({canScrollUp:!1,canScrollDown:!1}),_=()=>[...c.current?.querySelectorAll(tk)??[]],v=()=>{let e=l.current;if(!e)return;let t=e.scrollTop>0,n=Math.ceil(e.scrollTop+e.clientHeight)<e.scrollHeight;g(e=>e.canScrollUp===t&&e.canScrollDown===n?e:{canScrollUp:t,canScrollDown:n})},y=()=>{let e=o.triggerRef.current,t=c.current,n=l.current;e&&t&&n&&p(pk(e,t,n))};m(y,[]),m(()=>{if(!f||!o.open)return;let e=_();mk(e.find(e=>e.dataset.state===`checked`)??e[0]),v()},[f===null]);let b=()=>{let e=document.activeElement;(!e||e===document.body||c.current?.contains(e))&&o.triggerRef.current?.focus({preventScroll:!0})};M(()=>{o.open||b()},[o.open]),M(()=>b,[]),M(()=>{if(!o.open)return;let e=null,t=()=>o.setOpen(!1),n=e=>{let n=e.target;c.current?.contains(n)||o.triggerRef.current?.contains(n)||t()},r=t=>{t.target!==l.current&&(e??=DD(()=>{e=null,y()}))};return document.addEventListener(`pointerdown`,n,!0),window.addEventListener(`scroll`,r,{capture:!0,passive:!0}),window.addEventListener(`resize`,t),window.addEventListener(`blur`,t),()=>{e?.(),document.removeEventListener(`pointerdown`,n,!0),window.removeEventListener(`scroll`,r,!0),window.removeEventListener(`resize`,t),window.removeEventListener(`blur`,t)}},[o.open]);let x=e=>{if(i?.(e),e.defaultPrevented)return;let t=_(),n=t.indexOf(document.activeElement),r=e.key===` `&&s.hasSearch();if(ok(e)&&(e.key!==` `||r)){let r=YO(t.map(e=>e.textContent??``),s.append(e.key),n);r!==-1&&mk(t[r]);return}let a=t.length-1,c={ArrowDown:Math.min(n+1,a),ArrowUp:n===-1?a:Math.max(n-1,0),Home:0,End:a,PageDown:a,PageUp:0}[e.key];c===void 0?e.key===`Enter`||e.key===` `?(e.preventDefault(),t[n]?.click()):e.key===`Escape`?(e.preventDefault(),o.setOpen(!1)):e.key===`Tab`&&e.preventDefault():(e.preventDefault(),mk(t[c]))};return I(`div`,{ref:is(c,r),id:o.contentId,role:`listbox`,tabIndex:-1,dir:o.dir,"data-state":o.open?`open`:`closed`,"data-side":f?.side,className:G(`fixed z-50 flex min-w-32 flex-col 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=top]:slide-in-from-bottom-2`,`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,!f&&`invisible`,e),style:{...f?.style,...n},onKeyDown:x,...a,children:[h.canScrollUp&&I(fk,{direction:`up`,viewportRef:l}),I(`div`,{ref:l,className:`min-h-0 w-full min-w-(--select-trigger-width) flex-1 [scrollbar-width:none] overflow-y-auto p-1 [&::-webkit-scrollbar]:hidden`,onScroll:v,children:t}),h.canScrollDown&&I(fk,{direction:`down`,viewportRef:l})]})},gk=s(!1),_k=({children:e,...t})=>{let{open:n}=ik(),{isMounted:r,ref:i}=la(n),[a,o]=d(null);return m(()=>{o(document.createDocumentFragment())},[]),r?D(I(hk,{presenceRef:i,...t,children:e}),document.body):a?D(I(gk.Provider,{value:!0,children:I(`div`,{children:e})}),a):null},vk=({className:e,...t})=>I(`div`,{className:G(`px-1 py-0.5 text-sm font-semibold`,e),...t}),yk=({value:e,disabled:n=!1,textValue:r,className:i,children:a,onClick:o,onPointerMove:s,onPointerLeave:c,...l})=>{let d=ik(),f=t(gk),p=u(null),h=d.value===e;return m(()=>{let t={label:a,textValue:r??p.current?.textContent??``,disabled:n};return d.itemStore.set(e,t),()=>d.itemStore.delete(e,t)},[e,a,r,n]),f?I(`span`,{ref:p,children:a}):I(`div`,{role:`option`,"aria-selected":h,"aria-disabled":n||void 0,tabIndex:n?void 0:-1,"data-state":h?`checked`:`unchecked`,"data-disabled":n?``:void 0,className:G(`relative flex w-full cursor-pointer items-center rounded-lg py-1.5 ps-2 pe-8 text-sm outline-hidden select-none focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,i),onClick:t=>{o?.(t),t.defaultPrevented||n||(d.setValue(e),d.setOpen(!1))},onPointerMove:e=>{s?.(e),n||e.pointerType!==`mouse`||document.activeElement!==e.currentTarget&&e.currentTarget.focus({preventScroll:!0})},onPointerLeave:e=>{c?.(e),document.activeElement===e.currentTarget&&e.currentTarget.closest(`[role="listbox"]`)?.focus({preventScroll:!0})},...l,children:[I(`span`,{className:`absolute inset-e-2 flex size-3.5 items-center justify-center`,children:h&&I(Ts,{className:`size-4`})}),I(`span`,{ref:p,children:a})]})},bk=({className:e,...t})=>I(`div`,{"aria-hidden":!0,className:G(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),Q=ck;Q.Group=lk,Q.Value=uk,Q.Trigger=dk,Q.Content=_k,Q.Label=vk,Q.Item=yk,Q.Separator=bk,S();var xk=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}},Sk=({value:e,onChange:t})=>{let{comparator:n,numberValue:r}=x(()=>xk(e),[e]),[i,a]=d(n??null),[o,s]=d(r??null);return M(()=>{i&&o&&(i!==n||o!==r)&&t(`${i}${o}`)},[i,n,r,o,t]),I(`div`,{className:`flex gap-1`,children:[I(Q,{onValueChange:a,defaultValue:n,children:[I(Q.Trigger,{className:`w-20`,children:I(Q.Value,{placeholder:`Select a comparator`})}),I(Q.Content,{children:[I(Q.Item,{value:`<`,children:`<`}),I(Q.Item,{value:`<=`,children:`<=`}),I(Q.Item,{value:`=`,children:`=`}),I(Q.Item,{value:`>=`,children:`>=`}),I(Q.Item,{value:`>`,children:`>`})]})]}),I(UD,{type:`number`,"aria-label":`Quantity`,defaultValue:o??void 0,onChange:e=>s(e.target.value),className:`min-w-4`})]})};S();var Ck=({rawContent:e})=>{let[t,n]=d(``);return M(()=>{kn(async()=>{let{default:e}=await import(`./purify.es-Dzkdzyfv.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?I(`div`,{dangerouslySetInnerHTML:{__html:t}}):I(`div`,{})};S();var wk=_(()=>kn(()=>import(`./MarkDownRender-CshktxqS.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2]))),Tk=_(()=>kn(()=>import(`./MarkdownEditor-BaCiZXdM.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([3,2,4,1]))),Ek=O(function({label:e,...t}){let[n,r]=d(!1);return I(xD,{header:e,label:e,onToggle:e=>{e&&!n&&r(!0)},children:n?I(Gk,{...t}):null})}),Dk=({keyPath:e,dictionary:t,...n})=>{let{editedContent:r,addEditedContent:i}=_T(),a=pT(),{mutate:o,isPending:s}=UE();return I(jO,{variant:`default`,onContentChange:n=>i(t.localId,n,e),additionalButtons:I(Z,{Icon:zc,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})},Ok=({keyPath:e,dictionary:t,...n})=>{let{addEditedContent:r}=_T();return I(mO,{variant:`default`,onContentChange:n=>r(t.localId,n,e),...n})},kk=[{content:`False`,value:!1},{content:`True`,value:!0}],Ak=({dictionary:e,keyPath:t,...n})=>{let{addEditedContent:r}=_T();return I(LD,{choices:kk,value:!0,onChange:n=>r(e.localId,n,t),color:`text`,size:`sm`,...n})},jk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{locale:i,defaultLocale:a}=oa(),{selectedLocales:o}=qO(),s=e[zr];return I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex w-full flex-col gap-2`,children:o.map(e=>{let o=`${JSON.stringify(t)}-translation-${e}`;return I(b,{children:[I(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:I(`td`,{className:`flex w-full`,children:Tr(e,i)})}),I(`tr`,{className:`flex`,children:I(`td`,{className:`flex w-full`,children:I(Kk,{section:s[e]??Zi(s[a]),keyPath:[...t,{type:zr,key:e}],dictionary:n,renderSection:r})})})]},o)})})})},Mk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=_T(),{addNewEnumeration:a,removeEnumeration:o}=V(dO),s=e[Br],c=Object.keys(s)[0];return I(`div`,{className:`flex flex-col gap-2`,children:[I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(e[Br]).map(a=>{let l=[...t,{type:Br,key:a}],u=`${JSON.stringify(t)}-enumeration-${a}`;return I(b,{children:[I(`tr`,{className:`mt-2 w-full`,children:I(`td`,{className:`flex w-full`,children:I(`div`,{className:`flex flex-1`,children:I(Z,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:jc,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),I(`tr`,{className:`w-full p-2`,children:I(`td`,{className:`flex w-full`,children:I(Sk,{value:a,onChange:r=>{let o=e[Br],s=MO(o,a,r),c={...e,[Br]:s};console.log(`newValue`,c),i(n.localId,c,t)}})})}),I(`tr`,{className:`block w-full`,children:I(`td`,{className:`flex w-full`,children:I(Gk,{section:s[a]??Zi(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),I(Z,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Zi(s[c])??``,[...t,{type:Br,key:`unknown`}]),Icon:_c,className:`m-2`,children:a.text})]})},Nk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=_T(),{addNewSelectCase:a,removeSelectCase:o}=V(dO),s=e[ri],c=Object.keys(s)[0]??``;return I(`div`,{className:`flex flex-col gap-2`,children:[I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(s).map(a=>{let l=[...t,{type:ri,key:a}],u=`${JSON.stringify(t)}-select-${a}`;return I(b,{children:[I(`tr`,{className:`mt-2 w-full`,children:I(`td`,{className:`flex w-full`,children:I(`div`,{className:`flex flex-1`,children:I(Z,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:jc,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),I(`tr`,{className:`w-full p-2`,children:I(`td`,{className:`flex w-full`,children:I(mO,{"aria-label":`Edit case`,type:`text`,variant:`default`,onContentChange:r=>{let o={...e,[ri]:MO(s,a,String(r))};i(n.localId,o,t)},children:a})})}),I(`tr`,{className:`block w-full`,children:I(`td`,{className:`flex w-full`,children:I(Gk,{section:s[a]??Zi(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),I(Z,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Zi(s[c])??``,[...t,{type:ri,key:`newCase`}]),Icon:_c,className:`m-2`,children:a.text})]})},Pk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Hr];return I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return I(b,{children:[I(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:I(`td`,{className:`flex w-full`,children:String(e)})}),I(`tr`,{className:`block w-full`,children:I(`td`,{className:`flex w-full`,children:I(Kk,{section:i[e]??Zi(i.true),keyPath:[...t,{type:Hr,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},Fk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[ni];return I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return I(b,{children:[I(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:I(`td`,{className:`flex w-full`,children:String(e)})}),I(`tr`,{className:`block w-full`,children:I(`td`,{className:`flex w-full`,children:I(Kk,{section:i[e]??Zi(i.male),keyPath:[...t,{type:ni,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},Ik=[`zero`,`one`,`two`,`few`,`many`,`other`],Lk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Vr];return I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex w-full flex-col gap-2`,children:Ik.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return I(b,{children:[I(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:I(`td`,{className:`flex w-full`,children:e})}),I(`tr`,{className:`block w-full`,children:I(`td`,{className:`flex w-full`,children:I(Kk,{section:i[e]??Zi(i.other),keyPath:[...t,{type:Vr,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},Rk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=_T(),{addNewElement:a,removeElement:o}=V(dO);return I(`div`,{className:`flex flex-col gap-2`,children:[I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex w-full flex-col gap-2`,children:e.map((a,s)=>{let c=`${JSON.stringify(t)}-array-${s}`;return I(b,{children:[I(`tr`,{className:`mt-2 w-full p-2`,children:I(`td`,{className:`flex w-full`,children:I(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[I(`span`,{className:`text-xs`,children:String(s)}),I(Z,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,onClick:()=>{let e=[...t,{type:Kr,key:s}];i(n.localId,void 0,e)},Icon:jc,children:o.text})]})})}),I(`tr`,{className:`block w-full`,children:I(`td`,{className:`flex w-full`,children:I(Kk,{section:a??Zi(e[0]),keyPath:[...t,{type:Kr,key:s}],dictionary:n,renderSection:r})})})]},c)})})}),I(Z,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>{let r=[...t,{type:Kr,key:e.length}];i(n.localId,Zi(e[0])??``,r,!1)},Icon:_c,children:a.text})]})},zk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return I(`table`,{className:`w-full`,children:I(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:Gr,key:e}],s=i[e]??Zi(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?I(b,{children:[I(`tr`,{className:`mt-2 p-2 text-xs`,children:I(`td`,{className:`flex w-full`,children:String(e)})}),I(`tr`,{className:`block w-full`,children:I(`td`,{className:`flex w-full`,children:I(Gk,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):I(`tr`,{className:`block w-full border-t border-neutral/10 py-1`,children:I(`td`,{className:`flex w-full`,children:I(Ek,{label:fr(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},Bk=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=d(0),a=[{content:`Edit`,value:0},{content:`Preview`,value:1}],o=[...t,{type:Qr}],s=e[Qr];return I(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[I(LD,{choices:a,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),I(Kk,{section:s,keyPath:o,dictionary:n,renderSection:r===1?e=>I(Ck,{rawContent:e}):void 0})]})},Vk=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=d(0),{addEditedContent:a}=_T(),o=[{content:`Edit`,value:0},{content:`Raw`,value:1},{content:`Preview`,value:2}],s=[...t,{type:Zr}],c=e.markdown??``;return I(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[I(LD,{choices:o,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),I(Kk,{section:c,keyPath:s,dictionary:n,renderSection:r===0?(e,t)=>I(T,{fallback:I(_D,{}),children:I(Tk,{defaultValue:e,onChange:e=>a(n.localId,e,t)},JSON.stringify(t))}):r===2?e=>I(T,{fallback:I(_D,{}),children:I(wk,{children:e})}):void 0})]})},Hk=({section:e,keyPath:t,...n})=>{let r=[...t,{type:Ur}],i=e[Ur];return I(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:I(Kk,{section:i,keyPath:r,...n})})},Uk=({section:e,keyPath:t,...n})=>{let r=[...t,{type:Wr}],i=e[Wr],{content:a}=e;return I(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[I(`span`,{className:`text-sm text-neutral`,children:[i,` `]}),I(Kk,{section:a,keyPath:r,...n})]})},Wk=({keyPath:e,dictionary:t,renderSection:n,section:r,...i})=>{let{addEditedContent:a}=_T(),o=r[qr],s=[...e,{type:qr}];return I(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[I(NO,{children:`Dictionary key`}),I(mO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,dictionaryKey:String(e)},s)},children:o.dictionaryKey??``}),I(NO,{children:`Path (optional)`}),I(mO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,path:e===``?void 0:e},s)},children:o.path??``})]})},Gk=O(function({section:e,keyPath:t,dictionary:n,renderSection:r}){let{tsxNotEditable:i}=V(dO),a=na(e);return a===`reactNode`?I(`div`,{className:`flex w-full flex-col gap-2`,children:[I(`span`,{children:`(React Node)`}),I(`span`,{className:`flex text-xs text-muted-foreground`,children:i})]}):a===`nested`?I(Wk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`translation`?I(jk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`enumeration`?I(Mk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`condition`?I(Pk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`select`?I(Nk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`gender`?I(Fk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`plural`?I(Lk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`insertion`?I(Hk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`markdown`?I(Vk,{dictionary:n,keyPath:t,section:e}):a===`html`?I(Bk,{dictionary:n,keyPath:t,section:e}):a===`file`?I(Uk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`array`?I(Rk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`object`?I(zk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`number`?I(`div`,{className:`w-full p-2`,children:I(Ok,{dictionary:n,keyPath:t,type:`number`,"aria-label":`Edit field`,children:e})}):a===`text`?I(`div`,{className:`w-full p-2`,children:typeof r==`function`?r(e,t):I(Dk,{variant:`default`,"aria-label":`Edit field`,keyPath:t,dictionary:n,children:e})}):a===`boolean`?I(`div`,{className:`w-full p-2`,children:I(Ak,{dictionary:n,keyPath:t,value:e})}):I(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(e,null,2),JSON.stringify(t,null,2),`NodeType : `,a]})}),Kk=O(function(e){return I(pO,{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:I(Gk,{...e})})}),qk=[Br,Vr,Hr,ni,ri],Jk=[Zr,Qr,Ur],Yk=[Jr,Yr,Xr,ai],Xk=[`zero`,`one`,`two`,`few`,`many`,`other`],Zk=/^[A-Za-z_$][\w$-]*$/,Qk=(e,t)=>{let n=Zk.test(t)?t:`[${JSON.stringify(t)}]`;return e===``?n:n.startsWith(`[`)?`${e}${n}`:`${e}.${n}`},$k=(e,t)=>`${e}[${t}]`,eA=e=>e[e.nodeType],tA=(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=na(e),l=[...r.typeChain,i];if(i===`translation`&&r.cellKey===`*`){let i=eA(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?Zi(a):t,{...r,cellKey:e,keyPath:[...r.keyPath,{type:zr,key:e}],typeChain:l,isLocalized:!0,isMissing:r.isMissing||n})}c(r,e)}else if(Jk.includes(i)){let t=eA(e),n={...r,keyPath:[...r.keyPath,{type:i}],wrappers:[...r.wrappers,i],typeChain:l};typeof t==`string`||t==null?a(n,t??``,`leaf`,l,nA($r,n.wrappers)):s(t,n),c(r,e)}else if(qk.includes(i)){let t=a(r,e,`group`,l),n=Object.entries(eA(e)??{});for(let[e,a]of n)s(a,o(r,t,Qk(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,$k(r.path,n),`[${n}]`,{type:Kr,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=Qk(r.path,t),a={type:Gr,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`:nA(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=rA(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)=>Xk.indexOf(r.get(e)?.label??``)-Xk.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},nA=(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`:Yk.includes(e)?`readonly`:`text`,rA=(e,t)=>{let n=[],r=e;for(let e=0;e<8;e++){let e=na(r);if(n.push(e),e===`translation`){let e=eA(r)??{};r=e[t]??Object.values(e)[0]}else if(Jk.includes(e))r=eA(r);else break}return n},iA=(e,t)=>`${e}::${t}`,aA=e=>na(e)===Zr,oA={key:`change-set`,content:{nodeType:`translation`,translation:{en:{added:`added`,allLocales:`all locales`,changed:`changed`,emptyList:`No unsaved changes`,emptyValue:`(empty)`,removed:`removed`,revertButton:{label:`Restore the saved value of this field`,text:`Revert`},title:`Unsaved changes`},"en-GB":{added:`added`,allLocales:`all locales`,changed:`changed`,emptyList:`No unsaved changes`,emptyValue:`(empty)`,removed:`removed`,revertButton:{label:`Restore the saved value of this field`,text:`Revert`},title:`Unsaved changes`},fr:{added:`ajouté`,allLocales:`toutes les langues`,changed:`modifié`,emptyList:`Aucune modification non enregistrée`,emptyValue:`(vide)`,removed:`supprimé`,revertButton:{label:`Restaurer la valeur enregistrée de ce champ`,text:`Rétablir`},title:`Modifications non enregistrées`},es:{added:`añadido`,allLocales:`todos los idiomas`,changed:`modificado`,emptyList:`No hay cambios sin guardar`,emptyValue:`(vacío)`,removed:`eliminado`,revertButton:{label:`Restaurar el valor guardado de este campo`,text:`Revertir`},title:`Cambios sin guardar`},de:{added:`hinzugefügt`,allLocales:`alle Sprachen`,changed:`geändert`,emptyList:`Keine ungespeicherten Änderungen`,emptyValue:`(leer)`,removed:`entfernt`,revertButton:{label:`Gespeicherten Wert dieses Felds wiederherstellen`,text:`Zurücksetzen`},title:`Nicht gespeicherte Änderungen`},ja:{added:`追加`,allLocales:`すべてのロケール`,changed:`変更`,emptyList:`未保存の変更はありません`,emptyValue:`(空)`,removed:`削除`,revertButton:{label:`このフィールドの保存済みの値に戻す`,text:`元に戻す`},title:`未保存の変更`},ko:{added:`추가됨`,allLocales:`모든 로케일`,changed:`변경됨`,emptyList:`저장되지 않은 변경 사항 없음`,emptyValue:`(비어 있음)`,removed:`삭제됨`,revertButton:{label:`이 필드의 저장된 값 복원`,text:`되돌리기`},title:`저장되지 않은 변경 사항`},zh:{added:`已添加`,allLocales:`所有语言`,changed:`已更改`,emptyList:`没有未保存的更改`,emptyValue:`(空)`,removed:`已删除`,revertButton:{label:`恢复此字段的已保存值`,text:`还原`},title:`未保存的更改`},it:{added:`aggiunto`,allLocales:`tutte le lingue`,changed:`modificato`,emptyList:`Nessuna modifica non salvata`,emptyValue:`(vuoto)`,removed:`rimosso`,revertButton:{label:`Ripristina il valore salvato di questo campo`,text:`Ripristina`},title:`Modifiche non salvate`},pt:{added:`adicionado`,allLocales:`todos os idiomas`,changed:`alterado`,emptyList:`Nenhuma alteração não salva`,emptyValue:`(vazio)`,removed:`removido`,revertButton:{label:`Restaurar o valor salvo deste campo`,text:`Reverter`},title:`Alterações não salvas`},hi:{added:`जोड़ा गया`,allLocales:`सभी भाषाएँ`,changed:`बदला गया`,emptyList:`कोई असहेजा परिवर्तन नहीं`,emptyValue:`(खाली)`,removed:`हटाया गया`,revertButton:{label:`इस फ़ील्ड का सहेजा गया मान पुनर्स्थापित करें`,text:`वापस करें`},title:`असहेजे परिवर्तन`},ar:{added:`مضاف`,allLocales:`كل اللغات`,changed:`معدّل`,emptyList:`لا توجد تغييرات غير محفوظة`,emptyValue:`(فارغ)`,removed:`محذوف`,revertButton:{label:`استعادة القيمة المحفوظة لهذا الحقل`,text:`تراجع`},title:`تغييرات غير محفوظة`},ru:{added:`добавлено`,allLocales:`все языки`,changed:`изменено`,emptyList:`Нет несохранённых изменений`,emptyValue:`(пусто)`,removed:`удалено`,revertButton:{label:`Восстановить сохранённое значение поля`,text:`Откатить`},title:`Несохранённые изменения`}}},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`};S();var sA=s(null),cA=e=>{let n=t(sA)??e;return{triggerId:`unrollable-panel-button-${n}`,panelId:`unrollable-panel-${n}`}},lA=({children:e,className:t,identifier:n,...r})=>{let i=`${n}${j()}`,{triggerId:a}=cA(i);return I(sA,{value:i,children:I(`div`,{className:G(`group/popover relative flex cursor-pointer`,t),id:a,"aria-haspopup":!0,...r,children:e})})},uA=({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}=cA(o);return I(pO,{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-e-[10px] before:border-b-[10px] before:border-s-transparent before:border-e-transparent before:border-b-neutral`,c&&a===`above`&&`before:-bottom-3.5 before:border-s-[10px] before:border-e-[10px] before:border-t-[10px] before:border-s-transparent before:border-e-transparent 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})},dA=({identifier:e,...t})=>{let{panelId:n}=cA(e);return I(`button`,{type:`button`,popoverTarget:n,...t})};lA.Detail=uA,lA.Trigger=dA,S();var fA=8,pA=(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-fA,m=f>=fA,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-fA-o:i.bottom+fA,x=s-a-fA,S=c-o-fA;t.style.left=`${Math.max(fA,Math.min(h,x))}px`,t.style.top=`${Math.max(fA,Math.min(b,S))}px`},mA=({identifier:e,xAlign:t=`start`,yAlign:n=`below`,onOpenChange:r,onBeforeToggle:i,className:a,ref:o,...s})=>{let{triggerId:c,panelId:l}=cA(e),d=u(null),f=e=>{if(d.current=e,typeof o==`function`)return o(e);o&&(o.current=e)};M(()=>{let e=d.current;if(!e)return;let r=()=>{let r=document.getElementById(c);r&&e.matches(`:popover-open`)&&pA(r,e,t,n)},i=null,a=()=>{i||=DD(()=>{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 p=e=>{i?.(e),r?.(e.newState===`open`)};return I(pO,{transparency:`xs`,roundedSize:`md`,role:`group`,"aria-labelledby":c,...s,ref:f,id:l,popover:`auto`,onBeforeToggle:p,className:G(`fixed inset-auto m-0 hidden ring-1 ring-neutral [&:popover-open]:flex`,a)})};S();var hA=16,gA=16,_A=e=>I(lA,{...e}),vA=({xAlign:e=`start`,yAlign:t=`below`,...n})=>{let r=u(null),{triggerId:i}=cA(n.identifier),[a,o]=d(e),[s,c]=d(t),[l,f]=d(void 0);return m(()=>{let n=null,a=null,s=!1,l=()=>{let n=r.current,s=document.getElementById(i);if(!n||!s)return;let l=s.getBoundingClientRect(),u=window.innerWidth,d=window.innerHeight,p=u-l.left-gA,m=l.right-gA;f(Math.max(p,m));let h=n.classList.contains(`invisible`);h&&(n.style.visibility=`hidden`,n.classList.remove(`invisible`)),a=DD(()=>{a=null;let r=n.getBoundingClientRect();h&&(n.style.visibility=``,n.classList.add(`invisible`));let i=t,f=d-l.bottom-hA,p=l.top-hA;t===`below`&&f<r.height?p>=r.height&&(i=`above`):t===`above`&&p<r.height&&f>=r.height&&(i=`below`);let m=e,g=u-l.left-gA,_=l.right-gA,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)})},u=()=>{n||=DD(()=>{n=null,l()})},d=()=>{s||(s=!0,window.addEventListener(`scroll`,u,{passive:!0,capture:!0})),u()},p=()=>{s&&(s=!1,window.removeEventListener(`scroll`,u,!0))},m=document.getElementById(i);m&&(m.addEventListener(`mouseenter`,d,{passive:!0}),m.addEventListener(`focusin`,d,{passive:!0}),m.addEventListener(`mouseleave`,p,{passive:!0}),m.addEventListener(`focusout`,p,{passive:!0}));let h=new ResizeObserver(()=>{s&&u()});return r.current&&h.observe(r.current),window.addEventListener(`resize`,u,{passive:!0}),()=>{n?.(),a?.(),m&&(m.removeEventListener(`mouseenter`,d),m.removeEventListener(`focusin`,d),m.removeEventListener(`mouseleave`,p),m.removeEventListener(`focusout`,p)),h.disconnect(),window.removeEventListener(`resize`,u),window.removeEventListener(`scroll`,u,!0)}},[i,e,t]),I(uA,{...n,xAlign:a,yAlign:s,ref:r,style:{...n.style,maxWidth:l?`${l}px`:void 0}})},yA=_A;yA.Detail=vA,yA.Trigger=dA,yA.Panel=mA;var bA=Kc(`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`}}),xA=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>I(`div`,{className:bA({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e});function SA(e){return typeof e==`object`?e.key:e}function CA(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 wA(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 TA(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var EA=(e,t)=>Math.abs(e-t)<1.01,DA=(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 OA({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 kA=e=>e===`smooth`||e===`smoothFinishing`;function AA({kind:e,offset:t,command:n,target:r}){return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!kA(n.phase)&&!EA(t,n.lastTargetOffset)&&!EA(t,r())&&e!==`clampedEcho`}var jA=40;function MA(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<jA;)n--;if(n<0)return!1;let r=e[n],i=n-1;for(;i>=0&&r.t-e[i].t<jA;)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 NA(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<jA;)n--;if(n<0)return!1;let r=e[n];return Math.abs(t.offset-r.offset)/(t.t-r.t)>=.05}var PA,FA=()=>{if(PA!==void 0)return PA;if(typeof navigator>`u`)return PA=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return PA=!0;let e=navigator.maxTouchPoints;return PA=navigator.platform===`MacIntel`&&e!==void 0&&e>0},IA,LA=()=>IA===void 0?IA=FA()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):IA,RA=()=>!FA()||LA(),zA={capture:!0,passive:!0},BA=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,zA),e.addEventListener(`touchend`,n,zA),e.addEventListener(`touchcancel`,n,zA),()=>{e.removeEventListener(`touchstart`,t,zA),e.removeEventListener(`touchend`,n,zA),e.removeEventListener(`touchcancel`,n,zA),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}},VA=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},HA=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()}}},UA=e=>e,WA=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},GA=(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(VA(n)),!r.ResizeObserver)return()=>{};let a=HA(r),o=new r.ResizeObserver(()=>{let t=()=>{i(VA(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},KA={passive:!0},qA=typeof window>`u`||`onscrollend`in window,JA=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&qA,o=0,s=a?null:DA(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,KA),a&&r.addEventListener(`scrollend`,u,KA),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},YA=(e,t)=>JA(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),XA=(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`]},ZA=(e,{adjustments:t=0,behavior:n},r)=>{var i;let{scrollElement:a,options:o}=r,s=e+t,c=o.horizontal&&o.isRtl&&a!==null&&`ownerDocument`in a;(i=a?.scrollTo)==null||i.call(a,{[o.horizontal?`left`:`top`]:c?-s:s,behavior:n})},QA=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,$A=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function ej(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 tj=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 BA({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`&&NA(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=HA(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:UA,rangeExtractor:WA,onChange:()=>{},measureElement:XA,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=>SA(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||ej(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=wA(()=>(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:AA({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||MA(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()?$A(this.scrollState)&&!EA(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)=>OA({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=QA(t,e.index!=null&&EA(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=()=>!(FA()&&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=wA(()=>[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=wA(()=>[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=CA(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=wA(()=>[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=ij(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=wA(()=>{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(!$A(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`&&!$A(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=!$A(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=wA(()=>[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 TA(t[nj(0,t.length-1,r?e=>n[e*2]:e=>TA(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.getMeasurements()[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!(FA()&&this._iosGesture.dragging())&&e!==null&&!EA(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&&EA(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=$A(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`&&RA()){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:QA(n,e.index!=null&&EA(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},nj=(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 rj(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 ij(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=rj(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=nj(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}}S();var aj=typeof document<`u`?m:M;function oj({useFlushSync:t=!0,directDomUpdates:n=!1,directDomUpdatesMode:r=`transform`,...i}){let a=e(e=>e+1,0)[1],o=u({enabled:n,mode:r,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=n,o.current.mode=r;let s=u(!1),c=e=>{let t=o.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`}},l=(e,t,n)=>{let r=o.current,i=!!e.options.horizontal,a=t.start-e.options.scrollMargin;r.lastPositions.get(n)!==a&&(r.lastPositions.set(n,a),r.mode===`transform`?n.style.transform=i?`translate3d(${a}px, 0, 0)`:`translate3d(0, ${a}px, 0)`:n.style[i?`left`:`top`]=`${a}px`)},f=e=>{let t=o.current;if(t.enabled&&t.container){c(e);for(let t of e.getVirtualItems()){let n=e.elementsCache.get(t.key);n&&l(e,t,n)}}},p={...i,onChange:(e,n)=>{var r;let c=o.current,l=!0;if(c.enabled){f(e);let t=e.range,n=c.prevRange;l=!n||n.isScrolling!==e.isScrolling||n.startIndex!==t?.startIndex||n.endIndex!==t?.endIndex,l&&(c.prevRange=t?{startIndex:t.startIndex,endIndex:t.endIndex,isScrolling:e.isScrolling}:null)}l&&(t&&n&&!s.current?k(a):a()),(r=i.onChange)==null||r.call(i,e,n)}},[m]=d(()=>{let e=new tj(p),t=e.measureElement;return e.measureElement=n=>{s.current=!0;try{t(n)}finally{s.current=!1}let r=o.current;if(n!==null&&r.enabled&&r.container){let t=e.measurementsCache[e.indexFromElement(n)];t&&l(e,t,n)}},Object.assign(e,{containerRef:t=>{let n=o.current;n.container=t,n.lastSize=null,t!==null&&f(e)}})});return m.setOptions(p),aj(()=>m._didMount(),[]),aj(()=>(c(m),m._willUpdate())),aj(()=>{f(m)}),m}function sj(e){return oj({observeElementRect:GA,observeElementOffset:YA,scrollToFn:ZA,...e})}S();var cj=6,lj=({items:e,itemHeight:t,getItemKey:n,renderItem:r,overscan:i=cj,className:a})=>{let o=u(null),s=sj({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 I(`div`,{ref:o,className:G(`min-h-0 overflow-y-auto`,a),children:I(`ul`,{className:`relative w-full`,style:{height:s.getTotalSize()},children:s.getVirtualItems().map(n=>{let i=e[n.index];return i===void 0?null:I(`li`,{className:`absolute inset-x-0 top-0`,style:{height:t,transform:`translateY(${n.start}px)`},children:r(i,n.index)},n.key)})})})};S();var uj=60,dj=52,fj={added:`success`,changed:`warning`,removed:`error`},pj=e=>{if(e==null||e===``)return;let t=(typeof e==`string`?e:JSON.stringify(e)).replace(/\s+/g,` `).trim();return t.length>uj?`${t.slice(0,uj)}…`:t},mj=O(({entry:e,onRevert:t})=>{let n=V(oA),r=pj(e.previousValue),i=pj(e.nextValue);return I(`div`,{className:`flex h-full items-start gap-2 overflow-hidden rounded-lg px-2 py-1.5 hover:bg-text/5`,children:[I(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[I(`div`,{className:`flex min-w-0 items-center gap-2`,children:[I(`span`,{className:`truncate font-mono text-xs`,dir:`ltr`,children:[e.rowId,I(`span`,{className:`text-muted-foreground`,children:[` · `,e.cellKey===`*`?n.allLocales:e.cellKey]})]}),I(xA,{size:`xs`,color:fj[e.kind],className:`ms-auto shrink-0`,children:n[e.kind]})]}),I(`span`,{className:`flex min-w-0 items-center gap-1 text-xs`,children:[I(`span`,{dir:`auto`,className:G(`truncate text-muted-foreground`,r&&`line-through`),children:r??n.emptyValue}),I(`span`,{className:`shrink-0 text-muted-foreground`,children:`→`}),I(`span`,{dir:`auto`,className:`truncate`,children:i??n.emptyValue})]})]}),t&&I(Z,{label:n.revertButton.label.value,Icon:yc,variant:`hoverable`,color:`text`,size:`icon-sm`,onClick:()=>t(e)})]})}),hj=e=>e.cellId,gj=({changeSet:e,onRevert:t,children:n,className:r})=>{let i=V(oA);return I(yA,{identifier:`change-set`,className:r,children:[n,I(yA.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:[I(`div`,{className:`flex items-center justify-between gap-2`,children:[I(`span`,{className:`text-sm font-semibold`,children:i.title}),e.length>0&&I(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:e.length})]}),e.length===0?I(`span`,{className:`text-sm text-muted-foreground`,children:i.emptyList}):I(lj,{items:e,itemHeight:dj,getItemKey:hj,renderItem:e=>I(mj,{entry:e,onRevert:t})})]})]})},_j=e=>e===``?[]:e.split(`.`),vj=e=>typeof e==`object`&&!!e,yj=(e,t)=>_j(t).reduce((e,t)=>vj(e)?e[t]:void 0,e),bj=(e,t,n)=>{let[r,...i]=_j(t);if(r===void 0)return n;let a=vj(e)?Array.isArray(e)?[...e]:{...e}:{};return a[r]=i.length===0?n:bj(a[r],i.join(`.`),n),a},xj=(e,t)=>e===t||e.startsWith(`${t}.`),Sj=(e,t)=>{let n=e.safeParse(t);if(n.success)return{isValid:!0,data:n.data,errors:{}};let r={};for(let e of n.error.issues){let t=e.path.map(String).join(`.`);r[t]??=e.message}return{isValid:!1,errors:r}},Cj=(e,t,n)=>{let r={};for(let[t,i]of Object.entries(e))xj(t,n)||(r[t]=i);for(let[e,i]of Object.entries(t))xj(e,n)&&(r[e]=i);return r},wj=(e,{defaultValues:t,mode:n=`onSubmit`}={})=>{let r=t??{},i=new Set,a=new Map,o={values:r,errors:{},isValid:Sj(e,r).isValid,isSubmitting:!1,isSubmitted:!1},s=e=>{o={...o,...e};for(let e of i)e()},c=e=>(i.add(e),()=>{i.delete(e)}),l=(e=>e===void 0?o.values:yj(o.values,e)),u=(t,r)=>{let i=bj(o.values,t,r),a=Sj(e,i),c=n===`onChange`||o.isSubmitted;s({values:i,isValid:a.isValid,errors:c?Cj(o.errors,a.errors,t):o.errors})},d=t=>{t&&(r=t),s({values:r,errors:{},isValid:Sj(e,r).isValid,isSubmitted:!1})},f=e=>{let t=o.values;return c(()=>{o.values!==t&&(t=o.values,e(o.values))})},p=e=>{for(let t of Object.keys(e)){let e=a.get(t);if(e){e.focus();return}}};return{getState:()=>o,subscribe:c,getValues:l,setValue:u,reset:d,watch:f,handleSubmit:(t,n)=>async r=>{r?.preventDefault?.();let i=Sj(e,o.values);s({errors:i.errors,isValid:i.isValid,isSubmitting:!0});try{i.isValid?await t(i.data):(await n?.(i.errors),p(i.errors))}finally{s({isSubmitting:!1,isSubmitted:!0})}},registerElement:(e,t)=>{t?a.set(e,t):a.delete(e)}}};S();var Tj=({toolName:e,toolDescription:t,toolAutoSubmit:n})=>e?{toolname:e,tooldescription:t,toolautosubmit:n?``:void 0}:{},Ej=s(null),Dj=()=>t(Ej),Oj=()=>()=>{},kj=(e,t,n)=>{let r=()=>e?t(e.getState()):n;return h(e?.subscribe??Oj,r,r)},Aj=({form:e,name:t})=>{let n=Dj(),r=e??n;if(!r)throw Error("useWatch needs a `form` option or a parent <Form>");return kj(r,()=>t===void 0?r.getValues():r.getValues(t))},jj=e=>{let t=Dj(),n=e??t;return{isSubmitting:kj(n,e=>e.isSubmitting,!1),isSubmitted:kj(n,e=>e.isSubmitted,!1),isValid:kj(n,e=>e.isValid,!1)}},Mj=(e,t)=>{let[n]=d(()=>wj(e,t));return n},Nj=e=>{let t=e.target;if(e.key!==`Enter`||t.tagName!==`INPUT`)return;e.preventDefault();let n=Array.from(e.currentTarget.querySelectorAll(`input:not([disabled]):not([type="hidden"]), textarea:not([disabled])`)),r=n.indexOf(t);r>=0&&n[r+1]?.focus()},Pj=({form:e,onSubmitSuccess:t,onSubmitError:n,className:r,autoComplete:i,toolName:a,toolDescription:o,toolAutoSubmit:s,...c})=>{let l=e.handleSubmit(async e=>{try{await t?.(e)}catch(e){if(!n)throw e;await n(e instanceof Error?e:Error(String(e)))}});return I(Ej,{value:e,children:I(`form`,{className:G(`flex flex-col gap-y-6`,r),onKeyDown:Nj,noValidate:!0,...c,onSubmit:l,autoComplete:i?`on`:`off`,...Tj({toolName:a,toolDescription:o,toolAutoSubmit:s})})})},Fj=({isLoading:e,...t})=>{let n=Dj(),r=kj(t.type===`submit`?n:null,e=>e.isSubmitting,!1);return I(Z,{isLoading:e||r,...t})};S();var Ij=({id:e,...t})=>{let n=j(),r=e??n;return I(Lj,{value:{id:r},children:I(`div`,{className:`flex flex-col gap-2 p-2`,id:r,suppressHydrationWarning:!0,...t})})},Lj=s({});S();var Rj=e=>typeof e==`object`&&!!e&&`target`in e&&typeof e.target==`object`,zj=e=>{if(!Rj(e))return e;let{target:t}=e;return t.type===`checkbox`?t.checked:t.value},Bj=()=>{let e=Dj();if(!e)throw Error(`Form fields must be rendered inside <Form>`);return e},Vj=e=>{let t=Bj();return{name:e,value:kj(t,()=>t.getValues(e)),onChange:n=>t.setValue(e,zj(n)),ref:n=>t.registerElement(e,n)}},Hj=s(void 0),Uj=({name:e,render:t})=>t({field:Vj(e)}),Wj=e=>I(Hj,{value:e.name,children:I(Uj,{...e})}),Gj=()=>{let e=t(Hj),{id:n}=t(Lj);return{id:n,name:e,error:kj(Dj(),t=>e===void 0?void 0:t.errors[e]),formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`}};S();var Kj=e=>/^on[A-Z]/.test(e),qj=(e,t)=>{let n={...e,...t};for(let r of Object.keys(e)){let i=e[r],a=t[r];Kj(r)?n[r]=typeof i==`function`&&typeof a==`function`?(...e)=>{let t=a(...e);return i(...e),t}:a??i:r===`style`?n.style={...i,...a}:r===`className`&&(n.className=G(i,a))}return n},Jj=({children:e,ref:t,...n})=>{let r=C.only(e);if(!f(r))return null;let i=r;return g(i,{...qj(n,i.props),ref:t?is(t,i.props.ref):i.props.ref})},Yj=e=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=Gj();return I(Jj,{id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})},Xj=e=>{let{formDescriptionId:t}=Gj();return I(`p`,{className:`text-sm text-neutral`,id:t,...e})},Zj=({children:e,...t})=>{let{error:n,formMessageId:r}=Gj(),i=n??e;return i?I(`p`,{className:`text-xs font-medium text-error`,role:`alert`,id:r,...t,children:i}):null},Qj=({className:e,children:t,...n})=>I(`i`,{className:G(`text-xs text-neutral-400`,e),...n,children:[`ⓘ `,t]}),$j=({className:e,...t})=>{let{error:n,formItemId:r}=Gj();return I(NO,{className:G(`mb-2`,n&&`text-error`,e),htmlFor:r,...t})},eM=({isRequired:e})=>e?I(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):I(b,{}),tM=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>I(`div`,{className:`ms-1 flex gap-1 align-middle text-base leading-none`,children:[e&&I($j,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:G(`font-bold`,i),children:[e,I(eM,{isRequired:t})]}),n&&I(Qj,{content:n})]}),nM=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o,className:s})=>I(Ij,{className:G(`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,s),children:[(t||e)&&I(`div`,{className:`flex max-w-full flex-col gap-1 p-1 leading-none`,children:[e&&I(tM,{isRequired:n,info:r,htmlFor:o,children:e}),t&&I(Xj,{children:t})]}),I(Yj,{children:i}),a&&I(Zj,{"data-testid":`error-message`})]}),rM=e=>e?{toolparamdescription:e}:{},iM=(...e)=>t=>{for(let n of e)typeof n==`function`?n(t):n&&(n.current=t)},aM=({field:e,name:t,label:n,Element:r,isRequired:i=!1,info:a,description:o,showErrorMessage:s=!0,layoutClassName:c,toolParamDescription:l,...u})=>{let{value:d,onChange:f,ref:p}=u;return I(nM,{htmlFor:t,label:n,description:o,isRequired:i,info:a,showErrorMessage:s,className:c,children:I(r,{id:t,name:t,"data-testid":t,"aria-labelledby":n?`${t}-label`:void 0,"aria-label":n?void 0:t,...u,...rM(l),ref:iM(e.ref,p),value:d===void 0?e.value??``:d,onChange:(...t)=>{e.onChange(t[0]),f?.(...t)}})})},oM=e=>I(Wj,{name:e.name,render:({field:t})=>I(aM,{...e,field:t})}),sM=e=>I(oM,{Element:UD,...e}),cM=Kc(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden`,{variants:{color:{success:`hover:bg-success-500 border-success bg-success text-success`,error:`hover:bg-error-500 border-error bg-error text-error`,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:`bg-opacity-0 hover:bg-opacity-0 border-none text-inherit`,outline:`bg-opacity-0 hover:bg-opacity-30 rounded-lg border-[1.3px]`,hoverable:`bg-opacity-0 hover:bg-opacity-10 rounded-lg border-none transition`},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`}}),lM=({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 I(p,{className:G(cM({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&&I(`button`,{type:`button`,className:`ms-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:ring-1 focus:ring-offset-1 focus:outline-none`,onClick:h,"aria-label":`Remove ${i} badge`,children:I(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[I(`title`,{children:`Remove badge`}),I(`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`})]})})]})},uM=1,dM=.9,fM=.8,pM=.6,mM=.3,hM=0,gM=(e,t)=>{let n=0;for(let r of e)if(r===t[n]&&n++,n===t.length)return!0;return!1},_M=(e,t)=>e===t?uM:e.startsWith(t)?dM:e.split(/[\s\-_/]+/).some(e=>e.startsWith(t))?fM:e.includes(t)?pM:gM(e,t)?mM:hM,vM=(e,t,n=[])=>{let r=t.trim().toLowerCase();return r?Math.max(...[e,...n].map(e=>_M(e.trim().toLowerCase(),r))):uM};S();var yM=`[data-command-item]:not([aria-disabled="true"])`,bM=()=>{let e=new Map,t=new Set,n=``,r,i=()=>{for(let e of t)e()},a=(e,t=[])=>vM(e,n,t)>0,o=t=>[...e.values()].find(e=>e.value===t);return{subscribe:e=>(t.add(e),()=>{t.delete(e)}),getSearch:()=>n,setSearch:e=>{e!==n&&(n=e,i())},getSelectedValue:()=>r,setSelectedValue:e=>{e!==r&&(r=e,i())},getSelectedItemId:()=>o(r)?.id,selectCurrent:()=>o(r)?.onSelect(),matches:a,getVisibleCount:()=>[...e.values()].filter(e=>a(e.value,e.keywords)).length,isGroupVisible:t=>[...e.values()].some(e=>e.groupId===t&&a(e.value,e.keywords)),register:t=>(e.set(t.id,t),i(),()=>{e.delete(t.id),i()})}},xM=s(null),SM=s(void 0),CM=()=>{let e=t(xM);if(!e)throw Error(`Command parts must be rendered inside <Command>`);return e},wM=(e,t)=>h(e.subscribe,t,t),TM=e=>[...e?.querySelectorAll(yM)??[]],EM=({children:e,ref:t,onKeyDown:n,...r})=>{let[i]=d(bM),a=j(),o=u(null),s=wM(i,i.getSearch),c=wM(i,()=>i.getSelectedItemId()!==void 0),l=u(null),f=e=>{e&&(i.setSelectedValue(e.dataset.value),e.scrollIntoView?.({block:`nearest`}))};return m(()=>{let e=l.current!==s;l.current=s,(e||!c)&&i.setSelectedValue(TM(o.current)[0]?.dataset.value)},[s,c]),I(xM.Provider,{value:{store:i,listId:a},children:I(`div`,{ref:is(t,o),tabIndex:-1,onKeyDown:e=>{if(n?.(e),e.defaultPrevented||e.nativeEvent.isComposing)return;let t=TM(o.current),r=t.findIndex(e=>e.dataset.value===i.getSelectedValue()),a=t.length-1,s={ArrowDown:Math.min(r+1,a),ArrowUp:Math.max(r-1,0),Home:0,End:a}[e.key];s===void 0?e.key===`Enter`&&(e.preventDefault(),i.selectCurrent()):(e.preventDefault(),f(t[s]))},...r,children:e})})},DM=({value:e,onValueChange:t,...n})=>{let{store:r,listId:i}=CM(),[a,o]=sa({value:e,defaultValue:``,onChange:t}),s=wM(r,r.getSelectedItemId);return m(()=>{r.setSearch(a)},[a]),I(`input`,{type:`text`,role:`combobox`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,"aria-expanded":!0,"aria-controls":i,"aria-activedescendant":s,value:a,onChange:e=>o(e.target.value),...n})},OM=e=>{let{listId:t}=CM();return I(`div`,{role:`listbox`,id:t,...e})},kM=e=>{let{store:t}=CM();return wM(t,t.getVisibleCount)>0?null:I(`div`,{role:`presentation`,...e})},AM=({heading:e,children:t,...n})=>{let{store:r}=CM(),i=j(),a=j();return I(`div`,{role:`presentation`,hidden:!wM(r,()=>r.isGroupVisible(i)),...n,children:[e&&I(`div`,{id:a,"aria-hidden":!0,"data-command-group-heading":``,children:e}),I(`div`,{role:`group`,"aria-labelledby":e?a:void 0,children:I(SM.Provider,{value:i,children:t})})]})},jM=e=>{let{store:t}=CM();return wM(t,t.getSearch)?null:I(`div`,{role:`separator`,...e})},MM=({value:e,keywords:n,disabled:r=!1,onSelect:i,ref:a,onClick:o,onPointerMove:s,...c})=>{let{store:l}=CM(),f=t(SM),p=j(),h=u(null),[g,_]=d(e??``),v=(e??g).trim(),y=u(i);m(()=>{y.current=i}),m(()=>{let t=h.current?.textContent;e===void 0&&t&&_(t)}),m(()=>{if(v)return l.register({id:p,value:v,keywords:n??[],groupId:f,onSelect:()=>{r||y.current?.(v)}})},[v,n?.join(),f,r]);let b=wM(l,()=>!v||l.matches(v,n)),x=wM(l,()=>!!v&&l.getSelectedValue()===v);return b?I(`div`,{ref:is(a,h),id:p,role:`option`,"aria-selected":x,"aria-disabled":r,"data-command-item":``,"data-value":v,"data-selected":x,"data-disabled":r,onPointerMove:e=>{s?.(e),r||l.setSelectedValue(v)},onClick:e=>{o?.(e),!e.defaultPrevented&&!r&&i?.(v)},...c}):null},NM=({className:e,...t})=>I(EM,{className:G(`flex flex-col overflow-hidden rounded-md px-3 py-2 outline-hidden`,e),...t}),PM={Input:({className:e,...t})=>I(`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),children:[I(Dc,{className:`size-4 shrink-0 opacity-50`}),I(DM,{className:`flex-1 bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,...t})]}),List:({className:e,...t})=>I(OM,{className:G(`max-h-75 overflow-x-hidden overflow-y-auto`,e),...t}),Empty:({className:e,...t})=>I(kM,{className:G(`py-6 text-center text-sm`,e),...t}),Group:({className:e,...t})=>I(AM,{className:G(`overflow-hidden p-1 text-foreground [&_[data-command-group-heading]]:px-2 [&_[data-command-group-heading]]:py-1.5 [&_[data-command-group-heading]]:text-xs [&_[data-command-group-heading]]:font-medium [&_[data-command-group-heading]]:text-muted-foreground`,e),...t}),Separator:({className:e,...t})=>I(jM,{className:G(`-mx-1 h-px bg-border`,e),...t}),Item:({className:e,...t})=>I(MM,{className:G(`relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground`,e),...t}),Shortcut:({className:e,...t})=>I(`span`,{className:G(`ms-auto text-xs tracking-widest text-muted-foreground`,e),...t})};S();var FM=s(null),IM=()=>{let e=t(FM);if(!e)throw Error(`useMultiSelect must be used within MultiSelectProvider`);return e},LM=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,disabled:i=!1,className:a,children:o,dir:s,...c})=>{let[l,f]=d(t??[]),[p,m]=d(``),[h,g]=d(!1),[_,v]=d(-1),y=u(null),[b,S]=d(!1),[C,w]=d(``);M(()=>{e&&f(e)},[e]);let T=A(e=>{if(l.includes(e)){let t=l.filter(t=>t!==e);f(t),n?.(t)}else{let t=[...l,e];f(t),n?.(t)}},[l]),E=A(e=>{e.preventDefault();let t=e.currentTarget,n=t.value.substring(t.selectionStart??0,t.selectionEnd??0);w(n),S(n===p)},[p]),D=A(e=>{e.stopPropagation();let t=y.current;if(!t)return;let n=()=>{let e=_+1;v(e>l.length-1?r?0:-1:e)},i=()=>{let e=_-1;v(e<0?l.length-1:e)},a=()=>{let e=_-1<=0?l.length-1==0?-1:0:_-1;v(e)};switch(e.key){case`ArrowLeft`:s===`rtl`?l.length>0&&(_!==-1||r)&&n():l.length>0&&t.selectionStart===0&&i();break;case`ArrowRight`:s===`rtl`?l.length>0&&t.selectionStart===0&&i():l.length>0&&(_!==-1||r)&&n();break;case`Backspace`:case`Delete`:if(l.length>0){let e=l[_];_!==-1&&e!==void 0?(T(e),a()):(t.selectionStart===0&&C===p||b)&&T(l[l.length-1])}break;case`Enter`:g(!0);break;case`Escape`:_===-1?h&&g(!1):v(-1)}},[l,p,_,r]);return I(FM,{value:x(()=>({value:l,onValueChange:T,open:h,setOpen:g,inputValue:p,setInputValue:m,activeIndex:_,setActiveIndex:v,ref:y,handleSelect:E}),[l,T,h,g,p,m,_,v,y,E]),children:I(NM,{onKeyDown:D,className:G(`flex w-full flex-col gap-2 overflow-visible bg-transparent`,i&&`cursor-not-allowed opacity-50`,a),dir:s,"aria-disabled":i||void 0,inert:i,...c,children:o})})},RM=({className:e,getBadgeValue:t=e=>e,validationStyleEnabled:n=!1,children:r,...i})=>{let{value:a,onValueChange:o,activeIndex:s}=IM(),c=A(e=>{e.preventDefault(),e.stopPropagation()},[]);return I(`div`,{className:G(`flex w-full flex-col gap-3`,`cursor-pointer text-base shadow-none outline-none select-text 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`,n&&`valid:border-success invalid:border-error`,e),...i,children:[a.length>0&&I(`div`,{className:`flex w-full flex-wrap gap-1`,children:a.map((e,n)=>I(lM,{className:G(`flex items-center gap-1 rounded-xl px-1`,s===n&&`ring-2 ring-muted-foreground`),color:`text`,children:[I(`span`,{className:`text-xs`,children:t(e)}),I(`button`,{"aria-label":`Remove ${e} option`,"aria-roledescription":`button to remove option`,onMouseDown:c,onClick:()=>o(e),children:[I(`span`,{className:`sr-only`,children:[`Remove `,e,` option`]}),I(Vc,{className:`size-4 cursor-pointer`})]})]},e))}),r]})},zM=({className:e,...t})=>{let{setOpen:n,inputValue:r,setInputValue:i,activeIndex:a,setActiveIndex:o,handleSelect:s,ref:c}=IM();return I(PM.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`)})},BM=({children:e})=>{let{open:t}=IM();return I(`div`,{className:`relative`,children:t&&e})},VM=({className:e,children:t})=>I(PM.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,I(PM.Empty,{children:I(`span`,{className:`text-muted-foreground`,children:`No results found`})})]}),HM=({className:e,value:t,children:n,...r})=>{let{value:i,onValueChange:a,setInputValue:o}=IM(),s=A(e=>{e.preventDefault(),e.stopPropagation()},[]),c=i.includes(t);return I(PM.Item,{...r,onSelect:()=>{a(t),o(``)},className:G(`flex cursor-pointer justify-between`,`rounded-lg px-2 py-1`,`transition-colors`,`hover:bg-neutral/10`,c&&`opacity-50`,r.disabled&&`cursor-not-allowed opacity-50`,e),onMouseDown:s,children:[n,c&&I(Ts,{className:`size-4`})]})},UM=LM;UM.Trigger=RM,UM.Input=zM,UM.Content=BM,UM.List=VM,UM.Item=HM;var WM=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>I(Wj,{name:e,render:({field:c})=>I(nM,{htmlFor:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,children:I(UM,{onValueChange:c.onChange,values:c.value,...s,children:o})})}),GM=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>I(Wj,{name:e,render:({field:c})=>I(nM,{htmlFor:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,children:I(Q,{onValueChange:c.onChange,defaultValue:c.value,...s,children:o})})});function KM(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 qM(e,t){return typeof t==`bigint`?t.toString():t}var JM=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 YM(e){return new JM(e)}function XM(e){return e==null}function ZM(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function QM(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var $M=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function eN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tN(e){if(eN(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return eN(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function nN(e){return tN(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var rN=new Set([`string`,`number`,`symbol`]);function iN(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function aN(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function oN(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 sN(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function cN(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 lN(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 uN(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function dN(e){return typeof e==`string`?e:e?.message}function fN(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 pN(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function mN(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:dN(e.inst?._zod.def?.error?.(e))??dN(a?.(e))??dN(t?.error?.(e))??dN(n.customError?.(e))??dN(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 hN=/[\uD800-\uDBFF]/;function gN(e){let t=e.length;if(!hN.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 _N(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function vN(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function yN(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):SN(e,n,r.value)}}function bN(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function xN(e,t,n){return bN(e,t,n,!1)}function SN(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:bN(this,t,n.bind(this))},set(e){bN(this,t,e)}})}function CN(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var wN,TN=!1,EN={configurable:!0,get(){TN=!0}};function DN(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&wN!==e._zod?wN=void 0:(wN=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,EN);let e=TN;TN=!1;try{let r=n(this);return TN?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),TN||=e,r}catch(n){throw delete this[t],TN||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function ON(e,t,n,r){let i=CN(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 kN,AN={value:void 0,enumerable:!1},jN=`captureStackTrace`in Error?Error:null;function MN(e){let t=jN;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return jN=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function NN(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){AN.value=new a(r);try{Object.defineProperty(n,"_zod",AN)}finally{AN.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),yN(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?MN(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 PN=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(kN=globalThis).__zod_globalConfig??(kN.__zod_globalConfig={});var FN=globalThis.__zod_globalConfig;function IN(e){return e&&Object.assign(FN,e),FN}function LN(){let e=this._zod;return e.message??=JSON.stringify(e.def,qM,2),e.message}function RN(e){this._zod.message=e}var zN={get:LN,set:RN,enumerable:!0,configurable:!0},BN={value:void 0,enumerable:!1},VN=new WeakSet([Object.prototype,Error.prototype]),HN=NN(`$ZodError`,(e,t)=>{e.name=`$ZodError`,BN.value=t,Object.defineProperty(e,"issues",BN),BN.value=void 0,Object.defineProperty(e,"message",zN);let n=Object.getPrototypeOf(e);VN.has(n)||(VN.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}),UN=(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 PN;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>mN(e,o,IN())));throw $M(n,a?.callee??t),n}return s.value};return t})(HN),WN=(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=>mN(e,o,IN())));throw $M(n,a?.callee??t),n}return s.value};return t})(HN),GN=(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 PN;return a.issues.length?KN(e,a.issues,i):{success:!0,data:a.value}})(HN);function KN(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>mN(e,n,IN()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var qN=(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?KN(e,a.issues,i):{success:!0,data:a.value}})(HN),JN=/^[\s\S]{0,}$/,YN=NN(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),XN=e=>{let t=e.value;return!XM(t)&&t.length!==void 0},ZN=NN(`$ZodCheckMinLength`,(e,t)=>{var n;YN.init(e,t),(n=e._zod.def).when??(n.when=XN),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?gN(r):i)>=t.minimum)return;let a=_N(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),QN=NN(`$ZodCheckStringFormat`,(e,t)=>{var n,r;YN.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=()=>{})}),$N=NN(`$ZodCheckRegex`,(e,t)=>{QN.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})}}),eP={major:4,minor:6,patch:7},tP=NN(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eP;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=cN(t),a;for(let o of n){if(o._zod.def.when){if(lN(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 PN;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(pN(t.issues,n,e),i||=cN(t,n))});else{if(t.issues.length===n)continue;pN(t.issues,n,e),i||=cN(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(cN(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new PN;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 PN;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return xN(this,`~standard`,iP(this))},set"~standard"(e){bN(this,`~standard`,e)}}),nP=(e,t)=>e.issues.length?{issues:e.issues.map(e=>mN(e,t,IN()))}:{value:e.value};async function rP(e,t){let n={async:!0};return nP(await e._zod.run({value:t,issues:[]},n),n)}function iP(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return nP(r,n)}catch{}return rP(e,t)},vendor:`zod`,version:1}}var aP=NN(`$ZodString`,(e,t)=>{tP.init(e,t),e._zod.pattern=t.pattern??JN,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 oP(e,t){let n=fN(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 fN(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,pN(n.issues,t,e),n}}return i(n,a)}}var sP=e=>Array.isArray(e)?e.length:-1;function cP(e,t,n){e.issues.length&&t.issues.push(...uN(n,e.issues)),t.value[n]=e.value}var lP=NN(`$ZodArray`,(e,t)=>{tP.init(e,t);let n=FN.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=>cP(t,r,e)));else if(cP(c,r,e),s&&c.issues.length!==0&&cN(c))break}return o.length?Promise.all(o).then(()=>r):r},oP(e,sP)});function uP(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(...uN(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 dP=[];function fP(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:dP,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=sN(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function pP(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(cN(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=>uP(e,n,i,t,d,f))):uP(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 mP=NN(`$ZodObject`,(e,t)=>{tP.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=YM(()=>fP(t));DN(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)||QM(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=eN,o=t.catchall,s,c=FN.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(cN(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=>uP(n,t,e,r,a,o))):uP(s,t,e,r,a,o)}return o?pP(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),hP=NN(`$ZodEnum`,(e,t)=>{tP.init(e,t);let n=KM(t.entries),r=new Set(n);e._zod.values=r,DN(e,`pattern`,e=>{let t=KM(e.def.entries).filter(e=>rN.has(typeof e));return RegExp(t.length?`^(${t.map(e=>iN(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 gP(e,t){return e.value=t.issues.length?void 0:t.value,e}var _P=NN(`$ZodOptional`,(e,t)=>{tP.init(e,t),DN(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,DN(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),DN(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ZM(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=>gP(e,t)):gP(e,r)}return t.innerType._zod.run(e,n)}}),vP=NN(`$ZodDefault`,(e,t)=>{tP.init(e,t),e._zod.optin=`defaulted`,DN(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=>yP(e,t)):yP(r,t)}});function yP(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bP=NN(`$ZodCustom`,(e,t)=>{YN.init(e,t),tP.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=>xP(t,n,r,e));xP(i,n,r,e)}});function xP(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(vN(e))}}function SP(e){return e.checks&&=[...e.checks],e}function CP(e,t){return new e(SP({type:`string`,...oN(t)}))}function wP(e,t){return new ZN({check:`min_length`,...oN(t),minimum:e})}function TP(e,t){return new $N({check:`string_format`,format:`regex`,...oN(t),pattern:e})}function EP(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...oN(n)})}var DP=NN(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);tP.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){bN(this,`with`,e)},parse(e,t){return UN(this,e,t,{callee:this.parse})},parseAsync(e,t){return WN(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return GN(this,e,t)},safeParseAsync(e,t){return qN(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 aN(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)}}),OP=NN(`ZodMiniString`,(e,t)=>{aP.init(e,t),DP.init(e,t)});function kP(e){return CP(OP,e)}var AP=NN(`ZodMiniArray`,(e,t)=>{lP.init(e,t),DP.init(e,t)});function jP(e,t){return new AP({type:`array`,element:e,...oN(t)})}var MP=NN(`ZodMiniObject`,(e,t)=>{mP.init(e,t),DP.init(e,t),ON(e,`shape`,e=>e._zod.def.shape,!1)});function NP(e,t){return new MP({type:`object`,shape:e??{},...oN(t)})}var PP=NN(`ZodMiniEnum`,(e,t)=>{hP.init(e,t),DP.init(e,t),e.options=[...e._zod.values]});function FP(e,t){return new PP({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...oN(t)})}var IP=NN(`ZodMiniOptional`,(e,t)=>{_P.init(e,t),DP.init(e,t)});function LP(e){return new IP({type:`optional`,innerType:e})}var RP=NN(`ZodMiniDefault`,(e,t)=>{vP.init(e,t),DP.init(e,t)});function zP(e,t){return new RP({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():nN(t)}})}var BP=NN(`ZodMiniCustom`,(e,t)=>{bP.init(e,t),DP.init(e,t)});function VP(e,t={}){return EP(BP,e,t)}var HP=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(iA(n.id,e),r);return t},UP=e=>e==null||typeof e==`string`&&e.trim()===``,WP=(e,t)=>e===t||JSON.stringify(e)===JSON.stringify(t),GP=(e,t,{sourceLocale:n,originalCells:r,aiCellIds:i,lockedLocales:a})=>{let o=e.cells[t],s=iA(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||UP(o.value))return`missing`;let c=r.get(s);return!c||!WP(c.value,o.value)?`edited`:e.isLocalized&&t!==n&&typeof o.value==`string`&&o.value===e.cells[n]?.value?`identical`:`done`},KP=(e,t)=>t===`all`||e===t,qP=(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[GP(i,t,n)]++}return r},JP=e=>{let t=e.lastIndexOf(`::`);return{rowId:e.slice(0,t),cellKey:e.slice(t+2)}},YP=(e,t)=>{let n=HP(e),r=HP(t),i=[];for(let[e,t]of r){let r=n.get(e),a=!r||r.isMissing;a&&t.isMissing||(a||t.isMissing||!WP(r?.value,t.value))&&i.push({cellId:e,...JP(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,...JP(e),keyPath:t.keyPath,kind:`removed`,previousValue:t.value,nextValue:void 0});return i},XP=[Zr,Qr,Ur],ZP=[Br,Vr,Hr,ni,ri],QP=[$r,ei,ti],$P=e=>e[e.nodeType],eF=(e,t)=>{if(na(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}}},tF=(e,t,{locales:n,sourceLocale:r})=>{let i=na(e);if(i===t)return{node:e,isLossless:!0};if(XP.includes(i)&&!XP.includes(t))return tF($P(e),t,{locales:n,sourceLocale:r});if(t===`translation`)return{node:{nodeType:zr,[zr]:Object.fromEntries(n.map(t=>[t,t===r?structuredClone(e):Zi(e)]))},isLossless:!0};if(XP.includes(t)&&!XP.includes(i))return{node:{nodeType:t,[t]:structuredClone(e)},isLossless:!0};if(i===`translation`){let i=$P(e)??{},a=tF(i[r]??Object.values(i)[0]??``,t,{locales:n,sourceLocale:r});return{node:a.node,isLossless:a.isLossless&&Object.keys(i).length<=1}}if(QP.includes(i)){if(QP.includes(t))return eF(e,t)??{node:Xi(t,n),isLossless:!1};if(ZP.includes(t)||t===`array`)return{node:Xi(t,n,e),isLossless:!0}}if(ZP.includes(i)&&QP.includes(t)){let n=Object.values($P(e)??{}),r=eF(n[0]??``,t);if(r)return{node:r.node,isLossless:n.length<=1}}return{node:Xi(t,n),isLossless:!1}};S();var nF=s(void 0),rF=()=>{let e=t(nF);if(!e)throw Error(`useContentGrid must be used inside ContentGridProvider`);return e},iF=({dictionary:e,lockedLocales:t,children:n})=>{let r=pT(),{editedContent:i,addEditedContent:a,removeEditedContent:o}=_T(),{mutateAsync:s,isPending:c}=VE(),[l,u]=d(()=>new Set),f=e.localId,p=x(()=>(r?.internationalization?.locales??[]).map(String),[r]),m=String(r?.internationalization?.defaultLocale??p[0]??`en`),h=x(()=>new Set(t??[]),[t]),g=i?.[f]?.content,_=g===void 0?e.content:g,v=x(()=>({locales:p,sourceLocale:m}),[p,m]),y=x(()=>tA(e.content,v),[e.content,v]),b=x(()=>tA(_,v),[_,v]),S=x(()=>new Map(b.map(e=>[e.id,e])),[b]),C=x(()=>HP(y),[y]),w=x(()=>YP(y,b),[y,b]),T=x(()=>({sourceLocale:m,originalCells:C,aiCellIds:l,lockedLocales:h}),[m,C,l,h]),E=A(e=>u(t=>{let n=new Set(t);return e(n),n}),[]),D=A((e,t)=>{t===void 0?o(f,e.keyPath):a(f,t,e.keyPath)},[a,o,f]),O=A((e,t,n)=>{let r=e.cells[t];r&&(D(r,n),E(n=>n.delete(iA(e.id,t))))},[D,E]),k=x(()=>({locales:p,sourceLocale:m}),[p,m]),j=A(e=>e.rootKeyPath?[{keyPath:e.rootKeyPath,node:e.rootNode}]:Object.values(e.cells).map(e=>({keyPath:e.keyPath,node:e.value})),[]),M=A((e,t)=>{for(let n of j(e)){let{node:e}=tF(n.node,t,k);a(f,e,n.keyPath)}},[j,k,a,f]),N=A((e,t)=>j(e).every(e=>tF(e.node,t,k).isLossless),[j,k]),P=A(e=>{D({keyPath:e.keyPath,value:e.previousValue,isMissing:!1},e.previousValue),E(t=>t.delete(e.cellId))},[D,E]),F=A(e=>E(t=>t.delete(e)),[E]),L=A(()=>u(new Set),[]),ee=A(e=>{let t=w.find(t=>t.cellId===e);t?P(t):F(e)},[w,P,F]),te=A((e,t)=>{let n=t?t.flatMap(e=>S.get(e)??[]):b,r=[];for(let t of n)if(t.kind===`leaf`&&t.isLocalized&&typeof t.cells[m]?.value==`string`)for(let n of e)n===m||h.has(n)||t.cells[n]&&GP(t,n,T)===`missing`&&r.push({row:t,cellKey:n});return r},[b,S,m,h,T]),R=A(async t=>{let n=new Map;for(let e of t){if(h.has(e.cellKey))continue;let t=n.get(e.cellKey)??[];t.push(e),n.set(e.cellKey,t)}for(let[t,i]of n){let n=Object.fromEntries(i.map(({row:e})=>[e.id,e.cells[m]?.value??``])),a=(await s({entryFileContent:n,presetOutputContent:{},dictionaryDescription:e.description,entryLocale:m,outputLocale:t,mode:`complete`,aiOptions:{apiKey:r?.ai?.apiKey,model:r?.ai?.model,temperature:r?.ai?.temperature}}))?.data?.fileContent??{},o=[];for(let{row:e,cellKey:t}of i){let n=a[e.id],r=e.cells[t];typeof n==`string`&&r&&(D(r,n),o.push(iA(e.id,t)))}E(e=>{for(let t of o)e.add(t)})}},[h,m,s,e.description,r,D,E]),ne=A((e,t)=>GP(e,t,T),[T]),z=x(()=>({dictionary:e,rows:b,rowsById:S,locales:p,sourceLocale:m,lockedLocales:h,statusContext:T,changeSet:w,getStatus:ne,setCellValue:O,changeRowType:M,getIsTypeChangeLossless:N,revertChange:P,aiCellIds:l,acceptAICell:F,acceptAllAICells:L,revertAICell:ee,translateCells:R,isTranslating:c,getMissingTargets:te}),[e,b,S,p,m,h,T,w,ne,O,M,N,P,l,F,L,ee,R,c,te]);return I(nF.Provider,{value:z,children:n})},aF=/^[A-Za-z_$][\w$-]*$/,oF=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=aF.test(e)?e:`[${JSON.stringify(e)}]`;t=t===``?r:r.startsWith(`[`)?`${t}${r}`:`${t}.${r}`}}return t},sF=(e,t)=>{let n=t.filter(e=>e.type!==zr);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=oF(n);return!!(r&&(e.id===r||e.id.startsWith(`${r}.`)||e.id.startsWith(`${r}[`)||r.startsWith(`${e.id}.`)||r.startsWith(`${e.id}[`)))},cF={[zr]:`t`,[Zr]:`md`,[Br]:`enum`,[Ur]:`insert`,[Hr]:`cond`,[Jr]:`react`,[Yr]:`preact`,[Xr]:`solid`},lF=e=>(e.length>1&&e[e.length-1]===`text`?e.slice(0,-1):e).map(e=>cF[e]??e).join(` · `),uF=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``},dF=(e,t)=>e.isLocalized?t:[`*`],fF=(e,t)=>e.id.toLowerCase().includes(t)?!0:Object.values(e.cells).some(e=>uF(e.value).toLowerCase().includes(t)),pF=(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===``||fF(n,c),a=!l||sF(n,s),u=r===`all`||dF(n,i).some(e=>n.cells[e]!==void 0&&KP(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))},mF=e=>{if(e.rootKeyPath&&e.kind===`group`){if(e.typeChain[0]===`object`)return`field`;if(e.typeChain[0]===`array`)return`item`}},hF=(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=mF(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},gF=(e,t,n,r)=>{let i=[];for(let n of e)if(n.kind===`leaf`)for(let e of dF(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}}},_F=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)}},vF=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)},yF=(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}},bF={key:`content-grid`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"accept":"Accept","acceptAll":"Accept all AI values","add":"Add","addField":"Add field","addItem":"Add item","aiBanner":"Filled by AI from the source locale. Review it before publishing.","backToList":"Back to the list","cancel":"Cancel","changeType":"Change type","close":"Close","collapse":"Collapse","confirm":"Fill","confirmTranslateDescription":"Missing values to translate from","editValue":"Edit the value","emptyValue":"Empty","expand":"Expand","fieldColumn":"Field","fieldKeyPlaceholder":"Field key","fill":"Fill","filterAI":"AI-filled","filterAll":"All","filterEdited":"Edited","filterMissing":"Missing","groupConditional":"Conditional","groupMultilingual":"Multilingual","groupPrimitives":"Primitives","groupRichText":"Rich text","groupStructural":"Structure","htmlType":"HTML","jumpToMissing":"Next missing value","keyExists":"This key already exists","keyRequired":"A key is required","locale":"Locale","lockedTooltip":"Your role cannot edit this locale","makeTranslatable":"Translate per locale","noResults":"No field matches the current filters","openEditor":"Open the editor","readonlyChip":"read-only","readonlyTooltip":"Comes from code — not editable here","reorderField":"Drag to reorder (Alt + ↑/↓)","resetWarning":"This change resets the value. Part of the current content will be lost.","revert":"Revert","sameForAllLocales":"Same for all locales","searchPlaceholder":"Search a path or a value","skippedLocked":"Skipped (locked):","sourceLocale":"source","statusAI":"Filled by AI, not reviewed","statusDone":"Translated","statusEdited":"Edited, not saved","statusIdentical":"Identical to the source locale","statusLocked":"Locked for your role","statusMissing":"Missing value","statusReadonly":"Read-only","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expand","false":"Collapse"}},"translateColumn":"Translate the missing values of this locale with AI","translateMissing":"Translate missing","translateRow":"Translate this field into the missing locales with AI","typeSearchPlaceholder":"Search a type"},"en-GB":{"accept":"Accept","acceptAll":"Accept all AI values","add":"Add","addField":"Add field","addItem":"Add item","aiBanner":"Filled by AI from the source locale. Review it before publishing.","backToList":"Back to the list","cancel":"Cancel","changeType":"Change type","close":"Close","collapse":"Collapse","confirm":"Fill","confirmTranslateDescription":"Missing values to translate from","editValue":"Edit the value","emptyValue":"Empty","expand":"Expand","fieldColumn":"Field","fieldKeyPlaceholder":"Field key","fill":"Fill","filterAI":"AI-filled","filterAll":"All","filterEdited":"Edited","filterMissing":"Missing","groupConditional":"Conditional","groupMultilingual":"Multilingual","groupPrimitives":"Primitives","groupRichText":"Rich text","groupStructural":"Structure","htmlType":"HTML","jumpToMissing":"Next missing value","keyExists":"This key already exists","keyRequired":"A key is required","locale":"Locale","lockedTooltip":"Your role cannot edit this locale","makeTranslatable":"Translate per locale","noResults":"No field matches the current filters","openEditor":"Open the editor","readonlyChip":"read-only","readonlyTooltip":"Comes from code — not editable here","reorderField":"Drag to reorder (Alt + ↑/↓)","resetWarning":"This change resets the value. Part of the current content will be lost.","revert":"Revert","sameForAllLocales":"Same for all locales","searchPlaceholder":"Search a path or a value","skippedLocked":"Skipped (locked):","sourceLocale":"source","statusAI":"Filled by AI, not reviewed","statusDone":"Translated","statusEdited":"Edited, not saved","statusIdentical":"Identical to the source locale","statusLocked":"Locked for your role","statusMissing":"Missing value","statusReadonly":"Read-only","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expand","false":"Collapse"}},"translateColumn":"Translate the missing values of this locale with AI","translateMissing":"Translate missing","translateRow":"Translate this field into the missing locales with AI","typeSearchPlaceholder":"Search a type"},"fr":{"accept":"Accepter","acceptAll":"Accepter toutes les valeurs IA","add":"Ajouter","addField":"Ajouter un champ","addItem":"Ajouter un élément","aiBanner":"Rempli par l’IA depuis la langue source. Relisez-le avant de publier.","backToList":"Retour à la liste","cancel":"Annuler","changeType":"Changer le type","close":"Fermer","collapse":"Replier","confirm":"Remplir","confirmTranslateDescription":"Valeurs manquantes à traduire depuis","editValue":"Modifier la valeur","emptyValue":"Vide","expand":"Déplier","fieldColumn":"Champ","fieldKeyPlaceholder":"Clé du champ","fill":"Fill","filterAI":"Remplis par IA","filterAll":"Tous","filterEdited":"Modifiés","filterMissing":"Manquants","groupConditional":"Conditionnel","groupMultilingual":"Multilingue","groupPrimitives":"Primitifs","groupRichText":"Texte enrichi","groupStructural":"Structure","htmlType":"HTML","jumpToMissing":"Prochaine valeur manquante","keyExists":"Cette clé existe déjà","keyRequired":"Une clé est requise","locale":"Langue","lockedTooltip":"Votre rôle ne peut pas modifier cette langue","makeTranslatable":"Traduire par langue","noResults":"Aucun champ ne correspond aux filtres","openEditor":"Ouvrir l’éditeur","readonlyChip":"lecture seule","readonlyTooltip":"Provient du code — non modifiable ici","reorderField":"Glisser pour réordonner (Alt + ↑/↓)","resetWarning":"Ce changement réinitialise la valeur. Une partie du contenu actuel sera perdue.","revert":"Annuler la modification","sameForAllLocales":"Identique pour toutes les langues","searchPlaceholder":"Rechercher un chemin ou une valeur","skippedLocked":"Ignorées (verrouillées) :","sourceLocale":"source","statusAI":"Rempli par IA, non relu","statusDone":"Traduit","statusEdited":"Modifié, non enregistré","statusIdentical":"Identique à la langue source","statusLocked":"Verrouillé pour votre rôle","statusMissing":"Valeur manquante","statusReadonly":"Lecture seule","toggleCollapse":{"nodeType":"condition","condition":{"true":"Déplier","false":"Replier"}},"translateColumn":"Traduire avec l’IA les valeurs manquantes de cette langue","translateMissing":"Traduire les manquants","translateRow":"Traduire ce champ dans les langues manquantes avec l’IA","typeSearchPlaceholder":"Rechercher un type"},"es":{"accept":"Aceptar","acceptAll":"Aceptar todos los valores de IA","add":"Añadir","addField":"Añadir campo","addItem":"Añadir elemento","aiBanner":"Rellenado por IA desde el idioma de origen. Revísalo antes de publicar.","backToList":"Volver a la lista","cancel":"Cancelar","changeType":"Cambiar tipo","close":"Cerrar","collapse":"Contraer","confirm":"Rellenar","confirmTranslateDescription":"Valores faltantes a traducir desde","editValue":"Editar el valor","emptyValue":"Vacío","expand":"Expandir","fieldColumn":"Campo","fieldKeyPlaceholder":"Clave del campo","fill":"Fill","filterAI":"Rellenados por IA","filterAll":"Todos","filterEdited":"Editados","filterMissing":"Faltantes","groupConditional":"Condicional","groupMultilingual":"Multilingüe","groupPrimitives":"Primitivos","groupRichText":"Texto enriquecido","groupStructural":"Estructura","htmlType":"HTML","jumpToMissing":"Siguiente valor faltante","keyExists":"Esta clave ya existe","keyRequired":"Se requiere una clave","locale":"Idioma","lockedTooltip":"Tu rol no puede editar este idioma","makeTranslatable":"Traducir por idioma","noResults":"Ningún campo coincide con los filtros","openEditor":"Abrir el editor","readonlyChip":"solo lectura","readonlyTooltip":"Viene del código: no se puede editar aquí","reorderField":"Arrastre para reordenar (Alt + ↑/↓)","resetWarning":"Este cambio restablece el valor. Se perderá parte del contenido actual.","revert":"Revertir","sameForAllLocales":"Igual para todos los idiomas","searchPlaceholder":"Buscar una ruta o un valor","skippedLocked":"Omitidos (bloqueados):","sourceLocale":"origen","statusAI":"Rellenado por IA, sin revisar","statusDone":"Traducido","statusEdited":"Editado, sin guardar","statusIdentical":"Idéntico al idioma de origen","statusLocked":"Bloqueado para tu rol","statusMissing":"Valor faltante","statusReadonly":"Solo lectura","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expandir","false":"Contraer"}},"translateColumn":"Traducir con IA los valores faltantes de este idioma","translateMissing":"Traducir faltantes","translateRow":"Traducir este campo a los idiomas faltantes con IA","typeSearchPlaceholder":"Buscar un tipo"},"de":{"accept":"Übernehmen","acceptAll":"Alle KI-Werte übernehmen","add":"Hinzufügen","addField":"Feld hinzufügen","addItem":"Element hinzufügen","aiBanner":"Von KI aus der Ausgangssprache ausgefüllt. Vor dem Veröffentlichen prüfen.","backToList":"Zurück zur Liste","cancel":"Abbrechen","changeType":"Typ ändern","close":"Schließen","collapse":"Einklappen","confirm":"Ausfüllen","confirmTranslateDescription":"Fehlende Werte zum Übersetzen aus","editValue":"Wert bearbeiten","emptyValue":"Leer","expand":"Ausklappen","fieldColumn":"Feld","fieldKeyPlaceholder":"Feldschlüssel","fill":"Fill","filterAI":"KI-ausgefüllt","filterAll":"Alle","filterEdited":"Bearbeitet","filterMissing":"Fehlend","groupConditional":"Bedingt","groupMultilingual":"Mehrsprachig","groupPrimitives":"Primitive Werte","groupRichText":"Formatierter Text","groupStructural":"Struktur","htmlType":"HTML","jumpToMissing":"Nächster fehlender Wert","keyExists":"Dieser Schlüssel existiert bereits","keyRequired":"Ein Schlüssel ist erforderlich","locale":"Sprache","lockedTooltip":"Ihre Rolle kann diese Sprache nicht bearbeiten","makeTranslatable":"Pro Sprache übersetzen","noResults":"Kein Feld entspricht den Filtern","openEditor":"Editor öffnen","readonlyChip":"schreibgeschützt","readonlyTooltip":"Stammt aus dem Code – hier nicht bearbeitbar","reorderField":"Zum Neuordnen ziehen (Alt + ↑/↓)","resetWarning":"Diese Änderung setzt den Wert zurück. Ein Teil des Inhalts geht verloren.","revert":"Zurücksetzen","sameForAllLocales":"Für alle Sprachen gleich","searchPlaceholder":"Pfad oder Wert suchen","skippedLocked":"Übersprungen (gesperrt):","sourceLocale":"Quelle","statusAI":"Von KI ausgefüllt, ungeprüft","statusDone":"Übersetzt","statusEdited":"Bearbeitet, nicht gespeichert","statusIdentical":"Identisch mit der Ausgangssprache","statusLocked":"Für Ihre Rolle gesperrt","statusMissing":"Wert fehlt","statusReadonly":"Schreibgeschützt","toggleCollapse":{"nodeType":"condition","condition":{"true":"Ausklappen","false":"Einklappen"}},"translateColumn":"Fehlende Werte dieser Sprache mit KI übersetzen","translateMissing":"Fehlende übersetzen","translateRow":"Dieses Feld mit KI in fehlende Sprachen übersetzen","typeSearchPlaceholder":"Typ suchen"},"ja":{"accept":"承認","acceptAll":"AIの値をすべて承認","add":"追加","addField":"フィールドを追加","addItem":"項目を追加","aiBanner":"ソース言語からAIが入力しました。公開前に確認してください。","backToList":"一覧に戻る","cancel":"キャンセル","changeType":"タイプを変更","close":"閉じる","collapse":"折りたたむ","confirm":"補完","confirmTranslateDescription":"翻訳元の言語","editValue":"値を編集","emptyValue":"空","expand":"展開","fieldColumn":"フィールド","fieldKeyPlaceholder":"フィールドキー","fill":"Fill","filterAI":"AI入力","filterAll":"すべて","filterEdited":"編集済み","filterMissing":"未入力","groupConditional":"条件付き","groupMultilingual":"多言語","groupPrimitives":"プリミティブ","groupRichText":"リッチテキスト","groupStructural":"構造","htmlType":"HTML","jumpToMissing":"次の未入力","keyExists":"このキーは既に存在します","keyRequired":"キーが必要です","locale":"言語","lockedTooltip":"あなたのロールではこの言語を編集できません","makeTranslatable":"言語ごとに翻訳","noResults":"条件に一致するフィールドはありません","openEditor":"エディターを開く","readonlyChip":"読み取り専用","readonlyTooltip":"コード由来のためここでは編集できません","reorderField":"ドラッグして並べ替え(Alt + ↑/↓)","resetWarning":"この変更で値がリセットされ、現在の内容の一部が失われます。","revert":"元に戻す","sameForAllLocales":"全言語で共通","searchPlaceholder":"パスまたは値を検索","skippedLocked":"スキップ(ロック中):","sourceLocale":"ソース","statusAI":"AI入力・未確認","statusDone":"翻訳済み","statusEdited":"編集済み・未保存","statusIdentical":"ソース言語と同一","statusLocked":"あなたのロールではロック中","statusMissing":"値がありません","statusReadonly":"読み取り専用","toggleCollapse":{"nodeType":"condition","condition":{"true":"展開","false":"折りたたむ"}},"translateColumn":"この言語の未入力をAIで翻訳","translateMissing":"未入力を翻訳","translateRow":"このフィールドを未入力の言語へAIで翻訳","typeSearchPlaceholder":"タイプを検索"},"ko":{"accept":"승인","acceptAll":"AI 값 모두 승인","add":"추가","addField":"필드 추가","addItem":"항목 추가","aiBanner":"원본 언어에서 AI가 작성했습니다. 게시 전에 검토하세요.","backToList":"목록으로 돌아가기","cancel":"취소","changeType":"유형 변경","close":"닫기","collapse":"접기","confirm":"채우기","confirmTranslateDescription":"번역할 누락 값, 원본 언어","editValue":"값 편집","emptyValue":"비어 있음","expand":"펼치기","fieldColumn":"필드","fieldKeyPlaceholder":"필드 키","fill":"Fill","filterAI":"AI 작성","filterAll":"전체","filterEdited":"편집됨","filterMissing":"누락","groupConditional":"조건부","groupMultilingual":"다국어","groupPrimitives":"기본형","groupRichText":"서식 있는 텍스트","groupStructural":"구조","htmlType":"HTML","jumpToMissing":"다음 누락 값","keyExists":"이미 존재하는 키입니다","keyRequired":"키가 필요합니다","locale":"언어","lockedTooltip":"내 역할로는 이 언어를 편집할 수 없습니다","makeTranslatable":"언어별로 번역","noResults":"필터와 일치하는 필드가 없습니다","openEditor":"편집기 열기","readonlyChip":"읽기 전용","readonlyTooltip":"코드에서 정의됨 — 여기서 편집할 수 없음","reorderField":"드래그하여 순서 변경 (Alt + ↑/↓)","resetWarning":"이 변경은 값을 초기화하며 현재 내용 일부가 사라집니다.","revert":"되돌리기","sameForAllLocales":"모든 언어에 동일","searchPlaceholder":"경로 또는 값 검색","skippedLocked":"건너뜀(잠김):","sourceLocale":"원본","statusAI":"AI 작성, 검토 안 됨","statusDone":"번역됨","statusEdited":"편집됨, 저장 안 됨","statusIdentical":"원본 언어와 동일","statusLocked":"내 역할에서 잠김","statusMissing":"값 누락","statusReadonly":"읽기 전용","toggleCollapse":{"nodeType":"condition","condition":{"true":"펼치기","false":"접기"}},"translateColumn":"이 언어의 누락 값을 AI로 번역","translateMissing":"누락 항목 번역","translateRow":"이 필드를 누락된 언어로 AI 번역","typeSearchPlaceholder":"유형 검색"},"zh":{"accept":"接受","acceptAll":"接受所有 AI 值","add":"添加","addField":"添加字段","addItem":"添加项","aiBanner":"由 AI 根据源语言填充。发布前请审核。","backToList":"返回列表","cancel":"取消","changeType":"更改类型","close":"关闭","collapse":"折叠","confirm":"填充","confirmTranslateDescription":"要翻译的缺失值,源语言","editValue":"编辑值","emptyValue":"空","expand":"展开","fieldColumn":"字段","fieldKeyPlaceholder":"字段键","fill":"Fill","filterAI":"AI 填充","filterAll":"全部","filterEdited":"已编辑","filterMissing":"缺失","groupConditional":"条件","groupMultilingual":"多语言","groupPrimitives":"基本类型","groupRichText":"富文本","groupStructural":"结构","htmlType":"HTML","jumpToMissing":"下一个缺失值","keyExists":"该键已存在","keyRequired":"需要键名","locale":"语言","lockedTooltip":"您的角色无法编辑此语言","makeTranslatable":"按语言翻译","noResults":"没有字段符合当前筛选","openEditor":"打开编辑器","readonlyChip":"只读","readonlyTooltip":"来自代码,无法在此编辑","reorderField":"拖动以重新排序(Alt + ↑/↓)","resetWarning":"此更改会重置值,部分当前内容将丢失。","revert":"还原","sameForAllLocales":"所有语言相同","searchPlaceholder":"搜索路径或值","skippedLocked":"已跳过(锁定):","sourceLocale":"源","statusAI":"AI 填充,未审核","statusDone":"已翻译","statusEdited":"已编辑,未保存","statusIdentical":"与源语言相同","statusLocked":"您的角色无法编辑","statusMissing":"缺少值","statusReadonly":"只读","toggleCollapse":{"nodeType":"condition","condition":{"true":"展开","false":"折叠"}},"translateColumn":"用 AI 翻译此语言的缺失值","translateMissing":"翻译缺失项","translateRow":"用 AI 将此字段翻译为缺失语言","typeSearchPlaceholder":"搜索类型"},"it":{"accept":"Accetta","acceptAll":"Accetta tutti i valori IA","add":"Aggiungi","addField":"Aggiungi campo","addItem":"Aggiungi elemento","aiBanner":"Compilato dall’IA dalla lingua di origine. Revisionalo prima di pubblicare.","backToList":"Torna all’elenco","cancel":"Annulla","changeType":"Cambia tipo","close":"Chiudi","collapse":"Comprimi","confirm":"Compila","confirmTranslateDescription":"Valori mancanti da tradurre da","editValue":"Modifica il valore","emptyValue":"Vuoto","expand":"Espandi","fieldColumn":"Campo","fieldKeyPlaceholder":"Chiave del campo","fill":"Fill","filterAI":"Compilati da IA","filterAll":"Tutti","filterEdited":"Modificati","filterMissing":"Mancanti","groupConditional":"Condizionale","groupMultilingual":"Multilingue","groupPrimitives":"Primitivi","groupRichText":"Testo formattato","groupStructural":"Struttura","htmlType":"HTML","jumpToMissing":"Prossimo valore mancante","keyExists":"Questa chiave esiste già","keyRequired":"È richiesta una chiave","locale":"Lingua","lockedTooltip":"Il tuo ruolo non può modificare questa lingua","makeTranslatable":"Traduci per lingua","noResults":"Nessun campo corrisponde ai filtri","openEditor":"Apri l’editor","readonlyChip":"sola lettura","readonlyTooltip":"Proviene dal codice: non modificabile qui","reorderField":"Trascina per riordinare (Alt + ↑/↓)","resetWarning":"Questa modifica reimposta il valore. Parte del contenuto andrà persa.","revert":"Ripristina","sameForAllLocales":"Uguale per tutte le lingue","searchPlaceholder":"Cerca un percorso o un valore","skippedLocked":"Saltate (bloccate):","sourceLocale":"origine","statusAI":"Compilato da IA, non revisionato","statusDone":"Tradotto","statusEdited":"Modificato, non salvato","statusIdentical":"Identico alla lingua di origine","statusLocked":"Bloccato per il tuo ruolo","statusMissing":"Valore mancante","statusReadonly":"Sola lettura","toggleCollapse":{"nodeType":"condition","condition":{"true":"Espandi","false":"Comprimi"}},"translateColumn":"Traduci con l’IA i valori mancanti di questa lingua","translateMissing":"Traduci mancanti","translateRow":"Traduci questo campo nelle lingue mancanti con l’IA","typeSearchPlaceholder":"Cerca un tipo"},"pt":{"accept":"Aceitar","acceptAll":"Aceitar todos os valores de IA","add":"Adicionar","addField":"Adicionar campo","addItem":"Adicionar item","aiBanner":"Preenchido por IA a partir do idioma de origem. Reveja antes de publicar.","backToList":"Voltar à lista","cancel":"Cancelar","changeType":"Alterar tipo","close":"Fechar","collapse":"Recolher","confirm":"Preencher","confirmTranslateDescription":"Valores em falta a traduzir de","editValue":"Editar o valor","emptyValue":"Vazio","expand":"Expandir","fieldColumn":"Campo","fieldKeyPlaceholder":"Chave do campo","fill":"Fill","filterAI":"Preenchidos por IA","filterAll":"Todos","filterEdited":"Editados","filterMissing":"Em falta","groupConditional":"Condicional","groupMultilingual":"Multilíngue","groupPrimitives":"Primitivos","groupRichText":"Texto formatado","groupStructural":"Estrutura","htmlType":"HTML","jumpToMissing":"Próximo valor em falta","keyExists":"Esta chave já existe","keyRequired":"É necessária uma chave","locale":"Idioma","lockedTooltip":"A sua função não pode editar este idioma","makeTranslatable":"Traduzir por idioma","noResults":"Nenhum campo corresponde aos filtros","openEditor":"Abrir o editor","readonlyChip":"só de leitura","readonlyTooltip":"Vem do código — não editável aqui","reorderField":"Arraste para reordenar (Alt + ↑/↓)","resetWarning":"Esta alteração repõe o valor. Parte do conteúdo atual será perdida.","revert":"Reverter","sameForAllLocales":"Igual para todos os idiomas","searchPlaceholder":"Pesquisar um caminho ou um valor","skippedLocked":"Ignorados (bloqueados):","sourceLocale":"origem","statusAI":"Preenchido por IA, não revisto","statusDone":"Traduzido","statusEdited":"Editado, não guardado","statusIdentical":"Idêntico ao idioma de origem","statusLocked":"Bloqueado para a sua função","statusMissing":"Valor em falta","statusReadonly":"Só de leitura","toggleCollapse":{"nodeType":"condition","condition":{"true":"Expandir","false":"Recolher"}},"translateColumn":"Traduzir com IA os valores em falta deste idioma","translateMissing":"Traduzir em falta","translateRow":"Traduzir este campo para os idiomas em falta com IA","typeSearchPlaceholder":"Pesquisar um tipo"},"hi":{"accept":"स्वीकार करें","acceptAll":"सभी AI मान स्वीकार करें","add":"जोड़ें","addField":"फ़ील्ड जोड़ें","addItem":"आइटम जोड़ें","aiBanner":"स्रोत भाषा से AI द्वारा भरा गया। प्रकाशित करने से पहले समीक्षा करें।","backToList":"सूची पर वापस जाएँ","cancel":"रद्द करें","changeType":"प्रकार बदलें","close":"बंद करें","collapse":"संक्षिप्त करें","confirm":"भरें","confirmTranslateDescription":"अनुवाद के लिए अनुपलब्ध मान, स्रोत","editValue":"मान संपादित करें","emptyValue":"खाली","expand":"विस्तार करें","fieldColumn":"फ़ील्ड","fieldKeyPlaceholder":"फ़ील्ड कुंजी","fill":"Fill","filterAI":"AI द्वारा भरा","filterAll":"सभी","filterEdited":"संपादित","filterMissing":"अनुपलब्ध","groupConditional":"सशर्त","groupMultilingual":"बहुभाषी","groupPrimitives":"मूल प्रकार","groupRichText":"रिच टेक्स्ट","groupStructural":"संरचना","htmlType":"HTML","jumpToMissing":"अगला अनुपलब्ध मान","keyExists":"यह कुंजी पहले से मौजूद है","keyRequired":"कुंजी आवश्यक है","locale":"भाषा","lockedTooltip":"आपकी भूमिका इस भाषा को संपादित नहीं कर सकती","makeTranslatable":"प्रत्येक भाषा के लिए अनुवाद करें","noResults":"वर्तमान फ़िल्टर से कोई फ़ील्ड मेल नहीं खाता","openEditor":"संपादक खोलें","readonlyChip":"केवल पढ़ने योग्य","readonlyTooltip":"कोड से आता है — यहाँ संपादित नहीं हो सकता","reorderField":"क्रम बदलने के लिए खींचें (Alt + ↑/↓)","resetWarning":"यह बदलाव मान को रीसेट करता है। वर्तमान सामग्री का कुछ हिस्सा खो जाएगा।","revert":"वापस लें","sameForAllLocales":"सभी भाषाओं के लिए समान","searchPlaceholder":"पथ या मान खोजें","skippedLocked":"छोड़ा गया (लॉक):","sourceLocale":"स्रोत","statusAI":"AI द्वारा भरा, समीक्षा नहीं हुई","statusDone":"अनुवादित","statusEdited":"संपादित, सहेजा नहीं गया","statusIdentical":"स्रोत भाषा के समान","statusLocked":"आपकी भूमिका के लिए लॉक","statusMissing":"मान अनुपलब्ध","statusReadonly":"केवल पढ़ने योग्य","toggleCollapse":{"nodeType":"condition","condition":{"true":"विस्तार करें","false":"संक्षिप्त करें"}},"translateColumn":"इस भाषा के अनुपलब्ध मानों का AI से अनुवाद करें","translateMissing":"अनुपलब्ध का अनुवाद करें","translateRow":"इस फ़ील्ड का अनुपलब्ध भाषाओं में AI से अनुवाद करें","typeSearchPlaceholder":"प्रकार खोजें"},"ar":{"accept":"قبول","acceptAll":"قبول كل قيم الذكاء الاصطناعي","add":"إضافة","addField":"إضافة حقل","addItem":"إضافة عنصر","aiBanner":"عبّأه الذكاء الاصطناعي من لغة المصدر. راجعه قبل النشر.","backToList":"العودة إلى القائمة","cancel":"إلغاء","changeType":"تغيير النوع","close":"إغلاق","collapse":"طي","confirm":"ملء","confirmTranslateDescription":"القيم المفقودة للترجمة من","editValue":"تعديل القيمة","emptyValue":"فارغ","expand":"توسيع","fieldColumn":"الحقل","fieldKeyPlaceholder":"مفتاح الحقل","fill":"Fill","filterAI":"معبأ بالذكاء الاصطناعي","filterAll":"الكل","filterEdited":"معدّل","filterMissing":"مفقود","groupConditional":"شرطي","groupMultilingual":"متعدد اللغات","groupPrimitives":"أنواع أساسية","groupRichText":"نص منسق","groupStructural":"البنية","htmlType":"HTML","jumpToMissing":"القيمة المفقودة التالية","keyExists":"هذا المفتاح موجود بالفعل","keyRequired":"المفتاح مطلوب","locale":"اللغة","lockedTooltip":"لا يمكن لدورك تعديل هذه اللغة","makeTranslatable":"ترجمة لكل لغة","noResults":"لا يوجد حقل يطابق عوامل التصفية","openEditor":"فتح المحرر","readonlyChip":"للقراءة فقط","readonlyTooltip":"مصدره الكود — لا يمكن تعديله هنا","reorderField":"اسحب لإعادة الترتيب (Alt + ↑/↓)","resetWarning":"هذا التغيير يعيد تعيين القيمة. سيُفقد جزء من المحتوى الحالي.","revert":"تراجع","sameForAllLocales":"نفسه لجميع اللغات","searchPlaceholder":"ابحث عن مسار أو قيمة","skippedLocked":"تم التخطي (مقفل):","sourceLocale":"المصدر","statusAI":"معبأ بالذكاء الاصطناعي، غير مراجع","statusDone":"مترجم","statusEdited":"معدّل، غير محفوظ","statusIdentical":"مطابق للغة المصدر","statusLocked":"مقفل لدورك","statusMissing":"قيمة مفقودة","statusReadonly":"للقراءة فقط","toggleCollapse":{"nodeType":"condition","condition":{"true":"توسيع","false":"طي"}},"translateColumn":"ترجمة القيم المفقودة لهذه اللغة بالذكاء الاصطناعي","translateMissing":"ترجمة المفقود","translateRow":"ترجمة هذا الحقل إلى اللغات المفقودة بالذكاء الاصطناعي","typeSearchPlaceholder":"ابحث عن نوع"},"ru":{"accept":"Принять","acceptAll":"Принять все значения ИИ","add":"Добавить","addField":"Добавить поле","addItem":"Добавить элемент","aiBanner":"Заполнено ИИ с исходного языка. Проверьте перед публикацией.","backToList":"Назад к списку","cancel":"Отмена","changeType":"Изменить тип","close":"Закрыть","collapse":"Свернуть","confirm":"Заполнить","confirmTranslateDescription":"Недостающие значения для перевода с","editValue":"Изменить значение","emptyValue":"Пусто","expand":"Развернуть","fieldColumn":"Поле","fieldKeyPlaceholder":"Ключ поля","fill":"Fill","filterAI":"Заполнено ИИ","filterAll":"Все","filterEdited":"Изменённые","filterMissing":"Отсутствуют","groupConditional":"Условный","groupMultilingual":"Многоязычный","groupPrimitives":"Примитивы","groupRichText":"Форматированный текст","groupStructural":"Структура","htmlType":"HTML","jumpToMissing":"Следующее недостающее значение","keyExists":"Такой ключ уже существует","keyRequired":"Нужен ключ","locale":"Язык","lockedTooltip":"Ваша роль не может редактировать этот язык","makeTranslatable":"Переводить для каждого языка","noResults":"Нет полей, подходящих под фильтры","openEditor":"Открыть редактор","readonlyChip":"только чтение","readonlyTooltip":"Задаётся в коде — здесь не редактируется","reorderField":"Перетащите для изменения порядка (Alt + ↑/↓)","resetWarning":"Это изменение сбросит значение. Часть текущего содержимого будет потеряна.","revert":"Откатить","sameForAllLocales":"Одинаково для всех языков","searchPlaceholder":"Поиск по пути или значению","skippedLocked":"Пропущено (заблокировано):","sourceLocale":"исходный","statusAI":"Заполнено ИИ, не проверено","statusDone":"Переведено","statusEdited":"Изменено, не сохранено","statusIdentical":"Совпадает с исходным языком","statusLocked":"Заблокировано для вашей роли","statusMissing":"Нет значения","statusReadonly":"Только чтение","toggleCollapse":{"nodeType":"condition","condition":{"true":"Развернуть","false":"Свернуть"}},"translateColumn":"Перевести недостающие значения этого языка с ИИ","translateMissing":"Перевести недостающее","translateRow":"Перевести это поле на недостающие языки с ИИ","typeSearchPlaceholder":"Поиск типа"}}}`),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`},xF=`text-text`,SF=({status:e,className:t})=>{let{statusMissing:n,statusEdited:r,statusAI:i,statusDone:a,statusIdentical:o,statusLocked:s,statusReadonly:c}=V(bF),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:I(`span`,{className:G(`inline-flex size-4 shrink-0 items-center justify-center`,t),title:l[e],children:[(()=>{switch(e){case`missing`:return I(`span`,{className:`block size-2.5 rounded-full border-2 border-warning bg-text-opposite`});case`edited`:return I(`span`,{className:`block size-2.5 rounded-full border-2 border-warning bg-text-opposite`});case`ai`:return I(kc,{className:G(`size-3.5`,xF)});case`done`:return I(Ts,{className:`size-3.5 text-text`});case`identical`:return I(`span`,{className:`font-mono text-xs leading-none font-bold text-warning`,children:`=`});case`locked`:return I(tc,{className:`size-3 text-neutral`});default:return null}})(),I(`span`,{className:`sr-only`,children:l[e]})]})};S();var CF=[`markdown`,`html`,`file`,`nested`],wF=e=>e.leafKind!==void 0&&CF.includes(e.leafKind),TF=[{content:`False`,value:!1},{content:`True`,value:!0}],EF=({value:e,isDisabled:t,onCommit:n,onStopEditing:r})=>{let{editValue:i}=V(bF),[a,o]=d(e),s=u(!1),c=u(null);return M(()=>{let e=c.current;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},[]),I(qD,{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()}})},DF=O(({row:e,cellKey:t,onOpenEditor:n,position:r,showStatus:i=!0,className:a})=>{let{getStatus:o,setCellValue:s}=rF(),c=V(bF),[l,f]=d(!1),p=u(null),m=e.cells[t],h=o(e,t),g=h===`locked`,_=e.leafKind===`readonly`,v=wF(e),y=m?.value,b=n=>s(e,t,n),x=()=>{f(!1),p.current?.focus()},S=()=>{g||_||(v?n(e.id,t):(e.leafKind===`text`||e.leafKind===`empty`)&&f(!0))};return I(`div`,{ref:p,role:`gridcell`,tabIndex:-1,"data-grid-position":r,"aria-readonly":g||_,title:g?c.lockedTooltip.value:void 0,onClick:l?void 0:S,onKeyDown:e=>{e.target===e.currentTarget&&e.key===`Enter`&&(e.preventDefault(),S())},className:G(`flex min-h-10 w-full max-w-xl min-w-0 items-start gap-2.5 rounded-lg px-3 py-2.5 transition-colors outline-none focus-visible:ring-2 focus-visible:ring-text/40`,!g&&!_&&`cursor-text hover:bg-text/5`,v&&`cursor-pointer`,g&&`cursor-not-allowed opacity-60`,a),children:[i&&I(SF,{status:h,className:`mt-0.5`}),(()=>{if(!m)return null;if(_)return I(`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 I(LD,{choices:TF,value:y===!0,onChange:e=>b(e),disabled:g,color:`text`,size:`xs`});if(e.leafKind===`number`)return I(UD,{type:`number`,size:`sm`,dir:`ltr`,defaultValue:typeof y==`number`?y:``,disabled:g,"aria-label":c.editValue.value,onKeyDown:e=>e.stopPropagation(),onBlur:e=>{let t=Number(e.currentTarget.value);!Number.isNaN(t)&&t!==y&&b(t)}},String(y));if(l)return I(EF,{value:typeof y==`string`?y:``,isDisabled:g,onCommit:b,onStopEditing:x});let t=uF(y);return I(`span`,{dir:`auto`,className:G(`line-clamp-3 min-w-0 flex-1 text-sm break-words whitespace-pre-wrap`,t===``&&`text-neutral italic`,v&&`line-clamp-1`,g&&`text-neutral`),title:v?t:void 0,children:t===``?c.emptyValue:t})})(),v&&!g&&I(sc,{className:`mt-0.5 size-3.5 shrink-0 text-neutral`,"aria-label":c.openEditor.value})]})});DF.displayName=`ContentGridCell`;var OF={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{array:`Array`,boolean:`Boolean`,condition:`Condition`,enumeration:`Enumeration`,file:`File`,gender:`Gender`,insertion:`Insertion`,markdown:`Markdown`,multilingual:`Multilingual content`,nest:`Nesting`,node:`Object`,number:`Number`,plural:`Plural`,reactNode:`React Node`,select:`Select`,text:`Text`,triggerPlaceHolder:`Node type`},"en-GB":{array:`Array`,boolean:`Boolean`,condition:`Condition`,enumeration:`Enumeration`,file:`File`,gender:`Gender`,insertion:`Insertion`,markdown:`Markdown`,multilingual:`Multilingual content`,nest:`Nesting`,node:`Object`,number:`Number`,plural:`Plural`,reactNode:`React Node`,select:`Select`,text:`Text`,triggerPlaceHolder:`Node type`},fr:{array:`Tableau`,boolean:`Booléen`,condition:`Condition`,enumeration:`Énumération`,file:`Fichier`,gender:`Genre`,insertion:`Insertion`,markdown:`Markdown`,multilingual:`Contenu Multilingue`,nest:`Imbriquation`,node:`Objet`,number:`Nombre`,plural:`Pluriel`,reactNode:`Node React`,select:`Sélection`,text:`Texte`,triggerPlaceHolder:`Type du Nœud`},es:{array:`Arreglo`,boolean:`Booleano`,condition:`Condición`,enumeration:`Enumeración`,file:`Archivo`,gender:`Género`,insertion:`Inserción`,markdown:`Markdown`,multilingual:`Contenido multilingüe`,nest:`Anidación`,node:`Objeto`,number:`Número`,plural:`Plural`,reactNode:`Nodo React`,select:`Selección`,text:`Texto`,triggerPlaceHolder:`Tipo del nodo`},de:{array:`Array`,boolean:`Bool`,condition:`Bedingung`,enumeration:`Enumeration`,file:`Datei`,gender:`Geschlecht`,insertion:`Einfügung`,markdown:`Markdown`,multilingual:`Mehrsprachiger Inhalt`,nest:`Vererbung`,node:`Objekt`,number:`Zahl`,plural:`Plural`,reactNode:`React-Knoten`,select:`Auswahl`,text:`Text`,triggerPlaceHolder:`Knotentyp`},ja:{array:`配列`,boolean:`ブール`,condition:`条件`,enumeration:`列挙`,file:`ファイル`,gender:`性別`,insertion:`挿入`,markdown:`マークダウン`,multilingual:`複数言語コンテンツ`,nest:`ネスト`,node:`オブジェクト`,number:`数字`,plural:`複数形`,reactNode:`リアル・ノード`,select:`選択`,text:`テキスト`,triggerPlaceHolder:`ノードタイプ`},ko:{array:`배열`,boolean:`불리언`,condition:`조건`,enumeration:`열거`,file:`파일`,gender:`성별`,insertion:`삽입`,markdown:`마크다운`,multilingual:`다중 언어 콘텐츠`,nest:`중첩`,node:`객체`,number:`숫자`,plural:`복수`,reactNode:`리액 노드`,select:`선택`,text:`텍스트`,triggerPlaceHolder:`노드 유형`},zh:{array:`数组`,boolean:`布尔`,condition:`条件`,enumeration:`枚举`,file:`文件`,gender:`性别`,insertion:`插入`,markdown:`Markdown`,multilingual:`多语言内容`,nest:`嵌套`,node:`对象`,number:`数字`,plural:`复数`,reactNode:`React 节点`,select:`选择`,text:`文本`,triggerPlaceHolder:`节点类型`},it:{array:`Array`,boolean:`Booleano`,condition:`Condizione`,enumeration:`Enumerazione`,file:`File`,gender:`Genere`,insertion:`Inserimento`,markdown:`Markdown`,multilingual:`Contenuto multilingue`,nest:`Nidificazione`,node:`Oggetto`,number:`Numero`,plural:`Plurale`,reactNode:`Nodo React`,select:`Selezione`,text:`Testo`,triggerPlaceHolder:`Tipo di nodo`},pt:{array:`Array`,boolean:`Booleano`,condition:`Condição`,enumeration:`Enumeração`,file:`Arquivo`,gender:`Gênero`,insertion:`Inserção`,markdown:`Markdown`,multilingual:`Conteúdo multilíngue`,nest:`Nido`,node:`Objeto`,number:`Número`,plural:`Plural`,reactNode:`Nó React`,select:`Seleção`,text:`Texto`,triggerPlaceHolder:`Tipo de nó`},hi:{array:`ऐरे`,boolean:`बूलियन`,condition:`शर्त्ता`,enumeration:`गणना`,file:`फ़ाइल`,gender:`लिंग`,insertion:`सम्मिलन`,markdown:`मार्कडाउन`,multilingual:`बहुभाषी सामग्री`,nest:`नेस्टेंस`,node:`ऑब्जेक्ट`,number:`संख्या`,plural:`बहुवचन`,reactNode:`रेड नोड`,select:`चयन`,text:`पाठ`,triggerPlaceHolder:`नोड प्रकार`},ar:{array:`مصفوفة`,boolean:`منطقي`,condition:`شرط`,enumeration:`تعداد`,file:`ملف`,gender:`جنس`,insertion:`إدراج`,markdown:`مارك داون`,multilingual:`محتوى متعدد اللغات`,nest:`مستوى`,node:`كائن`,number:`رقم`,plural:`جمع`,reactNode:`عقدة رياكت`,select:`تحديد`,text:`نص`,triggerPlaceHolder:`نوع العقدة`},ru:{array:`Массив`,boolean:`Булево`,condition:`Условие`,enumeration:`Перечисление`,file:`Файл`,gender:`Пол`,insertion:`Вставка`,markdown:`Markdown`,multilingual:`Многоязычный контент`,nest:`Вложенность`,node:`Объект`,number:`Число`,plural:`Множественное число`,reactNode:`Реакт узел`,select:`Выбор`,text:`Текст`,triggerPlaceHolder:`Тип узла`}}},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`};S();var kF=[{groupKey:`groupPrimitives`,nodeTypes:[$r,ei,ti]},{groupKey:`groupMultilingual`,nodeTypes:[zr]},{groupKey:`groupConditional`,nodeTypes:[Br,Vr,ni,ri,Hr]},{groupKey:`groupRichText`,nodeTypes:[Zr,Qr,Ur]},{groupKey:`groupStructural`,nodeTypes:[Gr,Kr,qr,Wr]}],AF=({row:e,className:t})=>{let{changeRowType:n,getIsTypeChangeLossless:r}=rF(),i=V(bF),a=V(OF),[o,s]=d(!1),c=u(null),[l,f]=d(``),[p,m]=d(),h=lF(e.typeChain),g=e.leafKind===`readonly`,_=e.typeChain[0],v=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,y=()=>c.current?.hidePopover(),b=e=>{s(e),e||(f(``),m(void 0))},x=t=>{n(e,t),y()},S=t=>{if(t===_)return y();if(r(e,t))return x(t);m(t)},C=G(`inline-flex shrink-0 items-center rounded-md border border-neutral/30 px-1.5 py-0.5 font-mono text-[10px] leading-none text-neutral`,t);if(g)return I(`span`,{className:C,title:i.readonlyTooltip.value,children:i.readonlyChip});let w=l.trim().toLowerCase();return I(yA,{identifier:`type-picker`,className:`inline-flex shrink-0`,children:[I(yA.Trigger,{identifier:`type-picker`,className:G(C,`cursor-pointer transition-colors hover:border-text hover:text-text`),"aria-label":`${i.changeType.value}: ${h}`,"aria-expanded":o,dir:`ltr`,children:h}),I(yA.Panel,{ref:c,identifier:`type-picker`,onOpenChange:b,roundedSize:`xl`,className:`min-w-74 p-2`,children:[o&&p&&I(`div`,{className:`flex flex-col gap-3 p-1`,children:[I(`p`,{className:`flex items-start gap-2 text-sm text-warning`,children:[I(Nc,{className:`mt-0.5 size-4 shrink-0`}),i.resetWarning]}),I(`div`,{className:`flex justify-end gap-2`,children:[I(Z,{label:i.cancel.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>m(void 0),children:i.cancel}),I(Z,{label:i.changeType.value,color:`error`,variant:`outline`,size:`sm`,onClick:()=>x(p),children:i.changeType})]})]}),o&&!p&&I(`div`,{className:`flex flex-col gap-4`,children:[I(UD,{size:`sm`,className:`bg-text-opposite`,autoFocus:o,value:l,onChange:e=>f(e.currentTarget.value),placeholder:i.typeSearchPlaceholder.value,"aria-label":i.typeSearchPlaceholder.value}),I(`div`,{className:`max-h-xl flex flex-col gap-2 overflow-y-auto`,children:kF.map(({groupKey:e,nodeTypes:t})=>{let n=t.filter(e=>w===``||e.toLowerCase().includes(w)||v(e).toLowerCase().includes(w));return n.length===0?null:I(`div`,{className:`flex flex-col`,children:[I(`span`,{className:`px-2 py-1 text-xs text-neutral`,children:i[e]}),n.map(e=>I(`button`,{type:`button`,onClick:()=>S(e),"aria-current":e===_,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:[I(`span`,{children:v(e)}),I(`span`,{className:`font-mono text-[10px] text-neutral`,dir:`ltr`,children:e})]},e))]},e)})})]})]})]})};S();var jF={horizontal:{forward:`ArrowRight`,backward:`ArrowLeft`},vertical:{forward:`ArrowDown`,backward:`ArrowUp`}},MF=({itemIds:e,onMove:t,canMove:n=()=>!0,orientation:r=`horizontal`,title:i})=>{let[a,o]=d(),[s,c]=d(),l=()=>{o(void 0),c(void 0)},u=e=>a!==void 0&&a!==e&&n(a,e),f=t=>{if(s===t&&u(t))return e.indexOf(a)<e.indexOf(t)?`after`:`before`},p=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}=jF[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))}}),m=e=>({"data-drop-position":f(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:p,getDropZoneProps:m,getReorderProps:e=>({...p(e),...m(e)})}},NF=`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`;S();var PF=1.25,FF=.75,IF=e=>({paddingInlineStart:`${FF+e*PF}rem`}),LF=`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`,RF=({depth:e})=>Array.from({length:e},(e,t)=>I(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 border-s border-neutral/20`,style:{insetInlineStart:`${FF+t*PF+.4375}rem`}},t)),zF=O(({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}=rF(),m=V(bF),h=e.kind===`group`,g=e.kind===`leaf`&&e.isLocalized?u(t,[e.id]):[],_=()=>h?I(`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]?I(DF,{row:e,cellKey:t,position:`${n}:${r}`,onOpenEditor:s},t):I(`div`,{className:`flex items-center px-2 text-xs text-neutral`,"aria-hidden":!0,children:`—`},t)):I(b,{children:[I(DF,{row:e,cellKey:`*`,position:`${n}:0`,onOpenEditor:s}),t.length>1&&I(`div`,{className:`flex items-center gap-2 px-2 py-1.5 text-xs text-neutral`,style:{gridColumn:`span ${t.length-1}`},children:[I(`span`,{className:`italic`,children:m.sameForAllLocales}),e.leafKind!==`readonly`&&I(Z,{label:m.makeTranslatable.value,variant:`hoverable`,color:`text`,size:`sm`,Icon:$s,onClick:()=>p(e,`translation`),children:m.makeTranslatable})]})]});return I(`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:[I(`div`,{role:`rowheader`,className:G(LF,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:IF(e.depth),children:[I(RF,{depth:e.depth}),c&&I(Z,{...c,label:m.reorderField.value,Icon:Zs,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 group-hover/row:opacity-100 hover:bg-text/10 focus-visible:opacity-100 active:cursor-grabbing`,iconClassName:`size-3`}),h?I(Z,{label:m.toggleCollapse(i).value,Icon:js,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)}):I(`span`,{className:`w-3.5 shrink-0`}),I(`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 text-start text-sm break-words [font-variant-ligatures:none] hover:underline`,h?`font-semibold`:`text-text`),children:vF(e.label)}),I(AF,{row:e,className:`mt-0.5`}),g.length>0&&I(Z,{label:m.translateRow.value,title:m.translateRow.value,Icon:kc,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 group-hover/row:opacity-100 focus-visible:opacity-100`,`text-text`)})]}),_()]})});zF.displayName=`ContentGridRow`;var BF=e=>e&&typeof e==`object`&&!Array.isArray(e)?Object.keys(e):[],VF=({addLine:e,gridTemplateColumns:t,rootKeys:n})=>{let{dictionary:r}=rF(),{addEditedContent:i}=_T(),a=V(bF),[o,s]=d(!1),[c,l]=d(``),[u,f]=d(),p=r.localId,m=e.parentRow?.rootKeyPath??[],h=e.parentRow?BF(e.parentRow.rootNode):n,g=()=>{let t=e.parentRow?.rootNode??[];i(p,Zi(t[0])??``,[...m,{type:Kr,key:t.length}],!1)},_=()=>{s(!1),l(``),f(void 0)},v=e=>{e.preventDefault();let t=c.trim();if(t===``)return f(a.keyRequired.value);if(h.includes(t))return f(a.keyExists.value);i(p,``,[...m,{type:Gr,key:t}]),_()},y=e.kind===`item`?a.addItem:a.addField;return I(`div`,{className:`grid min-w-full`,style:{gridTemplateColumns:t},children:I(`div`,{className:G(LF,`items-center`),style:IF(e.depth),children:[I(RF,{depth:e.depth}),I(`span`,{className:`w-3.5 shrink-0`}),o?I(`form`,{onSubmit:v,className:`flex min-w-0 flex-1 flex-col gap-1`,children:[I(`div`,{className:`flex items-center gap-1`,children:[I(UD,{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),f(void 0)},onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&_()}}),I(Z,{type:`submit`,label:a.add.value,size:`sm`,color:`text`,children:a.add})]}),u&&I(`span`,{className:`text-xs text-error`,children:u})]}):I(Z,{label:y.value,variant:`hoverable`,color:`neutral`,size:`sm`,Icon:_c,onClick:()=>e.kind===`item`?g():s(!0),children:y})]})})},HF=({row:e,cellKey:t,isNarrow:n,onClose:r})=>{let{dictionary:i,aiCellIds:a,acceptAICell:o,revertAICell:s}=rF(),c=V(bF),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=>iA(e.id,t)).filter(e=>a.has(e));return I(`section`,{"aria-label":e.id,className:`flex h-full min-h-0 w-full min-w-0 flex-col`,children:[I(`header`,{className:`flex items-center gap-2 border-b border-neutral/20 px-3 py-2`,children:[n&&I(Z,{label:c.backToList.value,variant:`hoverable`,color:`text`,size:`icon-md`,Icon:ys,onClick:r}),I(`span`,{dir:`ltr`,className:`min-w-0 truncate font-mono text-sm font-semibold`,title:e.id,children:e.id}),I(AF,{row:e}),!n&&I(Z,{label:c.close.value,variant:`hoverable`,color:`text`,size:`icon-md`,Icon:Vc,className:`ms-auto`,onClick:r})]}),f.length>0&&I(`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:[I(kc,{className:`size-4 shrink-0`}),I(`span`,{className:`flex-1`,children:c.aiBanner}),I(Z,{label:c.revert.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>f.forEach(s),children:c.revert}),I(Z,{label:c.accept.value,color:`text`,size:`sm`,onClick:()=>f.forEach(o),children:c.accept})]}),I(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:l&&I(Gk,{dictionary:i,section:u,keyPath:d},e.id)})]})};S();var UF=({children:e,onClickOutSide:t,listenForEscape:n=!1,disabled:r=!1,...i})=>{let a=u(null),o=A(e=>{r||a.current&&!a.current.contains(e.target)&&t()},[t,r]),s=A(e=>{!r&&n&&e.key===`Escape`&&t()},[t,r,n]);return M(()=>(document.addEventListener(`mousedown`,o,{passive:!0}),n&&document.addEventListener(`keydown`,s),()=>{document.removeEventListener(`mousedown`,o),n&&document.removeEventListener(`keydown`,s)}),[o,s,n]),I(`div`,{ref:a,...i,role:i.role||`region`,children:e})},WF=({className:e,...t})=>I(`div`,{className:`relative flex w-full items-center gap-1`,children:[I(Dc,{className:`absolute inset-s-2 size-4`}),I(UD,{...t,type:`search`,className:G(`ps-8`,e)})]});S();var GF={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},KF=e=>typeof e==`number`?e:GF[e]??GF.md,qF=()=>{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)},JF=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},YF=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},XF=Object.freeze({isMobileScreen:void 0,isMobileUserAgent:void 0,isMobile:void 0,isIOS:void 0,isMac:void 0}),ZF,QF=()=>(ZF??={isMobileUserAgent:qF(),isIOS:JF(),isMac:YF()},ZF),$F=new Map,eI=e=>{let t=window.matchMedia(`(max-width: ${e}px)`),n=new Set,r=e=>({...QF(),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}},tI=e=>{let t=$F.get(e);if(t)return t;let n=eI(e);return $F.set(e,n),n},nI=()=>XF,rI=(e=`md`)=>{let t=KF(e),n=A(e=>tI(t).subscribe(e),[t]),r=A(()=>tI(t).getSnapshot(),[t]);return h(n,r,nI)};S();var iI=e=>e.split(` + `).map(e=>e.trim()),aI=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,oI=(e,t)=>{let n=t.map(aI),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(aI(e)));if(!i)return!1;let a=aI(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},sI=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,cI=(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},lI=({shortcut:e,onTriggered:t,display:n=!0,disabled:r=!1,className:i,size:a=`md`})=>{let{isMac:o}=rI(),s=cI(e,o??!1),c=x(()=>iI(s),[s]),[l,u]=d(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(sI(a))):s.add(a.toUpperCase()),u(s),!r&&t&&oI(e,c)){let n=c.includes(`Escape`);if(i&&!n)return;e.preventDefault(),t()}},n=()=>{u(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=aI(e);return l.has(e)||l.has(t)||l.has(n)||e===`⌘`&&l.has(`Meta`)||e===`Ctrl`&&l.has(`Control`)||e===`⌥`&&l.has(`Alt`)||e===`Alt`&&l.has(`Alt`)||e===`←`&&l.has(`ArrowLeft`)||e===`→`&&l.has(`ArrowRight`)||e===`↑`&&l.has(`ArrowUp`)||e===`↓`&&l.has(`ArrowDown`)};return I(`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-sans font-medium`,`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=sI(t);return I(`span`,{className:`inline-flex items-center`,children:[n>0&&I(`span`,{className:`text-neutral/50`,children:`+`}),I(`span`,{className:G(`min-w-4 px-0.5 text-center`,f(t)&&`scale-120 font-bold text-foreground`),suppressHydrationWarning:!0,children:i})]},r)})})},uI={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{languageListLabel:`Language list`,localeSwitcherLabel:`Language switcher`,reorderLocale:`Drag to reorder (Alt + ↑/↓)`,searchInput:{ariaLabel:`Language search`,placeholder:`Search a locale`,text:`Search Locale`},seeAllLocalesSwitch:{false:`See only selected locales`,true:`See all locales`},switchTo:`Switch to`},"en-GB":{languageListLabel:`Language list`,localeSwitcherLabel:`Language switcher`,reorderLocale:`Drag to reorder (Alt + ↑/↓)`,searchInput:{ariaLabel:`Language search`,placeholder:`Search a locale`,text:`Search Locale`},seeAllLocalesSwitch:{false:`See only selected locales`,true:`See all locales`},switchTo:`Switch to`},fr:{languageListLabel:`Liste des langues`,localeSwitcherLabel:`Changer de langue`,reorderLocale:`Glisser pour réordonner (Alt + ↑/↓)`,searchInput:{ariaLabel:`Recherche de langue`,placeholder:`Rechercher une locale`,text:`Rechercher la locale`},seeAllLocalesSwitch:{false:`Voir seulement les langues sélectionnées`,true:`Voir toutes les langues`},switchTo:`Passer à`},es:{languageListLabel:`Lista de idiomas`,localeSwitcherLabel:`Cambiar idioma`,reorderLocale:`Arrastre para reordenar (Alt + ↑/↓)`,searchInput:{ariaLabel:`Búsqueda de idioma`,placeholder:`Buscar un idioma`,text:`Buscar idioma`},seeAllLocalesSwitch:{false:`Ver solo los idiomas seleccionados`,true:`Ver todos los idiomas`},switchTo:`Cambiar a`},de:{languageListLabel:`Sprachliste`,localeSwitcherLabel:`Sprachwechsler`,reorderLocale:`Zum Neuordnen ziehen (Alt + ↑/↓)`,searchInput:{ariaLabel:`Sprachsuche`,placeholder:`Sprache suchen`,text:`Sprache durchsuchen`},seeAllLocalesSwitch:{false:`Nur ausgewählte Sprachen anzeigen`,true:`Alle Sprachen anzeigen`},switchTo:`Wechseln Sie zu`},ja:{languageListLabel:`言語リスト`,localeSwitcherLabel:`言語スイッチャー`,reorderLocale:`ドラッグして並べ替え(Alt + ↑/↓)`,searchInput:{ariaLabel:`言語検索`,placeholder:`ロケールを検索`,text:`ロケールを検索`},seeAllLocalesSwitch:{false:`選択された言語のみを表示`,true:`すべての言語を表示`},switchTo:`に切り替える`},ko:{languageListLabel:`언어 목록`,localeSwitcherLabel:`언어 스위치`,reorderLocale:`드래그하여 순서 변경 (Alt + ↑/↓)`,searchInput:{ariaLabel:`언어 검색`,placeholder:`언어 검색`,text:`언어 검색`},seeAllLocalesSwitch:{false:`선택한 언어만 보기`,true:`모든 언어 보기`},switchTo:`전환`},zh:{languageListLabel:`语言列表`,localeSwitcherLabel:`语言切换器`,reorderLocale:`拖动以重新排序(Alt + ↑/↓)`,searchInput:{ariaLabel:`语言搜索`,placeholder:`搜索语言`,text:`搜索语言`},seeAllLocalesSwitch:{false:`仅查看选定的语言`,true:`查看所有语言`},switchTo:`切换到`},it:{languageListLabel:`Elenco lingue`,localeSwitcherLabel:`Cambia lingua`,reorderLocale:`Trascina per riordinare (Alt + ↑/↓)`,searchInput:{ariaLabel:`Ricerca lingua`,placeholder:`Cerca una lingua`,text:`Cerca lingua`},seeAllLocalesSwitch:{false:`Vedi solo le lingue selezionate`,true:`Vedi tutte le lingue`},switchTo:`Passa a`},pt:{languageListLabel:`Lista de idiomas`,localeSwitcherLabel:`Mudar idioma`,reorderLocale:`Arraste para reordenar (Alt + ↑/↓)`,searchInput:{ariaLabel:`Pesquisa de idioma`,placeholder:`Pesquisar um idioma`,text:`Pesquisar idioma`},seeAllLocalesSwitch:{false:`Ver apenas os idiomas selecionados`,true:`Ver todos os idiomas`},switchTo:`Mudar para`},hi:{languageListLabel:`भाषा सूची`,localeSwitcherLabel:`भाषा स्विचर`,reorderLocale:`क्रम बदलने के लिए खींचें (Alt + ↑/↓)`,searchInput:{ariaLabel:`भाषा खोजें`,placeholder:`भाषा खोजें`,text:`भाषा खोजें`},seeAllLocalesSwitch:{false:`केवल चुने गए भाषाओं को देखें`,true:`सभी भाषाओं को देखें`},switchTo:`स्विच करें`},ar:{languageListLabel:`قائمة اللغات`,localeSwitcherLabel:`مبدل اللغة`,reorderLocale:`اسحب لإعادة الترتيب (Alt + ↑/↓)`,searchInput:{ariaLabel:`بحث اللغة`,placeholder:`بحث اللغة`,text:`بحث اللغة`},seeAllLocalesSwitch:{false:`عرض اللغات المحددة فقط`,true:`عرض جميع اللغات`},switchTo:`التبديل إلى`},ru:{languageListLabel:`Список языков`,localeSwitcherLabel:`Переключатель языка`,reorderLocale:`Перетащите для изменения порядка (Alt + ↑/↓)`,searchInput:{ariaLabel:`Поиск языка`,placeholder:`Поиск языка`,text:`Поиск языка`},seeAllLocalesSwitch:{false:`Показать только выбранные языки`,true:`Показать все языки`},switchTo:`Переключиться на`}}},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`},dI=({children:e,className:t,identifier:n,...r})=>I(`div`,{className:G(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});dI.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>I(Z,{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}),dI.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})=>I(`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:I(bD,{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 fI={key:`locale-switcher-drop-down`,content:{nodeType:`translation`,translation:{en:{languageListLabel:`Language list`,localeSwitcherLabel:`Language switcher`,searchInput:{ariaLabel:`Language search`,placeholder:`Search a locale`,text:`Search Locale`},switchTo:`Switch to`},"en-GB":{languageListLabel:`Language list`,localeSwitcherLabel:`Language switcher`,searchInput:{ariaLabel:`Language search`,placeholder:`Search a locale`,text:`Search Locale`},switchTo:`Switch to`},fr:{languageListLabel:`Liste des langues`,localeSwitcherLabel:`Changer de langue`,searchInput:{ariaLabel:`Recherche de langue`,placeholder:`Rechercher une locale`,text:`Rechercher la locale`},switchTo:`Passer à`},es:{languageListLabel:`Lista de idiomas`,localeSwitcherLabel:`Cambiar idioma`,searchInput:{ariaLabel:`Búsqueda de idioma`,placeholder:`Buscar un idioma`,text:`Buscar idioma`},switchTo:`Cambiar a`},de:{languageListLabel:`Sprachliste`,localeSwitcherLabel:`Sprachwechsler`,searchInput:{ariaLabel:`Sprachsuche`,placeholder:`Sprache suchen`,text:`Sprache durchsuchen`},switchTo:`Wechseln Sie zu`},ja:{languageListLabel:`言語リスト`,localeSwitcherLabel:`言語スイッチャー`,searchInput:{ariaLabel:`言語検索`,placeholder:`ロケールを検索`,text:`ロケールを検索`},switchTo:`に切り替える`},ko:{languageListLabel:`언어 목록`,localeSwitcherLabel:`언어 스위치`,searchInput:{ariaLabel:`언어 검색`,placeholder:`언어 검색`,text:`언어 검색`},switchTo:`전환`},zh:{languageListLabel:`语言列表`,localeSwitcherLabel:`语言切换器`,searchInput:{ariaLabel:`语言搜索`,placeholder:`搜索语言`,text:`搜索语言`},switchTo:`切换到`},it:{languageListLabel:`Elenco lingue`,localeSwitcherLabel:`Cambia lingua`,searchInput:{ariaLabel:`Ricerca lingua`,placeholder:`Cerca una lingua`,text:`Cerca lingua`},switchTo:`Passa a`},pt:{languageListLabel:`Lista de idiomas`,localeSwitcherLabel:`Mudar idioma`,searchInput:{ariaLabel:`Pesquisa de idioma`,placeholder:`Pesquisar um idioma`,text:`Pesquisar idioma`},switchTo:`Mudar para`},hi:{languageListLabel:`भाषा सूची`,localeSwitcherLabel:`भाषा स्विचर`,searchInput:{ariaLabel:`भाषा खोजें`,placeholder:`भाषा खोजें`,text:`भाषा खोजें`},switchTo:`स्विच करें`},ar:{languageListLabel:`قائمة اللغات`,localeSwitcherLabel:`مبدل اللغة`,searchInput:{ariaLabel:`بحث اللغة`,placeholder:`بحث اللغة`,text:`بحث اللغة`},switchTo:`التبديل إلى`},ru:{languageListLabel:`Список языков`,localeSwitcherLabel:`Переключатель языка`,searchInput:{ariaLabel:`Поиск языка`,placeholder:`Поиск языка`,text:`Поиск языка`},switchTo:`Переключиться на`}}},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 pI(e){return Array.isArray?Array.isArray(e):CI(e)===`[object Array]`}function mI(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 hI(e){return e==null?``:mI(e)}function gI(e){return typeof e==`string`}function _I(e){return typeof e==`number`}function vI(e){return e===!0||e===!1||bI(e)&&CI(e)==`[object Boolean]`}function yI(e){return typeof e==`object`}function bI(e){return yI(e)&&e!==null}function xI(e){return e!=null}function SI(e){return!e.trim().length}function CI(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var wI=`Incorrect 'index' type`,TI=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,EI=e=>`Invalid value for key ${e}`,DI=e=>`Pattern length exceeds max of ${e}.`,OI=e=>`Missing ${e} property in key`,kI=e=>`Property 'weight' in key '${e}' must be a positive integer`,AI=`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.`,jI=Object.prototype.hasOwnProperty,MI=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=NI(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 NI(e){let t=null,n=null,r=null,i=1,a=null;if(gI(e)||pI(e))r=e,t=PI(e),n=FI(e);else{if(!jI.call(e,`name`))throw Error(OI(`name`));let o=e.name;if(r=o,jI.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(kI(FI(o)));t=PI(o),n=FI(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function PI(e){return pI(e)?e:e.split(`.`)}function FI(e){return pI(e)?e.join(`.`):e}function II(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(xI(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!xI(s))return;if(a===t.length-1&&(gI(s)||_I(s)||vI(s)||typeof s==`bigint`))n.push(o===void 0?hI(s):{v:hI(s),i:o});else if(pI(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,gI(t)?t.split(`.`):t,0),r?n:n[0]}var LI={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},RI={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},zI={location:0,threshold:.6,distance:100},BI={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:II,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},$=Object.freeze({...RI,...LI,...zI,...BI});function VI(e){return e>=9&&e<=13||e===32||e===160}function HI(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++)VI(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 UI=class{constructor({getFn:e=$.getFn,fieldNormWeight:t=$.fieldNormWeight}={}){this.norm=HI(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(gI(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(TI);if(gI(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(TI);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!xI(e)||SI(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(xI(i)){if(pI(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(xI(n)){if(gI(n)){if(!SI(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(xI(n.v)){let t=gI(n.v)?n.v:hI(n.v);if(!SI(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(gI(i)&&!SI(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 WI(e,t,{getFn:n=$.getFn,fieldNormWeight:r=$.fieldNormWeight}={}){let i=new UI({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(NI)),i.setSources(t),i.create(),i}function GI(e,{getFn:t=$.getFn,fieldNormWeight:n=$.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new UI({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function KI(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 qI(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(DI(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=KI(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function JI(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 YI(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 XI={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},ZI=RegExp(`[`+Object.keys(XI).join(``)+`]`,`g`),QI=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(ZI,e=>XI[e]):e=>e,$I=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?QI(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:JI(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?QI(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}=qI(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=YI(u)),p}},eL=new Set([`fuzzy`,`include`]);function tL(e){return e.startsWith(`inverse`)}var nL=[{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 $I(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)}}}}],rL=nL.length,iL=`\0`,aL=`|`;function oL(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 sL(e,t){let n=e.match(t);return n?n[1]:null}function cL(e,t={}){return e.replace(/\\\|/g,iL).split(aL).map(e=>{let n=oL(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<rL;){let e=nL[o],n=sL(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<rL;){let e=nL[o],n=sL(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var lL=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?QI(e):e,this.pattern=e,this.query=cL(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?QI(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,tL(r.type)&&(c=!0),n&&(eL.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=YI(o)),e}}return{isMatch:!1,score:1}}},uL=[];function dL(...e){uL.push(...e)}function fL(e,t){for(let n=0,r=uL.length;n<r;n+=1){let r=uL[n];if(r.condition(e,t))return new r(e,t)}return new $I(e,t)}var pL={AND:`$and`,OR:`$or`},mL={PATH:`$path`,PATTERN:`$val`},hL=e=>!!(e[pL.AND]||e[pL.OR]),gL=e=>!!e[mL.PATH],_L=e=>!pI(e)&&yI(e)&&!hL(e),vL=e=>({[pL.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function yL(e,t,{auto:n=!0}={}){let r=e=>{if(gI(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=fL(e,t)),r}let i=Object.keys(e),a=gL(e);if(!a&&i.length>1&&!hL(e))return r(vL(e));if(_L(e)){let r=a?e[mL.PATH]:i[0],o=a?e[mL.PATTERN]:e[r];if(!gI(o))throw Error(EI(r));let s={keyId:FI(r),pattern:o};return n&&(s.searcher=fL(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];pI(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return hL(e)||(e=vL(e)),r(e)}function bL(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 xL(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){e.forEach(e=>{e.score=bL(e.matches,{ignoreFieldNorm:t})})}var SL=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 CL(e){let t=[];return e.matches.forEach(e=>{if(!xI(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 wL(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=CL(e)),r&&(a.score=e.score),a})}var TL=/[\p{L}\p{M}\p{N}_]+/gu,EL=new WeakSet;function DL(e){EL.has(e)||(EL.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 OL(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||DL(e),t=>t.match(e)||[]):e=>e.match(TL)||[]}function kL({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=OL(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=QI(n)),r(n)}}}var AL=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=kL({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 $I(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=YI(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function jL(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 ML(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0)jL(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)jL(e,t.v,i,r);else jL(e,n.v,i,r)}}}function NL(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)ML(r,i,t,n);return r}function PL(e,t,n,r){ML(e,t,n,r)}function FL(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 IL(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)FL(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 LL=class{constructor(e,t,n){this.options={...$,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new MI(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=fL(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 UI))throw Error(wI);if(this._myIndex=t||WI(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=kL({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=NL(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!xI(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=kL({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});PL(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&&IL(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(TI);this._invertedIndex&&IL(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(gI(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return _I(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&_I(n)&&n>0&&gI(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new SL(n,u);gI(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=gI(e)?gI(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),xL(d,{ignoreFieldNorm:s}),a&&d.sort(gI(e)?u:l),_I(n)&&n>-1&&(d=d.slice(0,n));return wL(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(!xI(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=bL(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=yL(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===pL.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(xI(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(!xI(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=bL(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!xI(t))return[];let r=[];if(pI(t))t.forEach(({v:t,i,n:a})=>{if(!xI(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}};LL.version=`7.5.0`,LL.createIndex=WI,LL.parseIndex=GI,LL.config=$,LL.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(AI);return fL(e,{...$,...n}).searchIn(t)},LL.parseQuery=yL,dL(lL),dL(AL),LL.use=function(...e){e.forEach(e=>dL(e))};var RL=LL;S();var zL={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`}},BL=`locale-switcher`,VL=({locale:e,localeList:t,availableLocales:n,fullLocaleName:r=!0,setLocale:i,panelProps:a,size:o=`md`,border:s,borderColor:c,roundedSize:l,variant:f,color:p,className:m})=>{let h=`-`,{switchTo:g,searchInput:_,languageListLabel:v,localeSwitcherLabel:y}=V(fI),b=u(null),S=x(()=>t.map(t=>({locale:t,englishName:Tr(t,`en`),currentLocaleName:Tr(t,e),ownLocaleName:Tr(t)})),[t,e]),[C,w]=d(S),T=x(()=>new RL(S,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[S]),E=A(e=>{if(e){let t=T.search(e).map(e=>e.item);w(t)}else w(S)},[T,S]);return e&&(h=r?Tr(e):e.toUpperCase()),I(`nav`,{className:G(f?void 0:zL[o].nav,m),"aria-label":y.value,children:I(dI,{identifier:BL,children:[I(dI.Trigger,{identifier:BL,...f&&{variant:f},color:p??`custom`,size:o===`sm`?`custom`:`md`,roundedSize:o===`sm`?`full`:`md`,className:G(!p&&`text-text`,zL[o].trigger),children:I(`div`,{className:`flex w-full items-center justify-between`,children:[I(`div`,{className:G(`text-nowrap`,zL[o].label),children:h}),I(dc,{className:G(`self-center`,zL[o].icon)})]})}),I(dI.Panel,{identifier:BL,isOverable:!0,isFocusable:!0,align:`end`,...a,children:I(pO,{className:`max-h-[80vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:s,borderColor:c,roundedSize:l,"aria-label":v.value,children:[I(`div`,{className:`p-3`,children:I(UD,{type:`search`,"aria-label":_.ariaLabel.value,placeholder:_.placeholder.value,onChange:e=>E(e.target.value),ref:b})}),I(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:C.map(({locale:r,currentLocaleName:a,ownLocaleName:o})=>I(`li`,{className:`px-1.5 py-1`,children:I(Z,{onClick:()=>i(r),label:`${g} ${a}`,disabled:!(n??t).includes(r),isActive:e===r,variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,children:I(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[I(`div`,{className:`flex flex-col text-nowrap`,children:[I(`span`,{dir:wr(r),lang:r,suppressHydrationWarning:!0,children:o}),I(`span`,{className:`text-xs text-neutral`,suppressHydrationWarning:!0,children:a})]}),I(`span`,{className:`text-sm text-neutral`,children:r.toUpperCase()})]})})},r))})]})})]})})},HL=(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};S();var UL=(e,t=`horizontal`)=>{let{setSelectedLocales:n}=qO(),{reorderLocale:r}=V(uI),i=A((e,t)=>n(n=>HL(n,e,t)),[n]);return{...MF({itemIds:e,onMove:i,orientation:t,title:r.value}),moveLocale:i}},WL=NF;S();var GL=`locale-switcher-content`,KL=({panelProps:e,isMultilingual:t=!0,className:n,size:r=`md`,border:i,borderColor:a,roundedSize:o,variant:s,color:c})=>{let{switchTo:l,searchInput:f,localeSwitcherLabel:p,languageListLabel:m,seeAllLocalesSwitch:h}=V(uI),g=u(null),{locale:_}=oa(),{availableLocales:v,selectedLocales:y,setSelectedLocales:b}=qO(),{getDragHandleProps:S,getDropZoneProps:C}=UL(y,`vertical`),w=x(()=>v.map(e=>({locale:e,englishName:Tr(e,`en`),currentLocaleName:Tr(e,_),ownLocaleName:Tr(e)})),[v,_]),[T,E]=d(``),[D,O]=WO(`locale-content-selector-see-all-locales`,!1),k=x(()=>new RL(w,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[w]),A=x(()=>{if(T)return k.search(T).map(e=>e.item);let e=y.flatMap(e=>w.filter(t=>t.locale===e)),t=w.filter(e=>!y.includes(e.locale));return[...e,...t]},[T,w,k,y]),j=e=>t&&!T&&y.length>1&&y.includes(e),M=e=>{t?y.includes(e)?y.length>1&&b(t=>t.filter(t=>t!==e)):b(t=>[...t,e]):b([e])},N=e=>{O(e),E(``),b(e?v:[_])};return I(`nav`,{className:G(s?void 0:zL[r].nav,n),"aria-label":p.value,children:I(dI,{identifier:GL,children:[I(dI.Trigger,{identifier:GL,label:p.value,roundedSize:`3xl`,variant:`outline`,color:`text`,size:`md`,className:G(!s&&!c&&`text-text`,!s&&zL[r].trigger),children:I(`div`,{className:`flex items-center justify-between gap-1.5`,children:[I(Ys,{className:G(`shrink-0`,r===`sm`?`size-3.5`:`size-4`)}),I(dc,{className:G(`shrink-0 self-center`,r===`sm`?`size-3`:`size-3.5`)})]})}),I(dI.Panel,{identifier:GL,isOverable:!0,isFocusable:!0,align:`end`,...e,children:I(pO,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:i??!0,roundedSize:o??`3xl`,borderColor:a??`text`,"aria-label":m.value,children:[t&&I(`div`,{className:`m-auto p-2`,children:I(LD,{defaultValue:D,onChange:N,color:`text`,size:`sm`,className:`mx-3 !w-60`,choices:[{content:h.true.value,value:!0},{content:h.false.value,value:!1}]})}),!(t&&D)&&I(`div`,{className:`p-3`,children:I(UD,{type:`search`,"aria-label":f.ariaLabel.value,placeholder:f.placeholder.value,onChange:e=>E(e.target.value),ref:g})}),I(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:A.map(({locale:e,currentLocaleName:n,ownLocaleName:r})=>I(`li`,{...j(e)?C(e):{},className:G(`px-1.5 py-1`,j(e)&&WL),children:I(Z,{...j(e)?S(e):{},onClick:()=>M(e),label:`${l} ${n}`,disabled:!(v??v).includes(e),isActive:y.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:I(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[j(e)&&I(Zs,{"aria-hidden":!0,className:`size-3.5 shrink-0 cursor-grab text-neutral`}),t&&I(`div`,{className:`w-4`,children:y.includes(e)&&I(Ts,{className:`size-full`})}),I(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[I(`div`,{className:`flex flex-col text-nowrap`,children:[I(`span`,{dir:wr(e),lang:e,children:r}),I(`span`,{className:`text-xs text-neutral`,children:n})]}),I(`span`,{className:`text-sm text-neutral`,children:e.toUpperCase()})]})]})})},e))})]})})]})})};S();var qL=Kc(`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`}}),JL=Kc(`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`}}),YL=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`text`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=u([]),c=u(null),{choiceIndicatorPosition:l,scheduleMeasurement:d}=jD(s,{isHoverable:i,orientation:a});return M(()=>{d()},[t]),I(`div`,{className:G(qL({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return g(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&&I(`div`,{className:G(JL({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})};S();var XL=e=>e.map(e=>e.toUpperCase()).join(`, `),ZL=({targets:e,targetLocales:t,skippedLocales:n})=>{let{translateCells:r,isTranslating:i,sourceLocale:a}=rF(),o=V(bF),[s,c]=d(!1),l=e.length===0,u=l?o.fill.value:`${o.translateMissing.value} → ${XL(t)}`;return I(UF,{onClickOutSide:()=>c(!1),listenForEscape:!0,disabled:!s,className:`inline-flex`,children:I(yA,{identifier:`content-grid-translate-missing`,children:[I(Z,{label:u,variant:`outline`,color:`neutral`,size:`sm`,roundedSize:`md`,Icon:kc,isLoading:i,disabled:l||i,onClick:()=>c(e=>!e),children:I(`span`,{dir:`ltr`,children:u})}),I(yA.Detail,{identifier:`content-grid-translate-missing`,isHidden:!s,isOverable:!1,displayArrow:!1,xAlign:`end`,className:`w-72 p-3 delay-0`,children:I(`div`,{className:`flex flex-col gap-3 text-sm`,children:[I(`p`,{children:[o.confirmTranslateDescription,` `,I(`span`,{className:`font-mono`,dir:`ltr`,children:a.toUpperCase()})]}),I(`ul`,{className:`flex flex-col gap-1`,children:t.map(t=>I(`li`,{className:`flex items-center justify-between font-mono text-xs`,dir:`ltr`,children:[I(`span`,{children:t.toUpperCase()}),I(`span`,{children:e.filter(e=>e.cellKey===t).length})]},t))}),n.length>0&&I(`p`,{className:`text-xs text-neutral`,children:[o.skippedLocked,` `,I(`span`,{className:`font-mono`,dir:`ltr`,children:XL(n)})]}),I(`div`,{className:`flex justify-end gap-2`,children:[I(Z,{label:o.cancel.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>c(!1),children:o.cancel}),I(Z,{label:o.confirm.value,color:`text`,size:`sm`,onClick:()=>{c(!1),r(e)},children:o.confirm})]})]})})]})})},QL=({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}=rF(),p=V(bF),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 I(`div`,{className:`flex shrink-0 flex-col gap-2`,children:[I(`div`,{className:`flex flex-wrap items-center justify-between gap-x-6 gap-y-2`,children:[I(`div`,{className:`max-w-md min-w-48 flex-1`,children:I(WF,{value:e,onChange:e=>t(e.currentTarget.value),placeholder:p.searchPlaceholder.value,"aria-label":p.searchPlaceholder.value})}),I(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!s&&I(KL,{size:`sm`,variant:`outline`,color:`neutral`,roundedSize:`2xl`}),I(ZL,{targets:m,targetLocales:h,skippedLocales:g}),d.size>0&&I(Z,{label:p.acceptAll.value,variant:`hoverable`,color:`text`,size:`sm`,roundedSize:`md`,Icon:Ts,onClick:f,children:p.acceptAll})]})]}),I(`div`,{className:`flex flex-wrap items-center gap-2 py-3`,children:[I(YL,{selectedChoice:n,hoverable:!0,color:`text`,className:`w-auto`,tabs:_.map(({filter:e,label:t,count:i,status:a})=>I(`button`,{type:`button`,"aria-pressed":n===e,"data-active":n===e,onClick:()=>r(e),className:`flex cursor-pointer items-center gap-2 rounded-md px-4 py-1 text-sm font-medium whitespace-nowrap transition-colors focus:outline-none`,children:[a&&I(SF,{status:a}),I(`span`,{children:t}),i!==void 0&&I(`span`,{className:`font-mono opacity-70`,children:i})]},e))}),o&&i.missing>0&&I(Z,{label:p.jumpToMissing.value,variant:`hoverable`,color:`neutral`,size:`sm`,roundedSize:`md`,Icon:Us,className:`ms-auto`,onClick:o,children:p.jumpToMissing}),o&&i.missing>0&&I(lI,{shortcut:`J`,size:`sm`,onTriggered:o})]})]})};S();var $L=(e=640)=>{let t=u(null),[n,r]=d(!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}},eR={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`};S();var tR=Kc(`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 text-sm font-medium 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 text-sm font-medium 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`}}),nR=({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},rR=e=>typeof e==`string`&&/^(\.\.?(\/|$)|[?#])/.test(e),iR=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(iR):f(e)?iR(e.props.children):!1,aR=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??nR(e),b=f??p?.startsWith(`#`)??!1,x=iR(i),S=y?`noopener noreferrer nofollow`:m,C=y?`_blank`:h??`_self`,w=l&&p&&!y&&!b&&!rR(p)?xr(p,l):p,T=w===``?void 0:w;return I(`a`,{...g,href:T,"aria-label":a,rel:S,target:C,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:G(tR({variant:t,color:n,roundedSize:r,underlined:c,size:v,className:o})),children:[_&&x?I(`span`,{children:i}):i,y&&x&&I(Gs,{className:`ms-2 inline-block size-4`}),b&&I(lc,{className:`ms-2 inline-block size-4`})]})};S();var oR=e=>e&&{neutral:`text-neutral`,text:`text-muted-foreground`,"text-inverse":`text-foreground-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,sR=Kc(`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`}}),cR=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let{linkLabel:l}=V(eR,o);return I(b,{children:[I(aR,{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:I(`span`,{itemProp:`name`,children:n})}),I(`meta`,{itemProp:`position`,content:a.toString()})]})},lR=({children:e,onClick:t,color:n,position:r,className:i,...a})=>{let{linkLabel:o}=V(eR);return I(b,{children:[I(Z,{onClick:t,variant:`link`,label:`${o} ${e}`,color:n,itemProp:`item`,size:`custom`,...a,children:I(`span`,{itemProp:`name`,children:e})}),I(`meta`,{itemProp:`position`,content:r.toString()})]})},uR=({children:e,position:t,className:n,...r})=>I(`span`,{itemProp:`item`,className:G(`inline-flex items-center`,`font-medium text-muted-foreground`,`transition-colors duration-200`,n),children:[I(`span`,{itemProp:`name`,...r,children:e}),I(`meta`,{itemProp:`position`,content:t.toString()})]}),dR=({links:e,className:t,color:n=`text`,locale:r,elementType:a=`page`,separator:o=I(js,{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 I(`nav`,{"aria-label":s,className:`rtl-mirror-icons`,children:I(`ol`,{className:G(sR({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?a:void 0,m=e===`...`,h=typeof e==`string`?e:e.text,g=oR(n);if(m)return I(b,{children:[I(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:I(`span`,{className:`text-neutral-500`,children:`…`})}),!s&&I(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:I(`span`,{className:G(g),children:o})})]},`truncated-${h}`);let _=I(uR,{position:t+1,"aria-current":f,className:G(`transition-colors duration-200`,d&&`text-foreground`),children:h},h);l?_=I(cR,{href:e.href,color:n,position:t+1,locale:r,"aria-current":f,className:G(d&&`cursor-default text-foreground`),children:h},h):u&&(_=I(lR,{onClick:e.onClick,color:n,position:t+1,"aria-current":f,className:G(d&&`cursor-default text-neutral-900`),children:h},h));let v=i(`li`,{...c&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:h,className:`flex items-center`},_);return s?v:I(b,{children:[v,I(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:I(`span`,{className:G(g),children:o})})]},h)})})})},fR=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>I(dR,{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}),pR=(e,t,n)=>{if(Array.isArray(e)){let r=e;return HL(r.map((e,t)=>t),Number(t),Number(n)).map(e=>r[e])}if(e&&typeof e==`object`){let r=e,i=HL(Object.keys(r),String(t),String(n));return Object.fromEntries(i.map(e=>[e,r[e]]))}return e};S();var mR=e=>{let{editedContent:t,addEditedContent:n}=_T(),r=e.localId;return{moveField:A((i,a,o)=>{let s=t?.[r]?.content??e.content,c=i.length===0?s:Yi(s,i);c&&typeof c==`object`&&n(r,pR(c,a,o),i)},[t,r,e.content,n])}};S();var hR=1,gR=(e,t)=>{let n=t.target.dataset.gridPosition;if(!n)return;let{rowIndex:r,columnIndex:i}=_F(n),a=Array.from(e.querySelectorAll(`[data-grid-position]`)).map(e=>{let{rowIndex:t,columnIndex:n}=_F(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())},_R=({className:e})=>{let t=rF(),{rows:n,rowsById:r,locales:i,sourceLocale:a,lockedLocales:o,statusContext:s,getStatus:c,getMissingTargets:l,translateCells:f,isTranslating:p}=t,m=V(bF),{locale:h}=oa(),{selectedLocales:g}=qO(),{containerRef:_,isNarrow:v}=$L(),S=u(null),{focusedContent:C,setFocusedContentKeyPath:w}=xE(),[,T]=y(),E=A(e=>T(()=>w(e)),[w]),D=!C?.dictionaryKey||C.dictionaryKey===t.dictionary.key?C?.keyPath:void 0,[O,k]=d(``),[j,N]=d(`all`),[P,F]=d(()=>new Set),[L,ee]=d(),[te,R]=d();M(()=>{if(!D||D.length===0){ee(void 0);return}for(let e of n)if(e.kind===`leaf`){for(let[t,n]of Object.entries(e.cells))if($n(D,n.keyPath)){ee({rowId:e.id,cellKey:t});return}}let e=D.filter(e=>e.type!==zr),t=D.find(e=>e.type===zr)?.key;for(let r of n)if(r.kind===`leaf`)for(let[n,i]of Object.entries(r.cells)){let a=i.keyPath.filter(e=>e.type!==zr);if($n(e,a)||$n(a,e)){t&&r.cells[t]?ee({rowId:r.id,cellKey:t}):ee({rowId:r.id,cellKey:n});return}}ee(void 0)},[D,n]);let ne=x(()=>{let e=g.map(String).filter(e=>i.includes(e));return e.length>0?e:[a]},[g,i,a]),z=te&&i.includes(te)?te:ne.find(e=>e!==a)??ne[0]??a,B=v?[z]:ne,re=x(()=>new Set(n.filter(e=>e.kind===`group`&&e.depth>hR!==P.has(e.id)).map(e=>e.id)),[n,P]),ie=x(()=>pF(n,r,{query:O,statusFilter:j,localeKeys:B,collapsedRowIds:re,getStatus:c,focusedKeyPath:D}),[n,r,O,j,B,re,c,D]),ae=(D?.length??0)>0,oe=O.trim()!==``||j!==`all`||ae,se=x(()=>n.filter(e=>e.parentId===void 0),[n]),ce=se.every(e=>Object.values(e.cells)[0]?.keyPath[0]?.type===Gr),le=x(()=>hF(ie,{collapsedRowIds:oe?new Set:re,isRootObject:!oe&&ce}).filter(e=>!oe||e.type===`row`),[ie,re,oe,ce]),{moveField:ue}=mR(t.dictionary),de=x(()=>new Map(n.map(e=>[e.id,yF(e,r)])),[n,r]),{getDragHandleProps:fe,getDropZoneProps:pe}=MF({itemIds:x(()=>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)&&r.get(e)?.parentId===r.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=x(()=>se.map(e=>e.label),[se]),ge=x(()=>qP(n,B,s),[n,B,s]),_e=A(e=>F(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),ve=A((e,t)=>ee({rowId:e,cellKey:t}),[]),ye=A(()=>ee(void 0),[]),be=e=>{let t=le.findIndex(t=>t.type===`row`&&t.row.id===e.rowId),n=r.get(e.rowId)?.isLocalized?B.indexOf(e.cellKey):0;S.current?.querySelector(`[data-grid-position="${t}:${n}"]`)?.focus()},xe=()=>{let e=document.activeElement?.dataset.gridPosition,t;if(e){let{rowIndex:n,columnIndex:r}=_F(e),i=le[n];i?.type===`row`&&(t={rowId:i.row.id,cellKey:i.row.isLocalized?B[r]??`*`:`*`})}let n=gF(ie,B,c,t);n&&be(n)},Se=e=>{S.current&&gR(S.current,e)},Ce=e=>{e.target===e.currentTarget&&e.currentTarget.querySelector(`[data-grid-position]`)?.focus()},we=L?r.get(L.rowId):void 0,Te=`minmax(14rem, 20rem) repeat(${B.length}, minmax(14rem, 1fr))`,Ee=e=>{let t=l([e]),n=o.has(e);return I(`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:[I(`span`,{className:`font-mono font-semibold`,dir:`ltr`,children:e.toUpperCase()}),I(`span`,{className:`truncate text-neutral`,children:Tr(e,h)}),e===a&&I(xA,{color:`neutral`,size:`xs`,className:`px-1.5 text-[10px]`,children:m.sourceLocale}),n&&I(tc,{className:`size-3 shrink-0 text-neutral`}),t.length>0&&I(Z,{label:`${m.translateColumn.value} (${e.toUpperCase()})`,title:m.translateColumn.value,Icon:kc,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=re.has(e.id)&&!oe,i=e.isLocalized?z:`*`;return I(`div`,{role:`row`,className:`relative flex flex-col gap-2 border-b border-neutral/10 py-3`,style:IF(e.depth),children:[I(RF,{depth:e.depth}),I(`div`,{className:`flex min-w-0 items-center gap-1.5 pe-2`,children:[n&&I(Z,{label:m.toggleCollapse(r).value,Icon:js,iconClassName:G(`size-3.5 transition-transform`,!r&&`rotate-90`),variant:`none`,color:`neutral`,size:`custom`,className:`hover:text-text`,onClick:()=>_e(e.id)}),I(`button`,{type:`button`,dir:`ltr`,title:e.id,onClick:()=>ve(e.id,i),className:G(`min-w-0 cursor-pointer text-start text-sm break-words [font-variant-ligatures:none] hover:underline`,n&&`font-semibold`),children:vF(e.label)}),I(AF,{row:e})]}),!n&&e.cells[i]&&I(DF,{row:e,cellKey:i,position:`${t}:0`,onOpenEditor:ve})]},e.id)},Oe=I(`p`,{className:`p-6 text-center text-sm text-neutral`,children:m.noResults});return I(`div`,{ref:_,className:G(`flex h-full min-h-0 w-full min-w-0 flex-col gap-6`,e),children:[!(v&&we)&&I(`div`,{className:`flex flex-col gap-4`,children:[I(fR,{dictionaryKey:t.dictionary.key,keyPath:D??[],onClickKeyPath:E}),I(QL,{query:O,onQueryChange:k,statusFilter:j,onStatusFilterChange:N,statusCounts:ge,localeKeys:B,onJumpToMissing:xe,isNarrow:v})]}),v?we&&L?I(HF,{row:we,cellKey:L.cellKey,isNarrow:!0,onClose:ye}):I(b,{children:[I(Q,{value:z,onValueChange:R,children:[I(Q.Trigger,{"aria-label":m.locale.value,children:I(Q.Value,{})}),I(Q.Content,{children:i.map(e=>I(Q.Item,{value:e,children:I(`span`,{className:`flex items-center gap-1.5`,children:[Tr(e,h),o.has(e)&&I(tc,{className:`size-3 text-neutral`})]})},e))})]}),I(`div`,{ref:S,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):I(VF,{addLine:e.addLine,rootKeys:he},`add-${e.addLine.parentRow?.id??`root`}`))})]}):I(`div`,{className:`flex min-h-0 flex-1 gap-3`,children:[I(`div`,{ref:S,role:`grid`,tabIndex:0,"aria-label":t.dictionary.key,"aria-colcount":B.length+1,onKeyDown:Se,onFocus:Ce,className:`min-h-0 min-w-0 flex-1 overflow-auto`,children:I(`div`,{className:`w-max min-w-full`,children:[I(`div`,{role:`row`,className:`sticky top-0 z-20 grid min-w-full border-b border-neutral/10 bg-background`,style:{gridTemplateColumns:Te},children:[I(`div`,{role:`columnheader`,className:G(LF,`z-30 items-center ps-4 text-xs text-neutral`),children:m.fieldColumn}),B.map(Ee)]}),le.length===0?Oe:le.map((e,t)=>e.type===`row`?I(zF,{row:e.row,localeKeys:B,rowIndex:t,gridTemplateColumns:Te,isCollapsed:re.has(e.row.id)&&!oe,isFocused:L?.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):I(VF,{addLine:e.addLine,gridTemplateColumns:Te,rootKeys:he},`add-${e.addLine.parentRow?.id??`root`}`))]})}),we&&L&&I(`div`,{className:`flex min-h-0 w-[28rem] max-w-[45%] shrink-0 flex-col overflow-hidden rounded-2xl border border-neutral/20`,children:I(HF,{row:we,cellKey:L.cellKey,isNarrow:!1,onClose:ye})})]})]})},vR=/^ {0,3}(#{1,6})[ \t]+(.+?)[ \t#]*$/,yR=/^ {0,3}(```|~~~)/,bR=/[*_`~]|\[([^\]]*)\]\([^)]*\)/g,xR=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=yR.exec(i)?.[1];if(a){r?r===a&&(r=void 0):r=a;continue}if(r)continue;let o=vR.exec(i);if(!o)continue;let s=(o[2]??``).replace(bR,(e,t)=>t??``).trim();s&&n.push({level:o[1]?.length??1,text:s,lineIndex:e})}return n},SR=e=>e.replace(/```[\s\S]*?```/g,` `).replace(/[#>*_`~|[\]()-]/g,` `).split(/\s+/).filter(e=>/[\p{L}\p{N}]/u.test(e)).length,CR=/^---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,wR=e=>{let t=CR.exec(e)?.[0]??``;return{frontMatter:t,body:e.slice(t.length)}},TR={key:`markdown-document`,content:{nodeType:`translation`,translation:{en:{compareWithSource:`Compare with source`,completionStatus:{nodeType:`condition`,condition:{true:`Missing`,false:`Complete`}},editMode:`Edit`,frontMatter:`Front matter`,noHeadings:`No headings yet`,outline:`Outline`,previewMode:`Preview`,rawMode:`Raw`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Source · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} words`}},"en-GB":{compareWithSource:`Compare with source`,completionStatus:{nodeType:`condition`,condition:{true:`Missing`,false:`Complete`}},editMode:`Edit`,frontMatter:`Front matter`,noHeadings:`No headings yet`,outline:`Outline`,previewMode:`Preview`,rawMode:`Raw`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Source · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} words`}},fr:{compareWithSource:`Comparer avec la source`,completionStatus:{nodeType:`condition`,condition:{true:`Manquant`,false:`Complet`}},editMode:`Éditer`,frontMatter:`Métadonnées (front matter)`,noHeadings:`Aucun titre pour le moment`,outline:`Plan`,previewMode:`Aperçu`,rawMode:`Brut`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Source · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} mots`}},es:{compareWithSource:`Comparar con el origen`,completionStatus:{nodeType:`condition`,condition:{true:`Falta`,false:`Completo`}},editMode:`Editar`,frontMatter:`Metadatos (front matter)`,noHeadings:`Aún no hay títulos`,outline:`Esquema`,previewMode:`Vista previa`,rawMode:`Sin formato`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Origen · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} palabras`}},de:{compareWithSource:`Mit Quelle vergleichen`,completionStatus:{nodeType:`condition`,condition:{true:`Fehlt`,false:`Vollständig`}},editMode:`Bearbeiten`,frontMatter:`Front Matter`,noHeadings:`Noch keine Überschriften`,outline:`Gliederung`,previewMode:`Vorschau`,rawMode:`Roh`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Quelle · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} Wörter`}},ja:{compareWithSource:`ソースと比較`,completionStatus:{nodeType:`condition`,condition:{true:`未入力`,false:`完了`}},editMode:`編集`,frontMatter:`フロントマター`,noHeadings:`見出しはまだありません`,outline:`アウトライン`,previewMode:`プレビュー`,rawMode:`ソース`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`ソース · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} 語`}},ko:{compareWithSource:`원본과 비교`,completionStatus:{nodeType:`condition`,condition:{true:`누락`,false:`완료`}},editMode:`편집`,frontMatter:`프런트 매터`,noHeadings:`아직 제목이 없습니다`,outline:`개요`,previewMode:`미리 보기`,rawMode:`원본`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`원본 · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}}단어`}},zh:{compareWithSource:`与源语言对比`,completionStatus:{nodeType:`condition`,condition:{true:`缺失`,false:`完成`}},editMode:`编辑`,frontMatter:`前置元数据`,noHeadings:`暂无标题`,outline:`大纲`,previewMode:`预览`,rawMode:`源码`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`源语言 · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} 个词`}},it:{compareWithSource:`Confronta con la sorgente`,completionStatus:{nodeType:`condition`,condition:{true:`Mancante`,false:`Completo`}},editMode:`Modifica`,frontMatter:`Front matter`,noHeadings:`Ancora nessun titolo`,outline:`Struttura`,previewMode:`Anteprima`,rawMode:`Sorgente`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Sorgente · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} parole`}},pt:{compareWithSource:`Comparar com a origem`,completionStatus:{nodeType:`condition`,condition:{true:`Ausente`,false:`Completo`}},editMode:`Editar`,frontMatter:`Front matter`,noHeadings:`Nenhum título ainda`,outline:`Estrutura`,previewMode:`Pré-visualizar`,rawMode:`Bruto`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Origem · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} palavras`}},hi:{compareWithSource:`स्रोत से तुलना करें`,completionStatus:{nodeType:`condition`,condition:{true:`अनुपलब्ध`,false:`पूर्ण`}},editMode:`संपादित करें`,frontMatter:`फ्रंट मैटर`,noHeadings:`अभी कोई शीर्षक नहीं`,outline:`रूपरेखा`,previewMode:`पूर्वावलोकन`,rawMode:`कच्चा`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`स्रोत · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} शब्द`}},ar:{compareWithSource:`قارن مع المصدر`,completionStatus:{nodeType:`condition`,condition:{true:`مفقود`,false:`مكتمل`}},editMode:`تحرير`,frontMatter:`البيانات الأمامية`,noHeadings:`لا توجد عناوين بعد`,outline:`المخطط`,previewMode:`معاينة`,rawMode:`خام`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`المصدر · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`{{count}} كلمة`}},ru:{compareWithSource:`Сравнить с исходником`,completionStatus:{nodeType:`condition`,condition:{true:`Отсутствует`,false:`Готово`}},editMode:`Редактировать`,frontMatter:`Front matter`,noHeadings:`Заголовков пока нет`,outline:`Структура`,previewMode:`Предпросмотр`,rawMode:`Исходник`,sourceLabel:{fields:[`locale`],nodeType:`insertion`,insertion:`Исходник · {{locale}}`},wordCount:{fields:[`count`],nodeType:`insertion`,insertion:`Слов: {{count}}`}}}},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`};S();var ER=_(()=>kn(()=>import(`./MarkdownEditor-BaCiZXdM.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([3,2,4,1]))),DR=_(()=>kn(()=>import(`./MarkDownRender-CshktxqS.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2]))),OR=e=>typeof e==`string`?e:JSON.stringify(e),kR=()=>{let{rows:e,dictionary:t,sourceLocale:n,getStatus:r,setCellValue:i}=rF(),{selectedLocales:a}=qO(),o=V(TR),[s,c]=d(`edit`),[l,f]=d(!1),p=u(null),m=e.find(e=>e.kind===`leaf`),h=x(()=>{if(!m)return[];if(!m.isLocalized)return[`*`];let e=a.map(String).filter(e=>m.cells[e]);return e.length>0?e:Object.keys(m.cells)},[m,a]),[g,_]=d(),v=g&&h.includes(g)?g:h[0]??`*`,{frontMatter:y,body:b}=wR(String(m?.cells[v]?.value??``)),{body:S}=wR(String(m?.cells[n]?.value??``)),C=x(()=>xR(b),[b]),w=x(()=>SR(b),[b]),E=t.content?.metadata,D=!!m?.isLocalized&&v!==n,O=D&&l,k=[{content:o.editMode.value,value:`edit`},{content:o.rawMode.value,value:`raw`},{content:o.previewMode.value,value:`preview`}],A=e=>{Array.from(p.current?.querySelectorAll(`h1, h2, h3, h4, h5, h6`)??[]).find(t=>t.textContent?.trim()===e)?.scrollIntoView({behavior:`smooth`,block:`start`})};if(!m)return null;let j=e=>i(m,v,`${y}${e}`);return I(`div`,{className:`flex w-full flex-col gap-4`,children:[I(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[m.isLocalized?I(`div`,{className:`min-w-0 overflow-x-auto`,children:I(YL,{selectedChoice:v,hoverable:!0,color:`text`,tabs:h.map(e=>{let t=r(m,e)===`missing`;return I(`button`,{type:`button`,"data-active":e===v,onClick:()=>_(e),title:o.completionStatus(t).value,className:`flex cursor-pointer items-center gap-1.5 rounded-md px-3 py-1 font-mono text-sm whitespace-nowrap`,children:[I(`span`,{"aria-hidden":!0,className:G(`inline-block size-2 rounded-full`,t?`border border-error`:`bg-text`)}),e]},e)})})}):I(`span`,{}),I(`div`,{className:`flex items-center gap-2`,children:[D&&I(Z,{label:o.compareWithSource.value,Icon:Ls,variant:l?`default`:`hoverable`,color:`text`,size:`icon-sm`,"aria-pressed":l,onClick:()=>f(e=>!e)}),I(LD,{choices:k,value:s,onChange:c,color:`text`,size:`sm`})]})]}),I(`div`,{className:`flex w-full gap-6`,children:[I(`aside`,{className:`sticky top-4 hidden max-h-[70vh] w-52 shrink-0 flex-col gap-2 self-start overflow-y-auto @4xl:flex`,children:[I(`span`,{className:`text-xs font-semibold text-muted-foreground uppercase`,children:o.outline}),C.length===0?I(`span`,{className:`text-xs text-muted-foreground`,children:o.noHeadings}):I(`ul`,{className:`flex flex-col gap-0.5`,children:C.map(e=>I(`li`,{children:I(`button`,{type:`button`,dir:`auto`,onClick:()=>A(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}`))}),I(`span`,{className:`mt-2 text-xs text-muted-foreground`,children:o.wordCount({count:w})})]}),I(`div`,{className:G(`grid min-w-0 flex-1 gap-6`,O&&`@3xl:grid-cols-2`),children:[O&&I(pO,{border:!0,background:`none`,roundedSize:`2xl`,className:`flex flex-col gap-3 p-6 opacity-80`,children:[I(`span`,{className:`font-mono text-xs text-muted-foreground`,children:o.sourceLabel({locale:n})}),I(`div`,{dir:`auto`,className:`text-base leading-relaxed`,children:I(T,{fallback:I(_D,{}),children:I(DR,{children:S})})})]}),I(`div`,{ref:p,dir:`auto`,className:`mx-auto flex w-full max-w-3xl flex-col gap-2 text-base leading-relaxed`,children:[I(T,{fallback:I(_D,{}),children:[s===`edit`&&I(ER,{defaultValue:b,onChange:j},v),s===`raw`&&I(qD,{value:b,onChange:e=>j(e.currentTarget.value),className:`font-mono text-sm`,"aria-label":o.rawMode.value},v),s===`preview`&&I(DR,{children:b})]}),I(`span`,{className:`text-xs text-muted-foreground @4xl:hidden`,children:o.wordCount({count:w})})]})]})]}),E&&Object.keys(E).length>0&&I(xD,{header:I(`span`,{className:`text-sm text-muted-foreground`,children:o.frontMatter}),label:o.frontMatter.value,children:I(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 px-2 py-2 font-mono text-xs`,children:Object.entries(E).map(([e,t])=>I(`div`,{className:`contents`,children:[I(`dt`,{className:`text-muted-foreground`,children:e}),I(`dd`,{dir:`auto`,className:`truncate`,children:OR(t)})]},e))})})]})};S();var AR=()=>t(nF),jR={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{contentTab:`Content`,detailsTab:`Details`,documentView:`Document`,gridView:`Grid`,jsonView:`JSON`,returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`},structureView:`Structure`,treeView:`Tree`,viewSwitcherLabel:`Editor view`},"en-GB":{contentTab:`Content`,detailsTab:`Details`,documentView:`Document`,gridView:`Grid`,jsonView:`JSON`,returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`},structureView:`Structure`,treeView:`Tree`,viewSwitcherLabel:`Editor view`},fr:{contentTab:`Contenu`,detailsTab:`Détails`,documentView:`Document`,gridView:`Grille`,jsonView:`JSON`,returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`},structureView:`Structure`,treeView:`Arbre`,viewSwitcherLabel:`Vue de l'éditeur`},es:{contentTab:`Contenido`,detailsTab:`Detalles`,documentView:`Documento`,gridView:`Cuadrícula`,jsonView:`JSON`,returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`},structureView:`Estructura`,treeView:`Árbol`,viewSwitcherLabel:`Vista del editor`},de:{contentTab:`Inhalt`,detailsTab:`Details`,documentView:`Dokument`,gridView:`Raster`,jsonView:`JSON`,returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`},structureView:`Struktur`,treeView:`Baum`,viewSwitcherLabel:`Editoransicht`},ja:{contentTab:`コンテンツ`,detailsTab:`詳細`,documentView:`ドキュメント`,gridView:`グリッド`,jsonView:`JSON`,returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`},structureView:`構造`,treeView:`ツリー`,viewSwitcherLabel:`エディタービュー`},ko:{contentTab:`콘텐츠`,detailsTab:`세부 정보`,documentView:`문서`,gridView:`그리드`,jsonView:`JSON`,returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`},structureView:`구조`,treeView:`트리`,viewSwitcherLabel:`편집기 보기`},zh:{contentTab:`内容`,detailsTab:`详情`,documentView:`文档`,gridView:`网格`,jsonView:`JSON`,returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`},structureView:`结构`,treeView:`树`,viewSwitcherLabel:`编辑器视图`},it:{contentTab:`Contenuto`,detailsTab:`Dettagli`,documentView:`Documento`,gridView:`Griglia`,jsonView:`JSON`,returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`},structureView:`Struttura`,treeView:`Albero`,viewSwitcherLabel:`Vista editor`},pt:{contentTab:`Conteúdo`,detailsTab:`Detalhes`,documentView:`Documento`,gridView:`Grade`,jsonView:`JSON`,returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`},structureView:`Estrutura`,treeView:`Árvore`,viewSwitcherLabel:`Visualização do editor`},hi:{contentTab:`सामग्री`,detailsTab:`विवरण`,documentView:`दस्तावेज़`,gridView:`ग्रिड`,jsonView:`JSON`,returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`},structureView:`संरचना`,treeView:`ट्री`,viewSwitcherLabel:`संपादक दृश्य`},ar:{contentTab:`المحتوى`,detailsTab:`التفاصيل`,documentView:`مستند`,gridView:`شبكة`,jsonView:`JSON`,returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`},structureView:`البنية`,treeView:`شجرة`,viewSwitcherLabel:`عرض المحرر`},ru:{contentTab:`Содержимое`,detailsTab:`Детали`,documentView:`Документ`,gridView:`Сетка`,jsonView:`JSON`,returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`},structureView:`Структура`,treeView:`Дерево`,viewSwitcherLabel:`Вид редактора`}}},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`};S();var MR=(e,t=2e3,n,r)=>{let[i,a]=d(!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))}}}},NR=({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}=MR(e,a,o,s);if(c)return I(`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?zs:Vs;return I(`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:[I(`span`,{className:`min-w-0 break-all`,children:t}),e&&I(_,{className:`ms-1 ms-auto shrink-0`,size:d,"aria-hidden":`true`})]})},PR={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"auditButton":{"label":"Audit","popover":"Use AI to generate and review fields"},"descriptionInput":{"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.","label":"Description","placeholder":"Enter the description of your dictionary"},"filePathInput":{"description":"The file path of your dictionary allows you to identify it in your project.","label":"File path","placeholder":"Enter the file path of your dictionary"},"componentFilePathField":{"label":"Source component","description":"Component the compiler extracted this dictionary from. Set automatically."},"importModeSelect":{"description":"The import mode determines how your dictionary is imported in your application.","dynamic":"Dynamic","label":"Import mode","live":"Fetch","static":"Static"},"keyInput":{"description":"The key of your dictionary is used to identify it in the application","label":"Key","placeholder":"Enter the key of your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"projectInput":{"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.","label":"Projects","placeholder":"Select one or more projects to associate with your dictionary"},"qualifierSection":{"item":"Item","meta":"Meta","title":"Qualifier","variant":"Variant"},"siblingDictionaries":{"nameColumn":"Name","descriptionColumn":"Description","localeColumn":"Locale","keyColumn":"Key","tagsColumn":"Tags","sameKeyTitle":"Same key","sameTagsTitle":"Same tags","titleColumn":"Title","currentTag":"current","collectionItems":"Collection items","itemIndex":"Item","metaRecords":"Meta records","noSiblings":"No linked dictionaries.","title":"Related dictionaries","variants":"Variants"},"tagsSelect":{"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.","label":"Tags","placeholder":"Select the tags to associate with your dictionary"},"titleInput":{"description":"The title of your dictionary allows you to easily identify it","label":"Title","placeholder":"Enter the title of your dictionary"},"typeSwitch":{"collection":"Collection","description":"The type controls how this dictionary is selected at runtime.","disablePickerDescription":"The following sibling dictionaries still have qualifiers. Navigate to each to update their type.","disablePickerTitle":"Sibling dictionaries with qualifiers","itemValueLabel":"Item index","itemValuePlaceholder":"e.g. 1","label":"Type","meta":"Dynamic","metaValueLabel":"Meta fields (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"Standard","variant":"Variant","variantJsonError":"Invalid JSON. Please fix before saving.","variantValueLabel":"Variant name","variantValuePlaceholder":"e.g. default","variantFieldsLabel":"Variant fields","variantFieldName":"Field","variantFieldValue":"Value","addVariantField":"Add field","removeVariantField":"Remove field"}},"en-GB":{"auditButton":{"label":"Audit","popover":"Use AI to generate and review fields"},"descriptionInput":{"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.","label":"Description","placeholder":"Enter the description of your dictionary"},"filePathInput":{"description":"The file path of your dictionary allows you to identify it in your project.","label":"File path","placeholder":"Enter the file path of your dictionary"},"componentFilePathField":{"label":"Source component","description":"Component the compiler extracted this dictionary from. Set automatically."},"importModeSelect":{"description":"The import mode determines how your dictionary is imported in your application.","dynamic":"Dynamic","label":"Import mode","live":"Fetch","static":"Static"},"keyInput":{"description":"The key of your dictionary is used to identify it in the application","label":"Key","placeholder":"Enter the key of your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"projectInput":{"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.","label":"Projects","placeholder":"Select one or more projects to associate with your dictionary"},"qualifierSection":{"item":"Item","meta":"Meta","title":"Qualifier","variant":"Variant"},"siblingDictionaries":{"nameColumn":"Name","descriptionColumn":"Description","localeColumn":"Locale","keyColumn":"Key","tagsColumn":"Tags","sameKeyTitle":"Same key","sameTagsTitle":"Same tags","titleColumn":"Title","currentTag":"current","collectionItems":"Collection items","itemIndex":"Item","metaRecords":"Meta records","noSiblings":"No linked dictionaries.","title":"Related dictionaries","variants":"Variants"},"tagsSelect":{"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.","label":"Tags","placeholder":"Select the tags to associate with your dictionary"},"titleInput":{"description":"The title of your dictionary allows you to easily identify it","label":"Title","placeholder":"Enter the title of your dictionary"},"typeSwitch":{"collection":"Collection","description":"The type controls how this dictionary is selected at runtime.","disablePickerDescription":"The following sibling dictionaries still have qualifiers. Navigate to each to update their type.","disablePickerTitle":"Sibling dictionaries with qualifiers","itemValueLabel":"Item index","itemValuePlaceholder":"e.g. 1","label":"Type","meta":"Dynamic","metaValueLabel":"Meta fields (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"Standard","variant":"Variant","variantJsonError":"Invalid JSON. Please fix before saving.","variantValueLabel":"Variant name","variantValuePlaceholder":"e.g. default","variantFieldsLabel":"Variant fields","variantFieldName":"Field","variantFieldValue":"Value","addVariantField":"Add field","removeVariantField":"Remove field"}},"fr":{"auditButton":{"label":"Auditer","popover":"Utiliser l'IA pour générer et réviser les champs"},"descriptionInput":{"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.","label":"Description","placeholder":"Entrez la description de votre dictionnaire"},"filePathInput":{"description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","label":"Chemin du fichier","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"componentFilePathField":{"label":"Composant source","description":"Composant dont le compilateur a extrait ce dictionnaire. Défini automatiquement."},"importModeSelect":{"description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","dynamic":"Dynamique","label":"Mode d'importation","live":"Fetch","static":"Statique"},"keyInput":{"description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","label":"Clé","placeholder":"Entrez la clé de votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"projectInput":{"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.","label":"Projets","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"qualifierSection":{"item":"Élément","meta":"Méta","title":"Qualificateur","variant":"Variante"},"siblingDictionaries":{"nameColumn":"Nom","descriptionColumn":"Description","localeColumn":"Langue","keyColumn":"Clé","tagsColumn":"Tags","sameKeyTitle":"Même clé","sameTagsTitle":"Mêmes tags","titleColumn":"Titre","currentTag":"actuel","collectionItems":"Éléments de collection","itemIndex":"Élément","metaRecords":"Enregistrements méta","noSiblings":"Aucun dictionnaire lié.","title":"Dictionnaires liés","variants":"Variantes"},"tagsSelect":{"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.","label":"Tags","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"titleInput":{"description":"Le titre de votre dictionnaire permet de l'identifier facilement","label":"Titre","placeholder":"Entrez le titre de votre dictionnaire"},"typeSwitch":{"collection":"Collection","description":"Le type contrôle comment ce dictionnaire est sélectionné à l'exécution.","disablePickerDescription":"Les dictionnaires frères suivants ont encore des qualificateurs. Naviguez vers chacun d'eux pour mettre à jour leur type.","disablePickerTitle":"Dictionnaires frères avec qualificateurs","itemValueLabel":"Index de l'élément","itemValuePlaceholder":"ex. 1","label":"Type","meta":"Dynamique","metaValueLabel":"Champs méta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mon-enregistrement\\" }","standard":"Standard","variant":"Variante","variantJsonError":"JSON invalide. Veuillez corriger avant de sauvegarder.","variantValueLabel":"Nom de variante","variantValuePlaceholder":"ex. défaut","variantFieldsLabel":"Champs de la variante","variantFieldName":"Champ","variantFieldValue":"Valeur","addVariantField":"Ajouter un champ","removeVariantField":"Supprimer le champ"}},"es":{"auditButton":{"label":"Auditar","popover":"Usa IA para generar y revisar campos"},"descriptionInput":{"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.","label":"Descripción","placeholder":"Ingrese la descripción de su diccionario"},"filePathInput":{"description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","label":"Ruta del archivo","placeholder":"Ingrese la ruta del archivo de su diccionario"},"componentFilePathField":{"label":"Componente de origen","description":"Componente del que el compilador extrajo este diccionario. Se define automáticamente."},"importModeSelect":{"description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","dynamic":"Dinámico","label":"Modo de importación","live":"Fetch","static":"Estático"},"keyInput":{"description":"La clave de su diccionario se utiliza para identificarla en la aplicación","label":"Clave","placeholder":"Ingrese la clave de 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."},"projectInput":{"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.","label":"Proyectos","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"qualifierSection":{"item":"Elemento","meta":"Meta","title":"Calificador","variant":"Variante"},"siblingDictionaries":{"nameColumn":"Nombre","descriptionColumn":"Descripción","localeColumn":"Idioma","keyColumn":"Clave","tagsColumn":"Etiquetas","sameKeyTitle":"Misma clave","sameTagsTitle":"Mismas etiquetas","titleColumn":"Título","currentTag":"actual","collectionItems":"Elementos de colección","itemIndex":"Elemento","metaRecords":"Registros meta","noSiblings":"No hay diccionarios vinculados.","title":"Diccionarios relacionados","variants":"Variantes"},"tagsSelect":{"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.","label":"Etiquetas","placeholder":"Seleccione los tags para asociar con su diccionario"},"titleInput":{"description":"El título de su diccionario le permite identificar fácilmente","label":"Título","placeholder":"Ingrese le título de su diccionario"},"typeSwitch":{"collection":"Colección","description":"El tipo controla cómo se selecciona este diccionario en tiempo de ejecución.","disablePickerDescription":"Los siguientes diccionarios hermanos todavía tienen calificadores. Navegue a cada uno para actualizar su tipo.","disablePickerTitle":"Diccionarios hermanos con calificadores","itemValueLabel":"Índice del elemento","itemValuePlaceholder":"ej. 1","label":"Tipo","meta":"Dinámico","metaValueLabel":"Campos meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mi-registro\\" }","standard":"Estándar","variant":"Variante","variantJsonError":"JSON no válido. Por favor, corrija antes de guardar.","variantValueLabel":"Nombre de variante","variantValuePlaceholder":"ej. predeterminado","variantFieldsLabel":"Campos de la variante","variantFieldName":"Campo","variantFieldValue":"Valor","addVariantField":"Añadir campo","removeVariantField":"Eliminar campo"}},"de":{"auditButton":{"label":"Prüfen","popover":"KI verwenden, um Felder zu generieren und zu überprüfen"},"descriptionInput":{"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.","label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein"},"filePathInput":{"description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","label":"Dateipfad","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"componentFilePathField":{"label":"Quellkomponente","description":"Komponente, aus der der Compiler dieses Wörterbuch extrahiert hat. Wird automatisch gesetzt."},"importModeSelect":{"description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","dynamic":"Dynamisch","label":"Importmodus","live":"Fetch","static":"Statisch"},"keyInput":{"description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","label":"Schlüssel","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"projectInput":{"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.","label":"Projekte","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"qualifierSection":{"item":"Element","meta":"Meta","title":"Qualifikator","variant":"Variante"},"siblingDictionaries":{"nameColumn":"Name","descriptionColumn":"Beschreibung","localeColumn":"Sprache","keyColumn":"Schlüssel","tagsColumn":"Tags","sameKeyTitle":"Gleicher Schlüssel","sameTagsTitle":"Gleiche Tags","titleColumn":"Titel","currentTag":"aktuell","collectionItems":"Sammlungselemente","itemIndex":"Element","metaRecords":"Meta-Datensätze","noSiblings":"Keine verknüpften Wörterbücher.","title":"Verwandte Wörterbücher","variants":"Varianten"},"tagsSelect":{"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.","label":"Tags","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"titleInput":{"description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","label":"Titel","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"typeSwitch":{"collection":"Sammlung","description":"Der Typ steuert, wie dieses Wörterbuch zur Laufzeit ausgewählt wird.","disablePickerDescription":"Die folgenden Geschwister-Wörterbücher haben noch Qualifikatoren. Navigieren Sie zu jedem, um seinen Typ zu aktualisieren.","disablePickerTitle":"Geschwister-Wörterbücher mit Qualifikatoren","itemValueLabel":"Elementindex","itemValuePlaceholder":"z.B. 1","label":"Typ","meta":"Dynamisch","metaValueLabel":"Meta-Felder (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mein-eintrag\\" }","standard":"Standard","variant":"Variante","variantJsonError":"Ungültiges JSON. Bitte vor dem Speichern korrigieren.","variantValueLabel":"Variantenname","variantValuePlaceholder":"z.B. Standard","variantFieldsLabel":"Variantenfelder","variantFieldName":"Feld","variantFieldValue":"Wert","addVariantField":"Feld hinzufügen","removeVariantField":"Feld entfernen"}},"ja":{"auditButton":{"label":"監査","popover":"AIを使用してフィールドを生成および確認"},"descriptionInput":{"description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。","label":"説明","placeholder":"辞書の説明を入力してください"},"filePathInput":{"description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","label":"ファイルパス","placeholder":"辞書のファイルパスを入力してください"},"componentFilePathField":{"label":"ソースコンポーネント","description":"コンパイラがこの辞書を抽出したコンポーネント。自動で設定されます。"},"importModeSelect":{"description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","dynamic":"動的","label":"インポートモード","live":"Fetch","static":"静的"},"keyInput":{"description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","label":"キー","placeholder":"辞書のキーを入力してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"projectInput":{"description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","label":"プロジェクト","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"qualifierSection":{"item":"項目","meta":"メタ","title":"修飾子","variant":"バリアント"},"siblingDictionaries":{"nameColumn":"名前","descriptionColumn":"説明","localeColumn":"ロケール","keyColumn":"キー","tagsColumn":"タグ","sameKeyTitle":"同じキー","sameTagsTitle":"同じタグ","titleColumn":"タイトル","currentTag":"現在","collectionItems":"コレクション項目","itemIndex":"項目","metaRecords":"メタレコード","noSiblings":"リンクされた辞書はありません。","title":"関連辞書","variants":"バリアント"},"tagsSelect":{"description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","label":"タグ","placeholder":"辞書に関連付けるタグを選択してください"},"titleInput":{"description":"辞書のタイトルは、それを簡単に識別することができます","label":"タイトル","placeholder":"辞書のタイトルを入力してください"},"typeSwitch":{"collection":"コレクション","description":"タイプは実行時にこの辞書がどのように選択されるかを制御します。","disablePickerDescription":"次の兄弟辞書にはまだ修飾子があります。それぞれに移動してタイプを更新してください。","disablePickerTitle":"修飾子を持つ兄弟辞書","itemValueLabel":"要素インデックス","itemValuePlaceholder":"例: 1","label":"タイプ","meta":"ダイナミック","metaValueLabel":"メタフィールド(JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"スタンダード","variant":"バリアント","variantJsonError":"無効なJSONです。保存する前に修正してください。","variantValueLabel":"バリアント名","variantValuePlaceholder":"例: default","variantFieldsLabel":"バリアントのフィールド","variantFieldName":"フィールド","variantFieldValue":"値","addVariantField":"フィールドを追加","removeVariantField":"フィールドを削除"}},"ko":{"auditButton":{"label":"감사","popover":"AI를 사용하여 필드 생성 및 검토"},"descriptionInput":{"description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다.","label":"설명","placeholder":"사전의 설명을 입력하세요"},"filePathInput":{"description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","label":"파일 경로","placeholder":"사전의 파일 경로를 입력하세요"},"componentFilePathField":{"label":"소스 컴포넌트","description":"컴파일러가 이 사전을 추출한 컴포넌트입니다. 자동으로 설정됩니다."},"importModeSelect":{"description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","dynamic":"동적","label":"가져오기 모드","live":"Fetch","static":"정적"},"keyInput":{"description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","label":"키","placeholder":"사전의 키를 입력하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"projectInput":{"description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","label":"프로젝트","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"qualifierSection":{"item":"항목","meta":"메타","title":"한정자","variant":"변형"},"siblingDictionaries":{"nameColumn":"이름","descriptionColumn":"설명","localeColumn":"로케일","keyColumn":"키","tagsColumn":"태그","sameKeyTitle":"같은 키","sameTagsTitle":"같은 태그","titleColumn":"제목","currentTag":"현재","collectionItems":"컬렉션 항목","itemIndex":"항목","metaRecords":"메타 레코드","noSiblings":"연결된 사전이 없습니다.","title":"관련 사전","variants":"변형"},"tagsSelect":{"description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","label":"태그","placeholder":"사전과 연결할 태그를 선택하세요"},"titleInput":{"description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","label":"제목","placeholder":"사전의 제목을 입력하세요"},"typeSwitch":{"collection":"컬렉션","description":"유형은 런타임에 이 사전이 선택되는 방식을 제어합니다.","disablePickerDescription":"다음 형제 사전에는 아직 한정자가 있습니다. 각각으로 이동하여 유형을 업데이트하세요.","disablePickerTitle":"한정자가 있는 형제 사전","itemValueLabel":"항목 인덱스","itemValuePlaceholder":"예: 1","label":"유형","meta":"동적","metaValueLabel":"메타 필드 (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"표준","variant":"변형","variantJsonError":"잘못된 JSON입니다. 저장하기 전에 수정하세요.","variantValueLabel":"변형 이름","variantValuePlaceholder":"예: default","variantFieldsLabel":"변형 필드","variantFieldName":"필드","variantFieldValue":"값","addVariantField":"필드 추가","removeVariantField":"필드 삭제"}},"zh":{"auditButton":{"label":"审核","popover":"使用 AI 生成并审核字段"},"descriptionInput":{"description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。","label":"描述","placeholder":"输入字典的描述"},"filePathInput":{"description":"字典的文件路径使您能够在项目中识别它。","label":"文件路径","placeholder":"输入字典的文件路径"},"componentFilePathField":{"label":"源组件","description":"编译器从中提取此字典的组件。自动设置。"},"importModeSelect":{"description":"导入模式决定了您的词典如何导入到您的应用程序中。","dynamic":"动态","label":"导入模式","live":"Fetch","static":"静态"},"keyInput":{"description":"字典的键用于在应用程序中识别它","label":"键","placeholder":"输入字典的键"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"projectInput":{"description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","label":"项目","placeholder":"选择一个或多个项目以与您的字典关联"},"qualifierSection":{"item":"项目","meta":"元","title":"限定符","variant":"变体"},"siblingDictionaries":{"nameColumn":"名称","descriptionColumn":"描述","localeColumn":"语言","keyColumn":"键","tagsColumn":"标签","sameKeyTitle":"相同键","sameTagsTitle":"相同标签","titleColumn":"标题","currentTag":"当前","collectionItems":"集合项","itemIndex":"项目","metaRecords":"元记录","noSiblings":"没有关联的字典。","title":"相关字典","variants":"变体"},"tagsSelect":{"description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","label":"标签","placeholder":"选择与您的字典相关的标签"},"titleInput":{"description":"字典的标题使您能够轻松识别它","label":"标题","placeholder":"输入字典的标题"},"typeSwitch":{"collection":"集合","description":"类型控制此字典在运行时的选择方式。","disablePickerDescription":"以下兄弟字典仍有限定符。导航到每个字典以更新其类型。","disablePickerTitle":"具有限定符的兄弟字典","itemValueLabel":"项目索引","itemValuePlaceholder":"例如 1","label":"类型","meta":"动态","metaValueLabel":"元字段 (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"标准","variant":"变体","variantJsonError":"无效的JSON。请在保存前修复。","variantValueLabel":"变体名称","variantValuePlaceholder":"例如 default","variantFieldsLabel":"变体字段","variantFieldName":"字段","variantFieldValue":"值","addVariantField":"添加字段","removeVariantField":"删除字段"}},"it":{"auditButton":{"label":"Controllare","popover":"Usa l'IA per generare e revisionare i campi"},"descriptionInput":{"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.","label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario"},"filePathInput":{"description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","label":"Percorso del file","placeholder":"Inserisci il percorso del file del tuo dizionario"},"componentFilePathField":{"label":"Componente di origine","description":"Componente da cui il compilatore ha estratto questo dizionario. Impostato automaticamente."},"importModeSelect":{"description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","dynamic":"Dinamico","label":"Modalità di importazione","live":"Fetch","static":"Statico"},"keyInput":{"description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","label":"Chiave","placeholder":"Inserisci la chiave del tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"projectInput":{"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.","label":"Progetti","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"qualifierSection":{"item":"Elemento","meta":"Meta","title":"Qualificatore","variant":"Variante"},"siblingDictionaries":{"nameColumn":"Nome","descriptionColumn":"Descrizione","localeColumn":"Lingua","keyColumn":"Chiave","tagsColumn":"Tag","sameKeyTitle":"Stessa chiave","sameTagsTitle":"Stessi tag","titleColumn":"Titolo","currentTag":"attuale","collectionItems":"Elementi di raccolta","itemIndex":"Elemento","metaRecords":"Record meta","noSiblings":"Nessun dizionario collegato.","title":"Dizionari correlati","variants":"Varianti"},"tagsSelect":{"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.","label":"Tag","placeholder":"Seleziona i tag da associare al tuo dizionario"},"titleInput":{"description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","label":"Titolo","placeholder":"Inserisci il titolo del tuo dizionario"},"typeSwitch":{"collection":"Raccolta","description":"Il tipo controlla come questo dizionario viene selezionato in fase di esecuzione.","disablePickerDescription":"I seguenti dizionari fratelli hanno ancora qualificatori. Naviga verso ognuno per aggiornare il loro tipo.","disablePickerTitle":"Dizionari fratelli con qualificatori","itemValueLabel":"Indice elemento","itemValuePlaceholder":"es. 1","label":"Tipo","meta":"Dinamico","metaValueLabel":"Campi meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mio-record\\" }","standard":"Standard","variant":"Variante","variantJsonError":"JSON non valido. Correggere prima di salvare.","variantValueLabel":"Nome variante","variantValuePlaceholder":"es. predefinito","variantFieldsLabel":"Campi della variante","variantFieldName":"Campo","variantFieldValue":"Valore","addVariantField":"Aggiungi campo","removeVariantField":"Rimuovi campo"}},"pt":{"auditButton":{"label":"Auditar","popover":"Use IA para gerar e revisar campos"},"descriptionInput":{"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.","label":"Descrição","placeholder":"Insira a descrição do seu dicionário"},"filePathInput":{"description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","label":"Caminho do arquivo","placeholder":"Insira o caminho do arquivo do seu dicionário"},"componentFilePathField":{"label":"Componente de origem","description":"Componente do qual o compilador extraiu este dicionário. Definido automaticamente."},"importModeSelect":{"description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","dynamic":"Dinâmico","label":"Modo de importação","live":"Fetch","static":"Estático"},"keyInput":{"description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","label":"Chave","placeholder":"Insira a chave do 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."},"projectInput":{"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.","label":"Projetos","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"qualifierSection":{"item":"Item","meta":"Meta","title":"Qualificador","variant":"Variante"},"siblingDictionaries":{"nameColumn":"Nome","descriptionColumn":"Descrição","localeColumn":"Idioma","keyColumn":"Chave","tagsColumn":"Tags","sameKeyTitle":"Mesma chave","sameTagsTitle":"Mesmas tags","titleColumn":"Título","currentTag":"atual","collectionItems":"Itens de coleção","itemIndex":"Item","metaRecords":"Registros meta","noSiblings":"Nenhum dicionário vinculado.","title":"Dicionários relacionados","variants":"Variantes"},"tagsSelect":{"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.","label":"Tags","placeholder":"Selecione os tags para associar ao seu dicionário"},"titleInput":{"description":"O titolo do seu dicionário permite que você o identifique facilmente","label":"Título","placeholder":"Insira o título do seu dicionário"},"typeSwitch":{"collection":"Coleção","description":"O tipo controla como este dicionário é selecionado em tempo de execução.","disablePickerDescription":"Os seguintes dicionários irmãos ainda têm qualificadores. Navegue para cada um para atualizar seu tipo.","disablePickerTitle":"Dicionários irmãos com qualificadores","itemValueLabel":"Índice do item","itemValuePlaceholder":"ex. 1","label":"Tipo","meta":"Dinâmico","metaValueLabel":"Campos meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"meu-registro\\" }","standard":"Padrão","variant":"Variante","variantJsonError":"JSON inválido. Por favor, corrija antes de salvar.","variantValueLabel":"Nome da variante","variantValuePlaceholder":"ex. padrão","variantFieldsLabel":"Campos da variante","variantFieldName":"Campo","variantFieldValue":"Valor","addVariantField":"Adicionar campo","removeVariantField":"Remover campo"}},"hi":{"auditButton":{"label":"ऑडिट","popover":"फ़ील्ड उत्पन्न और समीक्षा करने के लिए AI का उपयोग करें"},"descriptionInput":{"description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।","label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें"},"filePathInput":{"description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","label":"फ़ाइल पथ","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"componentFilePathField":{"label":"स्रोत कंपोनेंट","description":"वह कंपोनेंट जिससे कंपाइलर ने यह शब्दकोश निकाला। यह अपने आप सेट होता है।"},"importModeSelect":{"description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","dynamic":"गतिशील","label":"आयात मोड","live":"Fetch","static":"स्थैतिक"},"keyInput":{"description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","label":"कुंजी","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"projectInput":{"description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","label":"परियोजनाएँ","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"qualifierSection":{"item":"आइटम","meta":"मेटा","title":"क्वालीफायर","variant":"वेरिएंट"},"siblingDictionaries":{"nameColumn":"नाम","descriptionColumn":"विवरण","localeColumn":"भाषा","keyColumn":"कुंजी","tagsColumn":"टैग","sameKeyTitle":"समान कुंजी","sameTagsTitle":"समान टैग","titleColumn":"शीर्षक","currentTag":"वर्तमान","collectionItems":"संग्रह आइटम","itemIndex":"आइटम","metaRecords":"मेटा रिकॉर्ड","noSiblings":"कोई लिंक किया गया शब्दकोश नहीं।","title":"संबंधित शब्दकोश","variants":"वेरिएंट"},"tagsSelect":{"description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","label":"टैग","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"titleInput":{"description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","label":"शीर्षक","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"typeSwitch":{"collection":"संग्रह","description":"प्रकार नियंत्रित करता है कि रनटाइम पर यह शब्दकोश कैसे चुना जाता है।","disablePickerDescription":"निम्नलिखित सिब्लिंग शब्दकोशों में अभी भी क्वालीफायर हैं। प्रत्येक में जाकर उनका प्रकार अपडेट करें।","disablePickerTitle":"क्वालीफायर के साथ सिब्लिंग शब्दकोश","itemValueLabel":"आइटम इंडेक्स","itemValuePlaceholder":"उदा. 1","label":"प्रकार","meta":"डायनामिक","metaValueLabel":"मेटा फ़ील्ड (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"मानक","variant":"वेरिएंट","variantJsonError":"अमान्य JSON। सहेजने से पहले कृपया ठीक करें।","variantValueLabel":"वेरिएंट नाम","variantValuePlaceholder":"उदा. default","variantFieldsLabel":"वेरिएंट फ़ील्ड","variantFieldName":"फ़ील्ड","variantFieldValue":"मान","addVariantField":"फ़ील्ड जोड़ें","removeVariantField":"फ़ील्ड हटाएं"}},"ar":{"auditButton":{"label":"التدقيق","popover":"استخدم الذكاء الاصطناعي لإنشاء الحقول ومراجعتها"},"descriptionInput":{"description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك.","label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك"},"filePathInput":{"description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","label":"مسار الملف","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"componentFilePathField":{"label":"المكوّن المصدر","description":"المكوّن الذي استخرج منه المُصرِّف هذا القاموس. يُعيَّن تلقائيًا."},"importModeSelect":{"description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","dynamic":"ديناميكي","label":"وضع الاستيراد","live":"Fetch","static":"ثابت"},"keyInput":{"description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","label":"مفتاح","placeholder":"أدخل مفتاح القاموس الخاص بك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"projectInput":{"description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","label":"المشاريع","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"qualifierSection":{"item":"عنصر","meta":"بيانات وصفية","title":"المؤهل","variant":"نوع"},"siblingDictionaries":{"nameColumn":"الاسم","descriptionColumn":"الوصف","localeColumn":"اللغة","keyColumn":"المفتاح","tagsColumn":"الوسوم","sameKeyTitle":"نفس المفتاح","sameTagsTitle":"نفس الوسوم","titleColumn":"العنوان","currentTag":"الحالي","collectionItems":"عناصر المجموعة","itemIndex":"عنصر","metaRecords":"سجلات البيانات الوصفية","noSiblings":"لا توجد قواميس مرتبطة.","title":"القواميس ذات الصلة","variants":"الأنواع"},"tagsSelect":{"description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","label":"الوسوم","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"titleInput":{"description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","label":"العنوان","placeholder":"أدخل عنوان القاموس الخاص بك"},"typeSwitch":{"collection":"مجموعة","description":"يتحكم النوع في كيفية تحديد هذا القاموس في وقت التشغيل.","disablePickerDescription":"لا تزال القواميس المرتبطة التالية تحتوي على مؤهلات. انتقل إلى كل منها لتحديث نوعه.","disablePickerTitle":"قواميس مرتبطة مع المؤهلات","itemValueLabel":"مؤشر العنصر","itemValuePlaceholder":"مثال: 1","label":"النوع","meta":"ديناميكي","metaValueLabel":"حقول البيانات الوصفية (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"قياسي","variant":"نوع","variantJsonError":"JSON غير صالح. يرجى الإصلاح قبل الحفظ.","variantValueLabel":"اسم النوع","variantValuePlaceholder":"مثال: افتراضي","variantFieldsLabel":"حقول النوع","variantFieldName":"الحقل","variantFieldValue":"القيمة","addVariantField":"إضافة حقل","removeVariantField":"إزالة الحقل"}},"ru":{"auditButton":{"label":"Отслеживание","popover":"Использовать ИИ для генерации и проверки полей"},"descriptionInput":{"description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря.","label":"Описание","placeholder":"Введите описание вашего словаря"},"filePathInput":{"description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","label":"Путь к файлу","placeholder":"Введите путь к файлу вашего словаря"},"componentFilePathField":{"label":"Исходный компонент","description":"Компонент, из которого компилятор извлёк этот словарь. Задаётся автоматически."},"importModeSelect":{"description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","dynamic":"Динамический","label":"Режим импорта","live":"Fetch","static":"Статический"},"keyInput":{"description":"Ключ вашего словаря используется для его идентификации в приложении","label":"Ключ","placeholder":"Введите ключ вашего словаря"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"projectInput":{"description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","label":"Проекты","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"qualifierSection":{"item":"Элемент","meta":"Мета","title":"Квалификатор","variant":"Вариант"},"siblingDictionaries":{"nameColumn":"Название","descriptionColumn":"Описание","localeColumn":"Язык","keyColumn":"Ключ","tagsColumn":"Теги","sameKeyTitle":"Тот же ключ","sameTagsTitle":"Те же теги","titleColumn":"Заголовок","currentTag":"текущий","collectionItems":"Элементы коллекции","itemIndex":"Элемент","metaRecords":"Мета-записи","noSiblings":"Нет связанных словарей.","title":"Связанные словари","variants":"Варианты"},"tagsSelect":{"description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","label":"Теги","placeholder":"Выберите теги, которые нужно связать с словарем"},"titleInput":{"description":"Название вашего словаря позволяет легко его идентифицировать","label":"Заголовок","placeholder":"Введите название вашего словаря"},"typeSwitch":{"collection":"Коллекция","description":"Тип управляет тем, как этот словарь выбирается во время выполнения.","disablePickerDescription":"Следующие связанные словари всё ещё имеют квалификаторы. Перейдите к каждому, чтобы обновить его тип.","disablePickerTitle":"Связанные словари с квалификаторами","itemValueLabel":"Индекс элемента","itemValuePlaceholder":"напр. 1","label":"Тип","meta":"Динамический","metaValueLabel":"Мета-поля (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","standard":"Стандартный","variant":"Вариант","variantJsonError":"Недопустимый JSON. Пожалуйста, исправьте перед сохранением.","variantValueLabel":"Название варианта","variantValuePlaceholder":"напр. default","variantFieldsLabel":"Поля варианта","variantFieldName":"Поле","variantFieldValue":"Значение","addVariantField":"Добавить поле","removeVariantField":"Удалить поле"}}}}`),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`},FR=e=>I(oM,{Element:rO,...e}),IR=e=>I(oM,{Element:YD,...e}),LR=Kc(`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`}}),RR=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>I(`input`,{type:`checkbox`,className:G(LR({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),zR=e=>{let{label:t,name:n,id:r}=e;return t?I(`label`,{htmlFor:r??n,className:G(`flex w-full cursor-pointer items-center gap-x-4 text-sm font-medium`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[I(RR,{id:r??n,...e}),t]}):I(RR,{id:r??n,...e})},BR=e=>e===void 0?``:typeof e==`string`?e:JSON.stringify(e),VR=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}}},HR=e=>{if(e===void 0)return[];let t=(Array.isArray(e)?e:[e]).flatMap(e=>typeof e==`string`?[e]:Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}: ${t}`));return[...new Set(t)]},UR=`default`,WR=e=>[...new Set(e.map(e=>e.item).filter(e=>e!==void 0))].sort((e,t)=>e-t),GR=e=>{let t=new Map;for(let n of e){if(n.variant===void 0)continue;let e=BR(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===UR})}return[...t.values()]},KR=e=>e&&typeof e.primaryValue==`object`?e.primaryValue:void 0,qR=e=>{let t=new Map;for(let n of e){let e=KR(n);if(e)for(let[n,r]of Object.entries(e)){let e=t.get(n)??new Set;e.add(r),t.set(n,e)}}return[...t.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({name:e,values:[...t]}))},JR=(e,t,n,r)=>{let i=KR(t)??{},a,o=-1;for(let t of e){let e=KR(t);if(e?.[n]!==r)continue;let s=Object.entries(i).filter(([t,r])=>t!==n&&e[t]===r).length;s>o&&(a=t,o=s)}return a},YR=(e,t,n,r)=>{let i=KR(t);if(!i)return!0;let a={...i,[n]:r};return e.some(e=>{let t=KR(e);return t!==void 0&&Object.keys(t).length===Object.keys(a).length&&Object.entries(a).every(([e,n])=>t[e]===n)})},XR=(e,t)=>e.id&&t.id?e.id===t.id:e.localId&&t.localId?e.localId===t.localId:e===t,ZR=e=>e.find(e=>e.item===void 0&&e.variant===void 0),QR=(e,{item:t,variant:n})=>{if(t!==null||n!==null)return e.find(e=>(t===null||e.item===t)&&(n===null||BR(e.variant)===n))},$R=e=>({item:e.item??null,variant:e.variant===void 0?null:BR(e.variant)}),ez=e=>na(e)===`object`?Object.keys(e):[],tz=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 ez(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},nz=(e,t,n)=>{let r=tA(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}},rz=e=>typeof e==`string`?`'${e}'`:`{ ${Object.entries(e).map(([e,t])=>`${e}: ${typeof t==`string`?`'${t}'`:t}`).join(`, `)} }`,iz=(e,t,n)=>{let r=[...n?[`variant: ${rz(n.primaryValue)}`]:[],...t===null?[]:[`item: ${t}`]];return r.length===0?`useIntlayer('${e}')`:`useIntlayer('${e}', { ${r.join(`, `)} })`};S();var az=v(({className:e,isInteractive:t,...n},r)=>I(`table`,{ref:r,className:G(`w-full table-auto border-separate border-spacing-0 overflow-hidden rounded-2xl text-start text-sm`,`[&_thead_tr:first-child_th:first-child]:rounded-ss-2xl`,`[&_thead_tr:first-child_th:last-child]:rounded-se-2xl`,`[&_tbody_tr:last-child_td:first-child]:rounded-es-2xl`,`[&_tbody_tr:last-child_td:last-child]:rounded-ee-2xl`,`supports-[corner-shape:squircle]:rounded-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:first-child]:rounded-ss-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:last-child]:rounded-se-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:first-child]:rounded-es-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:last-child]:rounded-ee-3xl`,t&&`[&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors [&_tbody_tr:hover]:bg-neutral/40`,e),...n})),oz=(e,t)=>e.some(e=>t===`locale`?!!e.locale:t===`variant`?e.variant!==void 0:t===`item`?e.item!==void 0:t===`tags`?(e.tags?.length??0)>0:t===`title`?!!e.title:!!e.key),sz=({columnIndex:e,columnCount:t,isCurrent:n=!1,isSelectable:r=!1})=>G(`border-y border-neutral/30 px-3 py-2 transition-colors`,n&&`bg-text/10`,r&&`group-hover:bg-neutral/20`,e===0&&`rounded-s-xl border-s`,e===t-1&&`rounded-e-xl border-e`),cz=()=>I(`span`,{className:`text-neutral`,children:`-`}),lz=({title:e,dictionaries:t,currentDictionary:n,onSelectDictionary:r,labels:i})=>{let a=[`key`,`locale`,`variant`,`item`,`tags`,`title`].filter(e=>oz(t,e)),o=(e,t)=>{if(t===`key`)return I(`span`,{className:`font-mono`,dir:`ltr`,children:e.key});if(t===`locale`)return e.locale?I(xA,{color:`neutral`,size:`xs`,dir:`ltr`,children:String(e.locale)}):I(cz,{});if(t===`variant`){let t=HR(e.variant);return t.length===0?I(cz,{}):I(`div`,{className:`flex flex-wrap gap-1`,dir:`ltr`,children:t.map(e=>I(xA,{color:`warning`,size:`xs`,children:e},e))})}return t===`item`?e.item===void 0?I(cz,{}):I(xA,{color:`neutral`,size:`xs`,children:e.item}):t===`tags`?e.tags?.length?I(`div`,{className:`flex flex-wrap gap-1`,children:e.tags.map(e=>I(xA,{color:`neutral`,size:`xs`,children:e},e))}):I(cz,{}):e.title||I(cz,{})};return I(`div`,{className:`flex flex-col gap-2`,children:[I(`p`,{className:`text-xs font-medium tracking-wide text-muted uppercase`,children:e}),I(`div`,{className:`max-h-96 w-full overflow-auto`,children:I(az,{className:`border-spacing-y-1 text-xs`,children:[I(`thead`,{children:I(`tr`,{children:a.map(e=>I(`th`,{className:`px-3 py-2 font-medium whitespace-nowrap text-neutral`,children:i[e]},e))})}),I(`tbody`,{children:t.map(e=>{let t=XR(e,n),s=!!r&&!t;return I(`tr`,{"aria-current":t,tabIndex:s?0:void 0,onClick:()=>s&&r?.(e),onKeyDown:t=>{s&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r?.(e))},className:G(`group`,s&&`cursor-pointer`,t&&`font-semibold`),children:a.map((n,r)=>I(`td`,{className:sz({columnIndex:r,columnCount:a.length,isCurrent:t,isSelectable:s}),children:I(`span`,{className:`flex items-center gap-2`,children:[o(e,n),t&&r===0&&I(xA,{color:`text`,size:`xs`,children:i.current})]})},n))},e.id??e.localId??e.key)})})]})})]})},uz=({title:e,tags:t,onSelectTag:n,labels:r})=>{let i=[`key`,`name`,`description`].filter(e=>t.some(t=>!!t[e])),a=!!n;return I(`div`,{className:`flex flex-col gap-2`,children:[I(`p`,{className:`text-xs font-medium tracking-wide text-muted uppercase`,children:e}),I(`div`,{className:`max-h-96 w-full overflow-auto`,children:I(az,{className:`border-spacing-y-1 text-xs`,children:[I(`thead`,{children:I(`tr`,{children:i.map(e=>I(`th`,{className:`px-3 py-2 font-medium whitespace-nowrap text-neutral`,children:r[e]},e))})}),I(`tbody`,{children:t.map(e=>I(`tr`,{tabIndex:a?0:void 0,onClick:()=>n?.(e.key),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n?.(e.key))},className:G(`group`,a&&`cursor-pointer`),children:i.map((t,n)=>I(`td`,{className:sz({columnIndex:n,columnCount:i.length,isSelectable:a}),children:t===`key`?I(`span`,{className:`font-mono`,dir:`ltr`,children:e.key}):t===`description`&&e.description?I(`span`,{className:`line-clamp-2 max-w-xs text-neutral`,children:e.description}):e[t]??I(cz,{})},t))},e.key))})]})})]})};S();var dz=e=>Object.entries(e).map(([e,t])=>({name:e,value:String(t),isNumber:typeof t==`number`})),fz=e=>Object.fromEntries(e.filter(e=>e.name.trim()!==``).map(e=>{let t=Number(e.value),n=e.value.trim()!==``&&!Number.isNaN(t);return[e.name.trim(),e.isNumber&&n?t:e.value]})),pz=({fields:e,onChange:t,labels:n})=>{let[r,i]=d(()=>dz(e)),a=e=>{i(e),t(fz(e))},o=(e,t)=>a(r.map((n,r)=>r===e?{...n,...t}:n));return I(`div`,{className:`flex flex-col gap-2`,dir:`ltr`,children:[I(`span`,{className:`ms-1 text-sm font-medium`,children:n.title}),r.map((e,t)=>I(`div`,{className:`flex items-center gap-2`,children:[I(UD,{type:`text`,value:e.name,placeholder:n.fieldName,"aria-label":n.fieldName,className:`font-mono`,onChange:e=>o(t,{name:e.target.value})}),I(UD,{type:`text`,value:e.value,placeholder:n.fieldValue,"aria-label":n.fieldValue,className:`font-mono`,onChange:e=>o(t,{value:e.target.value})}),I(Z,{variant:`hoverable`,color:`text`,size:`icon-sm`,Icon:jc,label:n.removeField,className:`shrink-0`,disabled:r.length<=1,onClick:()=>a(r.filter((e,n)=>n!==t))})]},t)),I(Z,{variant:`outline`,color:`text`,size:`sm`,Icon:_c,label:n.addField,className:`self-start`,onClick:()=>i([...r,{name:``,value:``,isNumber:!1}]),children:n.addField})]})},mz={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"descriptionInvalidTypeError":"The description must be a valid string.","descriptionRequiredError":"Please enter a description for your dictionary.","filePathInvalidTypeError":"The file path must be a valid string","filePathRequiredError":"Please enter a file path","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","keyInvalidTypeError":"The key must be a valid string.","keyMinLengthError":"The key must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keySpaceError":"The key cannot contain spaces or special characters.","locationInvalidTypeError":"Please select a valid location","locationRequiredError":"Please select a location","requiredErrorProjectId":"Please select a project","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","titleRequiredError":"Please enter a name for your dictionary."},"en-GB":{"descriptionInvalidTypeError":"The description must be a valid string.","descriptionRequiredError":"Please enter a description for your dictionary.","filePathInvalidTypeError":"The file path must be a valid string","filePathRequiredError":"Please enter a file path","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","keyInvalidTypeError":"The key must be a valid string.","keyMinLengthError":"The key must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keySpaceError":"The key cannot contain spaces or special characters.","locationInvalidTypeError":"Please select a valid location","locationRequiredError":"Please select a location","requiredErrorProjectId":"Please select a project","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","titleRequiredError":"Please enter a name for your dictionary."},"fr":{"descriptionInvalidTypeError":"La description doit être une chaîne valide.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","keyInvalidTypeError":"La clé doit être une chaîne valide.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","locationRequiredError":"Veuillez sélectionner un emplacement","requiredErrorProjectId":"Veuillez sélectionner un projet","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire."},"es":{"descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","keyInvalidTypeError":"La clave debe ser una cadena válida.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","locationRequiredError":"Por favor, seleccione una ubicación","requiredErrorProjectId":"Por favor, seleccione un proyecto","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","titleRequiredError":"Por favor, ingrese un nombre para su diccionario."},"de":{"descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","locationRequiredError":"Bitte wählen Sie einen Standort aus","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein."},"ja":{"descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","descriptionRequiredError":"辞書の説明を入力してください。","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります","filePathRequiredError":"ファイルパスを入力してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keyMinLengthError":"キーは4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","locationInvalidTypeError":"有効な場所を選択してください","locationRequiredError":"場所を選択してください","requiredErrorProjectId":"プロジェクトを選択してください","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","titleRequiredError":"辞書の名前を入力してください。"},"ko":{"descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다","filePathRequiredError":"파일 경로를 입력하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","locationInvalidTypeError":"유효한 위치를 선택하세요","locationRequiredError":"위치를 선택하세요","requiredErrorProjectId":"프로젝트를 선택하세요","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","titleRequiredError":"사전 이름을 입력하세요."},"zh":{"descriptionInvalidTypeError":"描述必须是有效的字符串。","descriptionRequiredError":"请输入您词典的描述。","filePathInvalidTypeError":"文件路径必须是有效的字符串","filePathRequiredError":"请输入文件路径","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","keyInvalidTypeError":"关键字必须是有效的字符串。","keyMinLengthError":"键必须至少为4个字符。","keyRequiredError":"请输入您词典的键。","keySpaceError":"关键字不能包含空格或特殊字符。","locationInvalidTypeError":"请选择有效的位置","locationRequiredError":"请选择一个位置","requiredErrorProjectId":"请选择一个项目","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","titleRequiredError":"请输入您词典的名称。"},"it":{"descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida","filePathRequiredError":"Si prega di inserire un percorso del file","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","locationInvalidTypeError":"Si prega di selezionare una posizione valida","locationRequiredError":"Si prega di selezionare una posizione","requiredErrorProjectId":"Si prega di selezionare un progetto","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","titleRequiredError":"Si prega di inserire un nome per il proprio dizionario."},"pt":{"descriptionInvalidTypeError":"A descrição deve ser uma string válida.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida","filePathRequiredError":"Por favor, insira um caminho de arquivo","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","keyInvalidTypeError":"A chave deve ser uma string válida.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","locationInvalidTypeError":"Por favor, selecione um local válido","locationRequiredError":"Por favor, selecione um local","requiredErrorProjectId":"Por favor, selecione um projeto","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","titleRequiredError":"Por favor, insira um nome para o seu dicionário."},"hi":{"descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","locationRequiredError":"कृपया एक स्थान चुनें","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।"},"ar":{"descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة","filePathRequiredError":"يرجى إدخال مسار الملف","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","locationInvalidTypeError":"يرجى اختيار موقع صالح","locationRequiredError":"يرجى اختيار موقع","requiredErrorProjectId":"يرجى اختيار مشروع","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","titleRequiredError":"يرجى إدخال اسم لقاموسك."},"ru":{"descriptionInvalidTypeError":"Описание должно быть правильной строкой.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой","filePathRequiredError":"Пожалуйста, введите путь к файлу","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","locationRequiredError":"Пожалуйста, выберите местоположение","requiredErrorProjectId":"Пожалуйста, выберите проект","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","titleRequiredError":"Пожалуйста, введите название вашего словаря."}}}`),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`},hz=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(mz);return NP({title:LP(kP({error:e=>e.input===void 0?t.value:n.value}).check(VP(e=>e.length===0||e.length>=4,{error:r.value}))),key:zP(kP({error:e=>e.input===void 0?i.value:a.value}).check(wP(4,{error:s.value}),TP(/^[a-zA-Z0-9-_]+$/,{error:o.value})),``),description:LP(kP({error:e=>e.input===void 0?c.value:l.value})),projectIds:zP(jP(kP({error:e=>e.input===void 0?u.value:d.value})),[e]),tags:zP(jP(kP({error:()=>f.value})),[]),location:LP(FP([`local`,`remote`,`hybrid`,`plugin`],{error:e=>e.input===void 0?p.value:m.value})),importMode:LP(FP([`static`,`dynamic`,`fetch`])),filePath:LP(kP({error:e=>e.input===void 0?h.value:g.value}))})};S();var gz=[`collection`,`variant`],_z=e=>{let t=[];return e.item!==void 0&&t.push(`collection`),e.variant!==void 0&&t.push(`variant`),t},vz=[`remote`,`local`,`hybrid`,`plugin`],yz=e=>vz.includes(e),bz=e=>e===void 0?`remote`:yz(e)?e:`plugin`,xz=({dictionary:e,mode:t,onSelectSibling:n,siblings:r,onOpenDictionary:i,onOpenTag:a})=>{let{session:o}=IE(),{project:s}=o??{},{data:c,isLoading:l}=rD(),{data:u}=iD(),f=c?.data??[],p=u?.data??[],m=Mj(hz(String(s?.id)),{defaultValues:{...e,location:bz(e.location)}}),{isSubmitting:h}=jj(m),{editedContent:g,setEditedDictionary:_}=_T(),{titleInput:v,keyInput:y,descriptionInput:S,projectInput:C,tagsSelect:w,locationSelect:T,importModeSelect:E,filePathInput:D,componentFilePathField:O,auditButton:k,qualifierSection:A,siblingDictionaries:j,typeSwitch:N}=V(PR),{mutate:P,isPending:F}=HE(),L=g?.[e.localId],{data:ee,isLoading:te}=ZE({keys:[e.key]},{enabled:!r&&!!e.key}),R=x(()=>(r??ee?.data??[]).filter(t=>t.key===e.key&&!XR(t,e)),[r,ee,e]),ne=x(()=>[e,...R].sort((e,t)=>BR(e.variant).localeCompare(BR(t.variant))||(e.item??-1)-(t.item??-1)||String(e.locale??``).localeCompare(String(t.locale??``))),[e,R]),z=e.tags??[],B=x(()=>z.map(e=>{let t=p.find(t=>t.key===e);return{key:e,name:t?.name,description:t?.description}}),[z,p]),{data:re,isLoading:ie}=ZE({tags:z,pageSize:100},{enabled:z.length>0}),{localeDictionaries:ae}=mT(),oe=x(()=>{if(z.length===0)return[];let t=Object.values(ae??{}).filter(e=>!e.id);return[...re?.data??[],...t].filter(t=>t.key!==e.key&&t.tags?.some(e=>z.includes(e))).sort((e,t)=>e.key.localeCompare(t.key))},[re,ae,e.key,z]),se={key:j.keyColumn,locale:j.localeColumn,variant:j.variants,item:j.itemIndex,tags:j.tagsColumn,title:j.titleColumn,current:j.currentTag},ce=x(()=>R.filter(e=>e.item!==void 0).sort((e,t)=>(e.item??0)-(t.item??0)),[R]),le=x(()=>R.filter(e=>e.variant!==void 0),[R]),ue=x(()=>e.item===void 0?ce:[e,...ce].sort((e,t)=>(e.item??0)-(t.item??0)),[e,ce]);M(()=>{m.reset({...e,tags:e.tags??[],location:bz(e.location)}),he(_z(e)),_e(e.item??1),ye(BR(e.variant)),xe(!1),Te(!1)},[e,m?.reset]),M(()=>{L===void 0&&m.reset({...e,tags:e.tags??[],location:bz(e.location)})},[L]);let de=()=>{let t={...e,...L};P({fileContent:JSON.stringify(t)},{onSuccess:e=>{if(!e?.data)return;let n=e.data.fileContent,r={...t,...n,tags:n.tags??t.tags??[]};_(r),m.reset({...r,location:bz(r.location)})}})},fe=Aj({form:m,name:`location`}),pe=fe===`local`||fe===`hybrid`,[me,he]=d(()=>_z(e)),[ge,_e]=d(e.item??1),[ve,ye]=d(BR(e.variant)),[be,xe]=d(!1),Se=VR(ve),Ce=!Se.error&&typeof Se.variant==`object`&&!Array.isArray(Se.variant)?Se.variant:void 0,[we,Te]=d(!1),Ee=x(()=>[...ce,...le],[ce,le]);return I(Pj,{className:`relative flex w-full flex-col gap-8`,form:m,children:[I(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[I(FR,{name:`key`,label:y.label,placeholder:y.label.value,description:y.description,disabled:h,isRequired:!0,onSave:t=>{m.setValue(`key`,t),_({...e,...L??{},key:t})}}),I(FR,{name:`title`,label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:h,onSave:t=>{m.setValue(`title`,t),_({...e,...L??{},title:t})}})]}),I(IR,{name:`description`,label:S.label,placeholder:S.placeholder.value,description:S.description,disabled:h,onSave:t=>{m.setValue(`description`,t),_({...e,...L??{},description:t})}}),I(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[I(Wj,{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?m.getValues(`filePath`)??e.filePath:void 0;t||m.setValue(`filePath`,void 0),_({...e,...L??{},location:r,filePath:i})},s=t=>{if(!t&&!i)return;let r=t?i?`hybrid`:`remote`:`local`;n.onChange(r),_({...e,...L??{},location:r})};return I(Ij,{className:`flex flex-col gap-2 px-1`,children:[I(tM,{className:`ms-1`,children:T.label}),I(`div`,{className:`ms-2 flex items-center gap-4 py-2`,children:[I(zR,{id:`location-local`,name:`location-local`,label:T.local.value,color:`text`,checked:i,disabled:!t.includes(`local`)&&!t.includes(`remote`),onChange:e=>o(e.target.checked)}),I(zR,{id:`location-remote`,name:`location-remote`,label:T.remote.value,color:`text`,checked:a,disabled:!t.includes(`remote`)&&e.location!==`remote`&&e.location!==`hybrid`,onChange:e=>s(e.target.checked)})]}),I(Xj,{children:T.testDescription}),I(Zj,{})]})}}),I(eb,{mode:`wait`,children:pe&&I(Vb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},children:I(sM,{name:`filePath`,label:D.label.value,placeholder:D.placeholder.value,description:D.description.value,disabled:h||!pe,onChange:t=>{let n=t.target.value;_({...e,...L??{},filePath:n})}})},`filePath-input`)}),e.componentFilePath&&I(`div`,{className:`flex flex-col gap-2 px-1`,children:[I(`label`,{htmlFor:`component-file-path`,className:`ms-1 text-sm font-medium`,children:O.label}),I(UD,{id:`component-file-path`,type:`text`,dir:`ltr`,value:e.componentFilePath,readOnly:!0}),I(`p`,{className:`ms-1 text-sm text-neutral`,children:O.description})]})]}),I(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:I(GM,{name:`importMode`,label:E.label.value,description:E.description.value,onValueChange:t=>{m.setValue(`importMode`,t),_({...e,...L??{},importMode:t})},children:[I(Q.Trigger,{children:I(Q.Value,{placeholder:E.label.value})}),I(Q.Content,{children:[I(Q.Item,{value:`static`,children:E.static.value}),I(Q.Item,{value:`dynamic`,children:E.dynamic.value}),I(Q.Item,{value:`live`,children:E.live.value})]})]})}),I(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[I(WM,{name:`projectIds`,label:C.label.value,description:C.description,onValueChange:t=>{let n=[t].flat();m.setValue(`projectIds`,n),_({...e,...L??{},projectIds:n})},children:[I(UM.Trigger,{getBadgeValue:e=>f?.find(t=>String(t.id)===e)?.name??e,children:I(UM.Input,{placeholder:C.placeholder.value})}),I(UM.Content,{children:I(_D,{isLoading:l,children:I(UM.List,{children:f?.map(e=>I(UM.Item,{value:String(e.id),children:e.name},String(e.id)))})})})]}),I(WM,{name:`tags`,label:w.label.value,description:w.description,onValueChange:t=>{let n=[t].flat();m.setValue(`tags`,n),_({...e,...L??{},tags:n})},children:[I(UM.Trigger,{getBadgeValue:e=>p?.find(t=>String(t.key)===e)?.name??e,children:I(UM.Input,{placeholder:w.placeholder.value})}),I(UM.Content,{children:I(_D,{isLoading:l,children:I(UM.List,{children:p?.map(e=>I(UM.Item,{value:String(e.key),children:e.name??e.key},String(e.key)))})})})]})]}),I(pO,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`card`,children:[I(`div`,{className:`flex flex-col gap-1`,children:[I(`p`,{className:`ms-1 text-sm font-semibold`,children:N.label}),I(`p`,{className:`ms-1 text-xs text-neutral`,children:N.description})]}),I(UM,{values:me,onValueChange:t=>{let n=[t].flat(),r=n.filter(e=>!me.includes(e)),i=me.filter(e=>!n.includes(e)),a={...e,...L??{}};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=ue.length>0?Math.max(...ue.map(e=>e.item??0))+1:1;_e(e),a={...a,item:e}}else if(e===`variant`){let e=ve||`default`;ye(e),a={...a,variant:VR(e).variant}}he(n),_(a),xe(!1),n.length===0&&Ee.length>0?Te(!0):Te(!1)},className:`max-w-xs`,children:[I(UM.Trigger,{getBadgeValue:e=>e===`collection`?String(N.collection):e===`variant`?String(N.variant):e,children:I(UM.Input,{placeholder:N.label.value})}),I(UM.Content,{children:I(UM.List,{children:gz.map(e=>I(UM.Item,{value:e,children:N[e].value},e))})})]}),I(eb,{children:[me.includes(`collection`)&&I(Vb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:I(`div`,{className:`flex flex-col gap-2 px-1`,children:[I(`label`,{htmlFor:`qualifier-item-value`,className:`ms-1 text-sm font-medium`,children:N.itemValueLabel}),I(UD,{id:`qualifier-item-value`,type:`number`,min:1,value:ge,placeholder:N.itemValuePlaceholder.value,onChange:t=>{let n=parseInt(t.target.value,10);!Number.isNaN(n)&&n>=1&&(_e(n),_({...e,...L??{},item:n}))}})]})},`item-input`),me.includes(`variant`)&&I(Vb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:I(`div`,{className:`flex flex-col gap-2 px-1`,children:[Ce?I(pz,{fields:Ce,labels:{title:N.variantFieldsLabel.value,fieldName:N.variantFieldName.value,fieldValue:N.variantFieldValue.value,addField:N.addVariantField.value,removeField:N.removeVariantField.value},onChange:t=>{ye(JSON.stringify(t)),_({...e,...L??{},variant:t})}},e.localId):I(b,{children:[I(`label`,{htmlFor:`qualifier-variant-value`,className:`ms-1 text-sm font-medium`,children:N.variantValueLabel}),I(UD,{id:`qualifier-variant-value`,type:`text`,value:ve,placeholder:N.variantValuePlaceholder.value,onChange:t=>{let n=t.target.value;ye(n);let{variant:r,error:i}=VR(n);xe(i),i||_({...e,...L??{},variant:r})}})]}),be&&I(`p`,{className:`text-destructive ms-1 text-xs`,children:N.variantJsonError})]})},`variant-input`),me.length===0&&we&&I(Vb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:I(pO,{background:`none`,border:!0,borderColor:`neutral`,roundedSize:`xl`,padding:`md`,className:`gap-3`,children:[I(`p`,{className:`text-sm font-medium`,children:N.disablePickerTitle}),I(`p`,{className:`text-xs text-muted`,children:N.disablePickerDescription}),I(`div`,{className:`flex flex-wrap gap-2`,children:Ee.map(e=>I(`button`,{type:`button`,onClick:()=>{n?.(e),Te(!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&&I(`span`,{children:[A.variant,`:`,` `,BR(e.variant)]}),e.item!==void 0&&I(`span`,{children:[A.item,`: `,e.item]})]},e.localId))})]})},`sibling-picker`)]})]}),I(pO,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`neutral`,children:[I(`p`,{className:`text-sm font-semibold`,children:j.title}),I(_D,{isLoading:!r&&te||ie,children:[R.length===0&&oe.length===0&&B.length===0&&I(`span`,{className:`m-auto text-sm text-neutral`,children:j.noSiblings}),R.length>0&&I(lz,{title:j.sameKeyTitle,dictionaries:ne,currentDictionary:e,onSelectDictionary:n,labels:se}),oe.length>0&&I(lz,{title:j.sameTagsTitle,dictionaries:oe,currentDictionary:e,onSelectDictionary:i,labels:se}),B.length>0&&I(uz,{title:j.tagsColumn,tags:B,onSelectTag:a,labels:{key:j.keyColumn,name:j.nameColumn,description:j.descriptionColumn}})]})]}),I(lA,{identifier:`audit-dictionary-details`,className:`absolute top-0 right-0`,children:[I(Fj,{type:`button`,size:`icon-md`,label:k.label.value,Icon:zc,variant:`outline`,color:`text`,onClick:de,disabled:h||F,isLoading:F}),I(lA.Detail,{identifier:`audit-dictionary-details`,xAlign:`end`,children:I(pO,{padding:`sm`,roundedSize:`xl`,children:I(`span`,{className:`text-nowrap`,children:k.popover})})})]})]})},Sz={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`};S();var Cz=({content:e,onClick:t,...n})=>{let[r,i]=d(!1),[a,o]=d(!1),{label:s}=V(Sz),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 I(Z,{Icon:r?zs:Vs,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})};S();var wz=_(()=>kn(()=>import(`./dist-Drz9gF2m.js`).then(e=>({default:e.Editor})),__vite__mapDeps([5,2]))),Tz=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=u(null),c=u(null),[l,f]=d({height:0,width:0}),p=n?`vs-dark-transparent`:`hc-light-theme`,m=(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(p),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}),f({height:n,width:s.current?.clientWidth??0})},h=r??(typeof e==`string`&&e.split(`
74
- `).length>1);return I(`div`,{className:G(`relative size-full text-sm`,r&&`ms-0`),children:[i&&I(`div`,{className:`sticky top-5 z-10`,children:I(`div`,{className:G(`absolute inset-e-2 bottom-0 flex h-7 items-center`),children:I(Cz,{content:e})})}),I(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:I(T,{fallback:I(_D,{}),children:I(wz,{...l,defaultLanguage:`typescript`,language:t,loading:I(_D,{}),defaultValue:String(e).replace(/\n$/,``),onMount:m,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:h?`on`:`off`},theme:p,className:`my-2 rounded-md`})})})]})},Ez=({dictionary:e,isDarkMode:t})=>{let{setEditedContent:n,editedContent:r}=_T(),i=e=>{try{return JSON.parse(e),!0}catch{return!1}},a=r?.[e.localId]?.content??e?.content;return I(Tz,{language:`json`,onChange:t=>{i(t??`{}`)&&n(e.localId,JSON.parse(t??`{}`))},isDarkMode:t,children:JSON.stringify(a,null,2)})},Dz=e=>{let t=Qi(e),n=na(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?Dz(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0};S();var Oz=({children:e,onToggle:t,...n})=>{let[r,i]=d(!1);return I(xD,{...n,onToggle:e=>{e&&!r&&i(!0),t?.(e)},children:r?e:null})},kz=({reorderProps:e,children:t})=>I(`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`,NF),children:[I(Zs,{"aria-hidden":!0,className:`mt-2.5 size-3.5 shrink-0 text-neutral opacity-0 transition-opacity group-hover/reorder:opacity-100`}),I(`div`,{className:`min-w-0 flex-1`,children:t})]}),Az=e=>Array.isArray(e)?e.map((e,t)=>String(t)):e&&typeof e==`object`&&typeof e.nodeType!=`string`?Object.keys(e):[],jz=({section:e,keyPath:t,dictionary:n})=>{let{selectedLocales:r}=qO(),{locale:i}=oa(),a=Yi(e,t,yE()??r[0]??i),{addEditedContent:o}=gT(),{setFocusedContentKeyPath:s,focusedContent:c}=xE(),{addNewElement:l,goToField:u}=V(dO),d=na(a),f=e=>(c?.keyPath?.length??0)>0&&$n(e,c?.keyPath??[]),p=Dz(a),{reorderField:m}=V(bF),{moveField:h}=mR(n),g=Array.isArray(a),{getReorderProps:_}=MF({itemIds:Az(a),orientation:`vertical`,title:m.value,onMove:(e,n)=>h(t,g?Number(e):e,g?Number(n):n)});return a?p?I(Z,{label:u.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>s(t),IconRight:js,children:fr(t[t.length-1]?.key)}):typeof a==`object`?d===`reactNode`?I(b,{children:`React Node`}):d===`translation`?I(`div`,{className:`flex flex-col justify-between gap-2`,children:r.map(r=>I(jz,{keyPath:[...t,{type:zr,key:r}],section:e,dictionary:n},r))}):d===`enumeration`||d===`plural`||d===`condition`||d===`gender`||d===`select`?I(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(a[d]).map(r=>I(jz,{keyPath:[...t,{type:d,key:r}],section:e,dictionary:n},r))}):d===`array`?I(`div`,{className:`flex flex-col justify-between gap-2`,children:[a.map((r,i)=>{let a=[...t,{type:Kr,key:i}];return Dz(r)?I(kz,{reorderProps:_(String(i)),children:I(Z,{label:`${u.label.value} ${i}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>s(a),IconRight:js,isActive:f(a),children:[`Item `,i]})},JSON.stringify(a)):I(kz,{reorderProps:_(String(i)),children:I(Oz,{label:`${u.label.value} ${i}`,header:`Item ${i}`,isActive:f(a),onClick:()=>s(a),children:I(`div`,{className:`mt-2 flex w-full max-w-full`,children:I(`div`,{className:`flex-1 ps-10`,children:I(jz,{keyPath:a,section:e,dictionary:n})})})})},JSON.stringify(a))}),I(Z,{label:l.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...t,{type:Kr,key:a.length}],r=a,i=Zi(r[r.length-1])??``;o(n.localId,i,e,!1),s(e)},Icon:_c,children:l.text})]}):typeof a.nodeType==`string`?I(jz,{keyPath:[...t,{type:a.nodeType}],section:e,dictionary:n}):I(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(a).map(r=>{let i=[...t,{type:Gr,key:r}];return Dz(Yi(e,i))?I(kz,{reorderProps:_(r),children:I(Z,{label:`${u.label.value} ${r}`,isActive:f(i),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>s(i),IconRight:js,children:fr(r)})},r):I(kz,{reorderProps:_(r),children:I(Oz,{label:`${u.label.value} ${r}`,isActive:f(i),onClick:()=>s(i),header:fr(r),children:I(`div`,{className:`mt-2 flex w-full max-w-full`,children:I(`div`,{className:`flex-1 ps-10`,children:I(jz,{keyPath:i,section:e,dictionary:n})})})})},r)})}):I(b,{children:[`Error loading section --`,d,`--`,JSON.stringify(a),`--`,JSON.stringify(t)]}):I(b,{})};S();var Mz=({dictionary:e})=>{let{editedContent:t}=_T(),{focusedContent:n,setFocusedContentKeyPath:r}=xE(),[,i]=y(),a=A(e=>i(()=>r(e)),[r]),{content:o,key:s,localId:c}=e,l=n?.keyPath,u=t?.[c]?.content===void 0?o:t?.[c]?.content,{selectedLocales:d}=qO(),{locale:f}=oa(),p=yE()??d[0]??f,m=E(l),h=m!==l,g=x(()=>Yi(u,l??[],p),[u,l,p]),_=x(()=>Yi(u,m??[],p),[u,m,p]),v=Dz(u),b=Dz(_);return M(()=>{g===void 0&&a(n?.keyPath?.slice(0,-1)??[])},[]),I(`div`,{children:[I(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[I(fR,{dictionaryKey:s,keyPath:l??[],onClickKeyPath:a}),I(`div`,{className:`flex items-center gap-2`,children:I(KL,{})})]}),I(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof u==`object`&&u&&!v&&Object.keys(u).length>0&&I(pO,{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:I(jz,{keyPath:[],section:u,dictionary:e})}),(b||(m??[]).length>0)&&I(`div`,{className:h?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:I(Kk,{keyPath:m??[],section:_,dictionary:e})})]})]})},Nz={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"confirmation":{"cancelButton":{"label":"Click to cancel","text":"Cancel"},"confirmButton":{"label":"Click to confirm","text":"Confirm"},"message":"This will overwrite the existing dictionary. Are you sure you want to continue?","title":"Confirmation"},"deleteButton":{"label":"Click to delete dictionary","text":"Delete dictionary"},"discardButton":{"label":"Click to discard every unsaved change","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Discard {{count}} change","other":"Discard {{count}} changes"}}},"textWithoutCount":"Discard changes"},"publishButton":{"label":"Click to publish dictionary","text":"Publish dictionary"},"saveButton":{"label":"Click to save changes","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Save {{count}} change","other":"Save {{count}} changes"}}},"textWithoutCount":"Save changes"},"saveToFileButton":{"label":"Click to write the changes to the content declaration file","text":"Save to file"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Writes to {{filePath}}"}},"en-GB":{"confirmation":{"cancelButton":{"label":"Click to cancel","text":"Cancel"},"confirmButton":{"label":"Click to confirm","text":"Confirm"},"message":"This will overwrite the existing dictionary. Are you sure you want to continue?","title":"Confirmation"},"deleteButton":{"label":"Click to delete dictionary","text":"Delete dictionary"},"discardButton":{"label":"Click to discard every unsaved change","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Discard {{count}} change","other":"Discard {{count}} changes"}}},"textWithoutCount":"Discard changes"},"publishButton":{"label":"Click to publish dictionary","text":"Publish dictionary"},"saveButton":{"label":"Click to save changes","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Save {{count}} change","other":"Save {{count}} changes"}}},"textWithoutCount":"Save changes"},"saveToFileButton":{"label":"Click to write the changes to the content declaration file","text":"Save to file"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Writes to {{filePath}}"}},"fr":{"confirmation":{"cancelButton":{"label":"Cliquez pour annuler","text":"Annuler"},"confirmButton":{"label":"Cliquez pour confirmer","text":"Confirmer"},"message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","title":"Confirmation"},"deleteButton":{"label":"Cliquez pour supprimer le dictionnaire","text":"Supprimer le dictionnaire"},"discardButton":{"label":"Cliquez pour annuler toutes les modifications non enregistrées","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Annuler {{count}} modification","other":"Annuler {{count}} modification(s)"}}},"textWithoutCount":"Annuler les modifications"},"publishButton":{"label":"Cliquez pour publier dictionnaire","text":"Publier dictionnaire"},"saveButton":{"label":"Cliquez pour enregistrer les modifications","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Enregistrer {{count}} modification","other":"Enregistrer {{count}} modifications"}}},"textWithoutCount":"Enregistrer les modifications"},"saveToFileButton":{"label":"Cliquez pour écrire les modifications dans le fichier de déclaration de contenu","text":"Enregistrer dans le fichier"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Écrit dans {{filePath}}"}},"es":{"confirmation":{"cancelButton":{"label":"Haga clic para cancelar","text":"Cancelar"},"confirmButton":{"label":"Haga clic para confirmar","text":"Confirmar"},"message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","title":"Confirmación"},"deleteButton":{"label":"Haga clic para eliminar el diccionario","text":"Eliminar diccionario"},"discardButton":{"label":"Haga clic para descartar todos los cambios no guardados","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Descartar {{count}} cambio","other":"Descartar {{count}} cambios"}}},"textWithoutCount":"Descartar cambios"},"publishButton":{"label":"Haga clic para publicar diccionario","text":"Publicar diccionario"},"saveButton":{"label":"Haga clic para guardar cambios","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Guardar {{count}} cambio","other":"Guardar {{count}} cambios"}}},"textWithoutCount":"Guardar cambios"},"saveToFileButton":{"label":"Haga clic para escribir los cambios en el archivo de declaración de contenido","text":"Guardar en el archivo"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Escribe en {{filePath}}"}},"de":{"confirmation":{"cancelButton":{"label":"Klicken Sie, um abzubrechen","text":"Abbrechen"},"confirmButton":{"label":"Klicken Sie, um zu bestätigen","text":"Bestätigen"},"message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","title":"Bestätigung"},"deleteButton":{"label":"Klicken Sie, um das Wörterbuch zu löschen","text":"Wörterbuch löschen"},"discardButton":{"label":"Klicken Sie, um alle nicht gespeicherten Änderungen zu verwerfen","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"{{count}} Änderung verwerfen","other":"{{count}} Änderungen verwerfen"}}},"textWithoutCount":"Änderungen verwerfen"},"publishButton":{"label":"Klicken Sie, um das Wörterbuch zu veröffentlichen","text":"Wörterbuch veröffentlichen"},"saveButton":{"label":"Klicken Sie, um Änderungen zu speichern","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"{{count}} Änderung speichern","other":"{{count}} Änderungen speichern"}}},"textWithoutCount":"Änderungen speichern"},"saveToFileButton":{"label":"Klicken Sie, um die Änderungen in die Inhaltsdeklarationsdatei zu schreiben","text":"In Datei speichern"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Schreibt in {{filePath}}"}},"ja":{"confirmation":{"cancelButton":{"label":"キャンセルするにはクリックしてください","text":"キャンセル"},"confirmButton":{"label":"確認するにはクリックしてください","text":"確認"},"message":"既存の辞書を上書きします。続行しますか?","title":"確認"},"deleteButton":{"label":"辞書を削除するにはクリックしてください","text":"辞書を削除"},"discardButton":{"label":"クリックして未保存の変更をすべて破棄","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"{{count}} 件の変更を破棄","other":"{{count}} 件の変更を破棄"}}},"textWithoutCount":"変更を破棄"},"publishButton":{"label":"辞書を公開するにはクリックしてください","text":"辞書を公開"},"saveButton":{"label":"変更を保存するにはクリックしてください","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"{{count}} 件の変更を保存","other":"{{count}} 件の変更を保存"}}},"textWithoutCount":"変更を保存"},"saveToFileButton":{"label":"クリックして変更をコンテンツ宣言ファイルに書き込む","text":"ファイルに保存"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"{{filePath}} に書き込みます"}},"ko":{"confirmation":{"cancelButton":{"label":"취소를 클릭하세요","text":"취소"},"confirmButton":{"label":"확인을 클릭하세요","text":"확인"},"message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","title":"확인"},"deleteButton":{"label":"사전을 삭제하려면 클릭하세요","text":"사전 삭제"},"discardButton":{"label":"클릭하여 저장되지 않은 모든 변경 사항 취소","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"변경 사항 {{count}}개 취소","other":"변경 사항 {{count}}개 취소"}}},"textWithoutCount":"변경 사항 취소"},"publishButton":{"label":"사전을 게시하려면 클릭하세요","text":"사전을 게시합니다"},"saveButton":{"label":"변경 사항을 저장하려면 클릭하세요","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"변경 사항 {{count}}개 저장","other":"변경 사항 {{count}}개 저장"}}},"textWithoutCount":"변경 사항 저장"},"saveToFileButton":{"label":"클릭하여 변경 사항을 콘텐츠 선언 파일에 기록","text":"파일에 저장"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"{{filePath}}에 기록합니다"}},"zh":{"confirmation":{"cancelButton":{"label":"单击取消","text":"取消"},"confirmButton":{"label":"单击确认","text":"确认"},"message":"这将覆盖现有的字典。你确定要继续吗?","title":"确认"},"deleteButton":{"label":"单击以删除字典","text":"删除字典"},"discardButton":{"label":"单击以放弃所有未保存的更改","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"放弃 {{count}} 项更改","other":"放弃 {{count}} 项更改"}}},"textWithoutCount":"放弃更改"},"publishButton":{"label":"单击以发布字典","text":"发布字典"},"saveButton":{"label":"单击保存更改","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"保存 {{count}} 项更改","other":"保存 {{count}} 项更改"}}},"textWithoutCount":"保存更改"},"saveToFileButton":{"label":"单击将更改写入内容声明文件","text":"保存到文件"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"写入 {{filePath}}"}},"it":{"confirmation":{"cancelButton":{"label":"Fai clic per annullare","text":"Annulla"},"confirmButton":{"label":"Fai clic per confermare","text":"Conferma"},"message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","title":"Conferma"},"deleteButton":{"label":"Fai clic per eliminare il dizionario","text":"Elimina dizionario"},"discardButton":{"label":"Fai clic per annullare tutte le modifiche non salvate","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Annulla {{count}} modifiche","other":"Annulla {{count}} modifiche"}}},"textWithoutCount":"Annulla modifiche"},"publishButton":{"label":"Fai clic per pubblicare il dizionario","text":"Pubblica dizionario"},"saveButton":{"label":"Fai clic per salvare le modifiche","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Salva {{count}} modifiche","other":"Salva {{count}} modifiche"}}},"textWithoutCount":"Salva le modifiche"},"saveToFileButton":{"label":"Fai clic per scrivere le modifiche nel file di dichiarazione dei contenuti","text":"Salva nel file"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Scrive in {{filePath}}"}},"pt":{"confirmation":{"cancelButton":{"label":"Clique para cancelar","text":"Cancelar"},"confirmButton":{"label":"Clique para confirmar","text":"Confirmar"},"message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","title":"Confirmação"},"deleteButton":{"label":"Clique para excluir o dicionário","text":"Excluir dicionário"},"discardButton":{"label":"Clique para descartar todas as alterações não salvas","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Descartar {{count}} alterações","other":"Descartar {{count}} alterações"}}},"textWithoutCount":"Descartar alterações"},"publishButton":{"label":"Clique para publicar dicionário","text":"Publicar dicionário"},"saveButton":{"label":"Clique para salvar alterações","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Salvar {{count}} alterações","other":"Salvar {{count}} alterações"}}},"textWithoutCount":"Salvar alterações"},"saveToFileButton":{"label":"Clique para gravar as alterações no arquivo de declaração de conteúdo","text":"Salvar no arquivo"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Grava em {{filePath}}"}},"hi":{"confirmation":{"cancelButton":{"label":"रद्द करने के लिए क्लिक करें","text":"रद्द करें"},"confirmButton":{"label":"पुष्टि करने के लिए क्लिक करें","text":"पुष्टि करें"},"message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","title":"पुष्टि करें"},"deleteButton":{"label":"शब्दकोश हटाने के लिए क्लिक करें","text":"शब्दकोश हटाएं"},"discardButton":{"label":"सभी असहेजे परिवर्तन त्यागने के लिए क्लिक करें","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"{{count}} परिवर्तन त्यागें","other":"{{count}} परिवर्तन त्यागें"}}},"textWithoutCount":"परिवर्तन त्यागें"},"publishButton":{"label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें","text":"शब्दकोश प्रकाशित करें"},"saveButton":{"label":"परिवर्तनों को सहेजने के लिए क्लिक करें","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"{{count}} परिवर्तन सहेजें","other":"{{count}} परिवर्तन सहेजें"}}},"textWithoutCount":"परिवर्तनों को सहेजें"},"saveToFileButton":{"label":"परिवर्तनों को सामग्री घोषणा फ़ाइल में लिखने के लिए क्लिक करें","text":"फ़ाइल में सहेजें"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"{{filePath}} में लिखता है"}},"ar":{"confirmation":{"cancelButton":{"label":"انقر لإلغاء","text":"إلغاء"},"confirmButton":{"label":"انقر لتأكيد","text":"تأكيد"},"message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","title":"تأكيد"},"deleteButton":{"label":"انقر لحذف القاموس","text":"حذف القاموس"},"discardButton":{"label":"انقر لتجاهل جميع التغييرات غير المحفوظة","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"تجاهل {{count}} تغييرات","other":"تجاهل {{count}} تغييرات"}}},"textWithoutCount":"تجاهل التغييرات"},"publishButton":{"label":"انقر لنشر القاموس","text":"نشر القاموس"},"saveButton":{"label":"انقر لحفظ التغييرات","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"احفظ {{count}} تغييرات","other":"احفظ {{count}} تغييرات"}}},"textWithoutCount":"احفظ التغييرات"},"saveToFileButton":{"label":"انقر لكتابة التغييرات في ملف تعريف المحتوى","text":"حفظ في الملف"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"يكتب في {{filePath}}"}},"ru":{"confirmation":{"cancelButton":{"label":"Нажмите, чтобы отменить","text":"Отмена"},"confirmButton":{"label":"Нажмите, чтобы подтвердить","text":"Подтвердить"},"message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","title":"Подтверждение"},"deleteButton":{"label":"Нажмите, чтобы удалить словарь","text":"Удалить словарь"},"discardButton":{"label":"Нажмите, чтобы отменить все несохранённые изменения","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Отменить изменения: {{count}}","other":"Отменить изменения: {{count}}"}}},"textWithoutCount":"Отменить изменения"},"publishButton":{"label":"Нажмите, чтобы опубликовать словарь","text":"Опубликовать словарь"},"saveButton":{"label":"Нажмите, чтобы сохранить изменения","text":{"fields":["count"],"nodeType":"insertion","insertion":{"nodeType":"plural","plural":{"one":"Сохранить {{count}} изменений","other":"Сохранить {{count}} изменений"}}},"textWithoutCount":"Сохранить изменения"},"saveToFileButton":{"label":"Нажмите, чтобы записать изменения в файл декларации контента","text":"Сохранить в файл"},"writesTo":{"fields":["filePath"],"nodeType":"insertion","insertion":"Запись в {{filePath}}"}}}}`),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`};S();var Pz=e=>{let[t,n]=d(e);return M(()=>{n(e??window.document.body)},[e]),t};S();var Fz=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()})}};S();var Iz=()=>!1,Lz=e=>{let{disableScroll:t=!1,element:n,key:r=`unnamed_blocker`}=e??{},i=Pz(n);M(()=>{let e=n??window.document.body;return t?Fz.addBlockage(r,e):Fz.removeBlockage(r,e),()=>{Fz.removeBlockage(r,e)}},[t,n,r]);let a=A(()=>i?Fz.isElementScrollBlocked(i):!1,[i]);return{isScrollBlocked:h(Fz.subscribe,a,Iz)}},Rz=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,zz=`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`,Bz=({className:e,...t})=>I(`h1`,{className:G(`text-3xl`,e),...t}),Vz=({className:e,...t})=>I(`h2`,{className:G(`mb-2 text-2xl`,Rz,e),...t}),Hz=({className:e,...t})=>I(`h3`,{className:G(`mb-2 text-xl`,Rz,e),...t}),Uz=({className:e,...t})=>I(`h4`,{className:G(`text-lg`,Rz,e),...t}),Wz=({className:e,...t})=>I(`h5`,{className:G(`text-base`,Rz,e),...t}),Gz=({className:e,...t})=>I(`h6`,{className:G(`ms-3 text-base`,Rz,e),...t}),Kz=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),qz=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Jz=(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},Yz=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Kz(t):void 0;return I(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Jz(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),qz(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:G(r&&zz,n),...i,children:t})},Xz=({isClickable:e,...t})=>I(Bz,{...t}),Zz=({isClickable:e=!1,...t})=>I(Yz,{H:Vz,isClickable:e,...t}),Qz=({isClickable:e=!1,...t})=>I(Yz,{H:Hz,isClickable:e,...t}),$z=({isClickable:e=!1,...t})=>I(Yz,{H:Uz,isClickable:e,...t}),eB=({isClickable:e=!1,...t})=>I(Yz,{H:Wz,isClickable:e,...t}),tB=({isClickable:e=!1,...t})=>I(Yz,{H:Gz,isClickable:e,...t});S();var nB=Kc(`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`}}),rB={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`},iB=gx.create(pO),aB=({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=Pz(n);if(Lz({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 I(b,{});let m=!!o,h=rB[d||`none`];return D(I(gx.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:I(iB,{onClick:e=>e.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:nB({size:s,className:c}),role:`dialog`,"aria-modal":!0,padding:`none`,...f,children:[I(`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&&I(Qz,{className:`ms-1 mb-2 flex items-center justify-center text-lg font-bold`,children:o}),i&&I(Z,{variant:`hoverable`,color:a,label:`Close modal`,className:`ms-auto`,onClick:e=>{e.stopPropagation(),r?.()},Icon:Vc,size:`icon-md`})]}),I(`div`,{className:G(`flex min-h-0 w-full flex-1 flex-col`,l===!0&&`overflow-auto`,l===`y`&&`overflow-x-hidden overflow-y-auto`,l===`x`&&`overflow-x-auto overflow-y-hidden`,!l&&`overflow-visible`),children:I(`div`,{className:G(`flex size-full flex-1 flex-col`,h),children:e})})]})}),p)},oB=(e,t)=>!!e&&JSON.stringify(e)!==JSON.stringify(t),sB=(e,t)=>e?{...e,...t}:t,cB=()=>{let{setLocaleDictionary:e}=hT(),{restoreEditedContent:t}=gT(),{mutateAsync:n,isPending:r}=$E(),{mutateAsync:i,isPending:a}=nD();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}};S();var lB=[],uB=`max-w-2xs flex-1 group-[.flex-col]/save-form:w-full group-[.flex-col]/save-form:max-w-none`,dB=({dictionary:e,mode:t,className:n,onDelete:r,onSave:i,...a})=>{let[o,s]=d(!1),{mutate:c,isPending:l}=eD(),{saveDictionary:u,isPushing:f,isWriting:p,isSaving:m}=cB(),{editedContent:h,restoreEditedContent:g}=_T(),{deleteButton:_,discardButton:v,saveButton:y,publishButton:S,saveToFileButton:C,writesTo:w,confirmation:T}=V(Nz),E=AR(),D=pT(),O=h?.[e.localId],k=x(()=>{if(E||!O)return lB;let t=(D?.internationalization?.locales??[]).map(String),n={locales:t,sourceLocale:String(D?.internationalization?.defaultLocale??t[0]??`en`)};return YP(tA(e.content,n),tA(O.content??e.content,n))},[E,O,e.content,D]),A=E?.changeSet??k,j=A.length,{isAuthenticated:N}=LE(),{session:P}=IE(),F=xx(),[L,ee]=d(!1),te=P?(P.permissions?.includes(`dictionary:admin`)||P.permissions?.includes(`dictionary:write`))??!1:!!F?.accessToken,R=t.includes(`remote`)&&!N&&!!F?.login,ne=te,z=x(()=>oB(O,e),[O,e]),B=e?.id!==void 0,re=()=>sB(e,O??e),ie=async()=>{O&&await u(re(),`local`)&&(s(!1),i?.())},ae=async()=>{await u(re(),`remote`)&&i?.()},oe=()=>{ee(!0),F?.login?.()},se=!!F?.isLoggingIn;M(()=>{L&&(N?(ee(!1),ae()):se||ee(!1))},[L,N,se]);let ce=()=>{e.id&&c({dictionaryId:e.id},{onSuccess:e=>{e&&r?.()}})},le=I(Fj,{label:y.label.value,disabled:!z||m||!te,Icon:Cc,color:`text`,className:uB,isLoading:f,onClick:ae,children:j>0?y.text({count:j})(j):y.textWithoutCount}),ue=j>0?I(gj,{changeSet:A,onRevert:E?.revertChange,className:uB,children:le}):le;return I(b,{children:[I(aB,{isOpen:o,title:T.title.value,size:`md`,roundedSize:`2xl`,onClose:()=>s(!1),padding:`md`,border:!0,borderColor:`neutral`,children:I(`form`,{className:`size-full`,onSubmit:e=>{e.preventDefault(),ie()},children:[I(`p`,{className:`py-4 text-sm text-muted-foreground`,children:T.message}),I(`div`,{className:`mt-12 flex flex-row-reverse justify-start gap-2`,children:[I(Fj,{type:`submit`,label:T.confirmButton.label.value,disabled:!z||m,Icon:Cc,color:`text`,className:uB,isLoading:p,onClick:ie,children:T.confirmButton.text}),I(Fj,{type:`button`,label:T.cancelButton.label.value,disabled:m,color:`text`,className:uB,variant:`outline`,onClick:()=>s(!1),children:T.cancelButton.text})]})]})}),I(`form`,{className:G(`group/save-form flex flex-row flex-row-reverse flex-wrap items-end justify-start gap-2`,n),...a,children:[t.includes(`remote`)&&N&&B&&z&&ue,t.includes(`local`)&&e.filePath&&I(`span`,{className:`me-auto truncate font-mono text-xs text-muted-foreground`,dir:`ltr`,children:w({filePath:e.filePath})}),R&&!B&&I(Fj,{label:S.label.value,disabled:m,Icon:Cs,color:`text`,className:uB,isLoading:L,onClick:oe,children:S.text}),t.includes(`remote`)&&N&&!B&&I(Fj,{label:S.label.value,disabled:m||!te,Icon:Cs,color:`text`,className:uB,isLoading:f,onClick:ae,children:S.text}),t.includes(`local`)&&I(Fj,{label:C.label.value,disabled:!z||m,Icon:qs,color:`text`,variant:N||R?`outline`:`default`,className:uB,isLoading:p,onClick:()=>s(!0),children:C.text}),z&&I(Fj,{label:v.label.value,disabled:!z,Icon:yc,variant:`outline`,color:`text`,className:uB,onClick:()=>g(e.localId),children:j>0?v.text({count:j})(j):v.textWithoutCount}),t.includes(`remote`)&&B&&r&&N&&I(Fj,{label:_.label.value,Icon:jc,color:`error`,variant:`outline`,className:uB,isLoading:l,onClick:ce,disabled:!ne,children:_.text})]})]})},fB={key:`sibling-switcher`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"alsoAnswersTo":"Also answers to","baseDescription":"Shared content merged into every entry","baseLabel":"Base","codeSnippetLabel":"Usage in code","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} items × {{variants}} variants = {{total}} combinations"},"completenessLabel":"Translation completeness","contextLabel":"Select a variant or an item","defaultTag":"default","emptyPreview":"(empty)","incompleteOnly":"Incomplete only","inheritanceHint":"Fields not declared here are inherited from the default variant, then from the base.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"item {{item}}"},"itemsLabel":"Collection items","missingKeys":"missing:","noMatchingItem":"No item matches","searchItems":"Search items","variantsLabel":"Variants"},"en-GB":{"alsoAnswersTo":"Also answers to","baseDescription":"Shared content merged into every entry","baseLabel":"Base","codeSnippetLabel":"Usage in code","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} items × {{variants}} variants = {{total}} combinations"},"completenessLabel":"Translation completeness","contextLabel":"Select a variant or an item","defaultTag":"default","emptyPreview":"(empty)","incompleteOnly":"Incomplete only","inheritanceHint":"Fields not declared here are inherited from the default variant, then from the base.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"item {{item}}"},"itemsLabel":"Collection items","missingKeys":"missing:","noMatchingItem":"No item matches","searchItems":"Search items","variantsLabel":"Variants"},"fr":{"alsoAnswersTo":"Répond aussi à","baseDescription":"Contenu partagé fusionné dans chaque entrée","baseLabel":"Base","codeSnippetLabel":"Utilisation dans le code","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} éléments × {{variants}} variantes = {{total}} combinaisons"},"completenessLabel":"Avancement de la traduction","contextLabel":"Sélectionner une variante ou un élément","defaultTag":"par défaut","emptyPreview":"(vide)","incompleteOnly":"Incomplets uniquement","inheritanceHint":"Les champs non déclarés ici sont hérités de la variante par défaut, puis de la base.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"élément {{item}}"},"itemsLabel":"Éléments de la collection","missingKeys":"manquant :","noMatchingItem":"Aucun élément ne correspond","searchItems":"Rechercher des éléments","variantsLabel":"Variantes"},"es":{"alsoAnswersTo":"También responde a","baseDescription":"Contenido compartido fusionado en cada entrada","baseLabel":"Base","codeSnippetLabel":"Uso en el código","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} elementos × {{variants}} variantes = {{total}} combinaciones"},"completenessLabel":"Progreso de la traducción","contextLabel":"Seleccionar una variante o un elemento","defaultTag":"predeterminada","emptyPreview":"(vacío)","incompleteOnly":"Solo incompletos","inheritanceHint":"Los campos no declarados aquí se heredan de la variante predeterminada y luego de la base.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"elemento {{item}}"},"itemsLabel":"Elementos de la colección","missingKeys":"falta:","noMatchingItem":"Ningún elemento coincide","searchItems":"Buscar elementos","variantsLabel":"Variantes"},"de":{"alsoAnswersTo":"Antwortet auch auf","baseDescription":"Gemeinsamer Inhalt, der in jeden Eintrag übernommen wird","baseLabel":"Basis","codeSnippetLabel":"Verwendung im Code","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} Elemente × {{variants}} Varianten = {{total}} Kombinationen"},"completenessLabel":"Übersetzungsfortschritt","contextLabel":"Variante oder Element auswählen","defaultTag":"Standard","emptyPreview":"(leer)","incompleteOnly":"Nur unvollständige","inheritanceHint":"Hier nicht deklarierte Felder werden von der Standardvariante und dann von der Basis geerbt.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"Element {{item}}"},"itemsLabel":"Sammlungselemente","missingKeys":"fehlt:","noMatchingItem":"Kein passendes Element","searchItems":"Elemente suchen","variantsLabel":"Varianten"},"ja":{"alsoAnswersTo":"次の ID にも対応","baseDescription":"すべてのエントリーにマージされる共有コンテンツ","baseLabel":"ベース","codeSnippetLabel":"コードでの使用方法","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} 項目 × {{variants}} バリアント = {{total}} 通り"},"completenessLabel":"翻訳の進捗","contextLabel":"バリアントまたは項目を選択","defaultTag":"デフォルト","emptyPreview":"(空)","incompleteOnly":"未完了のみ","inheritanceHint":"ここで宣言されていないフィールドは、デフォルトのバリアント、次にベースから継承されます。","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"項目 {{item}}"},"itemsLabel":"コレクションの項目","missingKeys":"不足:","noMatchingItem":"一致する項目がありません","searchItems":"項目を検索","variantsLabel":"バリアント"},"ko":{"alsoAnswersTo":"다음 ID에도 응답","baseDescription":"모든 항목에 병합되는 공유 콘텐츠","baseLabel":"기본","codeSnippetLabel":"코드에서 사용","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}}개 항목 × {{variants}}개 변형 = {{total}}개 조합"},"completenessLabel":"번역 완료율","contextLabel":"변형 또는 항목 선택","defaultTag":"기본값","emptyPreview":"(비어 있음)","incompleteOnly":"미완료만","inheritanceHint":"여기에 선언되지 않은 필드는 기본 변형에서, 그다음 기본 콘텐츠에서 상속됩니다.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"항목 {{item}}"},"itemsLabel":"컬렉션 항목","missingKeys":"누락:","noMatchingItem":"일치하는 항목이 없습니다","searchItems":"항목 검색","variantsLabel":"변형"},"zh":{"alsoAnswersTo":"同时响应","baseDescription":"合并到每个条目中的共享内容","baseLabel":"基础","codeSnippetLabel":"在代码中使用","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} 项 × {{variants}} 个变体 = {{total}} 种组合"},"completenessLabel":"翻译完成度","contextLabel":"选择变体或项","defaultTag":"默认","emptyPreview":"(空)","incompleteOnly":"仅未完成","inheritanceHint":"此处未声明的字段先从默认变体继承,再从基础内容继承。","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"第 {{item}} 项"},"itemsLabel":"集合项","missingKeys":"缺少:","noMatchingItem":"没有匹配的项","searchItems":"搜索项","variantsLabel":"变体"},"it":{"alsoAnswersTo":"Risponde anche a","baseDescription":"Contenuto condiviso unito a ogni voce","baseLabel":"Base","codeSnippetLabel":"Utilizzo nel codice","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} elementi × {{variants}} varianti = {{total}} combinazioni"},"completenessLabel":"Completamento della traduzione","contextLabel":"Seleziona una variante o un elemento","defaultTag":"predefinita","emptyPreview":"(vuoto)","incompleteOnly":"Solo incompleti","inheritanceHint":"I campi non dichiarati qui vengono ereditati dalla variante predefinita, poi dalla base.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"elemento {{item}}"},"itemsLabel":"Elementi della raccolta","missingKeys":"mancante:","noMatchingItem":"Nessun elemento corrisponde","searchItems":"Cerca elementi","variantsLabel":"Varianti"},"pt":{"alsoAnswersTo":"Também responde a","baseDescription":"Conteúdo compartilhado mesclado em cada entrada","baseLabel":"Base","codeSnippetLabel":"Uso no código","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} itens × {{variants}} variantes = {{total}} combinações"},"completenessLabel":"Progresso da tradução","contextLabel":"Selecionar uma variante ou um item","defaultTag":"padrão","emptyPreview":"(vazio)","incompleteOnly":"Somente incompletos","inheritanceHint":"Os campos não declarados aqui são herdados da variante padrão e depois da base.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"item {{item}}"},"itemsLabel":"Itens da coleção","missingKeys":"ausente:","noMatchingItem":"Nenhum item corresponde","searchItems":"Pesquisar itens","variantsLabel":"Variantes"},"hi":{"alsoAnswersTo":"इन पर भी लागू","baseDescription":"हर प्रविष्टि में मिलाई जाने वाली साझा सामग्री","baseLabel":"बेस","codeSnippetLabel":"कोड में उपयोग","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} आइटम × {{variants}} वैरिएंट = {{total}} संयोजन"},"completenessLabel":"अनुवाद की पूर्णता","contextLabel":"वैरिएंट या आइटम चुनें","defaultTag":"डिफ़ॉल्ट","emptyPreview":"(खाली)","incompleteOnly":"केवल अधूरे","inheritanceHint":"यहाँ घोषित न किए गए फ़ील्ड पहले डिफ़ॉल्ट वैरिएंट से, फिर बेस से लिए जाते हैं।","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"आइटम {{item}}"},"itemsLabel":"संग्रह आइटम","missingKeys":"अनुपस्थित:","noMatchingItem":"कोई मेल खाता आइटम नहीं","searchItems":"आइटम खोजें","variantsLabel":"वैरिएंट"},"ar":{"alsoAnswersTo":"يستجيب أيضًا لـ","baseDescription":"محتوى مشترك يُدمج في كل إدخال","baseLabel":"الأساس","codeSnippetLabel":"الاستخدام في الكود","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} عناصر × {{variants}} متغيرات = {{total}} تركيبة"},"completenessLabel":"اكتمال الترجمة","contextLabel":"اختر متغيرًا أو عنصرًا","defaultTag":"افتراضي","emptyPreview":"(فارغ)","incompleteOnly":"غير المكتملة فقط","inheritanceHint":"الحقول غير المعرّفة هنا تُورث من المتغير الافتراضي ثم من الأساس.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"العنصر {{item}}"},"itemsLabel":"عناصر المجموعة","missingKeys":"مفقود:","noMatchingItem":"لا يوجد عنصر مطابق","searchItems":"البحث في العناصر","variantsLabel":"المتغيرات"},"ru":{"alsoAnswersTo":"Также отвечает на","baseDescription":"Общий контент, объединяемый с каждой записью","baseLabel":"Основа","codeSnippetLabel":"Использование в коде","combinations":{"fields":["items","variants","total"],"nodeType":"insertion","insertion":"{{items}} элементов × {{variants}} вариантов = {{total}} комбинаций"},"completenessLabel":"Готовность перевода","contextLabel":"Выберите вариант или элемент","defaultTag":"по умолчанию","emptyPreview":"(пусто)","incompleteOnly":"Только незавершённые","inheritanceHint":"Поля, не объявленные здесь, наследуются от варианта по умолчанию, затем от основы.","itemLabel":{"fields":["item"],"nodeType":"insertion","insertion":"элемент {{item}}"},"itemsLabel":"Элементы коллекции","missingKeys":"нет:","noMatchingItem":"Нет подходящих элементов","searchItems":"Поиск элементов","variantsLabel":"Варианты"}}}`),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`},pB=()=>I(`span`,{"aria-hidden":!0,className:`inline-block size-1.5 shrink-0 rounded-full bg-warning`}),mB=({children:e})=>I(`div`,{className:`flex min-w-0 flex-1 flex-nowrap items-center gap-1 overflow-x-auto pb-1`,children:e}),hB=({variants:e,selectedVariant:t,onSelectVariant:n,getHasUnsavedChanges:r,leadingChip:i})=>{let a=V(fB),o=e.find(e=>e.identity===t),s=KR(o),c=e.filter(e=>!e.isStructured),l=qR(e),u=e=>{let i=t===e.identity;return I(Z,{variant:i?`default`:`outline`,size:`sm`,color:`text`,label:e.identity,"aria-pressed":i,onClick:()=>n(i?null:e.identity),className:`shrink-0`,children:I(`span`,{className:`flex items-center gap-1.5`,children:[String(e.primaryValue),e.isDefault&&I(`span`,{className:`font-normal opacity-70`,children:[`(`,a.defaultTag,`)`]}),r?.(e)&&I(pB,{})]})},e.identity)},d=(t,i)=>{let a=s?.[t]===i,c=JR(e,o,t,i),l=YR(e,o,t,i);return I(Z,{variant:a?`default`:`outline`,size:`sm`,color:`text`,label:`${t}: ${i}`,"aria-pressed":a,onClick:()=>n(a?null:c?.identity??null),className:G(`shrink-0 font-mono`,!l&&`opacity-60`),children:I(`span`,{className:`flex items-center gap-1.5`,dir:`ltr`,children:[String(i),c&&r?.(c)&&I(pB,{})]})},String(i))};return I(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(c.length>0||i)&&I(mB,{children:[i,c.map(u)]}),l.map(e=>I(`div`,{className:`flex min-w-0 items-center gap-2`,children:[I(`span`,{className:`w-20 shrink-0 truncate font-mono text-xs text-neutral`,dir:`ltr`,title:e.name,children:e.name}),I(mB,{children:e.values.map(t=>d(e.name,t))})]},e.name)),o&&o.aliases.length>0&&I(`span`,{className:`text-xs text-neutral`,children:[a.alsoAnswersTo,` `,I(`span`,{className:`font-mono`,dir:`ltr`,children:o.aliases.map(e=>typeof e==`string`?e:JSON.stringify(e)).join(`, `)})]})]})};S();var gB=8,_B=e=>{let t=Object.values(e.completenessByLocale);return t.length===0?1:t.reduce((e,t)=>e+t,0)/t.length},vB=(e,t)=>e.localId!==void 0&&t?.[e.localId]!==void 0,yB=e=>`${Math.round(e*100)}%`,bB=()=>I(`span`,{"aria-hidden":!0,className:`inline-block size-1.5 shrink-0 rounded-full bg-warning`}),xB=({dictionaryKey:e,siblings:t,selectedItem:n,selectedVariant:r,onSelect:i,isCompact:a=!1,className:o})=>{let s=V(fB),c=pT(),{editedContent:l}=_T(),[u,f]=d(``),[p,m]=d(!1),h=x(()=>(c?.internationalization?.locales??[]).map(String),[c]),g=String(c?.internationalization?.defaultLocale??h[0]??`en`),_=x(()=>WR(t),[t]),v=x(()=>GR(t),[t]),y=x(()=>ZR(t),[t]),b=x(()=>tz(t),[t]),S=x(()=>_.map(e=>{let n=t.filter(t=>t.item===e),i=nz((n.find(e=>r!==null&&e.variant!==void 0&&BR(e.variant)===r)??n[0])?.content,h,g);return{item:e,summary:i,completeness:_B(i),missingKeys:b[e]??[],hasUnsavedChanges:n.some(e=>vB(e,l))}}),[_,t,r,h,g,b,l]);if(_.length===0&&v.length===0)return null;let C=v.find(e=>e.identity===r),w=iz(e,n,C),T=S.length>gB,E=u.trim().toLowerCase(),D=S.filter(e=>(!p||e.completeness<1||e.missingKeys.length>0)&&(E===``||String(e.item).includes(E)||e.summary.preview.toLowerCase().includes(E))),O=e=>i({item:e,variant:r}),k=e=>i({item:n,variant:e}),A=e=>t.find(t=>t.variant!==void 0&&BR(t.variant)===e.identity&&(n===null||t.item===n)),j=[e,...C?[typeof C.primaryValue==`string`?C.primaryValue:JSON.stringify(C.primaryValue)]:[],...n===null?[]:[String(s.itemLabel({item:String(n)}))]].join(` · `),M=(e,t)=>y&&I(`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:[I(`span`,{className:`font-medium`,children:s.baseLabel}),I(`span`,{className:`truncate text-xs text-neutral`,children:s.baseDescription}),vB(y,l)&&I(bB,{})]}),N=(e,t)=>{let r=n===e.item,i=Object.entries(e.summary.completenessByLocale).map(([e,t])=>`${e}: ${yB(t)}`).join(` · `);return I(`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:[I(`span`,{className:`w-8 shrink-0 font-mono text-xs text-neutral`,dir:`ltr`,children:[`#`,e.item]}),I(`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&&I(bB,{}),e.missingKeys.length>0&&I(xA,{color:`warning`,size:`xs`,className:`shrink-0`,children:[s.missingKeys,` `,e.missingKeys.join(`, `)]}),!a&&I(`span`,{className:`flex w-24 shrink-0 items-center gap-2`,title:`${s.completenessLabel.value} — ${i}`,children:[I(`span`,{className:`h-1 flex-1 overflow-hidden rounded-full bg-neutral/20`,children:I(`span`,{className:G(`block h-full rounded-full`,e.completeness>=1?`bg-success`:`bg-warning`),style:{width:yB(e.completeness)}})}),I(`span`,{className:`w-8 text-end text-xs text-neutral`,children:yB(e.completeness)})]})]},e.item)},P=e=>{let t=A(e);return t!==void 0&&vB(t,l)},F=e=>I(hB,{variants:v,selectedVariant:r,onSelectVariant:k,getHasUnsavedChanges:P,leadingChip:e&&I(Z,{variant:r===null?`default`:`outline`,size:`sm`,color:`text`,label:s.baseLabel.value,"aria-pressed":r===null,onClick:()=>k(null),className:`shrink-0`,children:s.baseLabel})});if(a){let t=`sibling-switcher-${e}`;return I(`div`,{className:G(`rounded-xl border border-text text-foreground transition-colors`,o),children:I(dI,{identifier:t,children:[I(dI.Trigger,{identifier:t,label:s.contextLabel.value,color:`text`,variant:`hoverable`,roundedSize:`xl`,children:I(`span`,{className:`flex w-full items-center justify-between gap-2`,children:[I(`span`,{className:`truncate font-mono text-xs`,dir:`ltr`,children:j}),I(dc,{className:`shrink-0`,size:16})]})}),I(dI.Panel,{identifier:t,isOverable:!0,isFocusable:!0,align:`start`,children:I(pO,{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:[S.length>0&&I(`div`,{className:`flex flex-col gap-1`,children:[I(`span`,{className:`px-2 text-xs font-medium text-neutral`,children:s.itemsLabel}),M(()=>O(null),n===null),S.map(e=>N(e,()=>O(e.item)))]}),v.length>0&&I(`div`,{className:`flex flex-col gap-1`,children:[I(`span`,{className:`px-2 text-xs font-medium text-neutral`,children:s.variantsLabel}),I(`div`,{className:`px-1`,children:F(!1)})]})]})})]})})}return I(`div`,{className:G(`flex flex-col gap-4`,o),children:[v.length>0&&I(`div`,{className:`flex flex-col gap-2`,children:[I(`span`,{className:`text-xs font-medium text-neutral`,children:s.variantsLabel}),F(S.length===0&&!!y),C&&!C.isDefault&&I(`span`,{className:`text-xs text-neutral`,children:s.inheritanceHint})]}),S.length>0&&I(`div`,{className:`flex flex-col gap-2`,children:[I(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[I(`span`,{className:`text-xs font-medium text-neutral`,children:s.itemsLabel}),v.length>0&&I(`span`,{className:`text-xs text-neutral`,children:s.combinations({items:String(S.length),variants:String(v.length),total:String(S.length*v.length)})})]}),T&&I(`div`,{className:`flex flex-wrap items-center gap-3`,children:[I(`div`,{className:`min-w-48 flex-1`,children:I(WF,{value:u,onChange:e=>f(e.target.value),placeholder:s.searchItems.value,"aria-label":s.searchItems.value})}),I(zR,{name:`sibling-switcher-incomplete-only`,label:s.incompleteOnly,checked:p,onChange:e=>m(e.target.checked),size:`sm`})]}),I(`div`,{className:`flex max-h-72 flex-col gap-0.5 overflow-y-auto`,children:[M(()=>O(null),n===null),D.map(e=>N(e,()=>O(e.item))),D.length===0&&I(`span`,{className:`px-3 py-2 text-sm text-neutral`,children:s.noMatchingItem})]})]}),I(`div`,{className:`flex flex-wrap items-center gap-2`,children:[I(`span`,{className:`text-xs text-neutral`,children:s.codeSnippetLabel}),I(NR,{text:w,className:`text-xs`,size:12,children:I(`code`,{className:`font-mono text-xs`,dir:`ltr`,children:w})})]})]})},SB={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{addNodeButton:{label:`Click to add a new node`,text:`Add a new node`},deleteButton:{label:`Remove node from section`},titleInput:{placeholder:`Enter the key of your node`}},"en-GB":{addNodeButton:{label:`Click to add a new node`,text:`Add a new node`},deleteButton:{label:`Remove node from section`},titleInput:{placeholder:`Enter the key of your node`}},fr:{addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`},deleteButton:{label:`Supprimer le nœud de la section`},titleInput:{placeholder:`Entrez la clé de votre nœud`}},es:{addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},titleInput:{placeholder:`Ingrese la clave de su nodo`}},de:{addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`}},ja:{addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`},deleteButton:{label:`セクションからノードを削除`},titleInput:{placeholder:`ノードのキーを入力してください`}},ko:{addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`},deleteButton:{label:`섹션에서 노드를 제거`},titleInput:{placeholder:`노드의 키를 입력하세요`}},zh:{addNodeButton:{label:`点击添加新节点`,text:`添加新节点`},deleteButton:{label:`从部分中移除节点`},titleInput:{placeholder:`输入您节点的键`}},it:{addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},titleInput:{placeholder:`Inserisci la chiave del tuo nodo`}},pt:{addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`},deleteButton:{label:`Remover nó da seção`},titleInput:{placeholder:`Insira a chave do seu nó`}},hi:{addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`}},ar:{addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`},deleteButton:{label:`إزالة العقدة من القسم`},titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`}},ru:{addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`},deleteButton:{label:`Удалить узел из секции`},titleInput:{placeholder:`Введите ключ вашего узла`}}}},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`};S();var CB=({section:e,onValueChange:t})=>{let{multilingual:n,text:r,number:i,boolean:a,node:o,array:s,enumeration:c,plural:l,triggerPlaceHolder:u,nest:f,gender:p,select:m,condition:h,markdown:g,insertion:_,reactNode:v,file:y}=V(OF),b=na(e),[x,S]=d(b);return I(Q,{value:x,onValueChange:e=>{S(e),t(e)},children:[I(Q.Trigger,{children:I(Q.Value,{placeholder:u})}),I(Q.Content,{children:[I(Q.Item,{value:zr,children:n}),I(Q.Item,{value:$r,children:r}),I(Q.Item,{value:ei,children:i}),I(Q.Item,{value:ti,children:a}),I(Q.Item,{value:Gr,children:o}),I(Q.Item,{value:Kr,children:s}),I(Q.Item,{value:Br,children:c}),I(Q.Item,{value:Vr,children:l}),I(Q.Item,{value:ni,children:p}),I(Q.Item,{value:ri,children:m}),I(Q.Item,{value:Ur,children:_}),I(Q.Item,{value:Zr,children:g}),I(Q.Item,{value:qr,children:f}),I(Q.Item,{value:Hr,children:h}),I(Q.Item,{value:Jr,disabled:!0,children:v}),I(Q.Item,{value:Wr,children:y})]})]})},wB=({section:e,dictionaryLocalId:t,keyPath:n,onNodeTypeChange:r})=>{let i=pT()?.internationalization?.locales??[],a=na(e),o=Qi(e),s=e=>{r(Xi(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 I(`div`,{className:`flex w-full flex-col gap-1`,children:[I(CB,{section:e,onValueChange:e=>r(Xi(e,i))}),I(wB,{section:o,keyPath:l,dictionaryLocalId:t,onNodeTypeChange:s})]})}if(a===`array`){let c=[...n,{type:a,key:0}];return I(`div`,{className:`flex w-full flex-col gap-1`,children:[I(CB,{section:e,onValueChange:e=>r(Xi(e,i))}),I(wB,{section:o,keyPath:c,dictionaryLocalId:t,onNodeTypeChange:s})]})}return a===`object`?I(b,{children:[I(CB,{section:e,onValueChange:e=>r(Xi(e,i))}),I(`div`,{className:`ms-10 mt-6`,children:I(DB,{keyPath:n,section:e,dictionaryLocalId:t})})]}):I(CB,{section:e,onValueChange:e=>r(Xi(e,i))})},TB=({sectionKey:e,section:t,keyPath:n,dictionaryLocalId:r})=>{let{focusedContent:i,setFocusedContentKeyPath:a}=xE(),{renameEditedContent:o,addEditedContent:s}=gT(),{titleInput:c,deleteButton:l}=V(SB),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 I(pO,{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:I(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof e==`string`&&I(`div`,{className:`w-full`,children:[I(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[I(rO,{name:`key`,"aria-label":`Key`,placeholder:c.placeholder.value,defaultValue:e,onSave:e=>u(e),variant:`invisible`}),I(Z,{label:l.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:jc,onClick:()=>{s(r,void 0,n);let e=n.slice(0,-1);a(e)}})]}),I(`span`,{className:`ms-3 text-sm text-muted-foreground`,children:[`( `,fr(e),` )`]})]}),I(wB,{keyPath:n,dictionaryLocalId:r,section:t,onNodeTypeChange:e=>{s(r,e,n)}})]})})},EB=({section:e,keyPath:t,dictionaryLocalId:n})=>{let{addNodeButton:r}=V(SB),{reorderField:i}=V(bF),{setFocusedContentKeyPath:a}=xE(),{addEditedContent:o}=gT(),{getDragHandleProps:s,getDropZoneProps:c}=MF({itemIds:e&&typeof e==`object`?Object.keys(e):[],orientation:`vertical`,title:i.value,onMove:(r,i)=>o(n,pR(e,r,i),t)});return!e||typeof e!=`object`?I(`div`,{children:`Not an object`}):I(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[I(`ul`,{className:`me-auto flex flex-col gap-4`,children:Object.keys(e).map(r=>I(`li`,{...c(r),className:G(`group/reorder flex w-full items-start gap-1 rounded-lg`,NF),children:[I(Z,{...s(r),label:i.value,Icon:Zs,iconClassName:`size-3.5`,variant:`none`,color:`neutral`,size:`custom`,roundedSize:`sm`,className:`mt-2 cursor-grab p-0.5 opacity-40 transition-opacity group-hover/reorder:opacity-100 hover:bg-text/10 focus-visible:opacity-100 active:cursor-grabbing data-[dragging=true]:opacity-40`}),I(TB,{sectionKey:r,section:e?.[r],keyPath:[...t,{type:Gr,key:r}],dictionaryLocalId:n})]},`${JSON.stringify(t)}-object-${r}`))}),I(Z,{label:r.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:_c,className:`flex-1`,onClick:()=>{let e=[...t,{type:Gr,key:`newKey`}];o(n,``,e),a(e)},children:r.text})]})},DB=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?I(TB,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):I(EB,{section:e,keyPath:t,dictionaryLocalId:n}),OB=({dictionary:e})=>{let{content:t,localId:n}=e,{editedContent:r}=_T();return I(TB,{section:r?.[n]?.content===void 0?t:r?.[n]?.content,keyPath:[],dictionaryLocalId:n})};S();var kB=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])};S();var AB=`intlayer:dictionary-editor:tab`,jB=`intlayer:dictionary-editor:view`,MB=[`grid`,`tree`,`structure`,`json`],NB=()=>{let{changeSet:e}=rF();return kB(e.length>0),null},PB=({dictionary:e,onClickDictionaryList:t,onOpenDictionary:n,onOpenTag:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c=!0,rightContent:l,lockedLocales:u,siblings:f,tab:p,onTabChange:m,view:h,onViewChange:g})=>{let _=pT(),{returnToDictionaryList:v,contentTab:y,detailsTab:S,viewSwitcherLabel:C,documentView:w,gridView:T,treeView:E,structureView:D,jsonView:O}=V(jR),{setFocusedContent:k}=xE(),{setLocaleDictionary:A}=hT(),{containerRef:j,isNarrow:N}=$L(),P=a.includes(`remote`),[F,L]=WO(AB,`content`),ee=p??(P&&F===`details`?`details`:`content`),te=e=>{m?.(e),L(e)},[R,ne]=d(e);M(()=>{ne(e)},[e]);let z=e.item!==void 0||e.variant!==void 0,{data:B}=ZE({keys:[e.key]},{enabled:!f&&!!e.key&&(P||z)}),re=x(()=>f??B?.data??[],[f,B]),ie=$R(R),ae=e=>{e&&!XR(e,R)&&(ne(e),k({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),A(e))},oe=t=>ae(t.item===null&&t.variant===null?ZR(re)??e:QR(re,t)),se=aA(R.content),[ce,le,,ue]=WO(jB,void 0),de=MB.find(e=>e===ce),[fe,pe]=d(),me=h??fe??de??(se?`document`:`grid`);M(()=>{k(t=>t?.dictionaryKey===e.key&&t?.dictionaryLocalId===e.localId?t:{...t??{},dictionaryKey:e.key,dictionaryLocalId:e.localId}),A(e)},[e.key,e.localId]);let he=e=>{g?.(e),e===`document`?(pe(`document`),ue()):(pe(void 0),le(e))},ge=[...se?[{content:w.value,value:`document`}]:[],{content:T.value,value:`grid`},{content:E.value,value:`tree`},{content:D.value,value:`structure`},{content:O.value,value:`json`}],_e=`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`;return I(JO,{availableLocales:_?.internationalization?.locales??[],children:I(iF,{dictionary:R,lockedLocales:u,children:[I(NB,{}),I(`div`,{ref:j,className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[c&&I(Z,{onClick:t,variant:`hoverable`,className:`z-10 ms-5 me-auto mb-6 shrink-0`,color:`text`,Icon:ys,label:v.label.value,children:v.text}),I(xB,{className:`mx-3 mb-3 shrink-0`,dictionaryKey:e.key,siblings:re,selectedItem:ie.item,selectedVariant:ie.variant,onSelect:oe,isCompact:N}),I(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[I(`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:[P&&I(YL,{selectedChoice:ee,tabs:[I(`button`,{className:_e,"data-active":ee===`content`,onClick:()=>te(`content`),type:`button`,children:y},`content`),I(`button`,{className:_e,"data-active":ee===`details`,onClick:()=>te(`details`),type:`button`,children:S},`details`)],hoverable:!0,color:`text`,className:`w-auto`}),ee===`content`&&I(`div`,{title:C.value,className:`overflow-x-auto`,children:I(YL,{selectedChoice:me,tabs:ge.map(({content:e,value:t})=>I(`button`,{className:_e,"data-active":me===t,onClick:()=>he(t),type:`button`,children:e},t)),hoverable:!0,color:`text`,className:`w-auto`})}),I(`div`,{className:`ms-auto flex items-center justify-end`,children:l})]}),I(`div`,{className:G(`min-h-0 flex-1 p-6`,ee===`content`&&me===`grid`?`flex min-h-0 flex-col overflow-hidden`:`overflow-y-auto`),children:I(`div`,{className:G(`flex w-full min-w-0 flex-col items-stretch gap-6`,ee===`content`&&me===`grid`&&`h-full min-h-0 flex-1`),children:[P&&ee===`details`&&I(xz,{dictionary:R,mode:a,onSelectSibling:ae,siblings:re,onOpenDictionary:n,onOpenTag:r}),ee===`content`&&I(b,{children:[me===`document`&&I(kR,{}),me===`grid`&&I(_R,{dictionary:R}),me===`tree`&&I(Mz,{dictionary:R}),me===`structure`&&I(OB,{dictionary:R}),me===`json`&&I(Ez,{dictionary:R,isDarkMode:i})]})]})})]}),I(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:I(pO,{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:[R.id&&I(NR,{text:R.id,className:`font-mono text-sm text-nowrap text-muted-foreground`,size:9,children:R.id}),I(dB,{dictionary:R,mode:a,className:`flex-1`,onDelete:()=>{k(null),o?.()},onSave:s})]})})]})]})})},FB={key:`push-dictionaries-progress`,content:{nodeType:`translation`,translation:{en:{failed:`Failed:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dictionaries pushed`},pushing:`Pushing:`},"en-GB":{failed:`Failed:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dictionaries pushed`},pushing:`Pushing:`},fr:{failed:`Échecs :`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dictionnaires envoyés`},pushing:`Envoi en cours :`},es:{failed:`Fallidos:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} diccionarios enviados`},pushing:`Enviando:`},de:{failed:`Fehlgeschlagen:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} Wörterbücher gesendet`},pushing:`Wird gesendet:`},ja:{failed:`失敗:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} 件の辞書をプッシュ済み`},pushing:`プッシュ中:`},ko:{failed:`실패:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`사전 {{settled}}/{{total}}개 푸시됨`},pushing:`푸시 중:`},zh:{failed:`失败:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`已推送 {{settled}}/{{total}} 个字典`},pushing:`正在推送:`},it:{failed:`Non riusciti:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dizionari inviati`},pushing:`Invio in corso:`},pt:{failed:`Falharam:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} dicionários enviados`},pushing:`Enviando:`},hi:{failed:`विफल:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`{{settled}}/{{total}} शब्दकोश भेजे गए`},pushing:`भेजा जा रहा है:`},ar:{failed:`فشل:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`تم إرسال {{settled}}/{{total}} قواميس`},pushing:`جارٍ الإرسال:`},ru:{failed:`Ошибки:`,pushedCount:{fields:[`settled`,`total`],nodeType:`insertion`,insertion:`Отправлено словарей: {{settled}}/{{total}}`},pushing:`Отправка:`}}},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`},IB=({progress:e,className:t})=>{let n=V(FB),{totalCount:r,settledCount:i,pushingKeys:a,failedKeys:o}=e,s=r===0?100:Math.round(i/r*100);return I(`div`,{className:G(`flex flex-col gap-2 text-sm`,t),children:[I(`span`,{className:`font-medium`,children:n.pushedCount({settled:i,total:r})}),I(`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:I(`div`,{className:`h-full rounded-full bg-text transition-[width]`,style:{width:`${s}%`}})}),a.length>0&&I(`div`,{className:`flex flex-col gap-1`,children:[I(`span`,{className:`text-neutral`,children:n.pushing}),I(`ul`,{className:`max-h-40 list-inside list-disc overflow-y-auto`,children:a.map(e=>I(`li`,{className:`truncate`,children:e},e))})]}),o.length>0&&I(`div`,{className:`flex flex-col gap-1 text-error`,children:[I(`span`,{children:n.failed}),I(`ul`,{className:`max-h-40 list-inside list-disc overflow-y-auto`,children:o.map(e=>I(`li`,{className:`truncate`,children:e},e))})]})]})},LB={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{closeDrawer:`Close Drawer`,goBack:`Go back`},"en-GB":{closeDrawer:`Close Drawer`,goBack:`Go back`},fr:{closeDrawer:`Fermer le tiroir`,goBack:`Retour`},es:{closeDrawer:`Cerrar cajón`,goBack:`Volver`},de:{closeDrawer:`Schublade schließen`,goBack:`Zurück`},ja:{closeDrawer:`引き出しを閉じる`,goBack:`戻る`},ko:{closeDrawer:`서랍 닫기`,goBack:`뒤로`},zh:{closeDrawer:`关闭抽屉`,goBack:`返回`},it:{closeDrawer:`Chiudi cassetto`,goBack:`Indietro`},pt:{closeDrawer:`Fechar gaveta`,goBack:`Voltar`},hi:{closeDrawer:`दराज बंद करें`,goBack:`वापस जाएं`},ar:{closeDrawer:`إغلاق الدرج`,goBack:`رجوع`},ru:{closeDrawer:`Закрыть панель`,goBack:`Назад`}}},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`},RB=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,isDisabled:i=!1,className:a,...o})=>{let s=t&&!i;return I(`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:I(`div`,{style:{minWidth:`${n}px`},className:G(r===`right`&&`ms-auto`),children:e})})},zB=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};S();var BB=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()})}},VB={open:BB.open,close:BB.close,set:BB.set},HB=()=>!1,UB=()=>VB,WB=e=>{let t=A(()=>BB.isOpen(e),[e]);return h(BB.subscribe,t,HB)};S();var GB=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let f=V(LB),{isMobile:p}=rI(`md`),m=u(null),h=u(null),g=Pz(l),{open:_,close:v}=UB(),y=WB(t),x=y,[S,C]=d(!1);M(()=>{if(!x){C(!1);return}let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>C(!0))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[x]);let w=x&&S;Lz({disableScroll:x,key:t?`right_drawer_${t}`:`right_drawer`}),M(()=>{if(!x)return;let e=e=>{try{if(!m.current)return;let n=a,r=e.target&&!m.current.contains(e.target),i=zB(m.current);(n&&r&&i||!e.target)&&(v(t),c?.())}catch{v(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[x,v,c,a,t]);let T=u(c);return M(()=>{T.current=c},[c]),M(()=>{s!==void 0&&s!==y&&(s?_(t):(v(t),T.current?.()))},[s,y,t,_,v]),g?D(I(`div`,{className:`fixed inset-e-0 top-0 z-50 flex h-full justify-end`,children:I(RB,{isHidden:!w,align:`right`,children:I(pO,{className:`relative flex h-screen w-screen flex-col border-s text-foreground md:w-100`,ref:m,roundedSize:`none`,borderColor:`neutral`,children:[I(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[I(`div`,{className:`flex justify-between gap-3`,children:[I(`div`,{children:o&&I(Z,{variant:`hoverable`,color:`text`,label:o.text??f.goBack.value,onClick:o.onBack,Icon:ks,children:o?.text})}),I(`div`,{children:I(yA,{identifier:`close-drawer`,children:[I(Z,{variant:`hoverable`,color:`text`,label:`Close`,className:`ms-auto`,onClick:()=>{v(t),c?.()},Icon:Vc,size:`icon-md`}),I(yA.Detail,{identifier:`close-drawer`,children:I(`div`,{className:`flex items-center gap-2 p-2`,children:[I(`span`,{className:`text-xs whitespace-nowrap text-muted-foreground`,children:f.closeDrawer}),I(lI,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{v(t),c?.()}})]})})]})})]}),e&&I(`h2`,{className:`flex items-center justify-center text-lg font-bold`,children:e}),r]}),I(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:I(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&p&&(v(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p&&(v(t),c?.()))},ref:h,role:`button`,tabIndex:0,children:n})}),i&&I(`div`,{className:`shrink-0`,children:i})]})})}),g):I(b,{})};n();var KB=e=>{let t=u(e??void 0);return e!=null&&(t.current=e),t.current},qB=`dictionaryList`;n();var JB=e=>`dictionary_edition_${e}`,YB=e=>{let t=JB(e),{open:n,close:r}=UB(),i=WB(t),{getEditedContentValue:a}=gT(),{focusedContent:o,setFocusedContent:s}=xE();return M(()=>{o?.dictionaryKey&&n(t)},[o?.dictionaryKey,n,t]),{isOpen:i,focusedContent:o,getEditedContentValue:a,close:A(()=>{r(t),s(e=>e?.dictionaryKey?{...e,keyPath:[]}:e??null)},[r,t,s])}};n();var XB=({dictionaryKey:e,isDarkMode:t})=>{let{backButtonText:n,openDictionaryEditor:r,modalTitle:i,noDictionaryFocused:a,focusedDictionaryNotFound:o}=V(hD),s=JB(e),{focusedContent:c,close:l}=YB(e),{setFocusedContent:u}=xE(),{open:f}=UB(),p=()=>f(qB),{data:m}=tD(),h=m,g=()=>{l(),u(null),p()},[_,v]=d(!1),y=()=>{v(!1),g()},x=KB(c?.dictionaryLocalId);if(!x)return I(`span`,{className:`mx-auto my-10 text-sm text-neutral`,children:a});let S=h?.[e]?.find(e=>e.localId===x);return S?I(GB,{identifier:s,backButton:{onBack:g,text:n.value},onClose:()=>{l(),u(null)},header:I(b,{children:[I(`header`,{className:`mb-5 flex w-full px-3`,children:[I(`h3`,{className:`w-full text-center text-lg`,children:S.title?S.title:S.key}),I(yA,{identifier:`open-dictionary-editor`,children:[I(Z,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:pc,label:r.label.value,onClick:()=>v(!0)}),I(yA.Detail,{identifier:`open-dictionary-editor`,children:I(`span`,{className:`p-2 text-xs whitespace-nowrap text-neutral`,children:r.popoverContent})})]})]}),I(`div`,{className:`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-b border-dotted border-text/20 pb-3`,children:[I(xA,{color:`text`,roundedSize:`full`,size:`xs`,children:S.key}),S.filePath&&I(xA,{color:`neutral`,roundedSize:`full`,size:`xs`,children:S.filePath.split(`/`).pop()}),S.id&&I(xA,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]})]}),footer:I(dB,{dictionary:S,mode:[`local`,`remote`],className:`mb-4 flex-col px-3`,onDelete:g}),children:[I(aB,{isOpen:_,onClose:()=>v(!1),hasCloseButton:!0,title:i,size:`xl`,transparency:`lg`,className:`h-full`,children:I(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:I(PB,{dictionary:S,onClickDictionaryList:y,isDarkMode:t,mode:[`local`,`remote`],onDelete:()=>{v(!1),g()},onSave:()=>{v(!1)}})})}),I(uO,{dictionary:S})]}):I(`span`,{className:`mx-auto my-10 text-sm text-neutral`,children:o})},ZB=({isDarkMode:e})=>{let{focusedContent:t}=xE(),n=KB(t?.dictionaryKey);return n?I(XB,{dictionaryKey:n,isDarkMode:e}):I(b,{})},QB={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`};S();var $B=e=>{let{minChars:t=3,debounceMs:n=300,trim:r=!0,defaultValue:i,onSearch:a,onClear:o}=e??{},s=u(``),c=u(null),[l,f]=d(i??``),p=()=>{c.current&&=(clearTimeout(c.current),null)};return M(()=>()=>{p()},[]),{setSearch:e=>{s.current=e;let i=r?e.trim():e;p(),i.length<t?(f(``),o?.()):c.current=setTimeout(()=>{let e=r?s.current.trim():s.current;e.length>=t?(f(e),a?.(e)):(f(``),o?.())},n)},search:l,hasMinChars:l.length>=t}},eV={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`};n();var tV=()=>{let e=dD(),t=!!e?.auth,n=!!e?.isLoggingIn,{localeDictionaries:r,setLocaleDictionary:i}=mT(),{editedContent:a,restoreEditedContent:o}=_T(),{mutate:s,isPending:c,progress:l}=$E(),{data:u}=QE({enabled:t}),[f,p]=d(null),m=x(()=>Sx(Object.values(r??{})).map(e=>{let t=a?.[e.localId];return t?{...e,...t}:e}),[r,a]),h=x(()=>{let e=u?.data;if(!t||!e)return m;let n=new Set(e);return m.filter(e=>!n.has(e.key))},[t,u,m]),g=A(e=>{e.length!==0&&s({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)&&a?.[e]&&(i(t),o(e))}}})},[s,a,i,o]),_=A(n=>{t||!e?g(n):(p(n),e.login())},[t,e,g]);return M(()=>{f&&(t?(p(null),g(f)):n||p(null))},[f,t,n,g]),{localDictionaries:m,missingDictionaries:h,push:_,isPushing:c||f!==null,isAwaitingLogin:f!==null,progress:l}},nV=({identifier:e})=>{let t=V(eV),{localDictionaries:n,missingDictionaries:r,push:i,isPushing:a,isAwaitingLogin:o,progress:s}=tV();if(n.length===0)return null;let c=(s?.failedKeys.length??0)>0,l=!o&&(a||c);return I(lA,{identifier:e,children:[I(Z,{label:t.label({count:n.length}).value,onClick:()=>i(n),isLoading:a,disabled:a,variant:`hoverable`,color:`text`,size:`icon-sm`,Icon:Fc}),I(lA.Detail,{identifier:e,xAlign:`end`,isHidden:!a&&void 0,children:I(pO,{className:`flex min-w-64 flex-col gap-2 p-3 text-sm`,children:[o&&I(`p`,{children:t.awaitingLogin}),l&&s&&I(IB,{progress:s}),!o&&!l&&I(b,{children:[I(`p`,{children:t.label({count:n.length})}),r.length>0&&I(`p`,{className:`text-neutral`,children:t.missingCount({count:r.length})})]})]})})]})};n();var rV=()=>{let{drawerTitle:e,buttonLabel:t}=V(QB),{set:n}=UB(),{localeDictionaries:r}=mT(),{editedContent:i}=_T(),{setFocusedContent:a}=xE(),{setSearch:o,search:s}=$B(),c=x(()=>Object.values(r??{}),[r]),l=x(()=>new RL(c,{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[c]),u=x(()=>{let e=s?.trim()??``;return e===``?c:l.search(e).map(e=>e.item)},[s,l,c]),d=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[qB]:!1,[JB(e.key)]:!0})},f=x(()=>new Set(Object.keys(i??{})),[i]);return I(GB,{title:e.label.value,identifier:qB,children:[I(`div`,{className:`flex items-center gap-2 p-3 pb-4`,children:[I(WF,{placeholder:`Search dictionaries`,onChange:e=>o(e.currentTarget.value),type:`search`}),I(nV,{identifier:`push-dictionaries-drawer`})]}),I(`ul`,{className:`flex flex-col gap-1`,children:u.map(e=>I(`li`,{className:`w-full`,children:I(Z,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>d(e),variant:`hoverable`,color:`text`,IconRight:js,size:`md`,isFullWidth:!0,Icon:f.has(e.localId)?hc:void 0,children:I(`div`,{className:`flex items-center gap-2 py-1`,children:I(`div`,{className:`flex max-w-full flex-col gap-1`,children:[I(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[I(xA,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&I(xA,{color:`neutral`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&I(xA,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]}),I(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},iV={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`},aV=({children:e,className:t,...n})=>I(`span`,{...n,className:G(`mx-1 rounded-md border border-neutral px-1.5 font-semibold whitespace-nowrap`,t),children:e}),oV=()=>{let{message:e,longPress:t,modifierClick:n}=V(iV),{isMac:r}=rI(),i=hE(ET.INTLAYER_HOVERED_CONTENT_CHANGED,null);return I(pO,{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:I(`p`,{className:`text-sm leading-6 text-text/50`,children:i?.dictionaryKey?e({longPress:I(aV,{children:t}),modifierClick:I(aV,{children:n({modifierKey:r?`⌘`:`Ctrl`})}),dictionaryKey:I(aV,{className:`mx-1 wrap-break-word`,children:i.dictionaryKey})}):``})})},sV=({children:e})=>I(`div`,{className:`relative size-full bg-card p-3`,children:[e,I(`div`,{className:`absolute inset-e-2 bottom-2`,children:I(oV,{})}),I(ZB,{}),I(rV,{})]}),cV=3e3,lV=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)}}},uV=e=>{let{data:t,isPending:n,refetch:r}=Ht({queryKey:[`application-status`,e],queryFn:()=>lV(e),enabled:!!e,retry:!1,staleTime:0,refetchOnWindowFocus:!0,refetchInterval:cV});return{isChecking:n,isRunning:t?.isRunning===!0,errorMessage:t?.isRunning===!1?t.errorMessage:void 0,retry:r}};n();var dV,fV=()=>(dV??=fetch(`/api/config`).then(e=>e.json()).then(e=>e.data).catch(e=>{throw dV=void 0,e}),dV),pV=()=>{let[e,t]=d();return M(()=>{fV().then(t)},[]),e};n();var mV=async e=>{try{await fetch(`/api/log`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),keepalive:!0})}catch{}},hV=e=>{let t=e?.level,n=e?.message;M(()=>{t&&n&&mV({level:t,message:n})},[t,n])},gV={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`},_V=({applicationURL:e,errorMessage:t,onRetry:n})=>{let{title:r,description:i,configurationTip:a,retry:o}=V(gV);return I(`div`,{className:`flex size-full items-center justify-center p-4`,children:I(pO,{className:`flex max-w-xl flex-col gap-4 text-sm`,padding:`xl`,roundedSize:`3xl`,border:!0,borderColor:`neutral`,children:[I(Qz,{className:`text-lg`,children:r}),I(`p`,{className:`text-neutral`,children:i({applicationUrl:I(`strong`,{children:e})})}),t&&I(`code`,{className:`rounded-lg border border-error p-2 text-xs text-neutral`,children:t}),I(`p`,{className:`text-neutral`,children:a}),I(Z,{label:o.value,onClick:n,color:`text`,className:`ms-auto`,children:o})]})})};n();var vV=({children:e,iframeRef:t})=>{let n=pV(),r=n?.editor.applicationURL,{isChecking:i,isRunning:a,errorMessage:o,retry:s}=uV(r);hV(r&&o?{level:`error`,message:`Application ${r} is unreachable (${o}). Start it, or fix \`editor.applicationURL\` in intlayer.config.ts. The editor retries every few seconds.`}:void 0);let c=A(e=>{t.current?.contentWindow?.postMessage(e,r)},[t,r]),l=x(()=>[r],[r]);return!n||r&&i?I(_D,{}):r&&!a?I(Dr,{children:I(_V,{applicationURL:r,errorMessage:o,onRetry:()=>s()})}):I(pE,{postMessage:c,allowedOrigins:l,configuration:n,children:e})};n();var yV=[`vscode-webview:`],bV=()=>{if(typeof window>`u`||window.parent===window)return null;let e=window.location.ancestorOrigins?.[0];return e&&yV.some(t=>e.startsWith(t))?e:null},xV=()=>{let{focusedContent:e}=xE();return M(()=>{let t=bV();t&&window.parent.postMessage({type:ET.INTLAYER_FOCUSED_CONTENT_CHANGED,data:e},t)},[e]),null},SV={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`},CV={key:`browser`,content:{nodeType:`translation`,translation:{en:{ariaLabel:`Embedded browser`,backButtonLabel:`Go back`,domainRestrictionError:`URL must match the application domain.`,errorMessage:`Invalid URL. Try a path like "/page" or a full URL.`,forwardButtonLabel:`Go forward`,iframeTitle:`Embedded web page`,sitemapButtonLabel:`Scan sitemap`,sitemapEmpty:`No URLs found`,sitemapError:`Could not load sitemap`,sitemapLoading:`Scanning sitemap…`,sitemapSearchAriaLabel:`Search sitemap URLs`,sitemapSearchPlaceholder:`Filter URLs…`,urlLabel:`URL address bar`,urlPlaceholder:`https://example.com`},"en-GB":{ariaLabel:`Embedded browser`,backButtonLabel:`Go back`,domainRestrictionError:`URL must match the application domain.`,errorMessage:`Invalid URL. Try a path like "/page" or a full URL.`,forwardButtonLabel:`Go forward`,iframeTitle:`Embedded web page`,sitemapButtonLabel:`Scan sitemap`,sitemapEmpty:`No URLs found`,sitemapError:`Could not load sitemap`,sitemapLoading:`Scanning sitemap…`,sitemapSearchAriaLabel:`Search sitemap URLs`,sitemapSearchPlaceholder:`Filter URLs…`,urlLabel:`URL address bar`,urlPlaceholder:`https://example.com`},fr:{ariaLabel:`Navigateur intégré`,backButtonLabel:`Retour`,domainRestrictionError:`L'URL doit correspondre au domaine de l'application.`,errorMessage:`URL invalide. Essayez un chemin comme "/page" ou une URL complète.`,forwardButtonLabel:`Avancer`,iframeTitle:`Page web intégrée`,sitemapButtonLabel:`Scanner le sitemap`,sitemapEmpty:`Aucune URL trouvée`,sitemapError:`Impossible de charger le sitemap`,sitemapLoading:`Scan du sitemap en cours…`,sitemapSearchAriaLabel:`Rechercher les URLs du sitemap`,sitemapSearchPlaceholder:`Filtrer les URLs…`,urlLabel:`Barre d'adresse URL`,urlPlaceholder:`https://example.com`},es:{ariaLabel:`Navegador integrado`,backButtonLabel:`Atrás`,domainRestrictionError:`La URL debe coincidir con el dominio de la aplicación.`,errorMessage:`URL no válida. Intente una ruta como "/page" o una URL completa.`,forwardButtonLabel:`Adelante`,iframeTitle:`Página web integrada`,sitemapButtonLabel:`Escanear sitemap`,sitemapEmpty:`No se encontraron URLs`,sitemapError:`No se pudo cargar el sitemap`,sitemapLoading:`Escaneando sitemap…`,sitemapSearchAriaLabel:`Buscar URLs del sitemap`,sitemapSearchPlaceholder:`Filtrar URLs…`,urlLabel:`Barra de direcciones URL`,urlPlaceholder:`https://example.com`},de:{ariaLabel:`Eingebetteter Browser`,backButtonLabel:`Zurück`,domainRestrictionError:`Die URL muss mit der Anwendungsdomäne übereinstimmen.`,errorMessage:`Ungültige URL. Versuchen Sie einen Pfad wie "/page" oder eine vollständige URL.`,forwardButtonLabel:`Vorwärts`,iframeTitle:`Eingebettete Webseite`,sitemapButtonLabel:`Sitemap scannen`,sitemapEmpty:`Keine URLs gefunden`,sitemapError:`Sitemap konnte nicht geladen werden`,sitemapLoading:`Sitemap wird gescannt…`,sitemapSearchAriaLabel:`Sitemap-URLs durchsuchen`,sitemapSearchPlaceholder:`URLs filtern…`,urlLabel:`URL-Adressleiste`,urlPlaceholder:`https://example.com`},ja:{ariaLabel:`埋め込みブラウザ`,backButtonLabel:`戻る`,domainRestrictionError:`URLはアプリケーションドメインと一致する必要があります。`,errorMessage:`無効なURL。"/page"のようなパスまたは完全なURLを試してください。`,forwardButtonLabel:`進む`,iframeTitle:`埋め込みウェブページ`,sitemapButtonLabel:`サイトマップをスキャン`,sitemapEmpty:`URLが見つかりません`,sitemapError:`サイトマップを読み込めませんでした`,sitemapLoading:`サイトマップをスキャン中…`,sitemapSearchAriaLabel:`サイトマップURLを検索`,sitemapSearchPlaceholder:`URLを絞り込む…`,urlLabel:`URLアドレスバー`,urlPlaceholder:`https://example.com`},ko:{ariaLabel:`임베디드 브라우저`,backButtonLabel:`뒤로 가기`,domainRestrictionError:`URL은 애플리케이션 도메인과 일치해야 합니다.`,errorMessage:`잘못된 URL입니다. "/page"와 같은 경로 또는 전체 URL을 시도하십시오.`,forwardButtonLabel:`앞으로 가기`,iframeTitle:`임베디드 웹페이지`,sitemapButtonLabel:`사이트맵 스캔`,sitemapEmpty:`URL을 찾을 수 없습니다`,sitemapError:`사이트맵을 불러올 수 없습니다`,sitemapLoading:`사이트맵 스캔 중…`,sitemapSearchAriaLabel:`사이트맵 URL 검색`,sitemapSearchPlaceholder:`URL 필터링…`,urlLabel:`URL 주소 표시줄`,urlPlaceholder:`https://example.com`},zh:{ariaLabel:`嵌入式浏览器`,backButtonLabel:`后退`,domainRestrictionError:`URL必须与应用程序域名匹配。`,errorMessage:`无效的URL。尝试像"/page"这样的路径或完整的URL。`,forwardButtonLabel:`前进`,iframeTitle:`嵌入式网页`,sitemapButtonLabel:`扫描网站地图`,sitemapEmpty:`未找到URL`,sitemapError:`无法加载网站地图`,sitemapLoading:`正在扫描网站地图…`,sitemapSearchAriaLabel:`搜索网站地图URL`,sitemapSearchPlaceholder:`过滤URL…`,urlLabel:`URL地址栏`,urlPlaceholder:`https://example.com`},it:{ariaLabel:`Browser incorporato`,backButtonLabel:`Indietro`,domainRestrictionError:`L'URL deve corrispondere al dominio dell'applicazione.`,errorMessage:`URL non valido. Prova un percorso come "/page" o un URL completo.`,forwardButtonLabel:`Avanti`,iframeTitle:`Pagina web incorporata`,sitemapButtonLabel:`Scansiona sitemap`,sitemapEmpty:`Nessun URL trovato`,sitemapError:`Impossibile caricare il sitemap`,sitemapLoading:`Scansione sitemap in corso…`,sitemapSearchAriaLabel:`Cerca URL del sitemap`,sitemapSearchPlaceholder:`Filtra URL…`,urlLabel:`Barra degli indirizzi URL`,urlPlaceholder:`https://example.com`},pt:{ariaLabel:`Navegador incorporado`,backButtonLabel:`Voltar`,domainRestrictionError:`A URL deve corresponder ao domínio da aplicação.`,errorMessage:`URL inválido. Tente um caminho como "/page" ou uma URL completa.`,forwardButtonLabel:`Avançar`,iframeTitle:`Página web incorporada`,sitemapButtonLabel:`Escanear sitemap`,sitemapEmpty:`Nenhuma URL encontrada`,sitemapError:`Não foi possível carregar o sitemap`,sitemapLoading:`Escaneando sitemap…`,sitemapSearchAriaLabel:`Pesquisar URLs do sitemap`,sitemapSearchPlaceholder:`Filtrar URLs…`,urlLabel:`Barra de endereços URL`,urlPlaceholder:`https://example.com`},hi:{ariaLabel:`एम्बेडेड ब्राउज़र`,backButtonLabel:`वापस जाएं`,domainRestrictionError:`URL एप्लिकेशन डोमेन से मेल खाना चाहिए।`,errorMessage:`अमान्य URL। "/page" जैसा पथ या पूर्ण URL प्रयास करें।`,forwardButtonLabel:`आगे जाएं`,iframeTitle:`एम्बेडेड वेब पेज`,sitemapButtonLabel:`साइटमैप स्कैन करें`,sitemapEmpty:`कोई URL नहीं मिला`,sitemapError:`साइटमैप लोड नहीं हो सका`,sitemapLoading:`साइटमैप स्कैन हो रहा है…`,sitemapSearchAriaLabel:`साइटमैप URL खोजें`,sitemapSearchPlaceholder:`URL फ़िल्टर करें…`,urlLabel:`URL पता बार`,urlPlaceholder:`https://example.com`},ar:{ariaLabel:`متصفح مدمج`,backButtonLabel:`رجوع`,domainRestrictionError:`يجب أن يتطابق الرابط مع نطاق التطبيق.`,errorMessage:`رابط غير صالح. جرب مسارًا مثل "/page" أو رابطًا كاملاً.`,forwardButtonLabel:`إلى الأمام`,iframeTitle:`صفحة ويب مدمجة`,sitemapButtonLabel:`مسح خريطة الموقع`,sitemapEmpty:`لم يتم العثور على روابط`,sitemapError:`تعذّر تحميل خريطة الموقع`,sitemapLoading:`جارٍ مسح خريطة الموقع…`,sitemapSearchAriaLabel:`ابحث في روابط خريطة الموقع`,sitemapSearchPlaceholder:`تصفية الروابط…`,urlLabel:`شريط عنوان URL`,urlPlaceholder:`https://example.com`},ru:{ariaLabel:`Встроенный браузер`,backButtonLabel:`Назад`,domainRestrictionError:`URL должен соответствовать домену приложения.`,errorMessage:`Неверный URL. Попробуйте путь вроде "/page" или полный URL.`,forwardButtonLabel:`Вперёд`,iframeTitle:`Встроенная веб-страница`,sitemapButtonLabel:`Сканировать карту сайта`,sitemapEmpty:`URL не найдены`,sitemapError:`Не удалось загрузить карту сайта`,sitemapLoading:`Сканирование карты сайта…`,sitemapSearchAriaLabel:`Поиск URL карты сайта`,sitemapSearchPlaceholder:`Фильтр URL…`,urlLabel:`Адресная строка URL`,urlPlaceholder:`https://example.com`}}},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`};S();var wV=({url:e})=>{let t=TV(e).split(`/`).filter(Boolean);return t.length===0?I(`span`,{children:`/`}):t.flatMap((e,t,n)=>[I(`span`,{children:e},`part-${t}`),t<n.length-1&&I(`span`,{className:`mx-2 text-neutral`,children:`/`},`sep-${t}`)])},TV=e=>{try{let{pathname:t,search:n,hash:r}=new URL(e);return`${t}${n}${r}`||`/`}catch{return e}},EV=({initialUrl:e=`https://example.com`,path:t,className:n,style:r,size:i=`md`,"aria-label":a,sandbox:o=`allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads`,ref:s,domainRestriction:l,toolbarActions:f,...p})=>{let[m,h]=d(e),[g,_]=d(e),[v,y]=d([e]),[b,S]=d(0),[C,w]=d(null),[T,E]=d(!1),D=u(null),[O,k]=d(!1),[A,j]=d([]),[N,P]=d(``),[F,L]=d(!1),ee=u(!1),[te,R]=d(!1),ne=u(null);c(s,()=>D.current,[]);let z=V(CV);M(()=>{h(e),_(e),y([e]),S(0),w(null),E(!1),k(!1),j([]),P(``),ee.current=!1,R(!1)},[e]),M(()=>{if(t)try{let n=`${new URL(l??e).origin}${t}`;h(n);let r=!1;if(D.current?.contentWindow)try{let e=D.current.contentWindow.location.href;new URL(e).href===new URL(n).href&&(r=!0)}catch{}v[b]!==n&&(y(e=>{let t=e.slice(0,b+1);return t.push(n),t}),S(e=>e+1)),r||_(n),w(null)}catch{}},[t,l,e]),M(()=>{let e=D.current;e&&e.src!==g&&(e.src=g)},[g]);let B=e=>{try{let t=le(e);if(t===g){oe();return}_(t),h(t),w(null);let n=v.slice(0,b+1);n.push(t),y(n),S(n.length-1)}catch(e){e instanceof Error&&e.message===`URL does not match allowed domain`&&l?w(z.domainRestrictionError?.value??`Only URLs from ${l} are allowed.`):w(z.errorMessage.value)}},re=()=>{if(b>0){let e=b-1,t=v[e]??``;S(e),_(t),h(t),w(null)}},ie=()=>{if(b<v.length-1){let e=b+1,t=v[e]??``;S(e),_(t),h(t),w(null)}},ae=e=>{e.preventDefault(),E(!0),B(m)},oe=()=>{let e=D.current;if(!e)return;let t=e.src;e.src=``,setTimeout(()=>{D.current&&(D.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(!l)return null;try{return new URL(l)}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(g).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(!ee.current){ee.current=!0,L(!0),R(!1);try{let{extractUrlFromSitemap:e}=await kn(async()=>{let{extractUrlFromSitemap:e}=await import(`./extractUrlFromSitemap-Chj1JVpo.js`);return{extractUrlFromSitemap:e}},[]);j(await e(g))}catch{R(!0)}finally{L(!1)}}},de=()=>{let e=!O;k(e),e&&(ue(),setTimeout(()=>ne.current?.focus(),50))},fe=x(()=>{let e=N.trim().toLowerCase();return e?A.filter(t=>t.toLowerCase().includes(e)):A},[A,N]),pe=T&&!!C,me=b>0,he=b<v.length-1;return I(`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:r,"aria-label":a??z.ariaLabel.value,children:[I(`div`,{className:`relative z-10 flex shrink-0 items-center gap-3 rounded-t-xl border-b bg-card px-4 py-2`,children:[I(`div`,{className:`flex items-center gap-1`,children:[I(Z,{type:`button`,onClick:re,disabled:!me,variant:`hoverable`,size:`icon-md`,label:z.backButtonLabel.value,Icon:ys}),I(Z,{type:`button`,onClick:ie,disabled:!he,variant:`hoverable`,size:`icon-md`,label:z.forwardButtonLabel.value,Icon:xs})]}),I(`form`,{onSubmit:ae,noValidate:!0,className:G(HD(),`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:[I(`label`,{htmlFor:`browser-url`,className:`sr-only`,children:z.urlLabel}),I(UD,{id:`browser-url`,type:`text`,inputMode:`url`,spellCheck:!1,autoCapitalize:`off`,variant:`invisible`,className:`ms-3 p-0!`,size:`sm`,autoCorrect:`off`,value:m,onChange:e=>{h(e.target.value),pe&&w(null)},placeholder:z.urlPlaceholder.value,"aria-label":z.urlLabel.value,"aria-invalid":pe,"aria-describedby":pe?`browser-url-error`:void 0}),I(Z,{type:`button`,onClick:oe,variant:`hoverable`,size:`icon-md`,className:`p-1!`,label:`content.reloadButtonTitle.value`,Icon:xc}),I(`button`,{type:`submit`,className:`sr-only absolute`,tabIndex:-1})]}),f,I(UF,{onClickOutSide:()=>k(!1),disabled:!O,role:`none`,children:I(dI,{identifier:`sitemap-explorer`,onMouseEnter:ue,onFocus:ue,children:[I(dI.Trigger,{identifier:`sitemap-explorer-trigger`,type:`button`,color:`text`,onClick:de,variant:`hoverable`,size:`icon-md`,label:z.sitemapButtonLabel.value,Icon:Tc}),I(dI.Panel,{identifier:`sitemap-explorer`,isHidden:!O,align:`end`,isFocusable:!0,isOverable:!0,children:I(pO,{className:`w-80 max-w-[calc(100cqw-2rem)] rounded-md!`,roundedSize:`2xl`,border:!0,borderColor:`neutral`,children:[I(`div`,{className:`p-2`,children:I(UD,{type:`search`,ref:ne,"aria-label":z.sitemapSearchAriaLabel.value,placeholder:z.sitemapSearchPlaceholder.value,onChange:e=>P(e.target.value),value:N,size:`sm`})}),I(`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?I(`li`,{className:`px-3 py-4 text-center text-xs text-muted-foreground`,children:z.sitemapLoading}):te||!F&&fe.length===0?I(`li`,{className:`px-3 py-4 text-center text-xs text-muted-foreground`,children:te?z.sitemapError:z.sitemapEmpty}):fe.map(e=>I(`li`,{className:`py-0.5`,children:I(Z,{variant:`hoverable`,color:`text`,size:`sm`,className:`w-full text-start`,label:e,onClick:()=>{B(e),k(!1)},children:I(`span`,{className:`block truncate text-start text-base`,children:I(wV,{url:e})})})},e))})]})})]})}),pe&&I(`div`,{className:`absolute inset-s-4 top-full z-20 mt-1`,children:I(`p`,{id:`browser-url-error`,role:`alert`,"aria-live":`assertive`,className:`rounded-md bg-red-900/90 px-3 py-1.5 text-xs text-red-100 shadow-md backdrop-blur-sm`,children:C})})]}),I(`div`,{className:`relative z-0 flex min-h-0 w-full flex-1 flex-col overflow-hidden rounded-b-xl bg-background`,children:I(`iframe`,{ref:D,src:g,title:z.iframeTitle.value,className:`size-full flex-1`,sandbox:o??void 0,loading:`lazy`,"aria-live":`polite`,...p})})]})},DV={key:`frame-connection-error`,content:JSON.parse('{"nodeType":"translation","translation":{"en":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} did not connect to the editor. Check that:"},"dismiss":"Show the page anyway","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.","editorEnabledCause":"the visual editor is enabled in its Intlayer configuration (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"its Content-Security-Policy `frame-ancestors` directive (or `X-Frame-Options` header) allows {{editorOrigin}}"},"providerCause":"the page renders the Intlayer provider of your framework","retry":"Retry","title":"The application could not be displayed"},"en-GB":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} did not connect to the editor. Check that:"},"dismiss":"Show the page anyway","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.","editorEnabledCause":"the visual editor is enabled in its Intlayer configuration (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"its Content-Security-Policy `frame-ancestors` directive (or `X-Frame-Options` header) allows {{editorOrigin}}"},"providerCause":"the page renders the Intlayer provider of your framework","retry":"Retry","title":"The application could not be displayed"},"fr":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} ne s\'est pas connectée à l\'éditeur. Vérifiez que :"},"dismiss":"Afficher la page quand même","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.","editorEnabledCause":"l\'éditeur visuel est activé dans sa configuration Intlayer (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"sa directive Content-Security-Policy `frame-ancestors` (ou son en-tête `X-Frame-Options`) autorise {{editorOrigin}}"},"providerCause":"la page affiche le provider Intlayer de votre framework","retry":"Réessayer","title":"L\'application n\'a pas pu être affichée"},"es":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} no se conectó al editor. Compruebe que:"},"dismiss":"Mostrar la página de todos modos","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.","editorEnabledCause":"el editor visual está activado en su configuración de Intlayer (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"su directiva Content-Security-Policy `frame-ancestors` (o la cabecera `X-Frame-Options`) permite {{editorOrigin}}"},"providerCause":"la página renderiza el provider de Intlayer de su framework","retry":"Reintentar","title":"No se pudo mostrar la aplicación"},"de":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} hat sich nicht mit dem Editor verbunden. Prüfen Sie, dass:"},"dismiss":"Seite trotzdem anzeigen","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.","editorEnabledCause":"der visuelle Editor in der Intlayer-Konfiguration aktiviert ist (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"seine Content-Security-Policy-Direktive `frame-ancestors` (oder der Header `X-Frame-Options`) {{editorOrigin}} erlaubt"},"providerCause":"die Seite den Intlayer-Provider Ihres Frameworks rendert","retry":"Erneut versuchen","title":"Die Anwendung konnte nicht angezeigt werden"},"ja":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} がエディターに接続しませんでした。次の点を確認してください:"},"dismiss":"それでもページを表示","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} の Intlayer 設定でビジュアルエディターが無効になっています。"},"editorDisabledHint":"Intlayer 設定ファイルで `editor.enabled: true` を設定し、アプリケーションを再起動してください。","editorEnabledCause":"Intlayer 設定でビジュアルエディターが有効になっている(`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"Content-Security-Policy の `frame-ancestors` ディレクティブ(または `X-Frame-Options` ヘッダー)が {{editorOrigin}} を許可している"},"providerCause":"ページがフレームワークの Intlayer プロバイダーをレンダリングしている","retry":"再試行","title":"アプリケーションを表示できませんでした"},"ko":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}}이(가) 에디터에 연결되지 않았습니다. 다음을 확인하세요:"},"dismiss":"그래도 페이지 표시","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}}의 Intlayer 설정에서 비주얼 에디터가 비활성화되어 있습니다."},"editorDisabledHint":"Intlayer 설정 파일에서 `editor.enabled: true`로 설정한 후 애플리케이션을 다시 시작하세요.","editorEnabledCause":"Intlayer 설정에서 비주얼 에디터가 활성화되어 있는지 (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"Content-Security-Policy의 `frame-ancestors` 지시어(또는 `X-Frame-Options` 헤더)가 {{editorOrigin}}을(를) 허용하는지"},"providerCause":"페이지가 프레임워크의 Intlayer 프로바이더를 렌더링하는지","retry":"다시 시도","title":"애플리케이션을 표시할 수 없습니다"},"zh":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} 未连接到编辑器。请检查:"},"dismiss":"仍然显示页面","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} 的 Intlayer 配置中已禁用可视化编辑器。"},"editorDisabledHint":"在其 Intlayer 配置文件中设置 `editor.enabled: true`,然后重启应用程序。","editorEnabledCause":"其 Intlayer 配置中已启用可视化编辑器(`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"其 Content-Security-Policy 的 `frame-ancestors` 指令(或 `X-Frame-Options` 头)允许 {{editorOrigin}}"},"providerCause":"页面渲染了您框架的 Intlayer provider","retry":"重试","title":"无法显示应用程序"},"it":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} non si è connessa all\'editor. Verifica che:"},"dismiss":"Mostra comunque la pagina","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.","editorEnabledCause":"l\'editor visuale è abilitato nella sua configurazione Intlayer (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"la sua direttiva Content-Security-Policy `frame-ancestors` (o l’header `X-Frame-Options`) consente {{editorOrigin}}"},"providerCause":"la pagina renderizza il provider Intlayer del tuo framework","retry":"Riprova","title":"Impossibile visualizzare l\'applicazione"},"pt":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} não se conectou ao editor. Verifique se:"},"dismiss":"Mostrar a página mesmo assim","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.","editorEnabledCause":"o editor visual está ativado na configuração do Intlayer (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"sua diretiva Content-Security-Policy `frame-ancestors` (ou o cabeçalho `X-Frame-Options`) permite {{editorOrigin}}"},"providerCause":"a página renderiza o provider Intlayer do seu framework","retry":"Tentar novamente","title":"Não foi possível exibir a aplicação"},"hi":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} एडिटर से कनेक्ट नहीं हुआ। जाँचें कि:"},"dismiss":"फिर भी पेज दिखाएँ","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} के Intlayer कॉन्फ़िगरेशन में विज़ुअल एडिटर अक्षम है।"},"editorDisabledHint":"इसकी Intlayer कॉन्फ़िगरेशन फ़ाइल में `editor.enabled: true` सेट करें, फिर एप्लिकेशन को पुनः आरंभ करें।","editorEnabledCause":"इसके Intlayer कॉन्फ़िगरेशन में विज़ुअल एडिटर सक्षम है (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"इसका Content-Security-Policy `frame-ancestors` निर्देश (या `X-Frame-Options` हेडर) {{editorOrigin}} को अनुमति देता है"},"providerCause":"पेज आपके फ़्रेमवर्क का Intlayer provider रेंडर करता है","retry":"पुनः प्रयास करें","title":"एप्लिकेशन प्रदर्शित नहीं किया जा सका"},"ar":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"لم يتصل {{applicationUrl}} بالمحرر. تحقق من أن:"},"dismiss":"عرض الصفحة على أي حال","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"المحرر المرئي معطّل في إعدادات Intlayer الخاصة بـ {{applicationUrl}}."},"editorDisabledHint":"اضبط `editor.enabled: true` في ملف إعدادات Intlayer، ثم أعد تشغيل التطبيق.","editorEnabledCause":"المحرر المرئي مفعّل في إعدادات Intlayer الخاصة به (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"توجيه `frame-ancestors` في Content-Security-Policy (أو ترويسة `X-Frame-Options`) يسمح بـ {{editorOrigin}}"},"providerCause":"الصفحة تعرض موفّر Intlayer الخاص بإطار العمل لديك","retry":"إعادة المحاولة","title":"تعذر عرض التطبيق"},"ru":{"description":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"{{applicationUrl}} не подключилось к редактору. Убедитесь, что:"},"dismiss":"Всё равно показать страницу","editorDisabledDescription":{"fields":["applicationUrl"],"nodeType":"insertion","insertion":"Визуальный редактор отключён в конфигурации Intlayer приложения {{applicationUrl}}."},"editorDisabledHint":"Укажите `editor.enabled: true` в файле конфигурации Intlayer и перезапустите приложение.","editorEnabledCause":"визуальный редактор включён в его конфигурации Intlayer (`editor.enabled`)","framingCause":{"fields":["editorOrigin"],"nodeType":"insertion","insertion":"его директива Content-Security-Policy `frame-ancestors` (или заголовок `X-Frame-Options`) разрешает {{editorOrigin}}"},"providerCause":"страница рендерит провайдер Intlayer вашего фреймворка","retry":"Повторить","title":"Не удалось отобразить приложение"}}}'),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`},OV=()=>[...new Set([window.location.origin,...Array.from(window.location.ancestorOrigins??[])])],kV=({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(DV);return I(`div`,{className:`absolute inset-0 z-10 flex overflow-auto bg-background/90 p-2 sm:p-4`,children:I(pO,{className:`m-auto flex w-full max-w-xl min-w-0 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:[I(Qz,{className:`text-base sm:text-lg`,children:i}),r?I(b,{children:[I(`p`,{className:`wrap-anywhere text-neutral`,children:c({applicationUrl:I(`strong`,{children:e})})}),I(`p`,{className:`wrap-anywhere text-neutral`,children:l})]}):I(b,{children:[I(`p`,{className:`wrap-anywhere text-neutral`,children:a({applicationUrl:I(`strong`,{children:e})})}),I(`ul`,{className:`list-outside list-disc space-y-2 ps-5 wrap-anywhere text-neutral`,children:[I(`li`,{children:o({editorOrigin:I(`strong`,{children:OV().join(`, `)})})}),I(`li`,{children:s}),I(`li`,{children:u})]})]}),I(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[I(Z,{label:f.value,onClick:n,variant:`outline`,color:`text`,children:f}),I(Z,{label:d.value,onClick:t,color:`text`,children:d})]})]})})},AV=(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})},jV=({iframeRef:e,applicationURL:t,applicationPath:n})=>{let r=pT(),i=fT(),a=yE(),o=gE(),s=r?.internationalization.locales??[];return!r||s.length<2?null:I(VL,{locale:a,localeList:s,setLocale:a=>{i?.requestLocaleChange(a);let s=o??n,c=AV(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`})},MV={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`};S();var NV=(e,t=` `)=>e?(t===` `?e.trim().split(/\s+/):e.split(t)).filter(Boolean).map(e=>e.charAt(0).toUpperCase()):[],PV=({isClickable:e,onClick:t,...n})=>e&&t?I(`button`,{...n,onClick:t,type:`button`}):I(`div`,{...n,role:n.tabIndex!==void 0||n[`aria-label`]?`img`:void 0}),FV=({fullname:e,className:t,isLoading:n=!1,isLoggedIn:r=!0,src:i,onClick:a,size:o=`md`,alt:s,focusable:c=!1,hoverable:l=!1,...u})=>{let d=!!i,f=(e??``).length>0,p=e?NV(e):void 0,m=n,h=r&&!m&&d,g=r&&!m&&!h&&f,_=r&&!m&&!h&&!g,v=a!==void 0,y=x(()=>{let t={};return h&&s?t[`aria-label`]=s:h&&e?t[`aria-label`]=`Avatar of ${e}`:g&&e?t[`aria-label`]=`Avatar initials for ${e}`:_?t[`aria-label`]=`Default user avatar`:m&&(t[`aria-label`]=`Loading avatar`,t[`aria-busy`]=!0),!v&&c&&(t.tabIndex=0),v&&(t[`aria-describedby`]=`avatar-description`),t},[h,g,_,m,s,e,v,c]);return I(PV,{isClickable:v,className:G(`transition-ring rounded-full border-[1.3px] border-text p-0.5 ring-offset-0 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`,v&&`cursor-pointer hover:opacity-80 focus:ring-3 focus:ring-text/50 focus:ring-offset-2 focus:outline-none`,l&&`hover:opacity-80 hover:ring-4 hover:ring-text/30 hover:ring-offset-2`,!v&&c&&`focus:ring-3 focus:ring-text/50 focus:ring-offset-2 focus:outline-none`,m&&`animate-pulse`,t),dir:`ltr`,onClick:a,...y,...u,children:I(`div`,{className:`relative flex aspect-square size-full flex-row items-center justify-center`,children:I(`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:[m&&I(_D,{className:`w-3/4`,"aria-label":`Loading user avatar`}),h&&I(`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}),g&&I(`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:p?.map((e,t)=>I(`span`,{children:e},`${e}-${t}`))}),_&&I(Lc,{size:G(o===`sm`&&14,o===`md`&&25,o===`lg`&&30,o===`xl`&&40),"aria-label":`Default user icon`})]})})})},IV=`editor-profile`,LV=()=>{let e=V(MV),t=dD();if(!t)return null;let{auth:n,isLoggingIn:r,login:i,logout:a,isLoggingOut:o}=t;if(!n)return I(Z,{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:rc,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 I(dI,{identifier:IV,children:[I(dI.Trigger,{identifier:IV,label:e.profileLabel.value,size:`icon-sm`,variant:`outline`,color:`text`,roundedSize:`full`,className:`border-none p-0!`,children:I(FV,{fullname:u,src:s?.image??void 0,size:`sm`})}),I(dI.Panel,{identifier:IV,isFocusable:!0,isOverable:!0,align:`end`,children:I(pO,{className:`min-w-56 p-4`,transparency:`xs`,roundedSize:`2xl`,border:!0,borderColor:`neutral`,children:I(`div`,{className:`flex flex-col gap-3`,children:[s?.name&&I(`span`,{className:`font-bold whitespace-nowrap`,children:s.name}),s?.email&&I(`span`,{className:`text-sm whitespace-nowrap`,children:s.email}),c?.name&&I(`span`,{className:`text-sm whitespace-nowrap`,children:[e.project,`: `,c.name]}),I(`span`,{className:`text-xs whitespace-nowrap text-neutral`,children:l===`session`?e.sessionAuth:e.accessKeyAuth}),l===`session`&&I(Z,{label:e.logout.label.value,onClick:a,isLoading:o,variant:`outline`,color:`text`,size:`sm`,Icon:ac,children:e.logout.title})]})})})]})},RV=({applicationURL:e,isConnectionFailed:t,isApplicationEditorEnabled:n})=>{if(!e)return{level:`warn`,message:"No application to edit: set `editor.applicationURL` in intlayer.config.ts (e.g. http://localhost:3000), then restart the editor."};if(t)return n?{level:`error`,message:`${e} did not connect to the editor. Check that its Content-Security-Policy \`frame-ancestors\` (or \`X-Frame-Options\`) allows ${[...new Set([window.location.origin,...Array.from(window.location.ancestorOrigins??[])])].join(` `)}, and that the page renders the Intlayer provider of your framework.`}:{level:`error`,message:`${e} did not connect to the editor: the visual editor is disabled in its configuration. Set \`editor.enabled: true\` in intlayer.config.ts, then restart the application.`}},zV={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`},BV=()=>{let{title:e,description:t,documentationLink:n}=V(zV);return I(`div`,{className:`flex flex-col gap-6`,children:[I(Qz,{className:`mb-8`,children:e}),I(`strong`,{className:`block text-neutral`,children:t}),I(aR,{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})]})};n();var VV=({iframeRef:e,applicationPath:t,isBrowserVisible:n=!1})=>{let r=V(SV),{editor:i}=pT()??{},a=pV()?.isApplicationEditorEnabled??!0,{enabled:o}=vT(),s=yT(),{isConnectionFailed:c,handleFrameLoad:l,dismiss:u}=CE();vE(),hV(RV({applicationURL:i?.applicationURL,isConnectionFailed:c,isApplicationEditorEnabled:a}));let f=A(()=>{let t=e.current;if(!t)return;let{src:n}=t;t.src=n},[e]);EE({applicationURL:i?.applicationURL,isDisconnected:c,reloadFrame:f});let[p,m]=d(!0),h=gE();if(M(()=>{typeof h==`string`&&window.history.replaceState({},``,`${h}${window.location.search}`)},[h]),!i?.applicationURL)return I(pO,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:I(BV,{})});let g=c&&I(kV,{applicationURL:i.applicationURL,onRetry:f,onDismiss:u,isEditorDisabled:!a}),_=!o&&I(`div`,{className:`fixed inset-e-4 bottom-4`,children:I(Z,{label:r.enableEditor.value,onClick:s,color:`text`,children:r.enableEditor})}),v=I(`div`,{className:`flex shrink-0 items-center gap-2`,children:[I(jV,{iframeRef:e,applicationURL:i.applicationURL,applicationPath:t}),I(nV,{identifier:`push-dictionaries-toolbar`}),I(LV,{})]});return n?I(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[I(EV,{initialUrl:`${i.applicationURL}${t}`,path:h,domainRestriction:i.applicationURL,className:`size-full`,sandbox:`allow-scripts allow-same-origin`,ref:e,onLoad:l,toolbarActions:v}),g,_]}):I(`div`,{className:`flex size-full flex-col gap-2`,children:[I(`div`,{className:`flex justify-end`,children:v}),I(`div`,{className:`relative min-h-0 w-full flex-1 overflow-hidden rounded-lg`,children:[I(_D,{isLoading:p}),I(`iframe`,{src:`${i.applicationURL}${t}`,title:r.intlayerApplication.value,sandbox:`allow-scripts allow-same-origin`,className:G(`size-full`,p&&`hidden`),ref:e,onLoad:()=>{m(!1),l()}}),g,_]})]})};n();var HV=`theme`,UV=e=>e===`light`||e===`dark`,WV=()=>{let e=new URLSearchParams(window.location.search).get(HV);return UV(e)?e:void 0},GV=()=>{let[e,t]=d(WV);return M(()=>{let e=bV();if(!e)return;let n=n=>{n.origin===e&&n.source===window.parent&&n.data?.type===ET.INTLAYER_HOST_THEME_CHANGED&&UV(n.data.theme)&&t(n.data.theme)};return window.addEventListener(`message`,n),()=>window.removeEventListener(`message`,n)},[]),e};n();var KV=`browser`,qV=()=>{let e=new URLSearchParams(window.location.search).get(KV);return e!==null&&e!==`false`},JV=()=>{let e=u(null),[t]=d(()=>window.location.pathname),[n]=d(qV);return I(vV,{iframeRef:e,children:[I(xV,{}),I(Dr,{children:I(sV,{children:I(VV,{iframeRef:e,applicationPath:t,isBrowserVisible:n})})})]})},YV=()=>I(bn,{forcedTheme:GV(),hasBootstrapScript:!1,children:I(mD,{children:I(JV,{})})});r();var XV=document.getElementById(`root`);XV&&o(I(YV,{}),XV);export{PE as A,K as B,pO as C,_D as D,Z as E,kc as F,Ht as G,V as H,js as I,ce as K,ks as L,Gc as M,Fc as N,WE as O,jc as P,Ds as R,WO as S,bD as T,kn as U,G as V,Ut as W,MM as _,$z as a,yA as b,Cz as c,YL as d,PM as f,DM as g,kM as h,Qz as i,Kc as j,RE as k,az as l,EM as m,Xz as n,eB as o,NM as p,I as q,Zz as r,tB as s,aB as t,aR as u,OM as v,jD as w,Q as x,Jj as y,Ts as z};