intlayer-editor 9.9.3-canary.1 → 9.9.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-CvJXcrHW.js","assets/MarkDownRender-DJZAt0rV.js","assets/compat-s514__hh.js","assets/MarkdownEditor-DOscG2B0.js","assets/shikiBundle-DR5bycuh.js","assets/dist-CE3noM9J.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-s514__hh.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 ee=Symbol.for(`pv`),P=0;Array.isArray;function F(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:ee,__v:--P,__i:-1,__u:0};return(i||o)&&(u.__source=i,u.__self=o),a.vnode&&a.vnode(u),u}S();var I=s(!0),te=()=>t(I),ne=.05,re=(e,t)=>{let n=e.find(e=>e.open!==!1),r=n?t[n.id]??0:0,i={},a=0,o=0,s=0;for(let n of e){if(i[n.id]={index:a,expandedOffset:o,frontHeight:r},n.open===!1)continue;let e=t[n.id]??0;a<3&&(s=o+e),a+=1,o+=e+12}let c=Math.min(a,3);return{positions:i,collapsedHeight:c>0?r+(c-1)*14:0,expandedHeight:s}};S();var L=3,R=1e3,z=0,ie=()=>(z=(z+1)%(2**53-1),z.toString()),B=new Map,ae=e=>{if(B.has(e))return;let t=setTimeout(()=>{B.delete(e),le({type:`REMOVE_TOAST`,toastId:e})},R);B.set(e,t)},oe=(e,t)=>{switch(t.type){case`ADD_TOAST`:{let n=0,r=[t.toast,...e.toasts].map(e=>e.open===!1||(n+=1,n<=L)?e:(ae(e.id),{...e,open:!1}));return{...e,toasts:r}}case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?ae(n):e.toasts.forEach(e=>{ae(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},se=[],ce={toasts:[]},le=e=>{ce=oe(ce,e),se.forEach(e=>{e(ce)})},ue=({...e})=>{let t=ie(),n=e=>le({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>le({type:`DISMISS_TOAST`,toastId:t});return le({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},de=()=>{let[e,t]=d(ce);return M(()=>(se.push(t),()=>{let e=se.indexOf(t);e>-1&&se.splice(e,1)}),[e]),{...e,toast:ue,dismiss:e=>le({type:`DISMISS_TOAST`,toastId:e})}};S();var fe=s(!1),pe=()=>t(fe);fe.Provider,S();var me=s(void 0),he=e=>{let n=t(me);if(e)return e;if(!n)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return n},ge=({client:e,children:t})=>(M(()=>(e.mount(),()=>{e.unmount()}),[e]),F(me.Provider,{value:e,children:t}));S();function _e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ve=s(_e()),ye=()=>t(ve),be=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(){}},xe=new class extends be{#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`}},Se={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ce=new class{#e=Se;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 we(e){setTimeout(e,0)}var Te=typeof window>`u`||`Deno`in globalThis;function Ee(){}function De(e,t){return typeof e==`function`?e(t):e}function Oe(e){return typeof e==`number`&&e>=0&&e!==1/0}function ke(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ae(e,t){return typeof e==`function`?e(t):e}function je(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ne(o,t.options))return!1}else if(!Fe(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 Me(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Pe(t.options.mutationKey)!==Pe(a))return!1}else if(!Fe(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ne(e,t){return(t?.queryKeyHashFn||Pe)(e)}function Pe(e){return JSON.stringify(e,(e,t)=>Be(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Fe(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))return!1;if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Fe(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Fe(e[r],t[r]))return!1;return!0}return!1}var Ie=Object.prototype.hasOwnProperty;function Le(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ze(e)&&ze(t);if(!r&&!(Be(e)&&Be(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:Ie.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Le(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Re(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!Ie.call(t,n)||e[n]!==t[n])return!1;return!0}function ze(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Be(e){if(!Ve(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!(!Ve(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Ve(e){return Object.prototype.toString.call(e)===`[object Object]`}function He(e){return new Promise(t=>{Ce.setTimeout(t,e)})}function Ue(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Le(e,t)}function We(e,t,n,r){let i=r?[t,...e]:[...e,t];return n&&i.length>n?r?i.slice(0,n):i.slice(-n):i}var Ge=Symbol();function Ke(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ge?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function qe(e,t){return typeof e==`function`?e(...t):!!e}var Je=Symbol();function Ye(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[Je]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var Xe=()=>Te,Ze=()=>Xe();function Qe(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=>{Ye(e,()=>t.signal,()=>n=!0,l[Je])},d=Ke(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;return{pages:We(e.pages,o,s,i),pageParams:We(e.pageParams,r,s,i)}};if(i&&a.length){let e=i===`backward`,t=e?et:$e,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]:$e(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 $e(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 et(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var tt=we;function nt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=tt,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 rt=nt(),it=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Oe(this.gcTime)&&(this.#e=Ce.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ze()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Ce.clearTimeout(this.#e),this.#e=void 0)}},at=new class extends be{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ot(e){return Math.min(1e3*2**e,3e4)}function st(e){return(e??`online`)!==`online`||at.isOnline()}var ct=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function lt(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(Ee);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new ct(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>xe.isFocused()&&(e.networkMode===`always`||at.isOnline())&&e.canRun(),p=()=>st(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Ze()?0:3),a=e.retryDelay??ot,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),He(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var ut=class extends it{#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=pt(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=pt(this.options);e.data!==void 0&&(this.setState(ft(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ue(this.state.data,e,this.options);return this.#u({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#u({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Ee).catch(Ee):Promise.resolve()}destroy(){this.cancel({silent:!0}),super.destroy()}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ae(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ge||!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=>Ae(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:!ke(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.#l()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#u({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,{[Je]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Ke(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`?Qe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#u({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=lt({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ct&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#u({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#u({type:`pause`})},onContinue:()=>{this.#u({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ct){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#u({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.#l()}})();return this.#o=s,o.start(),s}#l(){this.#r.get(this.queryHash)===this&&this.scheduleGc()}#u(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,...dt(t.data,this.options),fetchMeta:e.meta??null};case`success`:{let n={...t,...ft(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),rt.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function dt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:st(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ft(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function pt(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 mt=class extends be{#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.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),gt(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _t(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _t(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 Ae(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&&!Re(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&vt(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Ae(this.options.enabled,this.#t)!==Ae(t.enabled,this.#t)||Ae(this.options.staleTime,this.#t)!==Ae(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Ae(this.options.enabled,this.#t)!==Ae(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 Re(this.getCurrentResult(),n)||(this.#r=n,this.#i=e),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(Ee)),t}#h(e){return!Ze()&&Ae(this.options.enabled,this.#t)!==!1&&Oe(e)}#g(){this.#b();let e=Ae(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=ke(this.#r.dataUpdatedAt,e)+1;this.#u=Ce.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Ae(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Ce.setInterval(()=>{(this.options.refetchIntervalInBackground||xe.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Ce.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Ce.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=e===n?this.#n:e.state,{state:s}=e,c={...s},l=!1,u;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&gt(e,t),o=i&&vt(e,n,t,r);(a||o)&&(c={...c,...dt(s.data,e.options)}),t._optimisticResults===`isRestoring`&&(c.fetchStatus=`idle`)}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let m=!1;if(t.placeholderData!==void 0&&u===void 0&&p===`pending`){let e,n=i?.isPlaceholderData&&t.placeholderData===a?.placeholderData;n?(e=i.data,m=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,(n||e!==void 0)&&(p=`success`,u=Ue(t.select&&!m?this.#s:i?.data,e,t),l=!0)}if(t.select&&u!==void 0&&!m){if(u===this.#s&&t.select===this.#o)u=this.#c;else try{this.#o=t.select,this.#s=u,u=t.select(u),u=Ue(i?.data,u,t),this.#c=u,this.#a=null}catch(e){this.#a=e}}else u===void 0&&(this.#s=void 0,this.#a=null);this.#a&&(d=this.#a,u=this.#c,f=i?.error===d?i.errorUpdatedAt:Date.now(),p=`error`,l=!1);let h=c.fetchStatus===`fetching`,g=p===`pending`,_=p===`error`,v=g&&h,y=u!==void 0;return{status:p,fetchStatus:c.fetchStatus,isPending:g,isSuccess:p===`success`,isError:_,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>o.dataUpdateCount||c.errorUpdateCount>o.errorUpdateCount,isFetching:h,isRefetching:h&&!g,isLoadingError:_&&!y,isPaused:c.fetchStatus===`paused`,isPlaceholderData:l,isRefetchError:_&&y,isStale:yt(e,t),refetch:this.refetch,isEnabled:Ae(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.options,this.#t.state.data!==void 0&&(this.#l=this.#t),Re(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})();rt.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 ht(e,t){return Ae(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Ae(t.retryOnMount,e)!==!1)}function gt(e,t){return ht(e,t)||e.state.data!==void 0&&_t(e,t,t.refetchOnMount)}function _t(e,t,n){if(Ae(t.enabled,e)!==!1&&Ae(t.staleTime,e)!==`static`){let r=Ae(n,e);return r===`always`||r!==!1&&yt(e,t)}return!1}function vt(e,t,n,r){return(e!==t||Ae(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&yt(e,n)}function yt(e,t){return Ae(t.enabled,e)!==!1&&e.isStaleByTime(Ae(t.staleTime,e))}var bt=class extends it{#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||xt(),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.#n.has(this)&&this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=lt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),rt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function xt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var St=class extends be{#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 bt({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=Ct(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)){e.destroy();let t=Ct(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})}has(e){return this.#e.has(e)}canRun(e){let t=Ct(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=Ct(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){rt.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>e.destroy()),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=>Me(t,e))}findAll(e={}){return this.getAll().filter(t=>Me(e,t))}notify(e){rt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return rt.batch(()=>Promise.all(e.map(e=>e.continue().catch(Ee))))}};function Ct(e){return e.options.scope?.id}var wt=class extends be{#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),Re(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Pe(t.mutationKey)!==Pe(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??xt();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){rt.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)})})}},Tt=class extends be{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Ne(r,t),a=this.get(i);return a||(a=new ut({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(){rt.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=>je(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>je(e,t)):t}notify(e){rt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){rt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){rt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Et=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Tt,this.#t=e.mutationCache||new St,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=xe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=at.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ae(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=De(t,this.#e.get(r.queryHash)?.state.data);if(i!==void 0)return this.#e.build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return rt.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;rt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return rt.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=rt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Ee).catch(Ee)}invalidateQueries(e,t={}){return rt.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=rt.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(Ee)),r?Promise.resolve():t}));return Promise.all(r).then(Ee)}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(Ae(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(Ae(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ee).catch(Ee)}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(Ee).catch(Ee)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return at.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Pe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Fe(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Pe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Fe(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||=Ne(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===Ge&&(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 Dt=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?qe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Ot=e=>{M(()=>{e.clearReset()},[e])},kt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||qe(n,[e.error,r])),At=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))}},jt=(e,t)=>e?.suspense&&t.isPending,Mt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});S();function Nt(e,t,n){let r=pe(),i=ye(),a=he(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,At(o),Dt(o,i,s),Ot(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(rt.batchCalls(e)):Ee;return l.updateResult(),t},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),jt(o,u))throw Mt(o,l,i);if(kt({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Pt(e,t){return Nt(e,mt,t)}S();function Ft(e,t){let n=he(t),[r]=d(()=>new wt(n,e));M(()=>{r.setOptions(e)},[r,e]);let i=h(A(e=>r.subscribe(rt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=A((...e)=>{r.mutate(e[0],e[1]).catch(Ee)},[r]);if(i.error&&qe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}S();var It=typeof window>`u`,Lt=`intlayer-rq-cache`;if(It){let e=e=>{typeof e==`object`&&e&&`unref`in e&&typeof e.unref==`function`&&e.unref()};Ce.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 Rt={queries:{retry:1,staleTime:3e4,...It&&{gcTime:1/0},refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1},mutations:{retry:0}},zt=e=>e.split(`_`).join(` `),Bt=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},Vt=()=>{let{toast:e}=de();return{onError:t=>{[(()=>{try{if(typeof t==`string`)return JSON.parse(t);if(t instanceof Error)return JSON.parse(t.message)}catch{}return t})()].flat().forEach(t=>{let n=t?.error??t;n?.code===`RATE_LIMIT_EXCEEDED_UNAUTHENTICATED`?e({title:n.message,variant:`error`}):e({title:zt(n?.title??t?.title??`Error`),description:Bt(n?.errors)??n?.message??t?.message??String(n??`An error occurred`),variant:`error`})})},onSuccess:t=>{t?.error&&e({title:zt(t.error.title??t.error.code??`Error`),description:Bt(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`})}}},Ht=()=>new Et({defaultOptions:Rt}),Ut=new WeakSet,Wt=(e,t)=>{if(Ut.has(e))return e;Ut.add(e);let n=e.getMutationCache(),r=n.config.onSuccess,i=n.config.onError;return n.config.onSuccess=(...e)=>{r?.(...e),t.current.onSuccess?.(...e)},n.config.onError=(...e)=>{i?.(...e),t.current.onError?.(...e)},n.config.onSettled=(t,n,r,i,a)=>{a.meta?.invalidateQueries?.forEach(t=>{e.invalidateQueries({queryKey:t})}),a.meta?.resetQueries?.forEach(t=>{e.resetQueries({queryKey:t})})},e},Gt=({children:e,client:t})=>{let n=Vt(),r=u(n);M(()=>{r.current=n});let[i]=d(()=>Wt(t??Ht(),r));return M(()=>{try{window.localStorage.removeItem(Lt)}catch{}},[]),F(ge,{client:i,children:e})};S();var Kt=`data-theme`,qt=`(prefers-color-scheme: dark)`,Jt=typeof window>`u`,Yt=`(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
- })`,Xt=e=>`${Yt}(${JSON.stringify(e)},${JSON.stringify(Kt)},${JSON.stringify(qt)})`,Zt=e=>{try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return`system`},Qt=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()}},$t=Jt?M:m,en=s(void 0),tn=({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);$t(()=>{let t=window.matchMedia(qt);o(Zt(e)),c(t.matches?`dark`:`light`);let n=e=>c(e.matches?`dark`:`light`),r=t=>{t.key===e&&o(Zt(e))};return t.addEventListener(`change`,n),window.addEventListener(`storage`,r),()=>{t.removeEventListener(`change`,n),window.removeEventListener(`storage`,r)}},[e]),$t(()=>{if(!l)return;let e=document.documentElement;if(e.getAttribute(Kt)===l)return;let n=Qt(t);e.setAttribute(Kt,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 F(en.Provider,{value:f,children:[n&&F(`script`,{suppressHydrationWarning:!0,nonce:Jt?t:``,type:Jt?void 0:`text/plain`,dangerouslySetInnerHTML:{__html:Xt(e)}}),i]})},nn=({children:e,...n})=>t(en)?F(b,{children:e}):F(tn,{...n,children:e}),rn={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`},an={mode:`prefix-no-default`,storage:{cookies:[{name:`INTLAYER_LOCALE`,attributes:{path:`/`}}],headers:[{name:`x-intlayer-locale`}]},basePath:``},on={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`},sn=`modulepreload`,cn=function(e){return`/`+e},ln={},un={},dn=function(e){return e.pathname.endsWith(`.css`)},fn=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 delete e[t],n});return e[t]=i,i},pn=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=cn(e,n);let t=i(e),r=dn(t);return fn(ln,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)}}let e=r?a.styles:a.all,n=r?un[t.href]:void 0;if(!n&&e.has(t.href))return;let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:sn,r||(i.as=`script`),i.crossOrigin=``,i.href=t.href,s&&i.setAttribute(`nonce`,s),n&&delete un[t.href],n?.isConnected?n.replaceWith(i):document.head.appendChild(i),r)return new Promise((e,n)=>{let r=a=>{i.removeEventListener(`load`,r),i.removeEventListener(`error`,r),a.type===`error`?(un[t.href]=i,n(Error(`Unable to preload CSS for ${t}`))):e(a)};i.addEventListener(`load`,r),i.addEventListener(`error`,r)})})}).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)})},mn=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),hn=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}},gn=(e,t,n)=>{let r=[`${e}=${encodeURIComponent(t)}`];n.path&&r.push(`Path=${n.path}`),n.domain&&r.push(`Domain=${n.domain}`);let i=hn(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(`; `)},_n={}.INTLAYER_ROUTING_STORAGE_COOKIES===`false`;({}).INTLAYER_ROUTING_STORAGE_HEADERS;var vn={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)},yn=(e=vn)=>{let{locales:t}=rn;if(e?.isCookieEnabled===!1)return;let n=e=>!!e&&t.includes(e);if(!_n)for(let t=0;t<(an.storage.cookies??[]).length;t++)try{let r=e?.getCookie?.(an.storage.cookies[t].name);if(n(r))return r}catch{}},bn=!1,xn,Sn=()=>typeof window>`u`?yn(vn):(bn||=(xn=yn(vn),!0),xn),Cn=(e,t)=>{if(t?.isCookieEnabled!==!1&&(bn=!1,!_n&&an.storage.cookies))for(let n=0;n<an.storage.cookies.length;n++){let{name:r,attributes:i}=an.storage.cookies[n];try{t?.setCookieStore&&t.setCookieStore(r,e,{...i,expires:hn(i.expires)})}catch{try{t?.setCookieString&&t.setCookieString(r,gn(r,e,i))}catch{}}}},wn=e=>{let t=globalThis;return t[e]??=new Set,t[e]},Tn=()=>wn(Symbol.for(`intlayer.ambientLocaleResolvers`)),En=()=>{for(let e of Tn())try{let t=e();if(t)return t}catch{}},Dn=e=>e??En()??(typeof window>`u`?void 0:Sn())??rn.defaultLocale,On=50,kn=new Map,An={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}})}}},jn=e=>{let t=Intl[e];return typeof t==`function`?t:An[e]};function Mn(e,t,n){let r=Dn(t),i=`${r}|${n?JSON.stringify(n):``}`,a=e,o=kn.get(a);o||(o=new Map,kn.set(a,o));let s=o.get(i);if(!s){let t=typeof e==`string`?jn(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>On&&o.clear(),s=new t(r,n),o.set(i,s)}return s}var Nn={Collator:function(e,t){return Mn(`Collator`,e,t)},DateTimeFormat:function(e,t){return Mn(`DateTimeFormat`,e,t)},DisplayNames:function(e,t){return Mn(`DisplayNames`,e,t)},ListFormat:function(e,t){return Mn(`ListFormat`,e,t)},NumberFormat:function(e,t){return Mn(`NumberFormat`,e,t)},PluralRules:function(e,t){return Mn(`PluralRules`,e,t)},RelativeTimeFormat:function(e,t){return Mn(`RelativeTimeFormat`,e,t)},Segmenter:function(e,t){return Mn(`Segmenter`,e,t)}},Pn=new Map,Fn=(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??``}}}),In=(e,t=Object.prototype)=>{let n=typeof e,r=e==null?null:n===`object`||n===`function`?Object.getPrototypeOf(e):n,i=Pn.get(t);i||(i=new Map,Pn.set(t,i));let a=i.get(r);return a||(a=Fn(t,r===null?null:Object.getPrototypeOf(Object(e))),i.set(r,a)),a},Ln=(e,t)=>e.every((e,n)=>t[n]&&t[n].key===e.key&&t[n].type===e.type),Rn=e=>typeof e==`object`&&e?.key!==void 0&&e?.props!==void 0,zn=Sn,Bn=(e,t)=>Cn(e,{...vn,isCookieEnabled:t}),Vn=`https://back.intlayer.org`,Hn=[`en`],Un=`x-intlayer-locale`,Wn=(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},Gn=class{value;next;constructor(e){this.value=e}},Kn=class{#e;#t;#n;constructor(){this.clear()}enqueue(e){let t=new Gn(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()}},qn=e=>{Jn(e);let t=new Kn,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){Jn(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},Jn=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up")},Yn=async(e,t=async e=>e,n=10)=>{let r=qn(n);return Promise.all(e.map(e=>r(()=>t(e))))},Xn=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()},Zn=()=>{typeof window<`u`&&(window.intlayer={enabled:!0})},Qn=(e,t=rn?.locales)=>{let n=mn(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`,``)},$n=(e,t,n)=>(n??an?.rewrite,e),er=(e={})=>({...e,defaultLocale:e.defaultLocale??rn?.defaultLocale??`en`,mode:e.mode??an?.mode??`prefix-no-default`,locales:e.locales??rn?.locales??Hn,rewrite:e.rewrite??an?.rewrite,domains:e.domains??an?.domains}),tr=(e,t)=>!!e&&(t??rn.locales).includes(e),nr=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i,domains:a}=er(t);return!e||!tr(e,i)?{prefix:``,localePrefix:void 0}:r===`prefix-all`||r===`prefix-no-default`&&n!==e?{prefix:`${e}/`,localePrefix:e}:{prefix:``,localePrefix:void 0}},rr=(e,t,n)=>({path:e,isRewritten:!1}),ir=(e,t=rn?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o,domains:s}=er(n),c=Qn(e,a),l=new URL(c,`http://e.com`),u=rr($n(l.pathname,void 0,void 0),t,void 0).path,{prefix:d}=nr(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}`},ar=(e,t=rn?.defaultLocale,n={})=>{let{domains:r,currentDomain:i}=er(n),a=mn(e),o=a?new URL(e):new URL(e,`http://e.com`);return`${a?`${o.protocol}//${o.host}`:``}${ir(`${o.pathname}${o.search}${o.hash}`,t,n)}`},or=(e,t=rn?.locales,n=rn?.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},sr=[`Arab`,`Hebr`,`Thaa`,`Syrc`,`Mand`,`Adlm`,`Rohg`,`Nkoo`],cr=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 sr.includes(n.script??``)?`rtl`:`ltr`}catch{return`ltr`}},lr=(e,t=e)=>new Nn.DisplayNames(t,{type:`language`}).of(e)??`Unknown locale`;r(),n();var ur=s({get locale(){return zn()??rn?.defaultLocale},setLocale:()=>null}),dr=({locale:e,defaultLocale:t,variant:n,children:r,setLocale:i,isCookieEnabled:a})=>{let{defaultLocale:o,locales:s}=rn??{},[c,l]=d(()=>e??zn()??t??o);M(()=>{Zn()},[]);let u=e??c,f=A(e=>{u.toString()!==e.toString()&&(s?.map(String).includes(e)?(l(e),Bn(e,a??!0)):console.error(`Locale ${e} is not available`))},[u,s,a]),p=i??f,m=or(u),h=x(()=>({locale:m,setLocale:p,variant:n,isCookieEnabled:a}),[m,p,n,a]);return F(ur.Provider,{value:h,children:r})},fr=new WeakMap,pr=0,mr=e=>{if(!e)return`base`;let t=fr.get(e);if(t)return t;pr+=1;let n=`p${pr}`;return fr.set(e,n),n},hr=256,gr=new WeakMap,_r=e=>typeof e==`object`&&!!e,vr=(e,t,n)=>`${e}_${t}_${mr(n)}`,yr=(e,t)=>{if(!_r(e))return{hit:!1};let n=gr.get(e);return n?.has(t)?{hit:!0,content:n.get(t)}:{hit:!1}},br=(e,t,n)=>{if(!_r(e))return n;let r=gr.get(e);return r||(r=new Map,gr.set(e,r)),r.size>=hr&&r.clear(),r.set(t,n),xr?.push({dictionary:e,cacheKey:t,content:n}),n},xr=null,Sr=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},Cr=`translation`,wr=`enumeration`,Tr=`plural`,Er=`condition`,Dr=`insertion`,Or=`file`,kr=`object`,Ar=`array`,jr=`nested`,Mr=`reactNode`,Nr=`preactNode`,Pr=`solidNode`,Fr=`markdown`,Ir=`html`,Lr=`text`,Rr=`number`,zr=`boolean`,Br=`gender`,Vr=`select`,Hr=`null`,Ur=`unknown`,Wr=(e,t,n)=>({...e,children:t,keyPath:[...e.keyPath,n]}),Gr=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,Gr);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)=>Gr(e,Wr(t,e,{type:Ar,key:n})));let n={};for(let r in e){let i={type:kr,key:r};t.eager?n[r]=Gr(e[r],Wr(t,e[r],i)):Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:function(){let n=Gr(e[r],Wr(t,e[r],i));return Object.defineProperty(this,r,{value:n,enumerable:!0,configurable:!0}),n}})}return n},Kr=e=>{let t=Number(e);return e!==``&&Number.isFinite(t)&&String(t)===e?t:e},qr=(e,t)=>typeof e==`number`&&typeof t==`number`?e-t:typeof e==`number`?-1:typeof t==`number`?1:e===t?0:e<t?-1:1,Jr=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),Yr=(e,t,n)=>e[Mn(`PluralRules`,n).select(t)]??e.other,Xr=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)},Zr=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e)||!Xr(e)||!Xr(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`?Zr(a,i):a;o!==a&&(n===e&&(n={...e}),n[r]=o)}return n},Qr=(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)=>Zr(e,t))},$r=e=>{if(typeof e!=`object`||!e||!(`nodeType`in e))return!1;let{nodeType:t}=e;return!1},ei=e=>{if(typeof e==`string`)return e;if($r(e))return e.nodeType===`html`?e[Ir]:e[Fr]},ti=(e,t)=>{if(typeof e==`string`)return t;if($r(e)){let n=e.nodeType===`html`?Ir:Fr;return{...e,[n]:t}}return e},ni=(e,t,n,r,i)=>{let a=ti(e,Jr(ei(e),t));return i(a,{...n,plugins:r,children:a})},ri={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},ii=e=>{if(typeof e!=`function`)return!1;let{value:t}=e;return t===void 0||typeof t==`function`},ai=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?ri:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a=Qr(n.translation??{},e,t);return i(a,{...r,children:a,keyPath:[...r.keyPath,{type:Cr,key:e}]})}},oi=ri,si=e=>({}).INTLAYER_NODE_TYPE_PLURAL===`false`?ri:{id:`plural-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`plural`,transform:(t,n,r)=>{let i=t[Tr],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`||$r(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($r(e))return n=>ni(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=Jr(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:Tr,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=Yr(a,n,l);return ii(r)?r(t):r}}},ci={}.INTLAYER_NODE_TYPE_CONDITION===`false`?ri:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r=e[Er],i={};for(let e in r){let a=r[e];i[e]=n(a,{...t,children:a,keyPath:[...t.keyPath,{type:Er,key:e}]})}return e=>{let t=typeof e==`boolean`?e:e.value,n=Sr(i,t);return ii(n)&&typeof e==`object`?n(e):n}}},li={}.INTLAYER_NODE_TYPE_INSERTION===`false`?ri:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:Dr}],i=e[Dr],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||$r(e),transform:(e,n,r)=>{if($r(e))return i=>ni(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=Jr(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return fi(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}},ui=[wr,Er,Tr,Br,Vr],di=(e,t,n,r=!1)=>{let i=e?.nodeType;if(typeof t!=`function`||!i||!ui.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&&ii(i)?i(n):i}},fi=(e,t)=>typeof t==`function`&&ui.includes(e?.nodeType??``)?n=>di(e,t,n):t,pi=ri,mi=ri,hi=e=>ri,gi=ri,_i=(e,t=!0)=>[ai(e??rn.defaultLocale,t?rn.defaultLocale:void 0),oi,si(e??rn.defaultLocale),ci,li,hi(e??rn.defaultLocale),gi,pi,mi].filter(e=>e!==ri),vi=(e,t,n=[])=>Gr(e,{...t,plugins:n}),yi=new WeakSet,bi=(e,t,n)=>{let{locale:r,selector:i}={locale:t,selector:void 0},a=Dn(r),o=vr(a,``,n),s=yr(e,o);if(s.hit)return s.content;let c=n??_i(a),l=e,u=e=>{let t={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:c,nestedDictionaries:e.nestedDictionaries,eager:!yi.has(e)};yi.add(e);try{return vi(e.content,t,c)}finally{t.eager&&yi.delete(e)}};return l===null?br(e,o,null):Array.isArray(l)?br(e,o,l.map(u)):br(e,o,u(l))};r();var xi=({children:e,value:t,additionalProps:n})=>Object.setPrototypeOf({...l(e)?e:i(b,{},e),value:t,...n},In(t));r(),S();var Si=null,Ci=null,wi={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,t)=>xi({value:t.children,children:t.children})},Ti=ri,Ei=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,Di=(e,t)=>{if(!Object.values(t).some(Ei))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)))},Oi={}.INTLAYER_NODE_TYPE_INSERTION===`false`?ri:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:Dr}],i=e[Dr],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||$r(e),transform:(e,n,r)=>{if($r(e))return i=>ni(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=Di(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return fi(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}};_(()=>Si.then(e=>({default:e.MarkdownRendererPlugin}))),_(()=>Si.then(e=>({default:e.MarkdownMetadataRenderer})));var ki=ri;_(()=>Ci.then(e=>({default:e})));var Ai=ri,ji=new Map,Mi=(e,t=!0)=>{let n=Dn(e),r=`${n}_${t}`;if(ji.has(r))return ji.get(r);let i=[wi,ai(n,t?rn.defaultLocale:void 0),oi,si(n),ci,hi(n),gi,pi,mi,Ti,Oi,ki,Ai].filter(e=>e!==ri);return ji.set(r,i),i},Ni=(e,t)=>bi(e,t,Mi(typeof t==`object`&&t?t.locale:t)),Pi=(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}},Fi=(e,t,n)=>{let r=e;for(let e of t){for(;r?.nodeType===`translation`&&e.type!==`translation`;){let e=r[Cr];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)},Ii=(e,t,n)=>{let r=structuredClone(n);switch(e){case Cr:return{nodeType:Cr,[Cr]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case wr:return{nodeType:wr,[wr]:{1:r??``}};case Tr:return{nodeType:Tr,[Tr]:{one:r??``,other:r??``}};case Er:return{nodeType:Er,[Er]:{true:r??``,false:r??``}};case Br:return{nodeType:Br,[Br]:{male:r??``,female:r??``,fallback:r??``}};case Vr:return{nodeType:Vr,[Vr]:{case1:r??``,fallback:r??``}};case Dr:return{nodeType:Dr,[Dr]:{insertion:r??``}};case jr:return{nodeType:jr,[jr]:{dictionaryKey:``}};case Fr:return{nodeType:Fr,[Fr]:r??``};case Ir:return{nodeType:Ir,[Ir]:r??``,customComponents:[]};case Or:return{nodeType:Or,[Or]:r??``};case kr:return{newKey:r??``};case Ar:return[r??``];case Lr:return r??``;case Rr:return r??0;case zr:return r??!0;default:return r??``}},Li=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`?Li(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?Li(n):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(Li);let t=Object.entries(e).map(([e,t])=>[e,Li(t)]);return Object.fromEntries(t)},Ri=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},zi=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,Bi={[Cr]:!0,[wr]:!0,[Tr]:!0,[Er]:!0,[Dr]:!0,[Or]:!0,[kr]:!0,[Ar]:!0,[jr]:!0,[Mr]:!0,[Nr]:!0,[Pr]:!0,[Fr]:!0,[Ir]:!0,[Lr]:!0,[Rr]:!0,[zr]:!0,[Br]:!0,[Vr]:!0,[Hr]:!0,[Ur]:!0},Vi=e=>Object.hasOwn(Bi,e),Hi=e=>{if(typeof e==`string`)return Lr;if(zi(e)){let t=e.nodeType;return Vi(t)?t:Ur}return Array.isArray(e)?Ar:Rn(e)?Mr:typeof e==`number`?Rr:typeof e==`boolean`?zr:e&&typeof e==`object`?kr:e===null?Hr:Ur},Ui=(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(ur)??{},a=n??r,o=a;return x(()=>Ni(e,a),[e.key,o])};n();var{defaultLocale:Wi,locales:Gi}=rn??{},Ki=({isCookieEnabled:e,onLocaleChange:n}={})=>{let{locale:r,setLocale:i,isCookieEnabled:a}=t(ur)??{};return{locale:r,defaultLocale:Wi,availableLocales:Gi,setLocale:t=>{Gi?.map(String).includes(t)?(i(t),Bn(t,e??a??!0),n?.(t)):console.error(`Locale ${t} is not available`)}}},qi=2048,Ji=8192,Yi=2048,Xi=1024,Zi=2048,Qi=-0x7ee3623b,$i=16777619,ea=Array.isArray,ta=e=>{if(!e)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return``+e;let t=``;if(ea(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:ta(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},na=(e,t)=>{let n=[];for(let r=0;r<e;r++)n.push(t);return n},ra=`line`in Error(),ia=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,aa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oa=/\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$/,sa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ca=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,la=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ua=Number,da=Number.isNaN,fa=Number.isInteger,pa=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ma=(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(pa(e.charCodeAt(1))){let t=2;for(;t<r-1;){let n=e.charCodeAt(t);if(pa(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},ha=null,ga=-1,_a=``,va=``,ya=e=>{if(e===ha)return;ha=e;let t=ma(e,91,93);ga=t,t>0?(_a=e.slice(1,t),va=e.slice(t+1,e.length-1)):t===0&&(va=e.slice(1,-1))},ba=null,xa=-1,Sa=``,Ca=e=>{if(e===ba)return;ba=e;let t=ma(e,40,41);xa=t,t>0&&(Sa=e.slice(1,t))},wa=e=>ia.test(e),H=e=>!!e&&!da(ua(e)),Ta=e=>!!e&&fa(ua(e)),Ea=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),Da=e=>aa.test(e),Oa=()=>!0,ka=e=>oa.test(e)&&!sa.test(e),Aa=()=>!1,ja=e=>ca.test(e),Ma=e=>la.test(e),Na=e=>!U(e)&&!W(e),Pa=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))},Fa=e=>Xa(e,eo,Aa),U=e=>(ya(e),ga>=0),Ia=e=>Xa(e,to,ka),La=e=>Xa(e,no,H),Ra=e=>Xa(e,io,Oa),za=e=>Xa(e,ro,Aa),Ba=e=>Xa(e,Qa,Aa),Va=e=>Xa(e,$a,Ma),Ha=e=>Xa(e,ao,ja),W=e=>(Ca(e),xa>=0),Ua=e=>Za(e,to),Wa=e=>Za(e,ro),Ga=e=>Za(e,Qa),Ka=e=>Za(e,eo),qa=e=>Za(e,$a),Ja=e=>Za(e,ao,!0),Ya=e=>Za(e,io,!0),Xa=(e,t,n)=>(ya(e),ga<0?!1:ga>0?t(_a):n(va)),Za=(e,t,n=!1)=>(Ca(e),xa<0?!1:xa>0?t(Sa):n),Qa=e=>e===`position`||e===`percentage`,$a=e=>e===`image`||e===`url`,eo=e=>e===`length`||e===`size`||e===`bg-size`,to=e=>e===`length`,no=e=>e===`number`,ro=e=>e===`family-name`,io=e=>e===`number`||e===`weight`,ao=e=>e===`shadow`,oo=new Map([[U,1],[Fa,1],[Ia,1],[La,1],[Ra,1],[za,1],[Ba,1],[Va,1],[Ha,1],[W,2],[Ua,2],[Wa,2],[Ga,2],[Ka,2],[qa,2],[Ja,2],[Ya,2],[wa,4],[H,4],[Ta,4],[Ea,4],[Da,4],[Pa,4],[Oa,7],[Na,7]]),so=(e,t)=>({classGroupId:e,validator:t,shapeMask:oo.get(t)??7}),co=()=>({nextPart:new Map,validators:null,classGroupId:void 0}),lo=[],uo=e=>{let{theme:t,classGroups:n}=e,r=co();for(let e in n)fo(n[e],r,e,t);return r},fo=(e,t,n,r)=>{for(let i=0;i<e.length;i++)po(e[i],t,n,r)},po=(e,t,n,r)=>{typeof e==`string`?mo(e,t,n):typeof e==`function`?ho(e,t,n):vo(e)?fo(r[e.themeGroupId]||lo,t,n,r):go(e,t,n,r)},mo=(e,t,n)=>{let r=e===``?t:_o(t,e);r.classGroupId=n},ho=(e,t,n)=>{t.validators===null&&(t.validators=[]),t.validators.push(so(n,e))},go=(e,t,n,r)=>{let i=Object.entries(e);for(let e=0;e<i.length;e++){let[a,o]=i[e];fo(o,_o(t,a),n,r)}},_o=(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=co(),n.nextPart.set(t,i)),n=i}return n},vo=e=>`themeGroupId`in e&&typeof e.themeGroupId==`string`,yo=(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},bo=[],xo=e=>{let t=uo(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 wo(e);let r=e.split(`-`);return Co(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?yo(i,t):t}return i||So},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 bo;let t=[];for(let n=0;n<e.length;n++)t.push(o.get(e[n]));return t},u=na(c,bo),d=na(c,bo),f=na(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}},So=[],Co=(e,t,n)=>{if(t===e.length)return n.classGroupId;let r=n.nextPart.get(e[t]);if(r){let n=Co(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}},wo=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},To=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),Eo=[];Object.freeze(Eo);var Do=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 To(t===null?Eo:t,l,c,d)},Oo=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},Ao={classId:-1,conflictStart:0,conflictEnd:0},jo=e=>{let t=Oo(e),n=Mo(e),{getClassGroupId:r,groupIndexes:i,groupCount:a,groupNames:o,conflictRowsBase:s,conflictRowsPostfix:c}=xo(e),l=new Int32Array(256),u=0,d=new Int32Array(64),f=new Int32Array(64),p=new Int32Array(64),m=Yi,h=m-1,g=h,_=na(Yi,null),v=na(Yi,null),y=new Int32Array(Yi*4),b=new Int32Array(Yi*4),x=0,S=0,C=()=>{let e=_,t=y,n=m;m=n*2,h=m-1,_=na(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):(_=na(m,null),y=new Int32Array(m*4)),x=0},T=()=>{m=Yi,h=m-1,g=h,_=na(Yi,null),v=na(Yi,null),y=new Int32Array(Yi*4),b=new Int32Array(Yi*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=Qi),i=Math.imul(i^s,$i)}return O=a,r},A=new Map,j=new Map,M=new Map,N=0,ee=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},P=e=>{let t=j.get(e);return t===void 0&&(t=j.size,j.set(e,t)),t},F=new Int32Array(1024),I=0,te=new Map,ne=(e,t,n)=>{let r=i.get(e);if(r===void 0)return{classId:ee(t+e),conflictStart:0,conflictEnd:0};let l=P(t)*a,u=M.get(l+r);u===void 0&&(u=ee(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=te.get(p);if(m===void 0){if(I+f>F.length){let e=F.length*2;for(;e<I+f;)e*=2;let t=new Int32Array(e);t.set(F),F=t}m=I;for(let e=0;e<f;e++){let n=d[e],r=M.get(l+n);r===void 0&&(r=ee(t+o[n]),M.set(l+n,r)),F[m+e]=r}I=m+f,te.set(p,m)}return{classId:u,conflictStart:m,conflictEnd:m+f}},re=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?ne(t,``,!1):Ao}let{isExternal:o,modifiers:s,hasImportantModifier:c,baseClassName:l,maybePostfixModifierPosition:u}=Do(e);if(o)return Ao;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 Ao;d=!1}let p=s.length===0?``:s.length===1?s[0]:t(s).join(`:`),m=c?p+`!`:p;return ne(f,m,d)},L=na(Xi,null),R=new Int32Array(Xi),z=0,ie=0,B=0,ae=0,oe=(e,t)=>{let n=0,r=0,i=0,a=Qi;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],$i))}if(B=n,ae=i,n===1||(z=a&1023,ie=a,R[z]!==a))return null;let o=L[z];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=>{L[z]=e,R[z]=ie},ce=new Int32Array,le=new Map,ue=new Map,de=0,fe=new Set,pe=new Set,me=e=>e.indexOf(`[`)===-1||fe.has(e)||pe.has(e)?!0:(fe.add(e),fe.size>2048&&(pe=fe,fe=new Set),!1),he=e=>{let t=k(e);if(D)return ce;let n=new Int32Array(2+t*6);n[0]=t,n[1]=+(O+t-1===e.length);for(let r=0;r<t;r++){let t=d[r],i=f[r],a=i-t,o=p[r],s=0,c=0,l=0,u=!1,C=o&h,T;for(;(T=_[C])!==null;){if(y[C<<2]===o&&T.length===a){let n=0;for(;n<a&&T.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===a){let e=C<<2;s=y[e+1],c=y[e+2],l=y[e+3],u=!0;break}}C=C+1&h}if(!u){let n=o&g,r;for(;(r=v[n])!==null;){if(b[n<<2]===o&&r.length===a){let i=0;for(;i<a&&r.charCodeAt(i)===e.charCodeAt(t+i);)i++;if(i===a){let e=n<<2;s=b[e+1],c=b[e+2],l=b[e+3],_[C]=r;let t=C<<2;y[t]=o,y[t+1]=s,y[t+2]=c,y[t+3]=l,S++,++x>m>>1&&w(),u=!0;break}}n=n+1&g}}if(!u){let n=ko(e,t,i),r=re(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=na(16,ce),_e=new Int32Array(16),ve=()=>{A.clear(),j.clear(),M.clear(),te.clear(),I=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=ra&&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[F[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=re(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[F[e]]=n}}if(!r&&!D&&e.length===O+t-1)return e;let i=oe(e,t);if(i!==null)return i;if(B===1){let t=d[ae],n=f[ae],r=E(e,t,n,p[ae]);return r===null?e.slice(t,n):r}let a=``;if(!D){let n=-1,r=0;for(let i=0;i<t;i++){let t=f[i];if(t<0)continue;let o=d[i];n===-1?n=o:o!==r+1&&(a&&(a+=` `),a+=e.slice(n,r),n=o),r=t}return n!==-1&&(a&&(a+=` `),a+=e.slice(n,r)),se(a),a}for(let n=0;n<t;n++){let t=f[n];t<0||(a&&(a+=` `),a+=e.slice(d[n],t))}return se(a),a};return{mergeClassList:ye,mergePreparedParts:(e,t,n)=>{if(N>16384&&ve(),t>_e.length){let e=_e.length;for(;e<t;)e*=2;_e=new Int32Array(e),ge=na(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[F[n]]=o;f[c]=i}c--}}if(!s&&i)return n;let m=oe(n,r);if(m!==null)return m;if(B===1)return n.slice(d[ae],f[ae]);let h=``,g=-1,_=0;for(let e=0;e<r;e++){let t=f[e];if(t<0)continue;let r=d[e];g===-1?g=r:r!==_+1&&(h&&(h+=` `),h+=n.slice(g,_),g=r),_=t}return g!==-1&&(h&&(h+=` `),h+=n.slice(g,_)),se(h),h}}},Mo=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},No=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Po(n))&&(i&&(i+=` `),i+=r);return i},Po=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++){let i=e[r];i&&(t=Po(i))&&(n&&(n+=` `),n+=t)}return n},Fo=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=qi,c=qi*2,l=8191,u=4096,d=new Uint8Array(Ji),f=new Uint8Array(Ji),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(No(...e));return E.mergeString=x,E.peekString=w,E.mergeParts2=S,E.mergeParts3=C,E.mergeParts=T,E},Io=e=>({themeGroupId:e}),Lo=Fo(()=>{let e=Io(`color`),t=Io(`font`),n=Io(`text`),r=Io(`font-weight`),i=Io(`tracking`),a=Io(`leading`),o=Io(`breakpoint`),s=Io(`container`),c=Io(`spacing`),l=Io(`radius`),u=Io(`shadow`),d=Io(`inset-shadow`),f=Io(`text-shadow`),p=Io(`drop-shadow`),m=Io(`blur`),h=Io(`perspective`),g=Io(`aspect`),_=Io(`ease`),v=Io(`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=()=>[wa,`full`,`auto`,...w()],E=()=>[Ta,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,Ta,W,U]},Ta,W,U],O=()=>[Ta,`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=()=>[wa,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[s,wa,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[wa,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,W,U],I=()=>[...b(),Ga,Ba,{position:[W,U]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Ka,Fa,{size:[W,U]}],re=()=>[Ea,Ua,Ia],L=()=>[``,`none`,`full`,l,W,U],R=()=>[``,H,Ua,Ia],z=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],B=()=>[H,Ea,Ga,Ba],ae=()=>[``,`none`,m,W,U],oe=()=>[`none`,H,W,U],se=()=>[`none`,H,W,U],ce=()=>[H,W,U],le=()=>[wa,`full`,...w()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Da],breakpoint:[Da],color:[Oa],container:[Da],"drop-shadow":[Da],ease:[`in`,`out`,`in-out`],font:[Na],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Da],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Da],shadow:[Da],spacing:[`px`,H],text:[Da],"text-shadow":[Da],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,wa,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[Pa],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:[Ta,`auto`,W,U]}],basis:[{basis:[wa,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,wa,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Ta,`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`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],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,Ua,Ia]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ya,Ra]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ea,U]}],"font-family":[{font:[Wa,za,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,La]}],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:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,Ia]}],"text-decoration-color":[{decoration:F()}],"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:[Ta,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:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ta,W,U],radial:[``,W,U],conic:[``,Ta,W,U]},qa,Va]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,Ua,Ia]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,Ja,Ha]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ja,Ha]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[H,Ia]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Ja,Ha]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":B()}],"mask-image-linear-to-pos":[{"mask-linear-to":B()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":B()}],"mask-image-t-to-pos":[{"mask-t-to":B()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":B()}],"mask-image-r-to-pos":[{"mask-r-to":B()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":B()}],"mask-image-b-to-pos":[{"mask-b-to":B()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":B()}],"mask-image-l-to-pos":[{"mask-l-to":B()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":B()}],"mask-image-x-to-pos":[{"mask-x-to":B()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":B()}],"mask-image-y-to-pos":[{"mask-y-to":B()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":B()}],"mask-image-radial-to-pos":[{"mask-radial-to":B()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":B()}],"mask-image-conic-to-pos":[{"mask-conic-to":B()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"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,Ja,Ha]}],"drop-shadow-color":[{"drop-shadow":F()}],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:[Ta,W,U]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"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`,...F()]}],"stroke-w":[{stroke:[H,Ua,Ia,La]}],stroke:[{stroke:[`none`,...F()]}],"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`]}}),Ro=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},zo=[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(Zi).fill(-1),u=na(Zi,``),d=na(Zi,zo),f=new Int32Array(Zi),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&&Ro(t),t),w=e=>{for(let t=0,n=e.length;t<n;t++){let n=e[t];n&&typeof n!=`string`&&(e[t]=ta(n))}return F(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,ta(n)):t(e):e?A(ta(e),n):n?t(typeof n==`string`?n:ta(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=ra?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?ee(e,n,ta(r)):A(e,n):n?ee(e,ta(n),r):r?typeof r==`string`?A(e,r):A(e,ta(r)):t(e):e?ee(ta(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)},ee=ra?(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,P=(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},F=(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 P(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:ta(e));if(n===2)return A(e,arguments[1]);if(n===3)return ee(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 F(o,!1)}})(Lo),Bo=({className:e,strokeWidth:t=4})=>F(`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:F(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[F(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[F(`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`}),F(`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`})]}),F(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[F(`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`}),F(`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`})]})]})}),Vo=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>F(b,{children:t&&n?F(`div`,{className:`relative size-full`,children:[F(`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:F(Bo,{className:`size-10 max-h-full max-w-full`})}),e]}):t?F(`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:F(Bo,{className:`size-10 max-h-full max-w-full`})}):e??F(b,{})});function Ho(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=Ho(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Uo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ho(e))&&(r&&(r+=` `),r+=t);return r}var Wo=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Go=Uo,Ko=(e,t)=>n=>{if(t?.variants==null)return Go(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=Wo(t)||Wo(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 Go(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)},qo=Ko(`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`}}),Jo=Ko(`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}}),K=({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?F(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:Jo({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:E,className:h}),...w,...x,children:F(`span`,{className:`flex min-w-0 grow items-center`,children:[F(`span`,{className:`flex flex-1 basis-0 justify-end`,children:F(Vo,{className:qo({size:t,className:G(`me-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),F(`span`,{className:`min-w-0 truncate whitespace-nowrap`,children:r}),F(`span`,{className:`flex-1 basis-0`,"aria-hidden":`true`})]})}):F(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:Jo({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:E,className:h}),...w,...x,children:[i&&!s&&F(i,{className:qo({size:t,className:G(!T&&`me-3`,o)}),"aria-hidden":`true`}),F(`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:F(Vo,{className:qo({size:t,className:G(!T&&`me-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&F(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&F(`span`,{className:`sr-only`,children:m}),a&&F(a,{className:qo({size:t,className:G(!T&&`ms-3`,o)}),"aria-hidden":`true`})]})};S();var Yo=({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 Xo=e=>(e.getAnimations?.()??[]).filter(e=>e.effect?.getComputedTiming().iterations!==1/0),Zo=e=>{let[t,n]=d(e),[r,i]=d(null);return e&&!t&&n(!0),m(()=>{if(e||!t)return;let i=r?Xo(r):[],a=!1;return Promise.allSettled(i.map(e=>e.finished)).then(()=>{a||n(!1)}),()=>{a=!0}},[e,t,r]),{isMounted:e||t,ref:i}},Qo=(e,t)=>{if(typeof e==`function`){let n=e(t);return typeof n==`function`?n:void 0}e&&(e.current=t)},$o=(...e)=>t=>{let n=e.map(e=>Qo(e,t));return()=>{e.forEach((e,t)=>{let r=n[t];r?r():Qo(e,null)})}},es=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join(`-`).toLowerCase();function ts(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:es(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ns=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},rs=e=>{let t=ns(e);return t.charAt(0).toUpperCase()+t.slice(1)},is=(...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(` `)},as={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 os(e){return e!=null}function ss(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??as.width,a=e.size??e.height??as.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?is(...c):is(`lucide`,...s,...c),u=t.strokeWidth??as[`stroke-width`];if(t.absoluteStrokeWidth){let n=Number(u)*Number(e.size??e.width??as.width)/Number(t.size??t.width??as.width);Number.isFinite(n)&&(u=n)}return[`svg`,{...Object.entries(as).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&os(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&os(t.width)&&{[r(`width`)]:t.width},...`height`in t&&os(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 cs(e,t={}){return ss(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ls=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 us=s({}),ds=()=>t(us);S();var fs=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=``}=ds()??{},b=!!l||ls(f),[x,S,C=[]]=cs(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:is(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 q(e,t=[],n=[]){let r=typeof e==`string`?ts(e,t,n):e,a=v(({className:e,...t},n)=>i(fs,{ref:n,icon:r,className:e,...t}));return r.name&&(a.displayName=rs(r.name)),a}var ps={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};ps.node;var ms=q(ps),hs={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};hs.node;var gs=q(hs),_s={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`}]]};_s.node;var vs=q(_s),ys={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};ys.node;var bs=q(ys),xs={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};xs.node;var Ss=q(xs),Cs={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Cs.node;var ws=q(Cs),Ts={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Ts.node;var Es=q(Ts),Ds={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Ds.node;var Os=q(Ds),ks={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`}]]};ks.node;var As=q(ks),js={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`]};js.node;var Ms=q(js),Ns={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`}]]};Ns.node;var Ps=q(Ns),Fs={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`}]]};Fs.node;var Is=q(Fs),Ls={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`}]]};Ls.node;var Rs=q(Ls),zs={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`}]]};zs.node;var Bs=q(zs),Vs={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`}]]};Vs.node;var Hs=q(Vs),Us={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`}]]};Us.node;var Ws=q(Us),Gs={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`}]]};Gs.node;var Ks=q(Gs),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 Js=q(qs),Ys={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`}]]};Ys.node;var Xs=q(Ys),Zs={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`}]]};Zs.node;var Qs=q(Zs),$s={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`}]]};$s.node;var ec=q($s),tc={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`}]]};tc.node;var nc=q(tc),rc={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};rc.node;var ic=q(rc),ac={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`}]]};ac.node;var oc=q(ac),sc={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`}]]};sc.node;var cc=q(sc),lc={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`}]]};lc.node;var uc=q(lc),dc={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};dc.node;var fc=q(dc),pc={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`}]]};pc.node;var mc=q(pc),hc={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`}]]};hc.node;var gc=q(hc),_c={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`}]]};_c.node;var vc=q(_c),yc={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`}]]};yc.node;var bc=q(yc),xc={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};xc.node;var Sc=q(xc),Cc={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`]};Cc.node;var wc=q(Cc),Tc={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`]};Tc.node;var Ec=q(Tc),Dc={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`]};Dc.node;var Oc=q(Dc),kc={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`}]]};kc.node;var Ac=q(kc),jc={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`}]]};jc.node;var Mc=q(jc),Nc={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`]};Nc.node;var Pc=q(Nc),Fc={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Fc.node;var Ic=q(Fc);S();var Lc=5e3,Rc=50,zc=10,Bc=s({duration:Lc,swipeThreshold:Rc,isPaused:!1,isExpanded:!1,setIsViewportActive:()=>{}}),Vc=s({close:()=>{}}),Hc=({children:e,duration:t=Lc,swipeThreshold:n=Rc})=>{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)}},[]),F(Bc.Provider,{value:{duration:t,swipeThreshold:n,isPaused:r||a,isExpanded:r,setIsViewportActive:i},children:e})},Uc=({className:e,onPointerEnter:n,onPointerLeave:r,onFocus:i,onBlur:a,...o})=>{let{isExpanded:s,setIsViewportActive:c}=t(Bc),l=u(!1),d=u(!1),f=()=>c(l.current||d.current);return F(`ol`,{"aria-label":`Notifications`,"aria-live":`polite`,"aria-relevant":`additions`,tabIndex:-1,"data-expanded":s||void 0,className:G(`fixed inset-x-4 top-4 z-100 [--toast-direction:1] sm:top-auto sm:bottom-4 sm:[--toast-direction:-1] md:inset-s-auto md:w-97`,e),onPointerEnter:e=>{n?.(e),l.current=!0,f()},onPointerLeave:e=>{r?.(e),l.current=!1,f()},onFocus:e=>{i?.(e),d.current=!0,f()},onBlur:e=>{a?.(e),d.current=e.currentTarget.contains(e.relatedTarget),f()},...o})},Wc=Ko(`group pointer-events-auto relative flex w-full cursor-grab 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-[transform,translate,scale,opacity,height] duration-400 ease-[cubic-bezier(0.22,1,0.36,1)] [corner-shape:squircle] *:transition-opacity hover:scale-102 data-collapsed:*:opacity-0 data-hidden:pointer-events-none data-hidden:opacity-0 data-[state=closed]:translate-x-full data-[state=closed]:opacity-0 data-[swipe=cancel]:translate-x-0 data-[swipe=move]:translate-x-(--toast-swipe-move-x) data-[swipe=move]:cursor-grabbing data-[swipe=move]:transition-none data-[swipe=move]:select-none supports-[corner-shape:squircle]:rounded-3xl motion-reduce:transition-none starting:translate-y-[calc(var(--toast-direction,1)*-100%)] starting:opacity-0`,{variants:{variant:{error:`bg-error/40 text-foreground`,success:`bg-success/30 text-foreground`,default:`bg-card/80 text-foreground`}},defaultVariants:{variant:`default`}}),Gc=({className:e,variant:n,open:r,defaultOpen:i=!0,onOpenChange:a,duration:o,stack:s,onHeightChange:c,ref:l,style:d,onKeyDown:f,onPointerDown:p,onPointerMove:h,onPointerUp:g,onPointerCancel:_,onClickCapture:v,...y})=>{let b=t(Bc),x=o??b.duration,[S,C]=Yo({value:r,defaultValue:i,onChange:a}),{isMounted:w,ref:T}=Zo(S),E=u(null),D=u(x),O=u(null),k=u(!1),A=()=>C(!1),j=!!s&&!b.isExpanded&&s.index>0,N=u(c);m(()=>{N.current=c});let ee=!!c;if(m(()=>{let e=E.current;if(!e||!ee||j)return;let t=()=>N.current?.(e.offsetHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[ee,j,w]),M(()=>{if(!S||b.isPaused||!Number.isFinite(x))return;let e=Date.now(),t=setTimeout(A,D.current);return()=>{clearTimeout(t),D.current-=Date.now()-e}},[S,b.isPaused,x]),!w)return null;let P=(e,t,n)=>{let r=E.current;r&&(r.setAttribute(`data-swipe`,e),t&&r.style.setProperty(t,`${n}px`))},I=e=>{p?.(e),e.button===0&&(O.current={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,deltaX:0,isSwiping:!1})},te=e=>{h?.(e);let t=O.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)<zc||!(Math.abs(n)>Math.abs(r)))return;t.isSwiping=!0,window.getSelection()?.removeAllRanges(),e.currentTarget.setPointerCapture?.(e.pointerId)}t.deltaX=Math.max(0,n),P(`move`,`--toast-swipe-move-x`,t.deltaX)},re=e=>{let t=O.current;O.current=null,t?.isSwiping&&(k.current=!0,t.deltaX>=b.swipeThreshold?(P(`end`),A()):P(`cancel`),e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},L=e=>{f?.(e),e.defaultPrevented||e.key!==`Escape`||(e.preventDefault(),A())};return F(Vc.Provider,{value:{close:A},children:F(`li`,{ref:$o(l,E,T),"aria-atomic":!0,"data-state":S?`open`:`closed`,"data-collapsed":j||void 0,"data-hidden":s&&s.index>=3||void 0,className:G(Wc({variant:n}),s&&`absolute inset-x-0 top-0 origin-bottom sm:top-auto sm:bottom-0 sm:origin-top`,e),style:s?{...(e=>({transform:`translateY(calc(var(--toast-direction, 1) * ${b.isExpanded?e.expandedOffset:e.index*14}px)) scale(${b.isExpanded?1:1-e.index*ne})`,height:j?e.frontHeight:void 0,zIndex:Math.max(0,2*(3-e.index))+ +!S}))(s),...d}:d,onKeyDown:L,onPointerDown:I,onPointerMove:te,onPointerUp:e=>{g?.(e),re(e)},onPointerCancel:e=>{_?.(e),re(e)},onClickCapture:e=>{v?.(e),k.current&&(k.current=!1,e.preventDefault(),e.stopPropagation())},...y})})},Kc=({className:e,onClick:n,...r})=>{let{close:i}=t(Vc);return F(`button`,{type:`button`,"aria-label":`Close`,className:G(`absolute inset-e-1 top-1 cursor-pointer 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:F(Ic,{className:`size-5`})})},qc=(e,t,n)=>{let r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),i=document.createRange();for(let e=r.nextNode();e;e=r.nextNode()){i.selectNodeContents(e);for(let e of i.getClientRects?.()??[])if(t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)return!0}return!1},Jc=(e,t)=>{t?.(e),qc(e.currentTarget,e.clientX,e.clientY)&&e.stopPropagation()},Yc=({className:e,onPointerDown:t,...n})=>F(`div`,{className:G(`cursor-auto text-sm font-semibold wrap-break-word select-text [&+div]:text-xs`,e),onPointerDown:e=>Jc(e,t),...n}),Xc=({className:e,onPointerDown:t,...n})=>F(`div`,{className:G(`max-h-60 cursor-auto overflow-y-auto text-sm wrap-break-word opacity-90 select-text`,e),onPointerDown:e=>Jc(e,t),...n});S();var Zc=()=>{let{toasts:e}=de(),[t,n]=d({}),r=(e,t)=>n(n=>n[e]===t?n:{...n,[e]:t}),{positions:i,collapsedHeight:a,expandedHeight:o}=re(e,t);return F(Hc,{children:F(Uc,{className:`h-(--toast-collapsed-height) transition-[height] duration-400 ease-[cubic-bezier(0.22,1,0.36,1)] data-expanded:h-(--toast-expanded-height) motion-reduce:transition-none`,style:{"--toast-collapsed-height":`${a}px`,"--toast-expanded-height":`${o}px`},children:e.map(({id:e,title:t,description:n,action:a,...o})=>F(Gc,{...o,stack:i[e],onHeightChange:t=>r(e,t),children:[F(`div`,{className:`grid gap-1`,children:[t&&F(Yc,{children:t}),n&&F(Xc,{children:n})]}),a,F(Kc,{})]},e))})})};S();var Qc=s({});S();function $c(e){let t=u(null);return t.current===null&&(t.current=e()),t.current}var el=typeof window<`u`;S();var tl=el?m:M;S();var nl=s(null);function rl(e,t){e.indexOf(t)===-1&&e.push(t)}function il(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var al=(e,t,n)=>n>t?t:n<e?e:n,ol={},sl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),cl=e=>typeof e==`object`&&!!e,ll=e=>/^0[^.\s]+$/u.test(e);function ul(e){let t;return()=>(t===void 0&&(t=e()),t)}var dl=e=>e,fl=(...e)=>e.reduce((e,t)=>n=>t(e(n))),pl=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ml=class{constructor(){this.subscriptions=[]}add(e){return rl(this.subscriptions,e),()=>this.remove(e)}remove(e){il(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}},hl=e=>e*1e3,gl=e=>e/1e3,_l=(e,t)=>t?1e3/t*e:0,vl=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function yl(e,t,n,r){return e===t&&n===r?dl:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=vl(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(vl(s+1e-7,e,n)-i-r)}return vl(s,t,r)}}var bl=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xl=e=>t=>1-e(1-t),Sl=yl(.33,1.53,.69,.99),Cl=xl(Sl),wl=bl(Cl),Tl=e=>e>=1?1:(e*=2)<1?.5*Cl(e):.5*(2-2**(-10*(e-1))),El=e=>1-Math.sin(Math.acos(e)),Dl=xl(El),Ol=bl(El),kl=yl(.42,0,1,1),Al=yl(0,0,.58,1),jl=yl(.42,0,.58,1),Ml=e=>Array.isArray(e)&&typeof e[0]!=`number`,Nl=e=>Array.isArray(e)&&typeof e[0]==`number`,Pl={linear:dl,easeIn:kl,easeInOut:jl,easeOut:Al,circIn:El,circInOut:Ol,circOut:Dl,backIn:Cl,backInOut:wl,backOut:Sl,anticipate:Tl},Fl=e=>typeof e==`string`,Il=e=>{if(Nl(e)){let[t,n,r,i]=e;return yl(t,n,r,i)}return Fl(e)?Pl[e]:e},Ll={delta:0,timestamp:0,isProcessing:!1},Rl;function zl(){Rl=void 0}var Bl={now:()=>(Rl===void 0&&Bl.set(Ll.isProcessing||ol.useManualTiming?Ll.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(zl)}},Vl=e=>Math.round(e*1e5)/1e5,Hl=e=>t=>typeof t==`string`&&t.startsWith(e),Ul=Hl(`--`),Wl=Hl(`var(--`),Gl=e=>Wl(e)?Kl.test(e.split(`/*`)[0].trim()):!1,Kl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ql(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Jl={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Yl={...Jl,transform:e=>al(0,1,e)},Xl={...Jl,default:1},Zl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ql(e){return e==null}var $l=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eu=(e,t)=>n=>!!(typeof n==`string`&&$l.test(n)&&n.startsWith(e)||t&&!Ql(n)&&Object.prototype.hasOwnProperty.call(n,t)),tu=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Zl);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},nu=e=>al(0,255,e),ru={...Jl,transform:e=>Math.round(nu(e))},iu={test:eu(`rgb`,`red`),parse:tu(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ru.transform(e)+`, `+ru.transform(t)+`, `+ru.transform(n)+`, `+Vl(Yl.transform(r))+`)`},au=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function ou(e){let t=e.length>5?2:1,n=au(e,3,t);return{red:parseInt(au(e,0,t),16),green:parseInt(au(e,1,t),16),blue:parseInt(au(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var su={test:eu(`#`),parse:ou,transform:iu.transform},cu=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),lu=cu(`deg`),uu=cu(`%`),J=cu(`px`),du=cu(`vh`),fu=cu(`vw`),pu={...uu,parse:e=>uu.parse(e)/100,transform:e=>uu.transform(e*100)},mu={test:eu(`hsl`,`hue`),parse:tu(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+uu.transform(Vl(t))+`, `+uu.transform(Vl(n))+`, `+Vl(Yl.transform(r))+`)`},hu={test:e=>iu.test(e)||su.test(e)||mu.test(e),parse:e=>iu.test(e)?iu.parse(e):mu.test(e)?mu.parse(e):su.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?iu.transform(e):mu.transform(e),getAnimatableNone:e=>{let t=hu.parse(e);return t.alpha=0,hu.transform(t)}},gu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,_u=new RegExp(Zl.source),vu=new RegExp(gu.source,`i`);function yu(e){return isNaN(e)&&typeof e==`string`&&(_u.test(e)||vu.test(e))}var bu=`number`,xu=`color`,Su=`var`,Cu=`var(`,wu="${}",Tu=/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 Eu(e){let t=e.toString();return _u.test(t)||vu.test(t)}function Du(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Tu,e=>(hu.test(e)?(r.color.push(a),i.push(xu),n.push(hu.parse(e))):e.startsWith(Cu)?(r.var.push(a),i.push(Su),n.push(e)):(r.number.push(a),i.push(bu),n.push(parseFloat(e))),++a,wu)).split(wu),indexes:r,types:i}}function Ou(e){return Du(e).values}function ku({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===bu?Vl(r[a]):e===xu?hu.transform(r[a]):r[a]}return i}}function Au(e){return ku(Du(e))}var ju=e=>typeof e==`number`?0:hu.test(e)?hu.getAnimatableNone(e):e,Mu=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ju(e);function Nu(e){let t=Du(e);return ku(t)(t.values.map((e,n)=>Mu(e,t.split[n])))}var Pu={test:yu,parse:Ou,createTransformer:Au,getAnimatableNone:Nu};function Fu(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 Iu({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=Fu(s,r,e+1/3),a=Fu(s,r,e),o=Fu(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Lu(e,t){return n=>n>0?t:e}var Ru=(e,t,n)=>e+(t-e)*n,zu=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Bu=[su,iu,mu],Vu=e=>Bu.find(t=>t.test(e));function Hu(e){let t=Vu(e);if(!t)return!1;let n=t.parse(e);return t===mu&&(n=Iu(n)),n}var Uu=(e,t)=>{let n=Hu(e),r=Hu(t);if(!n||!r)return Lu(e,t);let i={...n};return e=>(i.red=zu(n.red,r.red,e),i.green=zu(n.green,r.green,e),i.blue=zu(n.blue,r.blue,e),i.alpha=Ru(n.alpha,r.alpha,e),iu.transform(i))},Wu=new Set([`none`,`hidden`]);function Gu(e,t){return Wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ku(e,t){return n=>Ru(e,t,n)}function qu(e){return typeof e==`number`?Ku:typeof e==`string`?Gl(e)?Lu:hu.test(e)?Uu:Zu:Array.isArray(e)?Ju:typeof e==`object`?hu.test(e)?Uu:Yu:Lu}function Ju(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>qu(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Yu(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qu(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Xu(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 Zu=(e,t)=>{let n=Du(e),r=Du(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?Wu.has(e)&&!r.values.length||Wu.has(t)&&!n.values.length?Gu(e,t):fl(Ju(Xu(n,r),r.values),ku(r)):Lu(e,t)},Qu=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function $u(e,t){let n=Qu.exec(e);if(!n)return;let r=Qu.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Vl(Ru(a,o,e))+i}function ed(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Ru(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=$u(e,t);if(n)return n}return qu(e)(e,t)}var td=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function nd(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 rd=40;function id(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=td.reduce((e,t)=>(e[t]=nd(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ol.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,rd),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:td.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<td.length;t++)o[td[t]].cancel(e)},state:n,steps:o}}var{schedule:ad,cancel:od,steps:sd}=id(typeof requestAnimationFrame<`u`?requestAnimationFrame:dl,!0,Ll),cd=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ad.update(t,e),stop:()=>od(t),now:()=>Ll.isProcessing?Ll.timestamp:Bl.now()}},ld=(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)})`},ud=2e4;function dd(e,t=50,n=ud,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 fd(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(dd(o),ud);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:gl(s)}}var pd=100,md=10,hd=1,gd=800,_d=.3,vd=.3,yd=.01,bd=2,xd=.005,Sd=.5,Cd=.01,wd=10,Td=.05,Ed=e=>e<0?1/Math.max(1+e,Td):Math.max(1-e,Td);function Dd(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 Ad(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Od(e,t){return e*Math.sqrt(1-t*t)}var kd=12;function Ad(e,t,n){let r=n;for(let n=1;n<kd;n++)r-=e(r)/t(r);return r}var jd=.001;function Md({duration:e=gd,bounce:t=_d}){let n,r,i=Ed(t);e=al(Cd,wd,gl(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Od(t,i),o=Math.exp(-r);return jd-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Od(t*t,i);return(-n(t)+jd>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=Ad(n,r,a),s=o*Dd(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:hl(e)}}var Nd=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Pd(e,t){if(Nd(e,t))return e}function Fd(e){let t=Pd(e.stiffness),n=Pd(e.damping,!0),r=Pd(e.mass),i={...e,stiffness:t??pd,damping:n??md,mass:r??hd,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Ed(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Dd(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Md(i)),i.isResolvedFromDuration=!0;Nd(i.stiffness)&&Nd(i.damping,!0)||(i.stiffness=pd,i.damping=md)}return i}function Id(e=vd,t=_d){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}=Fd({...n}),f=e=>u?0:-gl(e),p=s/(2*Math.sqrt(o*c)),m=gl(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?yd:bd),g.restDelta=n.restDelta||(e?xd:Sd)};_();let v,y,b;if(p<1){let e=Od(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=>hl(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=hl(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(dd(S),ud),t=ld(t=>S.next(e*t).value,e,30);return e+`ms `+t}};return S}var Ld=Object.assign(Id,{applyToOptions:e=>{let t=fd(e,100,Id);return e.ease=t.ease,e.duration=hl(t.duration),e.type=`keyframes`,e}});function Rd({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=Ld({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 zd(e,t,n){let r=[],i=ol.mix||ed,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=fl(Array.isArray(t)?t[o]||dl:t,a)),r.push(a)}return r}function Bd(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=zd(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=pl(e[r],e[r+1],n);return s[r](i)};return n?t=>l(al(e[0],e[a-1],t)):l}function Vd(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=pl(0,t,r);e.push(Ru(n,1,i))}}function Hd(e){let t=[0];return Vd(t,e.length-1),t}function Ud(e,t){return e.map(e=>e*t)}function Wd(e,t){return e.map(()=>t||jl).splice(0,e.length-1)}function Gd({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=Ml(r)?r.map(Il):Il(r)||jl,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:Hd(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=(ol.mix||ed)(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=Bd(Ud(n&&n.length===t.length?n:Hd(t),e),t,{ease:Array.isArray(o)?o:Wd(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}var Kd=5;function qd(e,t,n){let r=Math.max(t-Kd,0);return _l(n-e(r),t-r)}function Jd(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):qd(t=>e.next(t).value,t,e.next(t).value)}function Yd(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 Xd={decay:Rd,inertia:Rd,tween:Gd,keyframes:Gd,spring:Ld};function Zd(e){typeof e.type==`string`&&(e.type=Xd[e.type])}var Qd=40,$d=(e,t)=>t-e>Qd&&!ol.useManualTiming?t:e;function ef(e,t){return{kind:e,animation:t,timestamp:Bl.now(),frameTimestamp:Ll.timestamp,frameIsProcessing:Ll.isProcessing}}function tf(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...ef(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function nf(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...ef(`layout-animation-start`,e),node:t})}catch{}}var rf=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)}},af=e=>e/100,of=e=>Math.round(e*1e4)/1e4,sf=class extends rf{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=Bl.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(),tf(this,this.options)}initAnimation(){let{options:e}=this;Zd(e);let{type:t=Gd,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Gd;this.mixKeyframes=void 0,s!==Gd&&typeof o[0]!=`number`&&(this.mixKeyframes=fl(af,e.mixer?.(o[0],o[1])||ed(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=dd(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=$d(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!==Rd&&(f.value=Yd(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??of((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!==Rd?Yd(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=al(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 gl(this.calculatedDuration)}get iterationDuration(){return this.duration+gl(this.options.delay??0)}get time(){return gl(this.currentTime)}set time(e){this.state===`finished`&&this.updateFinished(),e=hl(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 Jd(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(Bl.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=gl(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=cd,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(Bl.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)}},cf=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function lf(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Zl)||[];if(!r)return e;let i=n.replace(r,``),a=+!!cf.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var uf=/\b([a-z-]*)\(.*?\)/gu,df={...Pu,getAnimatableNone:e=>{let t=e.match(uf);return t?t.map(lf).join(` `):e}},ff={...Pu,getAnimatableNone:e=>{let t=Pu.parse(e);return Pu.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},pf={...Jl,transform:Math.round},mf={rotate:lu,pathRotation:lu,rotateX:lu,rotateY:lu,rotateZ:lu,scale:Xl,scaleX:Xl,scaleY:Xl,scaleZ:Xl,skew:lu,skewX:lu,skewY:lu,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:Yl,originX:pu,originY:pu,originZ:J},hf={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,top:J,right:J,bottom:J,left:J,inset:J,insetBlock:J,insetBlockStart:J,insetBlockEnd:J,insetInline:J,insetInlineStart:J,insetInlineEnd:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,paddingBlock:J,paddingBlockStart:J,paddingBlockEnd:J,paddingInline:J,paddingInlineStart:J,paddingInlineEnd:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,marginBlock:J,marginBlockStart:J,marginBlockEnd:J,marginInline:J,marginInlineStart:J,marginInlineEnd:J,fontSize:J,backgroundPositionX:J,backgroundPositionY:J,...mf,zIndex:pf,fillOpacity:Yl,strokeOpacity:Yl,numOctaves:pf},gf={...hf,color:hu,backgroundColor:hu,outlineColor:hu,fill:hu,stroke:hu,borderColor:hu,borderTopColor:hu,borderRightColor:hu,borderBottomColor:hu,borderLeftColor:hu,filter:df,WebkitFilter:df,mask:ff,WebkitMask:ff},_f=e=>gf[e],vf=new Set([df,ff]),yf,bf,xf;function Sf(e,t){if(e===yf&&t===bf)return xf;let n=_f(e);return vf.has(n)||(n=Pu),xf=n.getAnimatableNone?n.getAnimatableNone(t):void 0,yf=e,bf=t,xf}function Cf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var wf=e=>e*180/Math.PI,Tf=e=>Df(wf(Math.atan2(e[1],e[0]))),Ef={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:Tf,rotateZ:Tf,skewX:e=>wf(Math.atan(e[1])),skewY:e=>wf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Df=e=>(e%=360,e<0&&(e+=360),e),Of=Tf,kf=e=>Math.hypot(e[0],e[1]),Af=e=>Math.hypot(e[4],e[5]),jf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kf,scaleY:Af,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(kf(e)+Af(e))/2,rotateX:e=>Df(wf(Math.atan2(e[6],e[5]))),rotateY:e=>Df(wf(Math.atan2(-e[2],e[0]))),rotateZ:Of,rotate:Of,skewX:e=>wf(Math.atan(e[4])),skewY:e=>wf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Mf(e){return+!!e.includes(`scale`)}function Nf(e,t){if(!e||e===`none`)return Mf(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return Mf(t);let r=(n[1]?jf:Ef)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var Pf=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Nf(n,t)},Ff=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],If=new Set([...Ff,`pathRotation`]),Lf=e=>e===Jl||e===J,Rf=new Set([`x`,`y`,`z`]),zf=Ff.filter(e=>!Rf.has(e));function Bf(e){let t=[];return zf.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 Vf=new Set([`bottom`,`right`]);function Hf(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 Uf=({transform:e})=>Nf(e,`x`),Wf=({transform:e})=>Nf(e,`y`),Gf={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Hf(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Hf(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:Uf,y:Wf,translateX:Uf,translateY:Wf},Kf=new Set,qf=!1,Jf=!1,Yf=!1;function Xf(){if(Jf){let e=[],t=new Set,n=new Set;Kf.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Vf.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Bf(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)})}Jf=!1,qf=!1,Kf.forEach(e=>e.complete(Yf)),Kf.clear()}function Zf(){Kf.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Jf=!0)})}function Qf(){Yf=!0,Zf(),Xf(),Yf=!1}function $f(e,t,n){if(typeof e==`string`){if(sl(e)||ll(e))return parseFloat(e);if(!Pu.test(e)&&Pu.test(n))return Sf(t,n)}return e??void 0}var ep=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?(Kf.add(this),qf||(qf=!0,ad.read(Zf),ad.resolveKeyframes(Xf))):(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=$f(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])}Cf(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Kf.delete(this)}cancel(){this.state===`scheduled`&&(Kf.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},tp=e=>e.startsWith(`--`);function np(e,t,n){tp(t)?e.style.setProperty(t,n):e.style[t]=n}var rp={};function ip(e,t){let n=ul(e);return()=>rp[t]??n()}var ap=ip(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),op=ip(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),sp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cp={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:sp([0,.65,.55,1]),circOut:sp([.55,0,1,.45]),backIn:sp([.31,.01,.66,-.59]),backOut:sp([.33,1.53,.69,.99])};function lp(e,t){if(e)return typeof e==`function`?op()?ld(e,t):`ease-out`:Nl(e)?sp(e):Array.isArray(e)?e.map(e=>lp(e,t)||cp.easeOut):cp[e]}function up(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=lp(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 dp(e){return typeof e==`function`&&`applyToOptions`in e}function fp({type:e,...t}){return dp(e)&&op()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var pp=class extends rf{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=fp(e);this.animation=up(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=Yd(r,this.options,o,this.speed);this.updateMotionValue?.(e),np(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},tf(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 gl(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+gl(e)}get time(){return gl(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hl(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&&ap()?(this.animation.timeline=e,t?.(this.animation),dl):n(this)}},mp={anticipate:Tl,backInOut:wl,circInOut:Ol};function hp(e){return e in mp}function gp(e){typeof e.ease==`string`&&hp(e.ease)&&(e.ease=mp[e.ease])}var _p=class extends pp{constructor(e){gp(e),Zd(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Bl.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 sf({...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?al(0,10,a):0,s=this.sample(a);n&&r&&np(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},vp=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Pu.test(e)||e===`0`)&&!e.startsWith(`url(`));function yp(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 bp(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=vp(i,t),s=vp(a,t);return!o||!s?!1:yp(e)||(n===`spring`||dp(n))&&r}function xp(e){e.duration=0,e.type=`keyframes`}var Sp=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Cp=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function wp(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Cp.test(e[t]))return!0;return!1}var Tp=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),Ep=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Dp=()=>!ol.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function Op(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Sp.has(n)||Ep.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 Dp()&&(Sp.has(n)||Ep.has(n)&&wp(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!Tp(e)}var kp=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Ap={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},jp=Ff.length,Mp={},Np=(e,t,n=kp(t,mf[e]))=>(Mp[e]||(Mp[e]=(Ap[e]||e)+`(`))+n+`)`,Pp=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function Fp(e,t,n){let r=``;for(let i=0;i<jp;i++){let a=Ff[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=kp(o,hf[a]));Pp(a,o)||(r+=Np(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Np(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Ip=new WeakMap,Lp=200,Rp=.001,zp=.1,Bp=.001,Vp=100,Hp=100,Up=new Set([`linear`,`easeIn`,`easeOut`,`easeInOut`]),Wp=e=>Up.has(e),Gp=new WeakMap,Kp=(e,t)=>{let n=Gp.get(e);return n?.[0]!==t&&(n=[t,`linear(`+Hd(Array(t+1)).map(t=>of(e(t))+` `+of(t*100)+`%`)+`)`],Gp.set(e,n)),n[1]},qp=(e,t)=>Math.min(Lp,Math.max(2,Math.ceil((t-e)/10))),Jp=(e,t)=>Math.abs(e-t)<=Rp,Yp=(e,t)=>e-t,Xp=(e,t,n)=>Hd(Array(n+1)).map(n=>Ru(e,t,n)),Zp=e=>e.motionValue.owner,Qp=e=>Ip.get(e),$p=({state:e})=>e===`idle`||e===`finished`,em=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),tm=({name:e,motionValue:t})=>e&&Ff.includes(e)&&t?.owner?.current instanceof HTMLElement&&Dp()&&op();function nm(e){let t=Zp(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(em(t,`transform`)||`none`)===`none`&&!em(t,`pathRotation`)&&!t.projection?.isProjecting()&&!Tp(e)}var rm=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!==cd?this.js.now():Ll.isProcessing?Ll.timestamp:Bl.now()}start(e=!0){let t=Qp(this.element);!t||t.isJS?this.js.start(e):t.schedule(!1,!e)}stopJS(){this.driver?.stop()}stop(){this.stopJS();let e=Qp(this.element);e&&!e.isFinishing&&e.release(this.animation)}},im,am=class extends sf{constructor(e){let t=Zp(e).current,{driver:n=cd}=e,r,i=nm(e);e.driver=e=>new rm(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=Hd(e)),this.cachedOffsets)}get group(){return Qp(Zp(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(Bl.now()):void 0}tween(){let{keyframes:e,type:t,repeat:n,delay:r=0}=this.options,i=-1;if(n||t!==Gd||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;Ml(a)&&(a=a[i]);let o=this.offsets(),s=e=>this.startTime+(r+o[e]*this.totalDuration)/this.speed;if(i>=0){let e=Nl(a)?sp(a):Wp(a)?cp[a]:Il(a);return[s(i),s(i+1),typeof e==`string`||Jp(e(0),0)&&Jp(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||Gd)===Gd?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=Bl.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||cm(Zp(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(Bl.now())}get time(){return this.isAccelerated()?gl(al(0,this.totalDuration,this.at(Bl.now())-(this.options.delay||0))):super.time}set time(e){(im??=Object.getOwnPropertyDescriptor(sf.prototype,`time`).set).call(this,e)}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}},om,sm=e=>{om||queueMicrotask(()=>{let e=om;om=void 0,e.forEach(e=>e())}),(om||=[]).push(e)};function cm(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?Ff:a){let a=r.get(s),c=t===void 0?em(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&&Pp(r,i)||(n+=Np(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=Bl.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)),P.schedule(!1)}),e.oncancel=()=>s.includes(r)&&P.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=qp(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(!Jp(i,a))return}}let o=Xp(t,n,i).concat(r).sort(Yp),s=e=>pl(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)*Rp>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)=>!Jp(e,a&&c[t])))return}if(!c||c.every((e,t)=>Jp(e,s(o[t]))))return`linear`;let u=[],d=(e,t=l(e))=>u.push(of(t)+` `+of(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`)?Bp:zp))),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?Xp(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(Yp))e>d&&l(d,e,0),d=e;return i.sort(Yp)},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=>pl(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=Bl.now()+e;t<m&&(clearTimeout(p),m=t,p=setTimeout(()=>{m=1/0,P.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=Ff.filter(t=>{if(r.has(t))return!0;let n=i[t]=em(e,t);return n!==void 0&&!Pp(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>Hp)return d.forEach(e=>e.sync()),A(h=n-t-Hp),!0;e=typeof i==`string`?i:i?Kp(i,qp(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,Qp(t)===P&&Ip.delete(t),P.isJS||S(),!0),ee=()=>{let t=Bl.now();if(P.isJS||(P.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]=em(e,n.name),o.has(n)||(c=!0))}),P.isFinishing=!1),l=!1,u||(n.forEach(e=>$p(e)&&n.delete(e)),N()))return;for(let e of n)if(!e.canAccelerate)return P.demote(!0);P.isJS&&(P.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<Vp)return P.demote();f=t}if(!j(t))return P.demote()}else if(h!==void 0&&!a)return;n.forEach(e=>e.timing()[0]===1/0&&e.sync())},P={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,Ll.isProcessing?ad.render(ee,!1,!0):sm(ee)))},release(e){$p(e)&&n.delete(e),N()||P.schedule(!0)},check(){if(!P.isJS){for(let t in i)if(em(e,t)!==i[t]&&!g(t))return P.schedule(!0,!0)}},demote(e){if(!(P.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),P.isJS=!0,o=new Map,S(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return Ip.set(t,P),P}var lm=class extends rf{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Bl.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||ep;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=Bl.now();let u=bp(e,i,a,o);u||((ol.instantAnimations||!s)&&l?.(Yd(e,n,t)),e[0]=e[e.length-1],xp(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Op(n),p=!f&&tm(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=$d(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new _p(n)}catch{m=new sf(n)}}else m=p?new am(n):new sf(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(),Qf()),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 um(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 dm=30,fm=e=>!isNaN(parseFloat(e)),pm={current:void 0},mm=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Bl.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=Bl.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=fm(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 ml)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new ml,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(){ad.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=Bl.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(){pm.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=Bl.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>dm)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,dm);return _l(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 hm(e,t){return new mm(e,t)}function gm(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function _m(e,t){let n=e?.[t]??e?.default??e;return n===e?n:gm(n,e)}var vm={type:`spring`,stiffness:500,damping:25,restSpeed:10},ym=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bm={type:`keyframes`,duration:.8},xm={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Sm=(e,{keyframes:t})=>t.length>2?bm:If.has(e)?e.startsWith(`scale`)?ym(t[1]):vm:xm,Cm=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function wm(e){for(let t in e)if(!Cm.has(t))return!0;return!1}var Tm=(e,t,n,r={},i,a)=>o=>{let s=_m(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=hl(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};wm(s)||Object.assign(u,Sm(e,u)),u.duration&&=hl(u.duration),u.repeatDelay&&=hl(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(xp(u),u.delay===0&&(d=!0)),(ol.instantAnimations||ol.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,xp(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Yd(u.keyframes,s);if(e!==void 0){ad.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new sf(u):new lm(u)},Em=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Dm(e){let t=Em.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Om(e,t,n=1){let[r,i]=Dm(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return sl(e)?parseFloat(e):e}return Gl(i)?Om(i,t,n+1):i}function km(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Am(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...km(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function jm(e,t,n){return Am(e.getProps(),t,n,e)}var Mm=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Nm=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Ff]),Pm=e=>Array.isArray(e);function Fm(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,hm(n))}function Im(e){return Pm(e)?e[e.length-1]||0:e}function Lm(e,t){let{transitionEnd:n={},transition:r={},...i}=jm(e,t)||{};i={...i,...n};for(let t in i)Fm(e,t,Im(i[t]))}var Rm=e=>!!(e&&e.getVelocity);function zm(e){return!!(Rm(e)&&e.add)}function Bm(e,t){let n=e.getValue(`willChange`);if(zm(n))return n.add(t);if(!n&&ol.WillChange){let n=new ol.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var Vm=`data-framer-appear-id`;function Hm(e){return e.props[Vm]}var Um=typeof window<`u`;function Wm({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Gm(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?gm(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&&Wm(f,t))continue;let o={delay:n,..._m(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){ad.update(()=>r.set(i));continue}let p=!1;if(Um&&window.MotionHandoffAnimation){let n=Hm(e);if(n){let e=window.MotionHandoffAnimation(n,t,ad);e!==null&&(o.startTime=e,p=!0)}}Bm(e,t);let m=l??e.shouldReduceMotion;r.run(Tm(t,r,i,m&&Nm.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>ad.update(()=>{o&&Lm(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Km(e,t,n={}){let r=jm(e,t,Mm(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Gm(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(Km(e,t,{...n,delay:r+(typeof o==`function`?0:o)+um(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 qm(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Km(e,t,n))):typeof t==`string`?Km(e,t,n):Promise.all(Gm(e,jm(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Jm={test:e=>e===`auto`,parse:e=>e},Ym=e=>t=>t.test(e),Xm=[Jl,J,uu,lu,fu,du,Jm],Zm=e=>Xm.find(Ym(e));function Qm(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||ll(e)}var $m=new Set([`auto`,`none`,`0`]);function eh(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!$m.has(t)&&Eu(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Sf(n,i))}var th=class extends ep{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(ql(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(),Gl(r))){let i=Om(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Nm.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=Zm(r),o=Zm(i);if(ql(r)!==ql(i)&&Gf[n])this.needsMeasurement=!0;else if(a!==o){if(Lf(a)&&Lf(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Gf[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Qm(e[t]))&&n.push(t);n.length&&eh(e,n,t)}measure(){let{element:e,name:t}=this;return Gf[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()}},nh=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function rh(e){return cl(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function ih(e){return cl(e)&&`ownerSVGElement`in e}var ah={};function oh(e){return ah.current?.add(e),e}var sh=e=>ah.current?ah.current.bind(e):e;function ch(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:ah.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function lh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function uh(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(If.has(e))o=!0;else if(Ul(e))i[e]=n;else{let t=kp(n,hf[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Fp(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 dh={offset:`stroke-dashoffset`,array:`stroke-dasharray`},fh={offset:`strokeDashoffset`,array:`strokeDasharray`};function ph(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?dh:fh;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var mh=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function hh(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(uh(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 mh)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&&ph(d,i,a,o,!1)}function gh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function _h({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vh(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 yh(e){return e===void 0||e===1}function bh({scale:e,scaleX:t,scaleY:n}){return!yh(e)||!yh(t)||!yh(n)}var xh=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function Sh(e){return bh(e)||wh(e)||Ch(e)}function Ch(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function wh(e){return Th(e.x)||Th(e.y)}function Th(e){return e&&e!==`0%`}function Eh(e,t,n){return n+t*(e-n)}function Dh(e,t,n,r,i){return i!==void 0&&(e=Eh(e,i,r)),Eh(e,n,r)+t}function Oh(e,t=0,n=1,r,i){e.min=Dh(e.min,t,n,r,i),e.max=Dh(e.max,t,n,r,i)}function kh(e,{x:t,y:n}){Oh(e.x,t.translate,t.scale,t.originPoint),Oh(e.y,n.translate,n.scale,n.originPoint)}var Ah=.999999999999,jh=1.0000000000001;function Mh(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&&(Nh(e.x,-a.scroll.offset.x),Nh(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,kh(e,o)),r&&(r.path?.[s]||r)!==a&&Sh(a.latestValues)&&Ih(e,a.latestValues,a.layout?.layoutBox));t.x<jh&&t.x>Ah&&(t.x=1),t.y<jh&&t.y>Ah&&(t.y=1)}function Nh(e,t){e.min+=t,e.max+=t}function Ph(e,t,n,r,i=.5){Oh(e,t,n,Ru(e.min,e.max,i),r)}function Fh(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Ih(e,t,n){let r=n??e;Ph(e.x,Fh(t.x,r.x),t.scaleX,t.scale,t.originX),Ph(e.y,Fh(t.y,r.y),t.scaleY,t.scale,t.originY)}function Lh(e,t){return gh(vh(e.getBoundingClientRect(),t))}function Rh(e,t,n){let r=Lh(e,n),{scroll:i}=t;return i&&(Nh(r.x,i.offset.x),Nh(r.y,i.offset.y)),r}var zh=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:Bh,cancel:Vh}=id(queueMicrotask,!1);function Hh(e,t,n){let r=Rm(e)?e:hm(e);return r.run(Tm(``,r,t,n)),r.animation}var Uh={},Wh={value:null,addProjectionMetrics:null,countProjection:void 0};function Gh(e,t){let n=Bl.now();e=sh(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(od(r),e(a-t))};return ad.setup(r,!0),oh(()=>od(r))}function Kh(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function qh(e){return ih(e)&&e.tagName===`svg`}function Jh(e){return Rm(e)?e.get():e}var Yh=e=>typeof e==`number`?e:parseFloat(e),Xh=nh.length,Zh=e=>typeof e==`number`||J.test(e);function Qh(e,t,n,r,i,a){i?(e.opacity=Ru(0,n.opacity??1,eg(r)),e.opacityExit=Ru(t.opacity??1,0,tg(r))):a&&(e.opacity=Ru(t.opacity??1,n.opacity??1,r));for(let i=0;i<Xh;i++){let a=nh[i],o=$h(t,a),s=$h(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Zh(o)===Zh(s)?(e[a]=Math.max(Ru(Yh(o),Yh(s),r),0),(uu.test(s)||uu.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<xh.length;i++){let a=xh[i];(t[a]||n[a])&&(e[a]=Ru(t[a]||0,n[a]||0,r))}}function $h(e,t){return e[t]===void 0?e.borderRadius:e[t]}var eg=ng(0,.5,Dl),tg=ng(.5,.95,dl);function ng(e,t,n){return r=>r<e?0:r>t?1:n(pl(e,t,r))}var rg=(e,t,{x:n,y:r})=>{let i=e*e+t*t;return i<1?0:-1e3*(n*e+r*t)/i},ig=(e,t=300)=>{let n=al(.25,2,t/300),{stiffness:r,damping:i}=Fd({...e,duration:e.duration&&hl(e.duration)});return{...e,stiffness:r,damping:i*Math.sqrt(n),mass:n}};function ag(e,t){e.min=t.min,e.max=t.max}function og(e,t){ag(e.x,t.x),ag(e.y,t.y)}function sg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var cg=.9999,lg=1.0001,ug=-.01,dg=.01;function fg(e){return e.max-e.min}function pg(e,t,n){return Math.abs(e-t)<=n}function mg(e,t,n,r=.5){e.origin=r,e.originPoint=Ru(t.min,t.max,e.origin),e.scale=fg(n)/fg(t),e.translate=Ru(n.min,n.max,e.origin)-e.originPoint,(e.scale>=cg&&e.scale<=lg||isNaN(e.scale))&&(e.scale=1),(e.translate>=ug&&e.translate<=dg||isNaN(e.translate))&&(e.translate=0)}function hg(e,t,n,r){mg(e.x,t.x,n.x,r?.originX),mg(e.y,t.y,n.y,r?.originY)}function gg(e,t,n,r=0){e.min=(r?Ru(n.min,n.max,r):n.min)+t.min,e.max=e.min+fg(t)}function _g(e,t,n,r){gg(e.x,t.x,n.x,r?.x),gg(e.y,t.y,n.y,r?.y)}function vg(e,t,n,r=0){let i=r?Ru(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+fg(t)}function yg(e,t,n,r){vg(e.x,t.x,n.x,r?.x),vg(e.y,t.y,n.y,r?.y)}function bg(e,t,n,r,i){return e-=t,e=Eh(e,1/n,r),i!==void 0&&(e=Eh(e,1/i,r)),e}function xg(e,t=0,n=1,r=.5,i,a=e,o=e){if(uu.test(t)&&(t=parseFloat(t),t=Ru(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Ru(a.min,a.max,r);e===a&&(s-=t),e.min=bg(e.min,t,n,s,i),e.max=bg(e.max,t,n,s,i)}function Sg(e,t,[n,r,i],a,o){xg(e,t[n],t[r],t[i],t.scale,a,o)}var Cg=[`x`,`scaleX`,`originX`],wg=[`y`,`scaleY`,`originY`];function Tg(e,t,n,r){Sg(e.x,t,Cg,n?.x,r?.x),Sg(e.y,t,wg,n?.y,r?.y)}var Eg=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Dg=Eg(`applewebkit/`)&&!Eg(`chrome/`)?Math.round:dl;function Og(e){e.min=Dg(e.min),e.max=Dg(e.max)}function kg(e){Og(e.x),Og(e.y)}var Ag=()=>({translate:0,scale:1,origin:0,originPoint:0}),jg=()=>({x:Ag(),y:Ag()}),Mg=()=>({min:0,max:0}),Ng=()=>({x:Mg(),y:Mg()});function Pg(e){return e.translate===0&&e.scale===1}function Fg(e){return Pg(e.x)&&Pg(e.y)}function Ig(e,t){return e.min===t.min&&e.max===t.max}function Lg(e,t){return Ig(e.x,t.x)&&Ig(e.y,t.y)}function Rg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function zg(e,t){return Rg(e.x,t.x)&&Rg(e.y,t.y)}function Bg(e){return fg(e.x)/fg(e.y)}function Vg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Hg=class{constructor(){this.members=[]}add(e){rl(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||(il(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(il(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 Ug(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Wg={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(J.test(e))e=parseFloat(e);else return e}return`${Ug(e,t.target.x)}% ${Ug(e,t.target.y)}%`}},Gg={borderRadius:Object.assign({},Wg,{applyTo:nh.slice()}),borderTopLeftRadius:Wg,borderTopRightRadius:Wg,borderBottomLeftRadius:Wg,borderBottomRightRadius:Wg,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Pu.parse(e);if(i.length>5)return r;let a=Pu.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=Ru(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 Kg(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<xh.length;e++){let t=xh[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 qg(e){return[e(`x`),e(`y`)]}var Jg=(e,t)=>e.depth-t.depth,Yg=class{constructor(){this.children=[],this.isDirty=!1}add(e){rl(this.children,e),this.isDirty=!0}remove(e){il(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Jg),this.isDirty=!1,this.children.forEach(e)}},Xg={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Zg=[`z`,`skew`,`skewZ`],Qg=1e3,$g=0;function e_(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var t_=e=>e.instance&&Ip.get(e.instance)?.demote()&&e.resetSkewAndRotation();function n_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Hm(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ad,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&n_(r)}function r_(e){if(e)return e.options.allowProjection===!1?r_(e.parent):e.projection}function i_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Uh,{...Gg,...Uh}),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:r_(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&Kh(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=$g++,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(s_),this.nodes.forEach(v_),this.nodes.forEach(y_),this.nodes.forEach(c_),Wh.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 Yg)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ml),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=ih(t)&&!qh(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;ad.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=Gh(i,250),Xg.hasAnimatedSinceResize&&(Xg.hasAnimatedSinceResize=!1,this.nodes.forEach(__)))})}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()||E_,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!zg(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={..._m(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||__(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,od(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(b_),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&&n_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;t_(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t_(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(d_),this.nodes.forEach(u_);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(f_);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(m_),this.nodes.forEach(h_),this.nodes.forEach(g_),this.nodes.forEach(a_),this.nodes.forEach(o_)):this.nodes.forEach(f_),this.clearAllSnapshots();let e=Bl.now();Ll.delta=al(0,1e3/60,e-Ll.timestamp),Ll.timestamp=e,Ll.isProcessing=!0,sd.update.process(Ll),sd.preRender.process(Ll),sd.render.process(Ll),Ll.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(l_),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ad.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ad.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!fg(this.snapshot.measuredBox.x)&&!fg(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||=Ng(),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&&t_(this);let t=this.projectionDelta&&!Fg(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Sh(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)),kg(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Ng();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(k_))){let{scroll:e}=this.root;e&&(Nh(t.x,e.offset.x),Nh(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Ng();if(og(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&&og(t,e),Nh(t.x,i.offset.x),Nh(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||Ng();og(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&&(Nh(a.x,-n.scroll.offset.x),Nh(a.y,-n.scroll.offset.y)),Sh(n.latestValues)&&Ih(a,n.latestValues,n.layout?.layoutBox)}return!r&&Sh(this.latestValues)&&Ih(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=Ng();og(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Sh(n.latestValues))continue;let r;n.instance&&(bh(n.latestValues)&&n.updateSnapshot(),r=Ng(),og(r,n.measurePageBox())),Tg(t,n.latestValues,n.snapshot?.layoutBox,r)}return Sh(this.latestValues)&&Tg(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!==Ll.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=Ll.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=Ng(),this.targetWithTransforms=Ng()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_g(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):og(this.target,this.layout.layoutBox),kh(this.target,this.targetDelta)):og(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),Wh.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||bh(this.parent.latestValues)||wh(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=Ng(),this.relativeTargetOrigin=Ng(),yg(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),og(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===Ll.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;og(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Mh(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=Ng());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sg(this.prevProjectionDelta.x,this.projectionDelta.x),sg(this.prevProjectionDelta.y,this.projectionDelta.y)),hg(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Vg(this.projectionDelta.x,this.prevProjectionDelta.x)&&Vg(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Wh.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=jg(),this.projectionDelta=jg(),this.projectionDeltaWithTransform=jg()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=jg();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Ng(),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(T_));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?rg(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?x_(o[r],e[r],this.layout.layoutBox[r],l[t*2],l[t*2+1]):S_(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){yg(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0);let e=this.relativeTargetOrigin,t=s;if(w_(this.relativeTarget,e,t,n),this.isSpringLayout){let e=this.relativeTarget,t=this.impulse||0,n=this.relativeStart,r=Bl.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&&Lg(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Ng(),og(f,this.relativeTarget)}c&&(this.animationValues=a,Qh(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&&=(od(this.pendingAnimation),void 0),this.pendingAnimation=ad.update(()=>{Xg.hasAnimatedSinceResize=!0,this.motionValue||=hm(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=ig(e,t&&Math.sqrt(fg(t.x)*fg(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)=>Ld({...r,keyframes:n?[e[n-1],0]:r.keyframes,velocity:t})),a=i.length;t&&i.push(Ld({...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=dd(c),c.next(0),this.edgeVelocity=e=>i[e+1].velocity(o),c}}}}}let a=Hh(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,nf(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?.(Qg),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&&O_(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||Ng(),D_(i.x,t.x,e.x),D_(i.y,t.y,e.y)}og(t,i),Ih(t,r),hg(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Hg),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(!Ch(t))return;let n={};for(let t=0;t<Zg.length;t++)e_(Zg[t],e,n,this.animationValues);for(let t=0;t<xh.length;t++)e_(xh[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=Jh(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=Jh(t?.pointerEvents)||``),this.hasProjected&&!Sh(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=Kg(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 Uh){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Uh[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?Jh(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(u_),this.root.sharedNodes.clear()}}}function a_(e){e.updateLayout(),p_(e)}function o_(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`)qg(e=>{let t=fg(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`;ag(r[e],a[e])}else O_(i,t.layoutBox,n)&&qg(t=>{let n=fg(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=jg();hg(c,n,t.layoutBox);let l=jg();hg(l,a?e.applyTransform(r,!0):n,s);let u=!Fg(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=Ng();yg(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=Ng();yg(l,n,i.layoutBox,s),a&&o(c,l),zg(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 s_(e){Wh.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 c_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function l_(e){e.clearSnapshot()}function u_(e){e.clearMeasurements()}function d_(e){e.isLayoutDirty=!0,e.updateLayout()}function f_(e){e.isLayoutDirty=!1}function p_(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;qg(e=>Nh(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function m_(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function h_(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function g_(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function __(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function v_(e){e.resolveTargetDelta()}function y_(e){e.calcProjection()}function b_(e){e.resetSkewAndRotation()}function x_(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 S_(e,t,n){e.translate=Ru(t.translate,0,n),e.scale=Ru(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function C_(e,t,n,r){e.min=Ru(t.min,n.min,r),e.max=Ru(t.max,n.max,r)}function w_(e,t,n,r){C_(e.x,t.x,n.x,r),C_(e.y,t.y,n.y,r)}function T_(e){return e.animationValues?.opacityExit!==void 0}var E_={duration:.45,ease:[.4,0,.1,1]};function D_(e,t,n){e.max=fg(n)+(e.min=t.min)}function O_(e,t,n){return e===`position`||e===`preserve-aspect`&&!pg(Bg(t),Bg(n),.2)}function k_(e){return e!==e.root&&e.scroll?.wasRoot}function A_(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var j_=i_({attachResizeListener:(e,t)=>A_(e,`resize`,t),measureScroll:zh,checkIsScrollRoot:()=>!0}),M_={current:void 0},N_=i_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M_.current){let e=new j_({});e.mount(window),e.setOptions({layoutScroll:!0}),M_.current=e}return M_.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),P_=new WeakMap;function F_(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function I_(e){return typeof e==`string`||Array.isArray(e)}var L_=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`whilePinch`,`exit`],R_=[`initial`].concat(L_);function z_(e){if(F_(e.animate))return!0;for(let t=0;t<R_.length;t++)if(I_(e[R_[t]]))return!0;return!1}function B_(e){return!!(z_(e)||e.variants)}function V_(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Rm(i))e.addValue(r,i);else if(Rm(a))e.addValue(r,hm(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,hm(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var H_={current:null},U_={current:!1},W_=typeof window<`u`;function G_(){if(U_.current=!0,W_){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>H_.current=e.matches;e.addEventListener(`change`,t),t()}else H_.current=!1}}var K_=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],q_={};function J_(e){q_=e}function Y_(){return q_}var X_=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=ep,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=Bl.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ad.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=z_(t),this.isVariantNode=B_(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&&Rm(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,P_.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:(U_.current||G_(),this.shouldReduceMotion=H_.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),od(this.notifyUpdate),od(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&&Sp.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new pp({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:hl(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=If.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ad.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Ip.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 q_){let t=q_[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):Ng()}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)&&Ip.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<K_.length;t++){let n=K_[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=V_(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=hm(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`&&(sl(n)||ll(n))?n=parseFloat(n):typeof n!=`number`&&!Pu.test(n)&&Pu.test(t)&&(n=Sf(e,t)),this.setBaseTarget(e,Rm(n)?n.get():n)),Rm(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new ml)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){Bh.render(this.render)}},Z_=class extends X_{constructor(){super(...arguments),this.KeyframeResolver=th}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;Rm(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Q_(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 $_(e,{layout:t,layoutId:n}){return If.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Uh[e]||e===`opacity`)}function ev(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Rm(r[t])||i&&Rm(i[t])||$_(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function tv(e){return window.getComputedStyle(e)}var nv=class extends Z_{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Q_}mount(e){super.mount(e)}readValueFromInstance(e,t){if(If.has(t))return this.projection?.isProjecting?Mf(t):Pf(e,t);{let n=tv(e),r=(Ul(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Lh(e,t)}build(e,t,n){uh(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ev(e,t,n)}},rv=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function iv(e){return{point:{x:e.pageX,y:e.pageY}}}var av=e=>t=>rv(t)&&e(t,iv(t));function ov(e,t,n,r){return A_(e,t,av(n),r)}var sv=new WeakMap,cv,lv=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:ih(r)&&`getBBox`in r?r.getBBox()[t]:r[n],uv=lv(`inline`,`width`,`offsetWidth`),dv=lv(`block`,`height`,`offsetHeight`);function fv({target:e,borderBoxSize:t}){sv.get(e)?.forEach(n=>{n(e,{get width(){return uv(e,t)},get height(){return dv(e,t)}})})}function pv(e){e.forEach(fv)}function mv(){typeof ResizeObserver<`u`&&(cv=new ResizeObserver(pv))}function hv(e,t){cv||mv();let n=ch(e);return n.forEach(e=>{let n=sv.get(e);n||(n=new Set,sv.set(e,n)),n.add(t),cv?.observe(e)}),()=>{n.forEach(e=>{let n=sv.get(e);n?.delete(t),n?.size||cv?.unobserve(e)})}}var gv=new Set,_v;function vv(){_v=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};gv.forEach(t=>t(e))},window.addEventListener(`resize`,_v)}function yv(e){return gv.add(e),_v||vv(),()=>{gv.delete(e),!gv.size&&typeof _v==`function`&&(window.removeEventListener(`resize`,_v),_v=void 0)}}function bv(e,t){return oh(typeof e==`function`?yv(e):hv(e,t))}var xv=(e,t)=>Math.abs(e-t);function Sv(e,t){let n=xv(e.x,t.x),r=xv(e.y,t.y);return Math.sqrt(n**2+r**2)}var Cv=new Set([`auto`,`scroll`]),wv=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=Ev(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Ov(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Sv(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Bl.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=Ev(t,this.transformPagePoint),this.hasPendingMove=!0,ad.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=Ov(e.type===`pointercancel`?this.lastMoveEventInfo:Ev(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!rv(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=iv(e),l=Ev(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:Bl.now()}];let{onSessionStart:d}=t;d&&d(e,Ov(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=fl(ov(this.contextWindow,`pointermove`,this.handlePointerMove,f),ov(this.contextWindow,`pointerup`,this.handlePointerUp,f),ov(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);(Cv.has(e.overflowX)||Cv.has(e.overflowY))&&this.scrollPositions.set(t,Tv(t)),t=t.parentElement}this.scrollPositions.set(window,Tv(window)),this.removeScrollListeners=fl(A_(window,`scroll`,this.onElementScroll,{capture:!0}),A_(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=Tv(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),ad.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),od(this.updatePoint)}},Tv=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Ev(e,t){return t?{point:t(e.point)}:e}function Dv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ov({point:e},t){return{point:e,delta:Dv(e,Av(t)),offset:Dv(e,kv(t)),velocity:jv(t,.1)}}function kv(e){return e[0]}function Av(e){return e[e.length-1]}function jv(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Av(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hl(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>hl(t)*2&&(r=e[1]);let a=gl(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 Mv=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Nv(e){return Mv.has(e.tagName)||e.isContentEditable===!0}var Pv=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Fv(e){return Pv.has(e.tagName)||e.isContentEditable===!0}var Iv={x:!1,y:!1};function Lv(){return Iv.x||Iv.y}function Rv(e){return e===`x`||e===`y`?Iv[e]?null:(Iv[e]=!0,()=>{Iv[e]=!1}):Iv.x||Iv.y?null:(Iv.x=Iv.y=!0,()=>{Iv.x=Iv.y=!1})}function zv(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ru(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ru(n,e,r.max):Math.min(e,n)),e}function Bv(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 Vv(e,{top:t,left:n,bottom:r,right:i}){return{x:Bv(e.x,n,i),y:Bv(e.y,t,r)}}function Hv(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 Uv(e,t){return{x:Hv(e.x,t.x),y:Hv(e.y,t.y)}}function Wv(e,t){let n=.5,r=fg(e),i=fg(t);return i>r?n=pl(t.min,t.max-r,e.min):r>i&&(n=pl(e.min,e.max-i,t.min)),al(0,1,n)}function Gv(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 Kv=.35;function qv(e=Kv){return e===!1?e=0:e===!0&&(e=Kv),{x:Jv(e,`left`,`right`),y:Jv(e,`top`,`bottom`)}}function Jv(e,t,n){return{min:Yv(e,t),max:Yv(e,n)}}function Yv(e,t){return typeof e==`number`?e:e[t]||0}function Xv(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 Zv=new WeakMap,Qv=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=Ng(),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=Rv(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),qg(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Gl(t)&&(t=Om(t,this.visualElement.current)||0),J.test(t))t=parseFloat(t);else if(uu.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=fg(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&ad.update(()=>a(e,t),!1,!0),Bm(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=iy(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&&ad.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 wv(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&&ad.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||!ry(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=zv(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;$v(e)?this.constraints&&this.scroll===Xv(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?Vv(r.layoutBox,e):!1,this.elastic=qv(t),i!==this.constraints&&!$v(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&qg(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Gv(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!$v(e))return!1;let n=ey(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=Xv(r);let i=Rh(n,r.root,this.visualElement.getTransformPagePoint()),a=Uv(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(_h(a));this.hasMutatedConstraints=!!e,e&&(a=gh(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)&&ry(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=qg(e=>{if(!ry(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 Bm(this.visualElement,e),n.start(Tm(e,n,0,t,this.visualElement,!1))}stopAnimation(){qg(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();qg(e=>{if(!ry(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Ru(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!$v(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};qg(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Wv({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(),qg(t=>{let n=this.getAxisMotionValue(t);if(!ry(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Ru(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Zv.set(this.visualElement,this);let e=this.visualElement.current,t=ov(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Fv(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=$v(t)&&ey(t);r&&(this.constraints=this.resolveRefConstraints(),n||=ny(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),ad.read(r);let o=A_(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(qg(t=>{if(!ry(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=Kv,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function $v(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var ey=e=>`current`in e?e.current:e;function ty(e){let t=!0;return()=>{t?t=!1:e()}}function ny(e,t,n){let r=bv(e,ty(n)),i=bv(t,ty(n));return()=>{r(),i()}}function ry(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iy(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function ay(e,t){let n=ch(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},oh(()=>r.abort())]}function oy(e){return!(e.pointerType===`touch`||Lv())}function sy(e,t,n={}){t=sh(t);let[r,i,a]=ay(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(!oy(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 cy=(e,t)=>t?e===t||cy(e,t.parentElement):!1,ly=new WeakSet;function uy(e){return t=>{t.key===`Enter`&&e(t)}}function dy(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var fy=(e,t)=>{let n=!1,r=uy(()=>{n||ly.has(e)||(n=!0,dy(e,`down`))}),i=uy(()=>{n&&(n=!1,dy(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&dy(e,`cancel`)},{...t,once:!0})};function py(e){return rv(e)&&!Lv()}var my=new WeakSet,hy=100,gy=8,_y=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,vy=e=>e.preventDefault();function yy(e,t,n={}){t=sh(t);let[r,i,a]=ay(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!py(e)||my.has(e))return;n.stopPropagation&&my.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=Bl.now(),d=hl(c),f=hl(s),p=o.get(r);p?.expire(_y(p.event,e,hy))?p=void 0:p&&(od(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(ly.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=hl(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return od(w);let e=Math.min(1-(S-Bl.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):od(w))},T={...i,capture:!0},E=(t,n)=>{if(rv(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,vy),od(w),ly.delete(r),Lv()&&(n=!1),n&&!h){let n=Bl.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||Bl.now()-n>f)return od(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),ad.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||cy(r,e.target))},O=e=>{E(e,!1)},k=t=>{rv(t)&&((l||!_)&&_y(e,t,gy)||a>1&&Lv())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(ad.update(w,!0),r.addEventListener(`contextmenu`,vy,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),rh(e)&&(e.addEventListener(`focus`,()=>fy(e,i),i),!Nv(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var by=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},xy=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`]),Sy=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Cy(e,t,n,r){Q_(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(xy.has(n)?n:lh(n),t.attrs[n])}function wy(e,t,n){let r=ev(e,t,n);for(let n in e)if(n!==`children`&&(Rm(e[n])||Rm(t[n]))){let t=Ff.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Ty=class extends Z_{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Ng}getBaseTargetFromProps(e,t){return If.has(t)?super.getBaseTargetFromProps(e,t)??Mf(t):e[t]}getDefaultValue(e){return If.has(e)?this.latestValues[e]??Mf(e):void 0}readValueFromInstance(e,t){if(If.has(t)){let e=_f(t);return e&&e.default||0}if(mh.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=xy.has(t)?t:lh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return wy(e,t,n)}build(e,t,n){hh(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Cy(e,t,n,r)}mount(e){this.isSVGTag=Sy(e.tagName),super.mount(e)}};function Ey(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 Dy=[...L_].reverse(),Oy=e=>e?.out===!0?e:e?.out;function ky(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>qm(e,t,n))),n=jy(),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`&&jm(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&&Oy(f(l??(g&&g.props.initial))?.transition);if(Dy.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?I_(f)||f===!1?f:void 0:l,y=I_(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||F_(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=Ay(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}=jm(e,n,Mm(e,t))||{};E={...E,...a,...i},D=Oy(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)?!Ey(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=jm(s,n)?.transition?.delayChildren;r.delay=um(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&&!Rm(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=jy(),i=!0}}}function Ay(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ey(t,e):!1}function jy(){let e={};for(let t of L_)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}S();var My=s({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});S();function Ny(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Py(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ny(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():Ny(e[t],null)}}}}function Fy(...e){return A(Py(...e),e)}S();var Iy=e=>{let{width:t,height:n}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,n/e?.offsetHeight||1]},Ly=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]=Iy(r);t+=e*a,n+=i*o}if(getComputedStyle(r).position===`fixed`)break}let[i,a]=Iy(e.offsetParent);return[t/i,n/a]},Ry=class extends N{getSnapshotBeforeUpdate(e){let t=this.props.getElement();if(rh(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=rh(e)&&e.offsetWidth||0,r=rh(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=Ly(t)}return null}componentDidUpdate(){}render(){return this.props.children}};function zy({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(My),m=Fy(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 Bh.setup(()=>{let[e,t]=Ly(r);u=d.current.point[0]-e,p=d.current.point[1]-t}),Bh.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]),F(Ry,{isPresent:n,getElement:h,sizeRef:d,pop:o,children:o===!1?e:g(e,{ref:m})})}S();var By=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let d=$c(Vy),f=j(),p=u(),m=u(n),h=u(r);tl(()=>{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=F(zy,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:p,children:e}),F(nl.Provider,{value:_,children:e})};function Vy(){return new Map}S();function Hy(e=!0){let n=t(nl);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 Uy=e=>e.key||``;function Wy(e){let t=[];return C.forEach(e,e=>{f(e)&&t.push(e)}),t}S();var Gy=({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]=Hy(s),h=x(()=>Wy(e),[e]),g=s&&!p?[]:h.map(Uy),_=u(!0),v=$c(()=>new Map),y=u(new Set),[S,C]=d(h),[w,T]=d(h);tl(()=>{s&&!p&&!w.length&&m?.()},[p,s,w.length,m]);let E=u();M(()=>()=>{let e=E.current;E.current=void 0,e?.()},[w]),tl(()=>{_.current=!1;for(let e=0;e<w.length;e++){let t=Uy(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(Uy(n));r===-1?(e.splice(t++,0,n),D.push(n)):t=r+D.length+1}return D.every(e=>v.get(Uy(e)))?e=h:o===`wait`&&(e=D),T(Wy(e)),C(h),null}let{forceRender:O}=t(Qc);return F(b,{children:w.map(e=>{let t=Uy(e),u=s&&!p?!1:h===w||g.includes(t);return F(By,{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 Ky=s({strict:!1}),qy={animation:[`variants`,...L_],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`]},Jy=!1;function Yy(){if(Jy)return;let e={};for(let t in qy)e[t]={isEnabled:e=>qy[t].some(t=>!!e[t])};J_(e),Jy=!0}function Xy(){return Yy(),Y_()}function Zy(e){let t=Xy();for(let n in e)t[n]={...t[n],...e[n]};J_(t)}S();function Qy({children:e,features:t,strict:n=!1}){let[,r]=d(!$y(t)),i=u(void 0);if(!$y(t)){let{renderer:e,...n}=t;i.current=e,Zy(n)}return M(()=>{$y(t)&&t().then(({renderer:e,...t})=>{Zy(t),i.current=e,w(()=>r(!0))})},[]),F(Ky.Provider,{value:{renderer:i.current,strict:n},children:e})}function $y(e){return typeof e==`function`}S();var eb=s({});function tb(e,t){if(z_(e)){let{initial:t,animate:n}=e;return{initial:t===!1||I_(t)?t:void 0,animate:I_(n)?n:void 0}}return e.inherit===!1?{}:t}S();function nb(e){let{initial:n,animate:r}=tb(e,t(eb));return x(()=>({initial:n,animate:r}),[rb(n),rb(r)])}function rb(e){return Array.isArray(e)?e.join(` `):e}var ib=()=>({style:{},transform:{},transformOrigin:{},vars:{}});S();function ab(e,t,n){for(let r in t)!Rm(t[r])&&!$_(r,n)&&(e[r]=t[r])}function ob({transformTemplate:e},t){return x(()=>{let n=ib();return uh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function sb(e,t){let n=e.style||{},r={};return ab(r,n,e),Object.assign(r,ob(e,t)),r}function cb(e,t){let n={},r=sb(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 lb=()=>({...ib(),attrs:{}});S();function ub(e,t,n,r){let i=x(()=>{let n=lb();return hh(n,t,Sy(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return ab(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var db=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 fb(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||db.has(e)}function pb(e,t){return e.startsWith(`on`)?!fb(e):t?.(e)??!fb(e)}function mb(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||Rm(e[a])||(a===`fx`?e.fx&&(i.fx=``):(pb(a,r)||n===!0&&fb(a)||!t&&!fb(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var hb=[`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 gb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(hb.indexOf(e)>-1||/[A-Z]/u.test(e))}S();function _b(e,t,n,{latestValues:r},a,o=!1,s,c){let l=(s??gb(e)?ub:cb)(t,r,a,e),u=mb(t,typeof e==`string`,o,c),d=e===b?{}:{...u,...l,ref:n},{children:f}=t,p=x(()=>Rm(f)?f.get():f,[f]);return i(e,{...d,children:p})}S();function vb({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:yb(n,r,i,e),renderState:t()}}function yb(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Jh(a[e]);let{initial:o,animate:s}=e,c=z_(e),l=B_(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`&&!F_(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Am(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 bb=e=>(n,r)=>{let i=t(eb),a=t(nl),o=()=>vb(e,n,i,a);return r?o():$c(o)},xb=bb({scrapeMotionValuesFromProps:ev,createRenderState:ib}),Sb=bb({scrapeMotionValuesFromProps:wy,createRenderState:lb}),Cb=Symbol.for(`motionComponentSymbol`);S();function wb(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 Tb=s({});S();function Eb(e,n,r,i,a,o){let{visualElement:s}=t(eb),c=t(Ky),l=t(nl),d=t(My),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(Tb);_&&!_.projection&&a&&(_.type===`html`||_.type===`svg`)&&a.create(_,r,v),p(()=>{_&&_.props!==r&&_.update(r,l)});let y=r[Vm],b=u(!!y&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return tl(()=>{g.current&&_&&(_.animationState?.animateChanges(),_.enteringChildren=void 0)},[]),tl(()=>{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 Db(e,{forwardMotionProps:n=!1,type:r}={},i,a){i&&Zy(i);let o=r?r===`svg`:gb(e),s=o?Sb:xb;function c(r,c){let l,u=Ob(r);$c(()=>!!M_.current?.sharedNodes.get(u)?.lead&&r.initial)&&(r={...r,initial:!1});let d={...t(My),...r,layoutId:u},{isStatic:f,isValidProp:p}=d,m=nb(r),h=s(r,f);if(!f&&typeof window<`u`){kb(d,i);let t=Ab(d);m.visualElement=Eb(e,h,d,a,t.ProjectionNode,o),(t.isEnabled||m.visualElement?.projection?.options.layoutId)&&(l=t.MeasureLayout)}return F(eb.Provider,{value:m,children:[l&&m.visualElement?F(l,{visualElement:m.visualElement,...d}):null,_b(e,r,wb(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[Cb]=e,l}function Ob({layoutId:e}){let n=t(Qc).id;return n&&e!==void 0?n+`-`+e:e}function kb(e,n){t(Ky).strict}function Ab(e){let{drag:t,layout:n}=Xy();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function jb(e,t){if(typeof Proxy>`u`)return Db;let n=new Map,r=(n,r)=>Db(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Db(a,void 0,e,t)),n.get(a))})}var Mb=jb();S();var Nb=(e,t)=>t.isSVG??gb(e)?new Ty(t):new nv(t,{allowProjection:e!==b}),Pb=class extends by{constructor(e){super(e),e.animationState||=ky(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();F_(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?.()}},Fb=0,Ib={animation:{Feature:Pb},exit:{Feature:class extends by{constructor(){super(...arguments),this.id=Fb++}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}=jm(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(){}}}},Lb=class extends by{constructor(e){super(e),this.removeGroupControls=dl,this.removeListeners=dl,this.controls=new Qv(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dl}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()}},Rb=e=>(t,n)=>{e&&ad.update(()=>e(t,n),!1,!0)},zb=class extends by{constructor(){super(...arguments),this.removePointerDownListener=dl}onPointerDown(e){this.session=new wv(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:Rb(e),onStart:Rb(t),onMove:Rb(n),onEnd:(e,t)=>{delete this.session,r&&ad.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ov(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}};S();var Bb=!1,Vb=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Hb=(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)}},Ub=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),Bb&&i.root.didUpdate(),i.options.layoutId!==r&&Hb(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Vb(this.props),onExitComplete:()=>this.safeToRemove()})),Xg.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(),Hb(o,n)),o.setOptions({...o.options,...Vb(this.props)}),Bb=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||ad.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),Bh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Bb=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function Wb(e){let[n,r]=Hy(),i=t(Qc);return F(Ub,{...e,layoutGroup:i,switchLayoutGroup:t(Tb),isPresent:n,safeToRemove:r})}var Gb={pan:{Feature:zb},drag:{Feature:Lb,ProjectionNode:N_,MeasureLayout:Wb}};function Kb(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&&ad.postRender(()=>s(t,iv(t)))}var qb=class extends by{mount(){let{current:e}=this.node;e&&(this.unmount=sy(e,(e,t)=>(Kb(this.node,t,`Hover`,`Start`),e=>Kb(this.node,e,`Hover`,`End`))))}unmount(){}},Jb=class extends by{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=fl(A_(this.node.current,`focus`,()=>this.onFocus()),A_(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Yb(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||Kb(e,t,`Tap`,n,r)}var Xb=class extends by{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=yy(e,(e,t)=>(Yb(this.node,t,`Start`),{onComplete:(e,{success:t})=>Yb(this.node,e,t?``:`Cancel`),onRepeat:()=>Yb(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(){}},Zb=new WeakMap,Qb=new WeakMap,$b=e=>{let t=Zb.get(e.target);t&&t(e)},ex=e=>{e.forEach($b)};function tx({root:e,...t}){let n=e||document;Qb.has(n)||Qb.set(n,{});let r=Qb.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ex,{root:e,...t})),r[i]}function nx(e,t,n){let r=tx(t);return Zb.set(e,n),r.observe(e),()=>{Zb.delete(e),r.unobserve(e)}}var rx={some:0,all:1},ix=class extends by{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:rx[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=nx(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(ax(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function ax({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var ox={inView:{Feature:ix},tap:{Feature:Xb},focus:{Feature:Jb},hover:{Feature:qb}},sx=jb(Object.assign({},Ib,ox,Gb,{layout:{ProjectionNode:N_,MeasureLayout:Wb}}),Nb),cx=Object.assign({renderer:Nb},Ib,ox),lx=({children:e})=>F(Qy,{features:cx,children:e});S();var ux=s(null),dx=({value:e,children:t})=>F(ux.Provider,{value:e,children:t}),fx=()=>t(ux),px=(e,t=`local`)=>e.filter(e=>(e.location??t)!==`local`),mx=()=>typeof process>`u`?void 0:{}.INTLAYER_BACKEND_INTERNAL_URL?.trim()||void 0,hx=(e,t=on.backendURL)=>{let n=mx();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}},gx=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}},_x={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},vx=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),yx=e=>e.reduce((e,t)=>{let n=e??{},r=vx(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),Y=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=yx([_x,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=yx([_x.headers,...t.map(e=>e.headers)]),s=yx(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=yx(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=hx(`${e}${r}`),d=await fetch(u,l);if(!d.ok){let e=await d.json().catch(()=>void 0);throw new gx(JSON.stringify(e?.error)??`An error occurred`,{status:d.status,code:e?.error?.code,data:e?.error})}return await d.json()},bx=(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}`},X=(e,t,n,...[r])=>bx(e,t.prefix,n.path,r),xx={prefix:`/oauth2`},Sx={getOAuth2AccessToken:{method:`POST`,path:`/token`},extendOAuth2Token:{method:`POST`,path:`/token/extend`}},Cx={prefix:`/api/cli-session`},wx={createCliSessionToken:{method:`POST`,path:`/`},getCliSessionMe:{method:`GET`,path:`/me`}},Tx=(e={},t)=>{let n=t?.editor?.backendURL??on.backendURL??`https://back.intlayer.org`,{clientId:r,clientSecret:i}=t?.editor??{};return{getOAuth2AccessToken:async(e={})=>await Y(X(n,xx,Sx.getOAuth2AccessToken),{},e,{method:Sx.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 Y(X(n,Cx,wx.createCliSessionToken),e,t,{method:wx.createCliSessionToken.method}),getCliSessionMe:async(t={})=>await Y(X(n,Cx,wx.getCliSessionMe),e,t,{method:wx.getCliSessionMe.method})}};function Ex(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 Dx(e,t,n=`.`,r){if(!Ex(t))return Dx(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]]:Ex(a)&&Ex(i[t])?Dx(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function Ox(e){return(...t)=>t.reduce((t,n)=>Dx(t,n,``,e),{})}var kx=Ox(),Ax=class extends Error{payload;constructor(e){super(JSON.stringify(e)),this.name=`ServerSentEventError`,this.payload=e}},jx=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 Ax({message:n});console.error(`Failed to parse SSE data:`,n);return}if(a===`error`)throw new Ax(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}},Mx={prefix:`/api/ai`},Nx={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`}},Px=(e={},t)=>{let n=t?.editor?.backendURL??on.backendURL??`https://back.intlayer.org`;return{customQuery:async(t,r={})=>await Y(X(n,Mx,Nx.customQuery),e,r,{method:Nx.customQuery.method,body:t}),translateJSON:async(t,r={})=>await Y(X(n,Mx,Nx.translateJSON),e,r,{method:Nx.translateJSON.method,body:t}),auditContentDeclaration:async(t,r={})=>await Y(X(n,Mx,Nx.auditContentDeclaration),e,r,{method:Nx.auditContentDeclaration.method,body:t}),auditContentDeclarationField:async(t,r={})=>await Y(X(n,Mx,Nx.auditContentDeclarationField),e,r,{method:Nx.auditContentDeclarationField.method,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await Y(X(n,Mx,Nx.auditContentDeclarationMetadata),e,r,{method:Nx.auditContentDeclarationMetadata.method,body:t}),auditTag:async(t,r={})=>await Y(X(n,Mx,Nx.auditTag),e,r,{method:Nx.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(X(n,Mx,Nx.ask),{method:Nx.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 jx(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(X(n,Mx,Nx.chat),{method:Nx.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 jx(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 Y(X(n,Mx,Nx.autocomplete),e,r,{method:Nx.autocomplete.method,body:t}),getDiscussions:async(t,r={})=>await Y(X(n,Mx,Nx.getDiscussions),e,r,{method:Nx.getDiscussions.method,params:t}),getAIStats:async(t={})=>await Y(X(n,Mx,Nx.getAIStats),e,t,{method:Nx.getAIStats.method}),getAICredits:async(t={})=>await Y(X(n,Mx,Nx.getAICredits),e,t,{method:Nx.getAICredits.method}),getAICreditUsage:async(t,r={})=>await Y(X(n,Mx,Nx.getAICreditUsage),e,r,{method:Nx.getAICreditUsage.method,params:t})}},Fx={prefix:`/api/assets`},Ix={getAssets:{method:`GET`,path:`/`},getAssetById:{method:`GET`,path:`/:assetId`},uploadAsset:{method:`POST`,path:`/`},updateAsset:{method:`PATCH`,path:`/:assetId`},deleteAsset:{method:`DELETE`,path:`/:assetId`}},Lx=(e={},t)=>{let n=t?.editor?.backendURL??on.backendURL??`https://back.intlayer.org`;return{getAssets:async(t,r,i={})=>await Y(X(n,Fx,Ix.getAssets),e,i,{cache:`no-store`,params:{...t!==void 0&&{page:String(t)},...r!==void 0&&{pageSize:String(r)}}}),getAssetById:async(t,r={})=>await Y(X(n,Fx,Ix.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(X(n,Fx,Ix.uploadAsset),{method:Ix.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 Y(X(n,Fx,Ix.updateAsset,{assetId:String(t)}),e,i,{method:Ix.updateAsset.method,body:r}),deleteAsset:async(t,r={})=>await Y(X(n,Fx,Ix.deleteAsset,{assetId:String(t)}),e,r,{method:Ix.deleteAsset.method})}},Rx={prefix:`/api/dictionary`},zx={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`}},Bx=(e={},t)=>{let n=t?.editor?.backendURL??on.backendURL??`https://back.intlayer.org`;return{getDictionaries:async(t,r={})=>await Y(X(n,Rx,zx.getDictionaries),e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await Y(X(n,Rx,zx.getDictionariesKeys),e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await Y(X(n,Rx,zx.getDictionariesUpdateTimestamp),e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await Y(X(n,Rx,zx.getDictionary,{dictionaryKey:t}),e,i,{params:r?{version:r.toString()}:void 0}),getDictionariesByKeys:async(t,r,i={})=>await Y(X(n,Rx,zx.getDictionariesByKeys),e,i,{cache:`no-store`,params:{keys:t.join(`,`),version:r?.toString()}}),pushDictionaries:async(t,r={})=>await Y(X(n,Rx,zx.pushDictionaries),e,r,{method:zx.pushDictionaries.method,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await Y(X(n,Rx,zx.addDictionary),e,r,{method:zx.addDictionary.method,body:t}),updateDictionary:async(t,r={})=>await Y(X(n,Rx,zx.updateDictionary,{dictionaryId:String(t.id)}),e,r,{method:zx.updateDictionary.method,body:t}),deleteDictionary:async(t,r={})=>await Y(X(n,Rx,zx.deleteDictionary,{dictionaryId:String(t)}),e,r,{method:zx.deleteDictionary.method})}},Vx=(e={},t)=>{let n=`${t?.editor?.editorURL??on.editorURL}/api`;return{getDictionaries:async(t={})=>(await Y(`${n}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await Y(`${n}/config`,e,t)).data,writeDictionary:async(t,r={})=>await Y(`${n}/dictionary`,e,r,{method:`POST`,body:t})}},Hx={prefix:`/api/project`},Z={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`},regenerateProjectScreenshot:{method:`POST`,path:`/screenshot`},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`}},Ux=(e={},t)=>{let n=t?.editor?.backendURL??on.backendURL??`https://back.intlayer.org`;return{getProjects:async(t,r={})=>await Y(X(n,Hx,Z.getProjects),e,r,{cache:`no-store`,method:Z.getProjects.method,params:t}),getProjectInsights:async(t={})=>await Y(X(n,Hx,Z.getProjectInsights),e,t,{cache:`no-store`,method:Z.getProjectInsights.method}),addProject:async(t,r={})=>await Y(X(n,Hx,Z.addProject),e,r,{method:Z.addProject.method,body:t}),updateProject:async(t,r={})=>await Y(X(n,Hx,Z.updateProject),e,r,{method:Z.updateProject.method,body:t}),updateProjectMembers:async(t,r={})=>await Y(X(n,Hx,Z.updateProjectMembers),e,r,{method:Z.updateProjectMembers.method,body:t}),pushProjectConfiguration:async(t,r={})=>await Y(X(n,Hx,Z.pushProjectConfiguration),e,r,{method:Z.pushProjectConfiguration.method,body:t}),deleteProject:async(t={})=>await Y(X(n,Hx,Z.deleteProject),e,t,{method:Z.deleteProject.method}),deleteProjectByIdAdmin:async(t,r={})=>Y(X(n,Hx,Z.deleteProjectByIdAdmin,{projectId:t}),e,r,{method:Z.deleteProjectByIdAdmin.method}),selectProject:async(t,r={})=>await Y(X(n,Hx,Z.selectProject,{projectId:String(t)}),e,r,{method:Z.selectProject.method}),unselectProject:async(t={})=>await Y(X(n,Hx,Z.unselectProject),e,t,{method:Z.unselectProject.method}),addNewAccessKey:async(t,r={})=>await Y(X(n,Hx,Z.addNewAccessKey),e,r,{method:Z.addNewAccessKey.method,body:t}),deleteAccessKey:async(t,r={})=>await Y(X(n,Hx,Z.deleteAccessKey),e,r,{method:Z.deleteAccessKey.method,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await Y(X(n,Hx,Z.refreshAccessKey),e,r,{method:Z.refreshAccessKey.method,body:{clientId:t}}),triggerBuild:async(t={})=>await Y(X(n,Hx,Z.triggerBuild),e,t,{method:Z.triggerBuild.method}),regenerateProjectScreenshot:async(t={})=>await Y(X(n,Hx,Z.regenerateProjectScreenshot),e,t,{method:Z.regenerateProjectScreenshot.method}),triggerWebhook:async(t,r={})=>await Y(X(n,Hx,Z.triggerWebhook),e,r,{method:Z.triggerWebhook.method,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await Y(X(n,Hx,Z.getCIConfiguration),e,t,{method:Z.getCIConfiguration.method}),pushCIConfig:async(t={})=>await Y(X(n,Hx,Z.pushCIConfiguration),e,t,{method:Z.pushCIConfiguration.method}),updateMemberAccess:async(t,r,i={})=>await Y(X(n,Hx,Z.updateMemberAccess,{userId:t}),e,i,{method:Z.updateMemberAccess.method,body:r})}},Wx={prefix:`/api/tag`},Gx={getTags:{method:`GET`,path:`/`},addTag:{method:`POST`,path:`/`},updateTag:{method:`PUT`,path:`/:tagId`},deleteTag:{method:`DELETE`,path:`/:tagId`}},Kx=(e={},t)=>{let n=t?.editor?.backendURL??on.backendURL??`https://back.intlayer.org`;return{getTags:async(t,r={})=>await Y(X(n,Wx,Gx.getTags),e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await Y(X(n,Wx,Gx.addTag),e,r,{method:Gx.addTag.method,body:t}),updateTag:async(t,r,i={})=>await Y(X(n,Wx,Gx.updateTag,{tagId:String(t)}),e,i,{method:Gx.updateTag.method,body:r}),deleteTag:async(t,r={})=>await Y(X(n,Wx,Gx.deleteTag,{tagId:String(t)}),e,r,{method:Gx.deleteTag.method})}};function qx(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var Jx=qx({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`}),Yx=`1.7.28`;function Xx(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 Zx(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 Qx(){return $x.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var $x={stubThis:e=>e};function eS(e){let{id:t}=e;return{...e,id:Zx(t),transports:e.transports}}function tS(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 nS=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 rS({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 nS({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 nS({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 nS({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 nS({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 nS({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new nS({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 nS({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new nS({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(!tS(t))return new nS({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new nS({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 nS({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 nS({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 iS=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}}},aS=[`cross-platform`,`platform`];function oS(e){if(e&&!(aS.indexOf(e)<0))return e}async function sS(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(!Qx())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:Zx(t.challenge),user:{...t.user,id:Zx(t.user.id)},excludeCredentials:t.excludeCredentials?.map(eS)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=iS.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw rS({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){cS(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=Xx(e))}catch(e){cS(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=Xx(c.getAuthenticatorData())}catch(e){cS(`getAuthenticatorData()`,e)}return{id:o,rawId:Xx(s),response:{attestationObject:Xx(c.attestationObject),clientDataJSON:Xx(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:oS(a.authenticatorAttachment)}}function cS(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 lS(){if(!Qx())return uS.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?uS.stubThis(new Promise(e=>e(!1))):uS.stubThis(e.isConditionalMediationAvailable())}var uS={stubThis:e=>e};function dS({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 nS({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new nS({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!tS(t))return new nS({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new nS({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 nS({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 fS(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(!Qx())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(eS));let a={...t,challenge:Zx(t.challenge),allowCredentials:i},o={};if(n){if(!await lS())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=iS.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw dS({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=Xx(u.userHandle)),{id:c,rawId:Xx(l),response:{authenticatorData:Xx(u.authenticatorData),clientDataJSON:Xx(u.clientDataJSON),signature:Xx(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:oS(s.authenticatorAttachment)}}var pS=`1.7.28`,mS=Symbol.for(`better-auth:broadcast-channel`),hS=()=>Math.floor(Date.now()/1e3),gS=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:hS()}))}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 _S(e=`better-auth.message`){return globalThis[mS]||(globalThis[mS]=new gS(e)),globalThis[mS]}var vS=[],yS=0,bS=null,xS=4,SS=globalThis.nanostoresGlobal||={epoch:0},CS=()=>{let e;for(yS=0;yS<vS.length;yS+=xS)try{vS[yS](vS[yS+1].value,vS[yS+2],vS[yS+3])}catch(t){e=t}if(vS.length=0,e)throw e},wS=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=yS+xS;t<vS.length;)vS[t]===e?vS.splice(t,xS):t+=xS;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){SS.epoch++;let i=!vS.length&&!0;for(let i of t)bS?.has(i)||(bS?.add(i),vS.push(i,n,e,r));i&&CS()},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},TS=2,ES=5,DS=6,OS=10,kS=(e,t,n,r)=>(e.events=e.events||{},e.events[n+OS]||(e.events[n+OS]=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+OS](),delete e.events[n+OS])}),AS=(e,t)=>kS(e,t,TS,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}}),jS=1e3,MS=(e,t)=>kS(e,n=>{let r=t(n);r&&e.events[DS].push(r)},ES,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[DS]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[DS])t();e.events[DS]=[]}},jS)},()=>{e.listen=n,e.off=r}});function NS(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function PS(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(!PS(e[n],t[n]))return!1;return!0}if(NS(e)&&NS(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)||!PS(e[r],t[r]))return!1;return!0}return!1}function FS(e,t){return AS(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var IS=Symbol.for(`better-auth:focus-manager`),LS=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 RS(){return globalThis[IS]||(globalThis[IS]=new LS),globalThis[IS]}var zS=Symbol.for(`better-auth:online-manager`),BS=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 VS(){return globalThis[zS]||(globalThis[zS]=new BS),globalThis[zS]}var HS=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,US={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},WS=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function GS(e){return e instanceof Date&&!isNaN(e.getTime())}function KS(e){let t=WS.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 GS(f)?f:null}function qS(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 US)return US[s];if(!HS.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=KS(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function JS(e,t={strict:!0}){return qS(e,t)}var YS=Symbol.for(`better-auth:auth-query`);function XS(e){let t=wS(e);return Object.defineProperty(t,YS,{value:!0}),t}var ZS=()=>typeof window>`u`;function QS(e,t){return PS(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}var $S=(e,t,n,r)=>{let i=XS({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>o(e)});MS(i,()=>FS(i,QS));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&&PS(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 MS(i,()=>{if(ZS())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},eC=()=>Math.floor(Date.now()/1e3),tC=5;function nC(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||VS().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=eC(),t();else if(e?.event===`visibilitychange`){if(eC()-c.lastSessionRequest<tC)return;c.lastSessionRequest=eC(),t()}else t()}},d=e=>{_S().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=_S().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=RS().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=VS().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=_S().setup(),c.cleanupFocusSetup=RS().setup(),c.cleanupOnlineSetup=VS().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 rC=()=>`Deno`in globalThis,iC=()=>`Bun`in globalThis,aC=Object.create(null),oC=e=>({}),sC=new Proxy(aC,{get(e,t){return oC()[t]??aC[t]},has(e,t){return t in oC()||t in aC},set(e,t,n){let r=oC(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=oC(!0);return delete n[t],!0},ownKeys(){let e=oC(!0);return Object.keys(e)}});sC.NODE_ENV;function cC(e,t){return typeof process<`u`?{}[e]??t:rC()?Deno.env.get(e)??t:iC()?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return cC(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return cC(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return cC(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return cC(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return cC(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return cC(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return cC(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function lC(){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 uC(e){let t=e.split(`
20
- at `);return t.length<=1?e:(t.splice(1,1),t.join(`
21
- at `))}function dC(e,t){class n extends e{#e;constructor(...e){if(lC()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=uC(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 fC={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};dC(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:fC[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 pC=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},mC=47;function hC(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===mC;)t--;return t===e.length?e:e.slice(0,t)}function gC(e){try{return(hC(new URL(e).pathname)||`/`)!==`/`}catch{throw new pC(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function _C(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new pC(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof pC?t:new pC(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function vC(e,t=`/api/auth`){if(_C(e),gC(e))return e;let n=hC(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function yC(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 bC(e,t,n,r,i){if(e)return vC(e,t);if(r!==!1){let e=sC.BETTER_AUTH_URL||sC.NEXT_PUBLIC_BETTER_AUTH_URL||sC.PUBLIC_BETTER_AUTH_URL||sC.NUXT_PUBLIC_BETTER_AUTH_URL||sC.NUXT_PUBLIC_AUTH_URL||(sC.BASE_URL===`/`?void 0:sC.BASE_URL);if(e)return vC(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&yC(o,`proto`)&&yC(a,`host`))try{return vC(`${o}://${a}`,t)}catch{}if(n){let e=xC(n.url);if(!e)throw new pC(`Could not get origin from request. Please provide a valid base URL.`);return vC(e,t)}if(typeof window<`u`&&window.location)return vC(window.location.origin,t)}function xC(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var SC=[`javascript:`,`data:`,`vbscript:`];function CC(e){let t;try{t=new URL(e)}catch{return!0}return!SC.includes(t.protocol)}var wC={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&CC(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},TC=()=>typeof window>`u`,EC=jS;function DC(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 OC(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function kC(e){return!e||e.session===null&&e.user===null?null:e}function AC(e,t){return PS(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function jC(e,t){let n=wS(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=XS({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});FS(s,AC);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}=OC(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}=OC(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=kC(i),u=s.value,d=u.data!=null&&l!=null&&PS(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()+EC,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 MS(s,()=>{let e;TC()||(e=setTimeout(()=>{d()},0));let r=nC({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 MC=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)}},NC=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}},PC=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}},FC=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 IC(e){if(typeof e==`number`)return new PC({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new PC(e);case`exponential`:return new FC(e);default:throw Error(`Invalid retry strategy`)}}var LC=[`get`,`post`,`put`,`patch`,`delete`];function RC(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return LC.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var zC=/^[a-z][a-z\d+.-]*:\/\/[^/?#]+/i,BC=/^\/+/;function VC(e){let t=e.length;for(;t>0&&e[t-1]===`/`;)t--;return e.slice(0,t)}function HC(e,t){let n=e.indexOf(t);return n===-1?[e,void 0]:[e.slice(0,n),e.slice(n+1)]}var UC=e=>e===`.`||e===`..`,WC=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function GC(e,t){let n=t.get(e);if(n===void 0)return WC(e);if(UC(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function KC(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 qC(e,t){let n=KC(e,t);return e.split(`/`).map(e=>GC(e,n)).join(`/`)}function JC(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 YC(e,t){if(!t)return e;let n=`${VC(t)}/`;return e.startsWith(n)?e.slice(n.length):e}function XC(e,t,n,r){let[i]=HC(e,`#`),[a,o=``]=HC(i,`?`),s=t.replace(BC,``),c=JC(`${o}&${n??``}`,r),l=`${VC(a)}/${s}${c}`;return zC.test(l)?new URL(l):l}function ZC(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},{path:a}=RC(e),o=a===e?e:`/${a}`,s=o.match(zC)?.[0],[c,l]=HC(s?o.slice(s.length):YC(o,n),`?`),u=qC(c,r);return XC(s??n??``,u,l,i)}var QC=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},$C=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ew(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 $C.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function tw(e){try{return JSON.parse(e),!0}catch{return!1}}function nw(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 rw(e){try{return JSON.parse(e)}catch{return e}}function iw(e){return typeof e==`function`}function aw(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&iw(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&iw(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function ow(e){return e?[`POST`,`PUT`,`PATCH`,`DELETE`].includes(e.toUpperCase()):!1}function sw(...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 cw(e){let t=new Headers(sw(e?.headers,await QC(e)));if(!t.has(`content-type`)){let n=lw(e?.body);n&&t.set(`content-type`,n)}return t}function lw(e){return nw(e)?`application/json`:null}function uw(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function dw(e,t){let{body:n}=e;return n?!nw(n)||typeof n==`string`?n:uw(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function fw(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=RC(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function pw(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var mw=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function hw(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new mw(n.issues);return n.value}function gw(e){"@babel/helpers - typeof";return gw=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},gw(e)}function _w(e,t){if(gw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(gw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function vw(e){var t=_w(e,`string`);return gw(t)==`symbol`?t:t+``}function yw(e,t,n){return(t=vw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bw(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 xw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bw(Object(n),!0).forEach(function(t){yw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Sw=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await NC(e,t),o=aw(a),s=new AbortController,c=a.signal??s.signal,l=ZC(i,a),u=await cw(a),d=dw(a,u),f=fw(i,a),p=xw(xw({},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}=pw(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(xw(xw({},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=ew(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??rw)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await hw(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e(xw(xw({},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??rw,b=await h.text(),x=tw(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:xw(xw({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e(xw(xw({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=IC(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 Sw(e,xw(xw({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new MC(h.status,h.statusText,x?S:b);return{data:null,error:xw(xw({},S),{},{status:h.status,statusText:h.statusText})}},Cw=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=xw(xw({},n),e.query!==void 0&&{query:xw(xw({},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}=RC(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 hw(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=xw(xw(xw(xw({},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 hw(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=xw({},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=xw(xw({},t),i.query)}i=xw(xw({},i),{},{body:o.input?await hw(o.input,n?.body):n?.body,params:o.params?await hw(o.params,n?.params):n?.params})}return{url:t,options:i}}}return xw({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),ww=e=>{async function t(t,n){let r=xw(xw(xw({},e),n),{},{headers:sw(e?.headers,n?.headers),plugins:[...e?.plugins||[],Cw(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await Sw(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 Sw(t,r)}return t},Tw=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{}}},Ew=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`,Dw=(e,t)=>{let n=`credentials`in Request.prototype,r=bC(e?.baseURL,e?.basePath,void 0,t)??Tw(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=ww({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?JS(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[wC],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=jC(d,e),h=!1,g=e=>{h||e===null||(h=!0,DC(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:Ew,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=kx(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 Ow(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function kw(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Aw=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,jw=/['\u2019]/g;function Mw(e){return e.replace(jw,``).match(Aw)??[]}function Nw(e){return Mw(e).map(e=>e.toLowerCase()).join(`-`)}function Pw(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`||Ow(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(Nw).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:ow(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 Fw(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,atomListeners:o,$store:s}=Dw(e),c={};for(let[e,t]of Object.entries(r))c[`use${kw(e)}`]=t;return Pw({...n,...c,hydrateSession:i,$fetch:a,$store:s},a,t,r,o)}var Iw=(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 fS({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof nS?e.code:`AUTH_CANCELLED`,message:Jx.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:Jx.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 sS({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 nS?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:Jx.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:Jx.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:Jx.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),Lw=()=>{let e=wS();return{id:`passkey`,version:Yx,$InferServerPlugin:{},getActions:(t,n)=>Iw(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:$S(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:Jx}},Rw=`1.7.28`,zw=e=>({id:`sso-client`,version:Rw,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}});function Bw(e){if(e.indexOf(`%`)===-1)return e;try{return decodeURIComponent(e)}catch{return e}}var Vw=/^[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E\x5F\x60\x61-\x7A\x7C\x7E]+$/,Hw=/^[\x20\x21\x23-\x3A\x3C-\x5B\x5D-\x7E]*$/;function Uw(e){return e.length<2||!e.startsWith(`"`)||!e.endsWith(`"`)?e:e.slice(1,-1)}function Ww(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 Gw(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=Ww(n.slice(0,e)),i=Uw(Ww(n.slice(e+1)));Vw.test(r)&&Hw.test(i)&&t.set(r,Bw(i))}return t}function Kw(e){return typeof document>`u`?null:Gw(document.cookie).get(e)??null}var qw=(e={})=>{let t=e.cookieName||`better-auth.last_used_login_method`;return{id:`last-login-method-client`,version:pS,getActions(){return{getLastUsedLoginMethod:()=>Kw(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=>Kw(t)===e}}}},Jw=()=>({id:`magic-link`,version:pS,$InferServerPlugin:{}}),Yw=qx({INVALID_SESSION_TOKEN:`Invalid session token`}),Xw=()=>({id:`multi-session`,version:pS,$InferServerPlugin:{},atomListeners:[{matcher(e){return e===`/multi-session/set-active`},signal:`$sessionSignal`}],$ERROR_CODES:Yw}),Zw=qx({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`}),Qw=e=>({id:`two-factor`,version:pS,$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`&&CC(e.twoFactorPage)&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:Zw}),$w=e=>Fw({baseURL:hx(e,e),withCredentials:!0,plugins:[Qw({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}}),Lw(),Jw(),zw(),Xw(),qw()]}),eT=e=>{let t=e?.editor?.backendURL??on?.backendURL;t||(t=Vn,console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=$w(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 tT=s(null),nT=({children:e,manager:t})=>F(tT.Provider,{value:t,children:e}),rT=()=>t(tT);S();var iT=()=>{let e=rT(),[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 aT=()=>{let e=rT(),[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])}},oT=()=>{let{setLocaleDictionaries:e,setLocaleDictionary:t}=aT();return{setLocaleDictionaries:e,setLocaleDictionary:t}};S();var sT=()=>{let e=rT();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])},cT=()=>{let e=rT(),[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,...sT()}};S();var lT=()=>{let e=rT(),[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}},uT=()=>{let e=rT();return A(()=>e?.pingClient(),[e])},dT=`__intlayer_editor_manager__`,fT=`__intlayer_editor_manager_events__`,pT=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[fT]||(e[fT]=new EventTarget),e[fT]},mT=()=>typeof window>`u`?null:window[dT]??null,hT=e=>{if(typeof window<`u`){let t=window;t[dT]=e}pT().dispatchEvent(new CustomEvent(`change`,{detail:e}))},gT=e=>{let t=pT(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},_T=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}({}),vT=.3,yT=[`mouseup`,`touchend`,`touchcancel`],bT=e=>{let t=e.focusedContent.value,n=()=>{for(let e of yT)document.removeEventListener(e,n,!0);setTimeout(()=>{e.focusedContent.value===t&&e.focusedContent.set(null)})};for(let e of yT)document.addEventListener(e,n,!0)},xT=e=>e.parentElement??e.getRootNode().host??null,ST=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)},CT=e=>{let t=0;for(let n=e;n;n=xT(n)){let e=getComputedStyle(n);Number.parseFloat(e.opacity)<1&&(t+=ST(e))}return t},wT=new Map,TT=(e,t)=>{let n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_DISCONNECTED?!0:!!(n&Node.DOCUMENT_POSITION_FOLLOWING)},ET=()=>{let e=null;for(let t of wT.keys())t.isConnected&&(e&&TT(t,e)||(e=t));let t=e?wT.get(e):void 0;wT.clear(),t?.()},DT=(e,t)=>{wT.size===0&&queueMicrotask(ET),wT.set(e,t)},OT=typeof HTMLElement<`u`?HTMLElement:class{},kT=class extends OT{_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=mT();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!==Cr)}_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[Cr][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,wT.delete(this),this._updateSelectorAttr();return}let t=this._getFilteredKeyPath(),n=this._isSelected;this._isSelected=e.dictionaryKey===this._dictionaryKey&&(e.keyPath?.length??0)>0&&Ln(e.keyPath??[],t),this._updateSelectorAttr(),this._isSelected&&!n?DT(this,()=>this._scrollIntoViewIfNeeded()):this._isSelected||wT.delete(this)}_scrollIntoViewIfNeeded(){let e=this._selector?.shadowRoot?.querySelector(`.wrapper`);if(!e)return;let t=e.getBoundingClientRect(),n=t.top-CT(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*vT,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=mT();e&&this._setupManagerSubscriptions(e),this._unsubManager=gT(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=mT();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),mT()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),mT()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,null)}_handleClickOutside(e){if(e.stopPropagation(),e.target!==this._selector||!this._isSelected)return;let t=mT();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&&Ln(e.filteredKeyPath,this._getFilteredKeyPath()))?this._selector?.setAttribute(`is-selecting`,``):n.length>0?bT(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}},AT=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,kT))},jT=new WeakSet,MT=e=>{jT.add(e)},NT=e=>jT.has(e),PT=[`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(`,`),FT=`intlayer-`,IT=e=>{if(e.localName.startsWith(FT))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host.localName.startsWith(FT)},LT=e=>{let t=e.composedPath().filter(e=>e instanceof Element),n=t.findLastIndex(IT);return t.some((e,t)=>IT(e)?!1:e.matches(PT)?!0:t>n&&getComputedStyle(e).cursor===`pointer`)},RT=250,zT=`
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
- `,BT=e=>{let t=e.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>e.nodeType===Node.TEXT_NODE)},VT=typeof HTMLElement<`u`?HTMLElement:class{},HT=class extends VT{_isSelecting=!1;_pressDuration=RT;_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=zT,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`,BT(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?RT: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(NT(e))return;let t=e.metaKey||e.ctrlKey;this._isSelecting||this._isSelectingState||t?(e.preventDefault(),e.stopPropagation(),t&&this._select()):LT(e)||(MT(e),this._select())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},UT=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,HT),AT())},WT=(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}},GT=()=>Math.random().toString(36).slice(2),KT=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;_warnedRejectedOrigins=new Set;constructor(e){this._config=e,this.senderId=GT()}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:GT()};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=>WT(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)}},qT=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)}},JT=()=>{for(let e of[`mousedown`,`click`])window.dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window}))},YT=class{_messenger;_clickHandler=null;_unsubscribeMerge=null;constructor(e){this._messenger=e}startInterceptor(){typeof window<`u`&&(this._clickHandler=e=>{NT(e)||this._messenger.send(`INTLAYER_IFRAME_CLICKED`)},window.addEventListener(`click`,this._clickHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(`INTLAYER_IFRAME_CLICKED`,JT)}stopInterceptor(){this._clickHandler&&=(window.removeEventListener(`click`,this._clickHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},XT=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)}}},ZT=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)}}},QT=3e3,$T=1e4,eE=e=>typeof e==`object`&&!!e&&typeof e.isActivated==`boolean`,tE=XT(`edited_content`),nE=XT(`focused_content`),rE=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 KT(e.messenger),this.editorEnabled=new qT(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new qT(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new qT(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new qT(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new qT(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new qT(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this.displayedDictionaryKeys=new qT(`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`,initialValue:e.mode===`client`?[]:void 0}),this._urlManager=new ZT(this.messenger),this._iframeInterceptor=new YT(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,tE,e=>Object.keys(e).length>0),this._syncWithSharedState(this.focusedContent,nE)],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(;Fi(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=Pi(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=Ui(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=Pi(structuredClone(n[e]?.content??r),t,Fi(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!==Cr),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:Fi(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=Fi(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(!eE(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>$T;this.editorEnabled.value&&e&&this.editorEnabled.set(!1),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)},QT)}_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 pn(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 iE=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=u(null);i.current||=new rE({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return M(()=>(UT(),hT(a),a.start(),()=>{a.stop(),hT(null)}),[a]),M(()=>{a&&t&&Object.keys(t).length!==0&&a.configuration.set(t)},[a,t]),F(nT,{manager:a,children:e})};S();var aE=()=>{let e=rT(),[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 oE=(e,t)=>{let n=rT(),[r,i]=d(t);return M(()=>n?.messenger.subscribe(`${e}/post`,e=>i(()=>e)),[n,e]),r},sE=()=>oE(_T.INTLAYER_URL_CHANGE,void 0);S();var cE=`INTLAYER_EDITED_CONTENT_CHANGED`,lE=()=>{let{editedContent:e,setEditedContentState:t}=cT();M(()=>{if(e!==void 0)return;let n=localStorage.getItem(cE);if(n)try{t(JSON.parse(n))}catch(e){console.error(e)}},[]),M(()=>{e!==void 0&&localStorage.setItem(cE,JSON.stringify(e))},[e])};S();var uE=()=>{let e=rT(),[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 dE=(e,t,n)=>{for(let r of t)try{if(Fi(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},fE=()=>{let{localeDictionaries:e}=aT(),t=uE(),{setFocusedContent:n,setFocusedContentKeyPath:r,focusedContent:i}=aE();return{focusedContent:x(()=>{if(!i||!e||i.dictionaryLocalId)return i;let n=Object.values(e).filter(e=>e.key===i.dictionaryKey),r=dE(i.keyPath??[],n,t);return{...i,...r}},[i,e,t]),setFocusedContent:n,setFocusedContentKeyPath:r}};S();var pE=5e3,mE=(e=pE)=>{let{enabled:t}=lT(),[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 hE=3e3,gE=e=>fetch(e,{method:`HEAD`,mode:`no-cors`,cache:`no-store`}).then(()=>!0).catch(()=>!1),_E=({applicationURL:e,isDisconnected:t,reloadFrame:n,intervalMs:r=hE})=>{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 gE(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])},vE=e=>{let t=iT(),{locale:n}=Ki(),r=fx(),i=e?.sessionToken??r?.accessToken,a={headers:{[Un]:n,...i&&{Authorization:`Bearer ${i}`}},...e?.options??{}},o=e?.intlayerConfiguration??t;return{options:a,resolvedConfig:o?.editor?o:void 0}},yE=e=>{let t=iT();return eT(e?.intlayerConfiguration??t)},bE=e=>{let{options:t,resolvedConfig:n}=vE(e);return Ux(t,n)},xE=e=>{let{options:t,resolvedConfig:n}=vE(e);return Bx(t,n)},SE=e=>{let{options:t,resolvedConfig:n}=vE(e);return Px(t,n)},CE=e=>{let{options:t,resolvedConfig:n}=vE(e);return Kx(t,n)},wE=e=>{let{options:t,resolvedConfig:n}=vE(e);return Vx(t,n)},TE=e=>{let{options:t,resolvedConfig:n}=vE(e);return Lx(t,n)},EE=e=>{let t=kx(e,iT(),{editor:on}),n=Tx(void 0,t),r=te(),{data:i}=Pt({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}},DE=(e,t)=>{let n=iT(),r=t??n??{editor:on},i=he(),a=te(),{data:o,isFetched:s,refetch:c}=Pt({queryKey:[`session`],queryFn:async()=>(await eT(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}},OE=({session:e,intlayerConfiguration:t}={})=>{let{session:n,fetchSession:r,revalidateSession:i,setSession:a}=DE(e,t),{oAuth2AccessToken:o}=EE(t),s=fx();return{session:n,fetchSession:r,setSession:a,revalidateSession:i,oAuth2AccessToken:o,isAuthenticated:!!(n?.user||o||s?.accessToken)}},kE=({requireUser:e,requireProject:t,requireOrganization:n})=>{let{oAuth2AccessToken:r,session:i}=OE({intlayerConfiguration:iT()}),a=fx(),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),projectId:c?.id}},AE=e=>{let{requireUser:t,requireProject:n,requireOrganization:r,...i}=e,{enable:a}=kE({requireUser:t,requireProject:n,requireOrganization:r});return Pt({enabled:i?.enabled!==!1&&a,...i})},jE=[`ai`,`credits`],ME=()=>{let e=SE();return Ft({mutationKey:[`ai-translateJSON`],meta:{invalidateQueries:[jE]},mutationFn:t=>e.translateJSON(t)})},NE=()=>{let e=SE();return Ft({mutationKey:[`ai-auditContentDeclarationMetadata`],meta:{invalidateQueries:[jE]},mutationFn:t=>e.auditContentDeclarationMetadata(t)})},PE=()=>{let e=SE();return Ft({mutationKey:[`ai-auditContentDeclarationField`],meta:{invalidateQueries:[jE]},mutationFn:t=>e.auditContentDeclarationField(t)})},FE=()=>{let e=SE();return Ft({mutationKey:[`ai-customQuery`],meta:{invalidateQueries:[jE]},mutationFn:t=>e.customQuery(t)})},IE=[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]],LE=()=>{let e=yE(),t=he();return Ft({mutationKey:[`logout`],mutationFn:()=>e.signOut({}),onSettled:()=>{IE.forEach(e=>{t.removeQueries({queryKey:e})})}})},RE={newDictionaries:[],updatedDictionaries:[],upToDateDictionaries:[],error:[]},zE=(e,t)=>({newDictionaries:[...e.newDictionaries,...t.newDictionaries],updatedDictionaries:[...e.updatedDictionaries,...t.updatedDictionaries],upToDateDictionaries:[...e.upToDateDictionaries,...t.upToDateDictionaries],error:[...e.error,...t.error]}),BE=e=>e instanceof Error?e.message:String(e),VE=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=Wn(e,n),l=await Yn(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)=>zE(e,t instanceof Error?{...RE,error:(c[n]??[]).map(e=>({key:e.key,localId:e.localId,message:BE(t)}))}:{...RE,...t.data}),RE),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 HE=(e,t)=>{let n=xE();return AE({queryKey:[`dictionaries`,e],queryFn:({signal:t})=>n.getDictionaries(e,{signal:t}),requireUser:!0,requireOrganization:!0,requireProject:!0,...t})},UE=e=>{let t=xE();return AE({queryKey:[`dictionariesKeys`],queryFn:()=>t.getDictionariesKeys(),requireUser:!0,requireOrganization:!0,requireProject:!0,...e})},WE=()=>{let e=xE(),[t,n]=d(null);return{...Ft({mutationKey:[`dictionaries`],mutationFn:t=>VE(t.dictionaries,t=>e.pushDictionaries(t),{onProgress:n}),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}}),progress:t}},GE=()=>{let e=xE();return Ft({mutationKey:[`dictionaries`],mutationFn:t=>e.deleteDictionary(t.dictionaryId),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}})},KE=()=>{let e=wE();return Pt({queryKey:[`editor`,`dictionaries`],queryFn:()=>e.getDictionaries()})},qE=()=>{let e=wE();return Ft({mutationKey:[`editor`,`dictionaries`],mutationFn:t=>e.writeDictionary(t)})},JE=(e,t)=>{let n=bE();return AE({queryKey:[`projects`,e],queryFn:({signal:t})=>n.getProjects(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},YE=(e,t)=>{let n=CE();return AE({queryKey:[`tags`,e],queryFn:({signal:t})=>n.getTags(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},XE=()=>{let{session:e,revalidateSession:t,setSession:n}=OE(),{mutate:r}=LE(),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 ZE=2e3,QE=3e4,$E=2**31-1,eD=[`editorAuth`],tD=s(null),nD=()=>t(tD),rD=async()=>(await(await fetch(`/api/auth`)).json()).data,iD=({children:e})=>{let t=he(),[n,r]=d(!1),[i,a]=d(0),[o,s]=d(!1),[c,l]=d(!1),{data:u}=Pt({queryKey:eD,queryFn:rD,refetchInterval:e=>e.state.data?.isLoginPending?ZE:!1,refetchOnWindowFocus:!0}),f=u?.auth??null;M(()=>{if(!f?.expiresAt)return;let e=new Date(f.expiresAt).getTime()-Date.now();if(e>$E)return;let n=setTimeout(()=>t.invalidateQueries({queryKey:eD}),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),QE);return()=>clearTimeout(e)},[p,i]);let m=A(()=>{r(!0),a(e=>e+1),fetch(`/api/auth/login`,{method:`POST`}).then(()=>t.invalidateQueries({queryKey:eD})).finally(()=>r(!1))},[t]),h=A(()=>{l(!0),fetch(`/api/auth/logout`,{method:`POST`}).then(e=>e.json()).then(e=>t.setQueryData(eD,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 F(tD.Provider,{value:v,children:F(dx,{value:_,children:e})})},aD=({children:e})=>F(lx,{children:F(Gt,{children:F(iD,{children:[F(Zc,{}),e]})})}),oD={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`},sD=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>F(`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:F(`div`,{style:{minHeight:`${a}px`},className:G(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})});S();var cD=({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 F(`div`,{className:G(`w-full`,f),children:[F(K,{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:Ss,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}),F(sD,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:s,role:`region`,"aria-labelledby":S,children:e})]})},lD=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>F(`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:F(cD,{isOpen:a,label:t,header:F(`div`,{className:`flex w-full`,children:[F(`div`,{className:`flex w-full items-center justify-between`,children:[F(`span`,{className:G(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&F(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&F(`p`,{className:`text-card-foreground ps-3 text-sm`,children:n})]}),children:F(`div`,{className:`size-full px-2`,children:r})})}),uD=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:Ar},s=[...t,o];return F(lD,{level:t.length,title:`${a}`,description:``,isSelected:Ln(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:F(XD,{...e,keyPath:s,section:n})},JSON.stringify(n))})},dD=new Set,fD=null,pD=()=>{fD=null;let e=[...dD];dD.clear();for(let t of e)t()},mD=e=>typeof requestAnimationFrame>`u`?()=>{}:(dD.add(e),fD??=requestAnimationFrame(pD),()=>{dD.delete(e),dD.size===0&&fD!==null&&(cancelAnimationFrame(fD),fD=null)});S();var hD=e=>e?.getAttribute(`aria-selected`)===`true`,gD=[`aria-selected`,`data-active`,`data-indicator`],_D=150,vD=(e,{selector:t=hD,isHoverable:n=!1,orientation:r=`horizontal`}={selector:hD,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=mD(()=>{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()},_D)};for(let e of t)r.observe(e,{attributes:!0,attributeFilter:gD}),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 yD=({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}=vD(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 bD=[{content:`Off`,value:!1},{content:`On`,value:!0}],xD=Ko(`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}}),SD=Ko(`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`}}),CD=Ko(`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`}}}),wD=e=>{let{choices:t=bD,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}=yD({choices:t,value:e.value,defaultValue:e.defaultValue,onChange:e.onChange,hoverable:e.hoverable,disabled:e.disabled},`horizontal`);return F(`div`,{className:xD({color:n,disabled:m,className:a}),role:`tablist`,"aria-disabled":m?`true`:void 0,children:F(`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(SD({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&&F(`div`,{className:G(CD({color:n})),style:f,ref:d})]})})},TD=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Fi(n,e,uE());if(a!==void 0&&typeof a!=`boolean`)return F(b,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=a??t;return F(`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:F(wD,{value:s,onChange:t=>r({keyPath:e,newValue:String(t)})})})};S();var ED=e=>{let{keyPath:t,section:n}=e;return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[Er]).map(r=>{let a={type:Er,key:r},o=[...t,a],s=n[Er][r];return F(b,{children:[F(`span`,{className:`flex items-center font-bold`,children:r}),i(XD,{...e,key:r,keyPath:o,section:s})]})})})};S();var DD=e=>{let{keyPath:t,section:n}=e;return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[wr]).map(r=>{let a={type:wr,key:r},o=[...t,a],s=n[wr][r];return F(b,{children:[F(`span`,{className:`flex items-center font-bold`,children:r}),i(XD,{...e,key:r,keyPath:o,section:s})]})})})},OD=(...e)=>e.filter(Boolean).join(` `),kD=Ko(`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`}}),AD=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>F(`input`,{className:OD(kD({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),jD=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>F(`textarea`,{className:G(`resize-none`,kD({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r});S();var MD=24,ND=12,PD=({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=MD*r+ND;n.height=`${Math.max(Math.min(i,a),36)}px`};return m(()=>{(a.value??a.defaultValue)&&s()},[a.value,a.defaultValue,t,r]),F(jD,{ref:e=>{o.current=e},onChange:e=>{n?.(e),s()},className:G(`overflow-y-auto`,t&&`resize-none`,e),...a})};S();var FD=({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]),F(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[F(`div`,{className:G(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,F(K,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:bs,onClick:f,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),F(K,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Ic,onClick:p,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),F(`div`,{className:G(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[F(`span`,{className:`ms-2 flex w-full p-1 text-sm leading-6 whitespace-pre-wrap`,children:m}),F(K,{label:`Edit`,Icon:uc,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 ID=({onSave:e,onCancel:t,ref:n,...r})=>{let i=u(null);return c(n,()=>i.current),F(FD,{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:F(PD,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},LD=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:i,onFocusKeyPath:a,renderSection:o})=>{let s=uE(),c=r??Fi(n,e,s);if(c&&typeof c!=`string`)return F(b,{children:`Error loading section - Edited content Incoherence with the original content format`});let l=e.length,u=String(c??t);return F(`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):F(ID,{"aria-label":`Editable field`,defaultValue:u,onSave:t=>i({keyPath:e,newValue:t}),onCancel:()=>null})})},RD=e=>{let{keyPath:t,section:n}=e,{addEditedContent:r}=cT(),i=Fi(e.editedContent,t),a=n[Or],{content:o}=n,s=[...t,{type:Or}];return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:[F(`span`,{className:`text-sm text-neutral`,children:[a,` `]}),F(LD,{...e,keyPath:s,section:o,editedContentValue:i?.content,onContentChange:i=>{r(e.dictionary.localId,{...n,content:i.newValue},t)}})]})};S();var zD=e=>{let{keyPath:t,section:n}=e,r=n[Br];return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:Br,key:n},a=[...t,i];return F(b,{children:[F(`span`,{className:`flex items-center font-bold`,children:n}),F(XD,{...e,keyPath:a,section:r[n]})]},n)})})},BD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Ir}],i=n[Ir];return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:F(XD,{...e,keyPath:r,section:i})})},VD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Dr}],i=n[Dr];return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:F(XD,{...e,keyPath:r,section:i})})},HD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Fr}],i=n[Fr];return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:F(XD,{...e,keyPath:r,section:i})})};S();var UD=O(e=>{let{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:i}=e;return x(()=>Object.keys(n??{}).filter(e=>!YD.includes(e)),[n]).map(a=>{let o={key:a,type:kr},s=[...t,o],c=Ln(s,r);return F(lD,{level:t.length,title:Xn(a),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),i(c?[]:s)},children:F(XD,{...e,keyPath:s,section:n[a]})},a)})});S();var WD=({onSave:e,onCancel:t,ref:n,...r})=>{let i=u(null);return c(n,()=>i.current),F(FD,{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:F(AD,{ref:i,...r})})},GD=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Fi(n,e,uE());if(a!==void 0&&typeof a!=`number`)return F(b,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=String(a??t);return F(`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:F(WD,{"aria-label":`Editable number field`,type:`number`,defaultValue:s,onSave:t=>r({keyPath:e,newValue:t}),onCancel:()=>null})})};S();var KD=e=>{let{keyPath:t,section:n}=e,r=n[Tr];return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:Tr,key:n},a=[...t,i];return F(b,{children:[F(`span`,{className:`flex items-center font-bold`,children:n}),F(XD,{...e,keyPath:a,section:r[n]})]},n)})})};S();var qD=e=>{let{keyPath:t,section:n}=e,r=n[Vr];return F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let a={type:Vr,key:n},o=[...t,a];return F(b,{children:[F(`span`,{className:`flex items-center font-bold`,children:n}),i(XD,{...e,key:n,keyPath:o,section:r[n]})]})})})},JD=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:Cr,key:r},a=[...t,i],o=n[Cr][r];return F(XD,{...e,keyPath:a,section:o})};S();var YD=[`filePath`,`id`,`nodeType`],XD=O(e=>{let t=uE(),n=x(()=>Fi(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=x(()=>Hi(n),[n]);if(typeof n==`object`)return r===`reactNode`?F(`span`,{className:`text-xs text-neutral`,children:`React node not editable`}):r===`nested`?F(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):F(r===`markdown`?HD:r===`html`?BD:r===`translation`?JD:r===`enumeration`?DD:r===`plural`?KD:r===`gender`?zD:r===`select`?qD:r===`condition`?ED:r===`insertion`?VD:r===`array`?uD:r===`file`?RD:UD,{...e,section:n});if(typeof n==`string`)return F(LD,{...e,section:n});if(typeof n==`number`)return F(GD,{...e,section:n});if(typeof n==`boolean`)return F(TD,{...e,section:n})});S();var ZD=({dictionary:e,...t})=>{let n=uE(),{editedContent:r,addEditedContent:a}=cT(),{focusedContent:o,setFocusedContentKeyPath:s}=fE();return F(`div`,{className:`flex flex-col gap-2`,children:i(XD,{...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})})},QD={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`},$D=Ko(`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`}]}),eO=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>F(`div`,{className:G($D({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 tO=({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 F(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[F(AD,{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)&&F(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[u&&F(b,{children:[F(K,{Icon:bs,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`}),F(K,{Icon:Ic,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 nO=`​`,rO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(nO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===nO?``:t.split(nO).join(``)}).join(`
61
- `)},iO=e=>{let t=e.split(`
62
- `);return t.length===0?[``]:t},aO=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null})(),oO=(e,t)=>{if(t<=0)return 0;if(aO){let n=[...aO.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},sO=(e,t)=>{if(t>=e.length)return e.length;if(aO){let n=[...aO.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},cO=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]??``);)n--;for(;n>0&&/\S/.test(e[n-1]??``);)n--;return n},lO=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]??``);)n++;for(;n<e.length&&/\s/.test(e[n]??``);)n++;return n},uO=(e,t)=>e.slice(0,t).lastIndexOf(`
63
- `)+1,dO=(e,t)=>{let n=e.indexOf(`
64
- `,t);return n===-1?e.length:n},fO=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=d(()=>iO(i)),s=u(null),c=u(null),l=e!==void 0,f=u(a);f.current=a,M(()=>{l&&e!==void 0&&o(iO(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=iO(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=rO(s.current),i=iO(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=oO(r,t.start),n=r.slice(0,e)+r.slice(t.start);x(n,e)}else{if(t.start>=r.length)return;let e=sO(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?uO(n,t.start):e.altKey?cO(n,t.start):oO(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?dO(n,t.start):e.altKey?lO(n,t.start):sO(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}},pO=({index:e,text:t,isLast:n,ghostText:r})=>F(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[F(`span`,{"data-editable":!0,children:t||`​`}),r&&F(`span`,{"data-ghost":!0,className:`pointer-events-none text-neutral select-none`,"aria-hidden":`true`,children:r}),!n&&F(`br`,{})]}),mO=24,hO=12,gO=({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}=fO({value:e,defaultValue:t,onChange:n,disabled:i}),ee=u(null),P=e=>{ee.current=e,S.current=e};c(y,()=>({getContainer:()=>ee.current,getText:C,focus:()=>ee.current?.focus(),getCursorOffset:j,setCursorAtOffset:e=>{M(N(e,x))}})),m(()=>{if(!s||!ee.current)return;let e=ee.current,t=mO*o+hO,n=mO*a+hO;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 I=x.length===1&&x[0]===``,te=f&&p!==void 0&&h!==void 0;return F(`div`,{className:`relative w-full`,children:[I&&r&&F(`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}),F(`div`,{...b,ref:P,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":te?`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`,kD({variant:d,validationStyleEnabled:l?`enabled`:`disabled`}),s&&`overflow-y-auto`,_),children:x.map((e,t)=>F(pO,{index:t,text:e,isLast:t===x.length-1,ghostText:te&&p===t?f:void 0},t))})]})};S();var _O=({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 F(gO,{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 vO=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let{isAuthenticated:o}=XE(),[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 F(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[F(_O,{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)&&F(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&F(b,{children:[F(K,{Icon:bs,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`}),F(K,{Icon:Ic,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:p,disabled:n})]}),i]})]},e)},yO=(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},bO=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>F(`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&&F(`span`,{className:`ms-1 text-error`,"aria-hidden":`true`,title:`This field is required`,children:`*`})]});S();var xO=new Map,SO=new Map,CO=e=>{try{return localStorage.getItem(e)}catch{return null}},wO=(e,t)=>{try{t===null?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}},TO=e=>{let t=xO.has(e)?xO.get(e):CO(e);return t===`undefined`?null:t},EO=e=>{for(let t of SO.get(e)??[])t()},DO=(e,t)=>{xO.set(e,t),wO(e,t),EO(e)},OO=e=>{let t=e.key===null?[...SO.keys()]:[e.key];for(let e of t)xO.delete(e),EO(e)},kO=(e,t)=>{SO.size===0&&window.addEventListener(`storage`,OO);let n=SO.get(e)??new Set;return n.add(t),SO.set(e,n),()=>{n.delete(t),n.size===0&&SO.delete(e),SO.size===0&&window.removeEventListener(`storage`,OO)}},AO=(e,t)=>{if(e===null)return t;try{return JSON.parse(e)}catch(e){return console.error(e),t}},jO=(e,t)=>{let[n]=d(t),r=A(t=>kO(e,t),[e]),i=h(r,()=>TO(e),()=>null),a=x(()=>AO(i,n),[i,n]),o=A(t=>{let r=typeof t==`function`?t(AO(TO(e),n)):t;r!==void 0&&DO(e,JSON.stringify(r))},[e,n]),s=A(()=>{xO.delete(e),EO(e)},[e]),c=A(()=>DO(e,null),[e]);return x(()=>[a,o,s,c],[a,o,s,c])},MO=(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 NO=s({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),PO=()=>t(NO),FO=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{let{locale:r}=Ki(),[i,a]=jO(`locale-content-selector-selected-locales`,t??[r]),o=x(()=>MO(i,e,t,r),[i,e,t,r]);return M(()=>{e.length&&JSON.stringify(o)!==JSON.stringify(i)&&a(o)},[e,o,i,a]),F(NO,{value:x(()=>({availableLocales:e,selectedLocales:o,setSelectedLocales:a}),[e,o,a]),children:n})},IO=(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 LO=384,RO=8,zO=1e3,BO=16,VO=50,HO=`[role="option"]:not([data-disabled])`,UO=()=>{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)})}},WO=s(null),GO=()=>{let e=t(WO);if(!e)throw Error(`Select parts must be rendered inside <Select>`);return e},KO=()=>{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=``},zO),e.current)}},qO=e=>e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey,JO=e=>e===void 0||e===``,YO=({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]=Yo({value:t,defaultValue:n,onChange:e=>{e!==void 0&&r?.(e)}}),[h,g]=Yo({value:i,defaultValue:a,onChange:o}),_=u(null),[v]=d(UO),y=j();return F(WO.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&&F(`input`,{type:`hidden`,name:c,value:p??``})]})},XO=e=>F(`div`,{role:`group`,...e}),ZO=({placeholder:e,children:t,style:n,...r})=>{let{value:i,itemStore:a}=GO(),o=h(a.subscribe,()=>JO(i)?void 0:a.get(i)?.label,()=>void 0);return F(`span`,{style:{pointerEvents:`none`,...n},...r,children:t??(JO(i)?e:o)})},QO=({validationStyleEnabled:e=!1,className:t,children:n,ref:r,onClick:i,onKeyDown:a,disabled:o,...s})=>{let c=GO(),l=KO(),u=c.disabled||o;return F(`button`,{ref:$o(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":JO(c.value)?``:void 0,suppressHydrationWarning:!0,className:G(kD({validationStyleEnabled:e?`enabled`:`disabled`}),`flex cursor-pointer items-center justify-between whitespace-nowrap`,`disabled:cursor-not-allowed [&>span]:line-clamp-1`,t),onClick:e=>{i?.(e),e.defaultPrevented||c.setOpen(!c.open)},onKeyDown:e=>{if(a?.(e),!(e.defaultPrevented||c.open)){if(qO(e)&&(e.key!==` `||l.hasSearch())){let t=c.itemStore.entries().filter(([,e])=>!e.disabled),n=t[IO(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,F(As,{"aria-hidden":!0,className:`size-4 opacity-50`})]})},$O=({direction:e,viewportRef:t})=>{let n=u(void 0),r=()=>clearInterval(n.current);return M(()=>r,[]),F(`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:BO})},VO)},onPointerLeave:r,children:F(e===`up`?Os:Ss,{})})},ek=(e,t,n)=>{let r=e.getBoundingClientRect(),i=getComputedStyle(e).direction===`rtl`,a=n.scrollHeight+(t.offsetHeight-n.clientHeight),o=window.innerHeight-r.bottom-RO,s=r.top-RO,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(LO,c===`bottom`?o:s),maxWidth:i?r.right-RO:window.innerWidth-r.left-RO}}},tk=e=>{e&&(e.focus({preventScroll:!0}),e.scrollIntoView?.({block:`nearest`}))},nk=({className:e,children:t,style:n,presenceRef:r,onKeyDown:i,...a})=>{let o=GO(),s=KO(),c=u(null),l=u(null),[f,p]=d(null),[h,g]=d({canScrollUp:!1,canScrollDown:!1}),_=()=>[...c.current?.querySelectorAll(HO)??[]],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(ek(e,t,n))};m(y,[]),m(()=>{if(!f||!o.open)return;let e=_();tk(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??=mD(()=>{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(qO(e)&&(e.key!==` `||r)){let r=IO(t.map(e=>e.textContent??``),s.append(e.key),n);r!==-1&&tk(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(),tk(t[c]))};return F(`div`,{ref:$o(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&&F($O,{direction:`up`,viewportRef:l}),F(`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&&F($O,{direction:`down`,viewportRef:l})]})},rk=s(!1),ik=({children:e,...t})=>{let{open:n}=GO(),{isMounted:r,ref:i}=Zo(n),[a,o]=d(null);return m(()=>{o(document.createDocumentFragment())},[]),r?D(F(nk,{presenceRef:i,...t,children:e}),document.body):a?D(F(rk.Provider,{value:!0,children:F(`div`,{children:e})}),a):null},ak=({className:e,...t})=>F(`div`,{className:G(`px-1 py-0.5 text-sm font-semibold`,e),...t}),ok=({value:e,disabled:n=!1,textValue:r,className:i,children:a,onClick:o,onPointerMove:s,onPointerLeave:c,...l})=>{let d=GO(),f=t(rk),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?F(`span`,{ref:p,children:a}):F(`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:[F(`span`,{className:`absolute inset-e-2 flex size-3.5 items-center justify-center`,children:h&&F(bs,{className:`size-4`})}),F(`span`,{ref:p,children:a})]})},sk=({className:e,...t})=>F(`div`,{"aria-hidden":!0,className:G(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),Q=YO;Q.Group=XO,Q.Value=ZO,Q.Trigger=QO,Q.Content=ik,Q.Label=ak,Q.Item=ok,Q.Separator=sk,S();var ck=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}},lk=({value:e,onChange:t})=>{let{comparator:n,numberValue:r}=x(()=>ck(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]),F(`div`,{className:`flex gap-1`,children:[F(Q,{onValueChange:a,defaultValue:n,children:[F(Q.Trigger,{className:`w-20`,children:F(Q.Value,{placeholder:`Select a comparator`})}),F(Q.Content,{children:[F(Q.Item,{value:`<`,children:`<`}),F(Q.Item,{value:`<=`,children:`<=`}),F(Q.Item,{value:`=`,children:`=`}),F(Q.Item,{value:`>=`,children:`>=`}),F(Q.Item,{value:`>`,children:`>`})]})]}),F(AD,{type:`number`,"aria-label":`Quantity`,defaultValue:o??void 0,onChange:e=>s(e.target.value),className:`min-w-4`})]})};S();var uk=({rawContent:e})=>{let[t,n]=d(``);return M(()=>{pn(async()=>{let{default:e}=await import(`./purify.es-BQJV6A36.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?F(`div`,{dangerouslySetInnerHTML:{__html:t}}):F(`div`,{})};S();var dk=_(()=>pn(()=>import(`./MarkDownRender-CvJXcrHW.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2]))),fk=_(()=>pn(()=>import(`./MarkdownEditor-DOscG2B0.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([3,2,4,1]))),pk=O(function({label:e,...t}){let[n,r]=d(!1);return F(cD,{header:e,label:e,onToggle:e=>{e&&!n&&r(!0)},children:n?F(Mk,{...t}):null})}),mk=({keyPath:e,dictionary:t,...n})=>{let{editedContent:r,addEditedContent:i}=cT(),a=iT(),{mutate:o,isPending:s}=PE();return F(vO,{variant:`default`,onContentChange:n=>i(t.localId,n,e),additionalButtons:F(K,{Icon:Pc,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})},hk=({keyPath:e,dictionary:t,...n})=>{let{addEditedContent:r}=cT();return F(tO,{variant:`default`,onContentChange:n=>r(t.localId,n,e),...n})},gk=[{content:`False`,value:!1},{content:`True`,value:!0}],_k=({dictionary:e,keyPath:t,...n})=>{let{addEditedContent:r}=cT();return F(wD,{choices:gk,value:!0,onChange:n=>r(e.localId,n,t),color:`text`,size:`sm`,...n})},vk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{locale:i,defaultLocale:a}=Ki(),{selectedLocales:o}=PO(),s=e[Cr];return F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex w-full flex-col gap-2`,children:o.map(e=>{let o=`${JSON.stringify(t)}-translation-${e}`;return F(b,{children:[F(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:F(`td`,{className:`flex w-full`,children:lr(e,i)})}),F(`tr`,{className:`flex`,children:F(`td`,{className:`flex w-full`,children:F(Nk,{section:s[e]??Li(s[a]),keyPath:[...t,{type:Cr,key:e}],dictionary:n,renderSection:r})})})]},o)})})})},yk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=cT(),{addNewEnumeration:a,removeEnumeration:o}=V(QD),s=e[wr],c=Object.keys(s)[0];return F(`div`,{className:`flex flex-col gap-2`,children:[F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(e[wr]).map(a=>{let l=[...t,{type:wr,key:a}],u=`${JSON.stringify(t)}-enumeration-${a}`;return F(b,{children:[F(`tr`,{className:`mt-2 w-full`,children:F(`td`,{className:`flex w-full`,children:F(`div`,{className:`flex flex-1`,children:F(K,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:Ec,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),F(`tr`,{className:`w-full p-2`,children:F(`td`,{className:`flex w-full`,children:F(lk,{value:a,onChange:r=>{let o=yO(e[wr],a,r),s={...e,[wr]:o};console.log(`newValue`,s),i(n.localId,s,t)}})})}),F(`tr`,{className:`block w-full`,children:F(`td`,{className:`flex w-full`,children:F(Mk,{section:s[a]??Li(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),F(K,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Li(s[c])??``,[...t,{type:wr,key:`unknown`}]),Icon:fc,className:`m-2`,children:a.text})]})},bk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=cT(),{addNewSelectCase:a,removeSelectCase:o}=V(QD),s=e[Vr],c=Object.keys(s)[0]??``;return F(`div`,{className:`flex flex-col gap-2`,children:[F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(s).map(a=>{let l=[...t,{type:Vr,key:a}],u=`${JSON.stringify(t)}-select-${a}`;return F(b,{children:[F(`tr`,{className:`mt-2 w-full`,children:F(`td`,{className:`flex w-full`,children:F(`div`,{className:`flex flex-1`,children:F(K,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:Ec,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),F(`tr`,{className:`w-full p-2`,children:F(`td`,{className:`flex w-full`,children:F(tO,{"aria-label":`Edit case`,type:`text`,variant:`default`,onContentChange:r=>{let o={...e,[Vr]:yO(s,a,String(r))};i(n.localId,o,t)},children:a})})}),F(`tr`,{className:`block w-full`,children:F(`td`,{className:`flex w-full`,children:F(Mk,{section:s[a]??Li(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),F(K,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Li(s[c])??``,[...t,{type:Vr,key:`newCase`}]),Icon:fc,className:`m-2`,children:a.text})]})},xk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Er];return F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return F(b,{children:[F(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:F(`td`,{className:`flex w-full`,children:String(e)})}),F(`tr`,{className:`block w-full`,children:F(`td`,{className:`flex w-full`,children:F(Nk,{section:i[e]??Li(i.true),keyPath:[...t,{type:Er,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},Sk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Br];return F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return F(b,{children:[F(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:F(`td`,{className:`flex w-full`,children:String(e)})}),F(`tr`,{className:`block w-full`,children:F(`td`,{className:`flex w-full`,children:F(Nk,{section:i[e]??Li(i.male),keyPath:[...t,{type:Br,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},Ck=[`zero`,`one`,`two`,`few`,`many`,`other`],wk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Tr];return F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex w-full flex-col gap-2`,children:Ck.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return F(b,{children:[F(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:F(`td`,{className:`flex w-full`,children:e})}),F(`tr`,{className:`block w-full`,children:F(`td`,{className:`flex w-full`,children:F(Nk,{section:i[e]??Li(i.other),keyPath:[...t,{type:Tr,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},Tk=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=cT(),{addNewElement:a,removeElement:o}=V(QD);return F(`div`,{className:`flex flex-col gap-2`,children:[F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex w-full flex-col gap-2`,children:e.map((a,s)=>{let c=`${JSON.stringify(t)}-array-${s}`;return F(b,{children:[F(`tr`,{className:`mt-2 w-full p-2`,children:F(`td`,{className:`flex w-full`,children:F(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[F(`span`,{className:`text-xs`,children:String(s)}),F(K,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,onClick:()=>{let e=[...t,{type:Ar,key:s}];i(n.localId,void 0,e)},Icon:Ec,children:o.text})]})})}),F(`tr`,{className:`block w-full`,children:F(`td`,{className:`flex w-full`,children:F(Nk,{section:a??Li(e[0]),keyPath:[...t,{type:Ar,key:s}],dictionary:n,renderSection:r})})})]},c)})})}),F(K,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>{let r=[...t,{type:Ar,key:e.length}];i(n.localId,Li(e[0])??``,r,!1)},Icon:fc,children:a.text})]})},Ek=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return F(`table`,{className:`w-full`,children:F(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:kr,key:e}],s=i[e]??Li(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?F(b,{children:[F(`tr`,{className:`mt-2 p-2 text-xs`,children:F(`td`,{className:`flex w-full`,children:String(e)})}),F(`tr`,{className:`block w-full`,children:F(`td`,{className:`flex w-full`,children:F(Mk,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):F(`tr`,{className:`block w-full border-t border-neutral/10 py-1`,children:F(`td`,{className:`flex w-full`,children:F(pk,{label:Xn(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},Dk=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=d(0),a=[{content:`Edit`,value:0},{content:`Preview`,value:1}],o=[...t,{type:Ir}],s=e[Ir];return F(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[F(wD,{choices:a,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),F(Nk,{section:s,keyPath:o,dictionary:n,renderSection:r===1?e=>F(uk,{rawContent:e}):void 0})]})},Ok=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=d(0),{addEditedContent:a}=cT(),o=[{content:`Edit`,value:0},{content:`Raw`,value:1},{content:`Preview`,value:2}],s=[...t,{type:Fr}],c=e.markdown??``;return F(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[F(wD,{choices:o,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),F(Nk,{section:c,keyPath:s,dictionary:n,renderSection:r===0?(e,t)=>F(T,{fallback:F(Vo,{}),children:F(fk,{defaultValue:e,onChange:e=>a(n.localId,e,t)},JSON.stringify(t))}):r===2?e=>F(T,{fallback:F(Vo,{}),children:F(dk,{children:e})}):void 0})]})},kk=({section:e,keyPath:t,...n})=>{let r=[...t,{type:Dr}];return F(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:F(Nk,{section:e[Dr],keyPath:r,...n})})},Ak=({section:e,keyPath:t,...n})=>{let r=[...t,{type:Or}],i=e[Or],{content:a}=e;return F(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[F(`span`,{className:`text-sm text-neutral`,children:[i,` `]}),F(Nk,{section:a,keyPath:r,...n})]})},jk=({keyPath:e,dictionary:t,renderSection:n,section:r,...i})=>{let{addEditedContent:a}=cT(),o=r[jr],s=[...e,{type:jr}];return F(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[F(bO,{children:`Dictionary key`}),F(tO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,dictionaryKey:String(e)},s)},children:o.dictionaryKey??``}),F(bO,{children:`Path (optional)`}),F(tO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,path:e===``?void 0:e},s)},children:o.path??``})]})},Mk=O(function({section:e,keyPath:t,dictionary:n,renderSection:r}){let{tsxNotEditable:i}=V(QD),a=Hi(e);return a===`reactNode`?F(`div`,{className:`flex w-full flex-col gap-2`,children:[F(`span`,{children:`(React Node)`}),F(`span`,{className:`flex text-xs text-muted-foreground`,children:i})]}):a===`nested`?F(jk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`translation`?F(vk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`enumeration`?F(yk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`condition`?F(xk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`select`?F(bk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`gender`?F(Sk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`plural`?F(wk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`insertion`?F(kk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`markdown`?F(Ok,{dictionary:n,keyPath:t,section:e}):a===`html`?F(Dk,{dictionary:n,keyPath:t,section:e}):a===`file`?F(Ak,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`array`?F(Tk,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`object`?F(Ek,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`number`?F(`div`,{className:`w-full p-2`,children:F(hk,{dictionary:n,keyPath:t,type:`number`,"aria-label":`Edit field`,children:e})}):a===`text`?F(`div`,{className:`w-full p-2`,children:typeof r==`function`?r(e,t):F(mk,{variant:`default`,"aria-label":`Edit field`,keyPath:t,dictionary:n,children:e})}):a===`boolean`?F(`div`,{className:`w-full p-2`,children:F(_k,{dictionary:n,keyPath:t,value:e})}):F(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(e,null,2),JSON.stringify(t,null,2),`NodeType : `,a]})}),Nk=O(function(e){return F(eO,{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:F(Mk,{...e})})}),Pk=[wr,Tr,Er,Br,Vr],Fk=[Fr,Ir,Dr],Ik=[Mr,Nr,Pr,Ur],Lk=[`zero`,`one`,`two`,`few`,`many`,`other`],Rk=/^[A-Za-z_$][\w$-]*$/,zk=(e,t)=>{let n=Rk.test(t)?t:`[${JSON.stringify(t)}]`;return e===``?n:n.startsWith(`[`)?`${e}${n}`:`${e}.${n}`},Bk=(e,t)=>`${e}[${t}]`,Vk=e=>e[e.nodeType],Hk=(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=Hi(e),l=[...r.typeChain,i];if(i===`translation`&&r.cellKey===`*`){let i=Vk(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?Li(a):t,{...r,cellKey:e,keyPath:[...r.keyPath,{type:Cr,key:e}],typeChain:l,isLocalized:!0,isMissing:r.isMissing||n})}c(r,e)}else if(Fk.includes(i)){let t=Vk(e),n={...r,keyPath:[...r.keyPath,{type:i}],wrappers:[...r.wrappers,i],typeChain:l};typeof t==`string`||t==null?a(n,t??``,`leaf`,l,Uk(Lr,n.wrappers)):s(t,n),c(r,e)}else if(Pk.includes(i)){let t=a(r,e,`group`,l),n=Object.entries(Vk(e)??{});for(let[e,a]of n)s(a,o(r,t,zk(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,Bk(r.path,n),`[${n}]`,{type:Ar,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=zk(r.path,t),a={type:kr,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`:Uk(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=Wk(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)=>Lk.indexOf(r.get(e)?.label??``)-Lk.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},Uk=(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`:Ik.includes(e)?`readonly`:`text`,Wk=(e,t)=>{let n=[],r=e;for(let e=0;e<8;e++){let e=Hi(r);if(n.push(e),e===`translation`){let e=Vk(r)??{};r=e[t]??Object.values(e)[0]}else if(Fk.includes(e))r=Vk(r);else break}return n},Gk=(e,t)=>`${e}::${t}`,Kk=e=>Hi(e)===Fr,qk={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 Jk=s(null),Yk=e=>{let n=t(Jk)??e;return{triggerId:`unrollable-panel-button-${n}`,panelId:`unrollable-panel-${n}`}},Xk=({children:e,className:t,identifier:n,...r})=>{let i=`${n}${j()}`,{triggerId:a}=Yk(i);return F(Jk,{value:i,children:F(`div`,{className:G(`group/popover relative flex cursor-pointer`,t),id:a,"aria-haspopup":!0,...r,children:e})})},Zk=({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}=Yk(o);return F(eO,{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})},Qk=({identifier:e,...t})=>{let{panelId:n}=Yk(e);return F(`button`,{type:`button`,popoverTarget:n,...t})};Xk.Detail=Zk,Xk.Trigger=Qk,S();var $k=8,eA=(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-$k,m=f>=$k,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-$k-o:i.bottom+$k,x=s-a-$k,S=c-o-$k;t.style.left=`${Math.max($k,Math.min(h,x))}px`,t.style.top=`${Math.max($k,Math.min(b,S))}px`},tA=({identifier:e,xAlign:t=`start`,yAlign:n=`below`,onOpenChange:r,onBeforeToggle:i,className:a,ref:o,...s})=>{let{triggerId:c,panelId:l}=Yk(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`)&&eA(r,e,t,n)},i=null,a=()=>{i||=mD(()=>{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 F(eO,{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 nA=16,rA=16,iA=e=>F(Xk,{...e}),aA=({xAlign:e=`start`,yAlign:t=`below`,...n})=>{let r=u(null),{triggerId:i}=Yk(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-rA,m=l.right-rA;f(Math.max(p,m));let h=n.classList.contains(`invisible`);h&&(n.style.visibility=`hidden`,n.classList.remove(`invisible`)),a=mD(()=>{a=null;let r=n.getBoundingClientRect();h&&(n.style.visibility=``,n.classList.add(`invisible`));let i=t,f=d-l.bottom-nA,p=l.top-nA;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-rA,_=l.right-rA,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||=mD(()=>{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]),F(Zk,{...n,xAlign:a,yAlign:s,ref:r,style:{...n.style,maxWidth:l?`${l}px`:void 0}})},oA=iA;oA.Detail=aA,oA.Trigger=Qk,oA.Panel=tA;var sA=Ko(`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`}}),cA=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>F(`div`,{className:sA({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e});function lA(e){return typeof e==`object`?e.key:e}function uA(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 dA(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 fA(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var pA=(e,t)=>Math.abs(e-t)<1.01,mA=(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 hA({offset:e,isScrolling:t,elementMax:n,holdOffset:r,scrollOffset:i,pendingWrite:a,clampedMaxAtWrite:o,ownWriteAt:s}){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`:!t&&s!==null&&Math.abs(e-s)<1.5?`restEcho`:`external`}var gA=e=>e===`smooth`||e===`smoothFinishing`;function _A({kind:e,offset:t,command:n,target:r}){let i,a=()=>i??=r();return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!gA(n.phase)&&!pA(t,n.lastTargetOffset)&&!pA(t,a())&&(e!==`restEcho`||a()===n.lastTargetOffset)&&e!==`clampedEcho`}var vA=40;function yA(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<vA;)n--;if(n<0)return!1;let r=e[n],i=n-1;for(;i>=0&&r.t-e[i].t<vA;)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 bA(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<vA;)n--;if(n<0)return!1;let r=e[n];return Math.abs(t.offset-r.offset)/(t.t-r.t)>=.05}var xA,SA=()=>{if(xA!==void 0)return xA;if(typeof navigator>`u`)return xA=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return xA=!0;let e=navigator.maxTouchPoints;return xA=navigator.platform===`MacIntel`&&e!==void 0&&e>0},CA,wA=()=>CA===void 0?CA=SA()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):CA,TA=()=>!SA()||wA(),EA={capture:!0,passive:!0},DA=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,EA),e.addEventListener(`touchend`,n,EA),e.addEventListener(`touchcancel`,n,EA),()=>{e.removeEventListener(`touchstart`,t,EA),e.removeEventListener(`touchend`,n,EA),e.removeEventListener(`touchcancel`,n,EA),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}},OA=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},kA=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()}}},AA=e=>e,jA=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},MA=(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(OA(n)),!r.ResizeObserver)return()=>{};let a=kA(r),o=new r.ResizeObserver(()=>{let t=()=>{i(OA(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},NA={passive:!0},PA=typeof window>`u`||`onscrollend`in window,FA=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&PA,o=0,s=a?null:mA(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,NA),a&&r.addEventListener(`scrollend`,u,NA),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},IA=(e,t)=>FA(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),LA=(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`]},RA=(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})},zA=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,BA=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function VA(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 HA=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.builtMeasurementOptions=null,this.builtItemSizeCacheVersion=-1,this.pendingResizes=[],this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.initialMeasurementsCacheApplied=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._trailing=0,this._drawnListEnd=1/0,this._iosGesture=new DA({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`&&bA(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand(),this._retryClampedAdjustment()}}),this._lastElementOffset=null,this.pendingWrite=null,this._ownWriteAt=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=kA(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:AA,rangeExtractor:jA,onChange:()=>{},measureElement:LA,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=>lA(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||VA(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._followAnchor(o)))},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=dA(()=>(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._trailing=0,this._clampedAdjustment=null,this.pendingWrite=null,this._ownWriteAt=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;this._readTrailing(n);let 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:_A({kind:a,offset:e,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,a===`readBack`||a===`clampedReadBack`||a===`clampedEcho`?this._ownWriteAt=e:a!==`restEcho`&&(this._ownWriteAt=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||yA(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._readTrailing(this._elementMaxScrollOffset()),this.maybeNotify()}this._noteClampMax();let t=this.pendingScrollAnchor;this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled&&(t.kind===`anchor`?this._canWriteScroll()?BA(this.scrollState)&&!this._landedBeforeAnchor(this.scrollState,t.delta)||(this._followAnchor(t.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=t.delta,this._followAnchor(t.delta),this.notify(!1)):this.scrollToEnd({behavior:t.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,n)=>hA({offset:e,isScrolling:t,elementMax:n,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:this._clampedAdjustment?.maxAtWrite??null,ownWriteAt:this._ownWriteAt}),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=zA(t,e.index!=null&&pA(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=()=>!(SA()&&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=dA(()=>[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=dA(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],(e,t)=>{let{count:n,paddingStart:r,scrollMargin:i,getItemKey:a,enabled:o,lanes:s,laneAssignmentMode:c,gap:l}=e;this.builtMeasurementOptions=e,this.builtItemSizeCacheVersion=t,this.pendingResizes=[];let u=this.itemSizeCache;if(!o)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.initialMeasurementsCacheApplied=!1,[];if(this.laneAssignments.size>n)for(let e of this.laneAssignments.keys())e>=n&&this.laneAssignments.delete(e);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),!this.initialMeasurementsCacheApplied&&this.measurementsCache.length===0&&!this.lanesSettling&&(this.initialMeasurementsCacheApplied=!0,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let d=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),s===1){let e=n*2,t=this._singleLaneMeasurements?.flat;if(!t||t.length<e){let n=new Float64Array(e);t&&d>0&&n.set(t.subarray(0,d*2)),t=n}let o=d===0?Array(n):this._singleLaneMeasurements.items.slice(),s;if(d===0)s=r+i;else{let e=d-1;s=t[e*2]+t[e*2+1]+l}for(let e=d;e<n;e++){let n=a(e);o[e]=n;let r=u.get(n),i=typeof r==`number`?r:this.options.estimateSize(e);t[e*2]=s,t[e*2+1]=i,s+=i+l}this._singleLaneMeasurements={flat:t,items:o};let c=uA(o,t);return this.measurementsCache=c,c}let f=this.measurementsCache.slice(0,d),p=Array(s).fill(void 0),m=new Float64Array(s),h=0;for(let e=0;e<d;e++){let t=f[e];t&&(p[t.lane]===void 0&&h++,p[t.lane]=e,m[t.lane]=t.end)}for(let e=d;e<n;e++){let t=a(e),n=this.laneAssignments.get(e),o,d,g=c===`estimate`||u.has(t);if(n!==void 0&&this.options.lanes>1){o=n;let e=p[o],t=e===void 0?void 0:f[e];d=t?t.end+l:r+i}else if(h===s){let t=0,n=m[0],r=p[0];for(let e=1;e<s;e++){let i=m[e];(i<n||i===n&&p[e]<r)&&(t=e,n=i,r=p[e])}o=t,d=n+l,g&&this.laneAssignments.set(e,o)}else o=e%this.options.lanes,d=r+i,g&&this.laneAssignments.set(e,o);let _=u.get(t),v=typeof _==`number`?_:this.options.estimateSize(e),y=d+v;f[e]={index:e,start:d,size:v,end:y,key:t,lane:o},p[o]===void 0&&h++,p[o]=e,m[o]=y}return this.measurementsCache=f,f},{key:!1,debug:()=>this.options.debug}),this.calculateRange=dA(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes,this._getLayoutTotalSize()+this.options.scrollMargin,this._trailing],(e,t,n,r,i,a)=>{if(e.length===0||t===0)return this.range=null,null;let o=Math.max(i+a-t,0);return this.range=GA(e,t,Math.min(n,o),r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range},{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=dA(()=>{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(!BA(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.canShiftFromPendingResizes=()=>this.options.lanes===1&&this._singleLaneMeasurements!==null&&this.shouldAdjustScrollPositionOnItemSizeChange===void 0&&!this.lanesChangedFlag&&!this.lanesSettling&&this.getMeasurementOptions()===this.builtMeasurementOptions&&this.itemSizeCacheVersion===this.builtItemSizeCacheVersion+this.pendingResizes.length,this.resizeItem=(e,t)=>{var n;if(!this.isIndexInRange(e))return;let r=0;if(this._resizeBatch?.sync){if(this.canShiftFromPendingResizes())for(let t of this.pendingResizes)t.index<e&&(r+=t.delta);else this.getMeasurements()}let i,a,o,s=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&s!=null)o=this.options.getItemKey(e),a=s[e*2]+r,i=s[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;o=t.key,a=t.start,i=t.size}let c=this.itemSizeCache.get(o)??i,l=t-c;if(l!==0){let r=this.options.anchorTo===`end`&&!BA(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=r?this._getLayoutTotalSize():0,u=this.getScrollOffset(),d=this.itemSizeCache.has(o)?a+c<=u&&this.scrollDirection!==`backward`:a<u,f=!BA(this.scrollState)&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?d:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:o,start:a,size:i,end:a+i,lane:0},l,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(o,t),this.itemSizeCacheVersion++,this.pendingResizes.push({index:e,delta:l});let p=!1;if(this._awaitingCommandReadBack()||(r?p=this.applyScrollAdjustment(this._getLayoutTotalSize()-s):f&&(p=this.applyScrollAdjustment(l))),this._resizeBatch){this._resizeBatch.notify=!0,(n=this._resizeBatch).sync||(n.sync=p);return}this.notify(p),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}else if(this.options.lanes>1&&!this.options.useCachedMeasurements&&!this.laneAssignments.has(e)){let t=this.getMeasurements()[e];t&&this.laneAssignments.set(e,t.lane)}},this.getVirtualItems=dA(()=>[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 fA(t[UA(0,t.length-1,r?e=>n[e*2]:e=>fA(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._readTrailing=e=>{if(e===null)return;let t=e+this.getSize()-this._drawnListEnd;this._trailing=t>0?t:0},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=()=>{let e=Math.max(this._getLayoutTotalSize()-this._holdOffset,0);return this._drawnListEnd=e+this.options.scrollMargin,e},this._getLayoutTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.scrollMargin+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!(SA()&&this._iosGesture.dragging())&&e!==null&&!pA(e,this.getScrollOffset())},this._followOffsetTarget=e=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=e)},this._landedBeforeAnchor=(e,t)=>e.phase!==`queued`&&(e.stableFrames>0||pA(this.getScrollOffset()-t,e.lastTargetOffset)),this._followAnchor=e=>{this._followOffsetTarget(e);let t=this.scrollState;t?.index!=null&&!t.toEnd&&this._landedBeforeAnchor(t,e)&&(this.scrollState=null)},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&&pA(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=BA(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`&&TA()){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:zA(n,e.index!=null&&pA(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},UA=(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 WA(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 GA(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=WA(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=UA(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 KA=typeof document<`u`?m:M;function qA({useFlushSync:t=!0,directDomUpdates:n=!1,directDomUpdatesMode:r=`transform`,...i}){let[,a]=e(e=>e+1,0),o=u(a).current,s=u({enabled:n,mode:r,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=n,s.current.mode=r;let c=u(!1),l=e=>{let t=s.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`}},f=(e,t,n)=>{let r=s.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`)},p=e=>{let t=s.current;if(t.enabled&&t.container){l(e);for(let t of e.getVirtualItems()){let n=e.elementsCache.get(t.key);n&&f(e,t,n)}}},m={...i,onChange:(e,n)=>{var r;let a=s.current,l=!0;if(a.enabled){p(e);let t=e.range,n=a.prevRange;l=!n||n.isScrolling!==e.isScrolling||n.startIndex!==t?.startIndex||n.endIndex!==t?.endIndex,l&&(a.prevRange=t?{startIndex:t.startIndex,endIndex:t.endIndex,isScrolling:e.isScrolling}:null)}l&&(t&&n&&!c.current?k(o):o()),(r=i.onChange)==null||r.call(i,e,n)}},[h]=d(()=>{let e=new HA(m),t=e.measureElement;return e.measureElement=n=>{c.current=!0;try{t(n)}finally{c.current=!1}let r=s.current;if(n!==null&&r.enabled&&r.container){let t=e.measurementsCache[e.indexFromElement(n)];t&&f(e,t,n)}},Object.assign(e,{containerRef:t=>{let n=s.current;n.container=t,n.lastSize=null,t!==null&&p(e)}})});return h.setOptions(m),KA(()=>h._didMount(),[]),KA(()=>(l(h),h._willUpdate())),KA(()=>{p(h)}),h}function JA(e){return qA({observeElementRect:MA,observeElementOffset:IA,scrollToFn:RA,...e})}S();var YA=6,XA=({items:e,itemHeight:t,getItemKey:n,renderItem:r,overscan:i=YA,className:a})=>{let o=u(null),s=JA({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 F(`div`,{ref:o,className:G(`min-h-0 overflow-y-auto`,a),children:F(`ul`,{className:`relative w-full`,style:{height:s.getTotalSize()},children:s.getVirtualItems().map(n=>{let i=e[n.index];return i===void 0?null:F(`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 ZA=60,QA=52,$A={added:`success`,changed:`warning`,removed:`error`},ej=e=>{if(e==null||e===``)return;let t=(typeof e==`string`?e:JSON.stringify(e)).replace(/\s+/g,` `).trim();return t.length>ZA?`${t.slice(0,ZA)}…`:t},tj=O(({entry:e,onRevert:t})=>{let n=V(qk),r=ej(e.previousValue),i=ej(e.nextValue);return F(`div`,{className:`flex h-full items-start gap-2 overflow-hidden rounded-lg px-2 py-1.5 hover:bg-text/5`,children:[F(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[F(`div`,{className:`flex min-w-0 items-center gap-2`,children:[F(`span`,{className:`truncate font-mono text-xs`,dir:`ltr`,children:[e.rowId,F(`span`,{className:`text-muted-foreground`,children:[` · `,e.cellKey===`*`?n.allLocales:e.cellKey]})]}),F(cA,{size:`xs`,color:$A[e.kind],className:`ms-auto shrink-0`,children:n[e.kind]})]}),F(`span`,{className:`flex min-w-0 items-center gap-1 text-xs`,children:[F(`span`,{dir:`auto`,className:G(`truncate text-muted-foreground`,r&&`line-through`),children:r??n.emptyValue}),F(`span`,{className:`shrink-0 text-muted-foreground`,children:`→`}),F(`span`,{dir:`auto`,className:`truncate`,children:i??n.emptyValue})]})]}),t&&F(K,{label:n.revertButton.label.value,Icon:mc,variant:`hoverable`,color:`text`,size:`icon-sm`,onClick:()=>t(e)})]})}),nj=e=>e.cellId,rj=({changeSet:e,onRevert:t,children:n,className:r})=>{let i=V(qk);return F(oA,{identifier:`change-set`,className:r,children:[n,F(oA.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:[F(`div`,{className:`flex items-center justify-between gap-2`,children:[F(`span`,{className:`text-sm font-semibold`,children:i.title}),e.length>0&&F(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:e.length})]}),e.length===0?F(`span`,{className:`text-sm text-muted-foreground`,children:i.emptyList}):F(XA,{items:e,itemHeight:QA,getItemKey:nj,renderItem:e=>F(tj,{entry:e,onRevert:t})})]})]})},ij=e=>e===``?[]:e.split(`.`),aj=e=>typeof e==`object`&&!!e,oj=(e,t)=>ij(t).reduce((e,t)=>aj(e)?e[t]:void 0,e),sj=(e,t,n)=>{let[r,...i]=ij(t);if(r===void 0)return n;let a=aj(e)?Array.isArray(e)?[...e]:{...e}:{};return a[r]=i.length===0?n:sj(a[r],i.join(`.`),n),a},cj=(e,t)=>e===t||e.startsWith(`${t}.`),lj=(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}},uj=(e,t,n)=>{let r={};for(let[t,i]of Object.entries(e))cj(t,n)||(r[t]=i);for(let[e,i]of Object.entries(t))cj(e,n)&&(r[e]=i);return r},dj=(e,{defaultValues:t,mode:n=`onSubmit`}={})=>{let r=t??{},i=new Set,a=new Map,o={values:r,errors:{},isValid:lj(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:oj(o.values,e)),u=(t,r)=>{let i=sj(o.values,t,r),a=lj(e,i),c=n===`onChange`||o.isSubmitted;s({values:i,isValid:a.isValid,errors:c?uj(o.errors,a.errors,t):o.errors})},d=t=>{t&&(r=t),s({values:r,errors:{},isValid:lj(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=lj(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 fj=({toolName:e,toolDescription:t,toolAutoSubmit:n})=>e?{toolname:e,tooldescription:t,toolautosubmit:n?``:void 0}:{},pj=s(null),mj=()=>t(pj),hj=()=>()=>{},gj=(e,t,n)=>{let r=()=>e?t(e.getState()):n;return h(e?.subscribe??hj,r,r)},_j=({form:e,name:t})=>{let n=mj(),r=e??n;if(!r)throw Error("useWatch needs a `form` option or a parent <Form>");return gj(r,()=>t===void 0?r.getValues():r.getValues(t))},vj=e=>{let t=mj(),n=e??t;return{isSubmitting:gj(n,e=>e.isSubmitting,!1),isSubmitted:gj(n,e=>e.isSubmitted,!1),isValid:gj(n,e=>e.isValid,!1)}},yj=(e,t)=>{let[n]=d(()=>dj(e,t));return n},bj=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()},xj=({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 F(pj,{value:e,children:F(`form`,{className:G(`flex flex-col gap-y-6`,r),onKeyDown:bj,noValidate:!0,...c,onSubmit:l,autoComplete:i?`on`:`off`,...fj({toolName:a,toolDescription:o,toolAutoSubmit:s})})})},Sj=({isLoading:e,...t})=>{let n=mj(),r=gj(t.type===`submit`?n:null,e=>e.isSubmitting,!1);return F(K,{isLoading:e||r,...t})};S();var Cj=({id:e,...t})=>{let n=j(),r=e??n;return F(wj,{value:{id:r},children:F(`div`,{className:`flex flex-col gap-2 p-2`,id:r,suppressHydrationWarning:!0,...t})})},wj=s({});S();var Tj=e=>typeof e==`object`&&!!e&&`target`in e&&typeof e.target==`object`,Ej=e=>{if(!Tj(e))return e;let{target:t}=e;return t.type===`checkbox`?t.checked:t.value},Dj=()=>{let e=mj();if(!e)throw Error(`Form fields must be rendered inside <Form>`);return e},Oj=e=>{let t=Dj();return{name:e,value:gj(t,()=>t.getValues(e)),onChange:n=>t.setValue(e,Ej(n)),ref:n=>t.registerElement(e,n)}},kj=s(void 0),Aj=({name:e,render:t})=>t({field:Oj(e)}),jj=e=>F(kj,{value:e.name,children:F(Aj,{...e})}),Mj=()=>{let e=t(kj),{id:n}=t(wj);return{id:n,name:e,error:gj(mj(),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 Nj=e=>/^on[A-Z]/.test(e),Pj=(e,t)=>{let n={...e,...t};for(let r of Object.keys(e)){let i=e[r],a=t[r];Nj(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},Fj=({children:e,ref:t,...n})=>{let r=C.only(e);if(!f(r))return null;let i=r;return g(i,{...Pj(n,i.props),ref:t?$o(t,i.props.ref):i.props.ref})},Ij=e=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=Mj();return F(Fj,{id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})},Lj=e=>{let{formDescriptionId:t}=Mj();return F(`p`,{className:`text-sm text-neutral`,id:t,...e})},Rj=({children:e,...t})=>{let{error:n,formMessageId:r}=Mj(),i=n??e;return i?F(`p`,{className:`text-xs font-medium text-error`,role:`alert`,id:r,...t,children:i}):null},zj=({className:e,children:t,...n})=>F(`i`,{className:G(`text-xs text-neutral-400`,e),...n,children:[`ⓘ `,t]}),Bj=({className:e,...t})=>{let{error:n,formItemId:r}=Mj();return F(bO,{className:G(`mb-2`,n&&`text-error`,e),htmlFor:r,...t})},Vj=({isRequired:e})=>e?F(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):F(b,{}),Hj=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>F(`div`,{className:`ms-1 flex gap-1 align-middle text-base leading-none`,children:[e&&F(Bj,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:G(`font-bold`,i),children:[e,F(Vj,{isRequired:t})]}),n&&F(zj,{content:n})]}),Uj=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o,className:s})=>F(Cj,{className:G(`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,s),children:[(t||e)&&F(`div`,{className:`flex max-w-full flex-col gap-1 p-1 leading-none`,children:[e&&F(Hj,{isRequired:n,info:r,htmlFor:o,children:e}),t&&F(Lj,{children:t})]}),F(Ij,{children:i}),a&&F(Rj,{"data-testid":`error-message`})]}),Wj=e=>e?{toolparamdescription:e}:{},Gj=(...e)=>t=>{for(let n of e)typeof n==`function`?n(t):n&&(n.current=t)},Kj=({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 F(Uj,{htmlFor:t,label:n,description:o,isRequired:i,info:a,showErrorMessage:s,className:c,children:F(r,{id:t,name:t,"data-testid":t,"aria-labelledby":n?`${t}-label`:void 0,"aria-label":n?void 0:t,...u,...Wj(l),ref:Gj(e.ref,p),value:d===void 0?e.value??``:d,onChange:(...t)=>{e.onChange(t[0]),f?.(...t)}})})},qj=e=>F(jj,{name:e.name,render:({field:t})=>F(Kj,{...e,field:t})}),Jj=e=>F(qj,{Element:AD,...e}),Yj=Ko(`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`}}),Xj=({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 F(p,{className:G(Yj({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&&F(`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:F(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[F(`title`,{children:`Remove badge`}),F(`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`})]})})]})},Zj=1,Qj=.9,$j=.8,eM=.6,tM=.3,nM=0,rM=(e,t)=>{let n=0;for(let r of e)if(r===t[n]&&n++,n===t.length)return!0;return!1},iM=(e,t)=>e===t?Zj:e.startsWith(t)?Qj:e.split(/[\s\-_/]+/).some(e=>e.startsWith(t))?$j:e.includes(t)?eM:rM(e,t)?tM:nM,aM=(e,t,n=[])=>{let r=t.trim().toLowerCase();return r?Math.max(...[e,...n].map(e=>iM(e.trim().toLowerCase(),r))):Zj};S();var oM=`[data-command-item]:not([aria-disabled="true"])`,sM=()=>{let e=new Map,t=new Set,n=``,r,i=()=>{for(let e of t)e()},a=(e,t=[])=>aM(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()})}},cM=s(null),lM=s(void 0),uM=()=>{let e=t(cM);if(!e)throw Error(`Command parts must be rendered inside <Command>`);return e},dM=(e,t)=>h(e.subscribe,t,t),fM=e=>[...e?.querySelectorAll(oM)??[]],pM=({children:e,ref:t,onKeyDown:n,...r})=>{let[i]=d(sM),a=j(),o=u(null),s=dM(i,i.getSearch),c=dM(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(fM(o.current)[0]?.dataset.value)},[s,c]),F(cM.Provider,{value:{store:i,listId:a},children:F(`div`,{ref:$o(t,o),tabIndex:-1,onKeyDown:e=>{if(n?.(e),e.defaultPrevented||e.nativeEvent.isComposing)return;let t=fM(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})})},mM=({value:e,onValueChange:t,...n})=>{let{store:r,listId:i}=uM(),[a,o]=Yo({value:e,defaultValue:``,onChange:t}),s=dM(r,r.getSelectedItemId);return m(()=>{r.setSearch(a)},[a]),F(`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})},hM=e=>{let{listId:t}=uM();return F(`div`,{role:`listbox`,id:t,...e})},gM=e=>{let{store:t}=uM();return dM(t,t.getVisibleCount)>0?null:F(`div`,{role:`presentation`,...e})},_M=({heading:e,children:t,...n})=>{let{store:r}=uM(),i=j(),a=j();return F(`div`,{role:`presentation`,hidden:!dM(r,()=>r.isGroupVisible(i)),...n,children:[e&&F(`div`,{id:a,"aria-hidden":!0,"data-command-group-heading":``,children:e}),F(`div`,{role:`group`,"aria-labelledby":e?a:void 0,children:F(lM.Provider,{value:i,children:t})})]})},vM=e=>{let{store:t}=uM();return dM(t,t.getSearch)?null:F(`div`,{role:`separator`,...e})},yM=({value:e,keywords:n,disabled:r=!1,onSelect:i,ref:a,onClick:o,onPointerMove:s,...c})=>{let{store:l}=uM(),f=t(lM),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=dM(l,()=>!v||l.matches(v,n)),x=dM(l,()=>!!v&&l.getSelectedValue()===v);return b?F(`div`,{ref:$o(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},bM=({className:e,...t})=>F(pM,{className:G(`flex flex-col overflow-hidden rounded-md px-3 py-2 outline-hidden`,e),...t}),xM={Input:({className:e,...t})=>F(`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:[F(Sc,{className:`size-4 shrink-0 opacity-50`}),F(mM,{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})=>F(hM,{className:G(`max-h-75 overflow-x-hidden overflow-y-auto`,e),...t}),Empty:({className:e,...t})=>F(gM,{className:G(`py-6 text-center text-sm`,e),...t}),Group:({className:e,...t})=>F(_M,{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})=>F(vM,{className:G(`-mx-1 h-px bg-border`,e),...t}),Item:({className:e,...t})=>F(yM,{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})=>F(`span`,{className:G(`ms-auto text-xs tracking-widest text-muted-foreground`,e),...t})};S();var SM=s(null),CM=()=>{let e=t(SM);if(!e)throw Error(`useMultiSelect must be used within MultiSelectProvider`);return e},wM=({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 F(SM,{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:F(bM,{onKeyDown:D,className:G(`flex w-full flex-col overflow-visible rounded-none bg-transparent p-0`,i&&`cursor-not-allowed opacity-50`,a),dir:s,"aria-disabled":i||void 0,inert:i,...c,children:o})})},TM=({className:e,getBadgeValue:t=e=>e,validationStyleEnabled:n=!1,children:r,...i})=>{let{value:a,onValueChange:o,activeIndex:s}=CM();return F(`div`,{className:G(kD({validationStyleEnabled:n?`enabled`:`disabled`}),`flex cursor-pointer flex-col gap-2`,e),...i,children:[a.length>0&&F(`div`,{className:`flex w-full flex-wrap gap-1`,children:a.map((e,n)=>F(Xj,{size:`sm`,dismissible:!0,onDismiss:()=>o(e),className:G(s===n&&`ring-2 ring-muted-foreground`),children:t(e)},e))}),F(`div`,{className:`flex w-full items-center gap-2`,children:[r,F(As,{"aria-hidden":!0,className:`size-4 shrink-0 opacity-50`})]})]})},EM=({className:e,...t})=>{let{setOpen:n,inputValue:r,setInputValue:i,activeIndex:a,setActiveIndex:o,handleSelect:s,ref:c}=CM();return F(xM.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(`flex-1 cursor-pointer rounded-none bg-transparent p-0`,`ring-0 focus-within:ring-0 hover:ring-0 dark:bg-transparent`,e,a!==-1&&`caret-transparent`)})},DM=({children:e})=>{let{open:t}=CM();return F(`div`,{className:`relative`,children:t&&e})},OM=({className:e,children:t})=>F(xM.List,{className:G(`absolute top-1 z-10 flex w-full flex-col`,`rounded-xl p-1 shadow-md`,`[scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,`bg-white dark:bg-neutral-950`,`text-foreground`,`border border-neutral-200 dark:border-neutral-800`,`transition-colors`,e),children:[t,F(xM.Empty,{children:F(`span`,{className:`text-sm text-muted-foreground`,children:`No results found`})})]}),kM=({className:e,value:t,children:n,...r})=>{let{value:i,onValueChange:a,setInputValue:o}=CM(),s=A(e=>{e.preventDefault(),e.stopPropagation()},[]),c=i.includes(t);return F(xM.Item,{...r,onSelect:()=>{a(t),o(``)},className:G(`w-full cursor-pointer rounded-lg py-1.5 ps-2 pe-8 text-foreground`,`transition-colors hover:bg-neutral/10`,`data-[selected=true]:bg-neutral/10 data-[selected=true]:text-foreground`,e),onMouseDown:s,children:[n,F(`span`,{className:`absolute inset-e-2 flex size-3.5 items-center justify-center`,children:c&&F(bs,{className:`size-4`})})]})},AM=wM;AM.Trigger=TM,AM.Input=EM,AM.Content=DM,AM.List=OM,AM.Item=kM;var jM=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>F(jj,{name:e,render:({field:c})=>F(Uj,{htmlFor:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,children:F(AM,{onValueChange:c.onChange,values:c.value,...s,children:o})})}),MM=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>F(jj,{name:e,render:({field:c})=>F(Uj,{htmlFor:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,children:F(Q,{onValueChange:c.onChange,defaultValue:c.value,...s,children:o})})});function NM(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 PM(e,t){return typeof t==`bigint`?t.toString():t}var FM=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 IM(e){return new FM(e)}function LM(e){return e==null}function RM(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function zM(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var BM=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function VM(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function HM(e){if(VM(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return VM(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function UM(e){return HM(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var WM=new Set([`string`,`number`,`symbol`]);function GM(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function KM(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function qM(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 JM(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function YM(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 XM(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 ZM(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function QM(e){return typeof e==`string`?e:e?.message}function $M(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 eN(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function tN(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:QM(e.inst?._zod.def?.error?.(e))??QM(a?.(e))??QM(t?.error?.(e))??QM(n.customError?.(e))??QM(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 nN=/[\uD800-\uDBFF]/;function rN(e){let t=e.length;if(!nN.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 iN(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function aN(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function oN(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):lN(e,n,r.value)}}function sN(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function cN(e,t,n){return sN(e,t,n,!1)}function lN(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:sN(this,t,n.bind(this))},set(e){sN(this,t,e)}})}function uN(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var dN,fN=!1,pN={configurable:!0,get(){fN=!0}};function mN(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&dN!==e._zod?dN=void 0:(dN=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,pN);let e=fN;fN=!1;try{let r=n(this);return fN?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),fN||=e,r}catch(n){throw delete this[t],fN||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function hN(e,t,n,r){let i=uN(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 gN,_N={value:void 0,enumerable:!1},vN=`captureStackTrace`in Error?Error:null;function yN(e){let t=vN;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return vN=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function bN(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){_N.value=new a(r);try{Object.defineProperty(n,"_zod",_N)}finally{_N.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),oN(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?yN(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 xN=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(gN=globalThis).__zod_globalConfig??(gN.__zod_globalConfig={});var SN=globalThis.__zod_globalConfig;function CN(e){return e&&Object.assign(SN,e),SN}function wN(){let e=this._zod;return e.message??=JSON.stringify(e.def,PM,2),e.message}function TN(e){this._zod.message=e}var EN={get:wN,set:TN,enumerable:!0,configurable:!0},DN={value:void 0,enumerable:!1},ON=new WeakSet([Object.prototype,Error.prototype]),kN=bN(`$ZodError`,(e,t)=>{e.name=`$ZodError`,DN.value=t,Object.defineProperty(e,"issues",DN),DN.value=void 0,Object.defineProperty(e,"message",EN);let n=Object.getPrototypeOf(e);ON.has(n)||(ON.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}),AN=(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 xN;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>tN(e,o,CN())));throw BM(n,a?.callee??t),n}return s.value};return t})(kN),jN=(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=>tN(e,o,CN())));throw BM(n,a?.callee??t),n}return s.value};return t})(kN),MN=(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 xN;return a.issues.length?NN(e,a.issues,i):{success:!0,data:a.value}})(kN);function NN(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>tN(e,n,CN()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var PN=(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?NN(e,a.issues,i):{success:!0,data:a.value}})(kN),FN=/^[\s\S]{0,}$/,IN=bN(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),LN=e=>{let t=e.value;return!LM(t)&&t.length!==void 0},RN=bN(`$ZodCheckMinLength`,(e,t)=>{var n;IN.init(e,t),(n=e._zod.def).when??(n.when=LN),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?rN(r):i)>=t.minimum)return;let a=iN(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zN=bN(`$ZodCheckStringFormat`,(e,t)=>{var n,r;IN.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=()=>{})}),BN=bN(`$ZodCheckRegex`,(e,t)=>{zN.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})}}),VN={major:4,minor:6,patch:7},HN=bN(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=VN;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=YM(t),a;for(let o of n){if(o._zod.def.when){if(XM(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 xN;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(eN(t.issues,n,e),i||=YM(t,n))});else{if(t.issues.length===n)continue;eN(t.issues,n,e),i||=YM(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(YM(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new xN;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 xN;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return cN(this,`~standard`,GN(this))},set"~standard"(e){sN(this,`~standard`,e)}}),UN=(e,t)=>e.issues.length?{issues:e.issues.map(e=>tN(e,t,CN()))}:{value:e.value};async function WN(e,t){let n={async:!0};return UN(await e._zod.run({value:t,issues:[]},n),n)}function GN(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return UN(r,n)}catch{}return WN(e,t)},vendor:`zod`,version:1}}var KN=bN(`$ZodString`,(e,t)=>{HN.init(e,t),e._zod.pattern=t.pattern??FN,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 qN(e,t){let n=$M(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 $M(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,eN(n.issues,t,e),n}}return i(n,a)}}var JN=e=>Array.isArray(e)?e.length:-1;function YN(e,t,n){e.issues.length&&t.issues.push(...ZM(n,e.issues)),t.value[n]=e.value}var XN=bN(`$ZodArray`,(e,t)=>{HN.init(e,t);let n=SN.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=>YN(t,r,e)));else if(YN(c,r,e),s&&c.issues.length!==0&&YM(c))break}return o.length?Promise.all(o).then(()=>r):r},qN(e,JN)});function ZN(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(...ZM(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 QN=[];function $N(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:QN,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=JM(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function eP(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(YM(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=>ZN(e,n,i,t,d,f))):ZN(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 tP=bN(`$ZodObject`,(e,t)=>{HN.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=IM(()=>$N(t));mN(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)||zM(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=VM,o=t.catchall,s,c=SN.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(YM(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=>ZN(n,t,e,r,a,o))):ZN(s,t,e,r,a,o)}return o?eP(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),nP=bN(`$ZodEnum`,(e,t)=>{HN.init(e,t);let n=NM(t.entries),r=new Set(n);e._zod.values=r,mN(e,`pattern`,e=>{let t=NM(e.def.entries).filter(e=>WM.has(typeof e));return RegExp(t.length?`^(${t.map(e=>GM(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 rP(e,t){return e.value=t.issues.length?void 0:t.value,e}var iP=bN(`$ZodOptional`,(e,t)=>{HN.init(e,t),mN(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,mN(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),mN(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${RM(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=>rP(e,t)):rP(e,r)}return t.innerType._zod.run(e,n)}}),aP=bN(`$ZodDefault`,(e,t)=>{HN.init(e,t),e._zod.optin=`defaulted`,mN(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=>oP(e,t)):oP(r,t)}});function oP(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var sP=bN(`$ZodCustom`,(e,t)=>{IN.init(e,t),HN.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=>cP(t,n,r,e));cP(i,n,r,e)}});function cP(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(aN(e))}}function lP(e){return e.checks&&=[...e.checks],e}function uP(e,t){return new e(lP({type:`string`,...qM(t)}))}function dP(e,t){return new RN({check:`min_length`,...qM(t),minimum:e})}function fP(e,t){return new BN({check:`string_format`,format:`regex`,...qM(t),pattern:e})}function pP(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...qM(n)})}var mP=bN(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);HN.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){sN(this,`with`,e)},parse(e,t){return AN(this,e,t,{callee:this.parse})},parseAsync(e,t){return jN(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return MN(this,e,t)},safeParseAsync(e,t){return PN(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 KM(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)}}),hP=bN(`ZodMiniString`,(e,t)=>{KN.init(e,t),mP.init(e,t)});function gP(e){return uP(hP,e)}var _P=bN(`ZodMiniArray`,(e,t)=>{XN.init(e,t),mP.init(e,t)});function vP(e,t){return new _P({type:`array`,element:e,...qM(t)})}var yP=bN(`ZodMiniObject`,(e,t)=>{tP.init(e,t),mP.init(e,t),hN(e,`shape`,e=>e._zod.def.shape,!1)});function bP(e,t){return new yP({type:`object`,shape:e??{},...qM(t)})}var xP=bN(`ZodMiniEnum`,(e,t)=>{nP.init(e,t),mP.init(e,t),e.options=[...e._zod.values]});function SP(e,t){return new xP({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...qM(t)})}var CP=bN(`ZodMiniOptional`,(e,t)=>{iP.init(e,t),mP.init(e,t)});function wP(e){return new CP({type:`optional`,innerType:e})}var TP=bN(`ZodMiniDefault`,(e,t)=>{aP.init(e,t),mP.init(e,t)});function EP(e,t){return new TP({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():UM(t)}})}var DP=bN(`ZodMiniCustom`,(e,t)=>{sP.init(e,t),mP.init(e,t)});function OP(e,t={}){return pP(DP,e,t)}var kP=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(Gk(n.id,e),r);return t},AP=e=>e==null||typeof e==`string`&&e.trim()===``,jP=(e,t)=>e===t||JSON.stringify(e)===JSON.stringify(t),MP=(e,t,{sourceLocale:n,originalCells:r,aiCellIds:i,lockedLocales:a})=>{let o=e.cells[t],s=Gk(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||AP(o.value))return`missing`;let c=r.get(s);return!c||!jP(c.value,o.value)?`edited`:e.isLocalized&&t!==n&&typeof o.value==`string`&&o.value===e.cells[n]?.value?`identical`:`done`},NP=(e,t)=>t===`all`||e===t,PP=(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[MP(i,t,n)]++}return r},FP=e=>{let t=e.lastIndexOf(`::`);return{rowId:e.slice(0,t),cellKey:e.slice(t+2)}},IP=(e,t)=>{let n=kP(e),r=kP(t),i=[];for(let[e,t]of r){let r=n.get(e),a=!r||r.isMissing;a&&t.isMissing||(a||t.isMissing||!jP(r?.value,t.value))&&i.push({cellId:e,...FP(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,...FP(e),keyPath:t.keyPath,kind:`removed`,previousValue:t.value,nextValue:void 0});return i},LP=[Fr,Ir,Dr],RP=[wr,Tr,Er,Br,Vr],zP=[Lr,Rr,zr],BP=e=>e[e.nodeType],VP=(e,t)=>{if(Hi(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}}},HP=(e,t,{locales:n,sourceLocale:r})=>{let i=Hi(e);if(i===t)return{node:e,isLossless:!0};if(LP.includes(i)&&!LP.includes(t))return HP(BP(e),t,{locales:n,sourceLocale:r});if(t===`translation`)return{node:{nodeType:Cr,[Cr]:Object.fromEntries(n.map(t=>[t,t===r?structuredClone(e):Li(e)]))},isLossless:!0};if(LP.includes(t)&&!LP.includes(i))return{node:{nodeType:t,[t]:structuredClone(e)},isLossless:!0};if(i===`translation`){let i=BP(e)??{},a=HP(i[r]??Object.values(i)[0]??``,t,{locales:n,sourceLocale:r});return{node:a.node,isLossless:a.isLossless&&Object.keys(i).length<=1}}if(zP.includes(i)){if(zP.includes(t))return VP(e,t)??{node:Ii(t,n),isLossless:!1};if(RP.includes(t)||t===`array`)return{node:Ii(t,n,e),isLossless:!0}}if(RP.includes(i)&&zP.includes(t)){let n=Object.values(BP(e)??{}),r=VP(n[0]??``,t);if(r)return{node:r.node,isLossless:n.length<=1}}return{node:Ii(t,n),isLossless:!1}};S();var UP=s(void 0),WP=()=>{let e=t(UP);if(!e)throw Error(`useContentGrid must be used inside ContentGridProvider`);return e},GP=({dictionary:e,lockedLocales:t,children:n})=>{let r=iT(),{editedContent:i,addEditedContent:a,removeEditedContent:o}=cT(),{mutateAsync:s,isPending:c}=ME(),[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(()=>Hk(e.content,v),[e.content,v]),b=x(()=>Hk(_,v),[_,v]),S=x(()=>new Map(b.map(e=>[e.id,e])),[b]),C=x(()=>kP(y),[y]),w=x(()=>IP(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(Gk(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}=HP(n.node,t,k);a(f,e,n.keyPath)}},[j,k,a,f]),N=A((e,t)=>j(e).every(e=>HP(e.node,t,k).isLossless),[j,k]),ee=A(e=>{D({keyPath:e.keyPath,value:e.previousValue,isMissing:!1},e.previousValue),E(t=>t.delete(e.cellId))},[D,E]),P=A(e=>E(t=>t.delete(e)),[E]),I=A(()=>u(new Set),[]),te=A(e=>{let t=w.find(t=>t.cellId===e);t?ee(t):P(e)},[w,ee,P]),ne=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]&&MP(t,n,T)===`missing`&&r.push({row:t,cellKey:n});return r},[b,S,m,h,T]),re=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(Gk(e.id,t)))}E(e=>{for(let t of o)e.add(t)})}},[h,m,s,e.description,r,D,E]),L=A((e,t)=>MP(e,t,T),[T]),R=x(()=>({dictionary:e,rows:b,rowsById:S,locales:p,sourceLocale:m,lockedLocales:h,statusContext:T,changeSet:w,getStatus:L,setCellValue:O,changeRowType:M,getIsTypeChangeLossless:N,revertChange:ee,aiCellIds:l,acceptAICell:P,acceptAllAICells:I,revertAICell:te,translateCells:re,isTranslating:c,getMissingTargets:ne}),[e,b,S,p,m,h,T,w,L,O,M,N,ee,l,P,I,te,re,c,ne]);return F(UP.Provider,{value:R,children:n})},KP=/^[A-Za-z_$][\w$-]*$/,qP=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=KP.test(e)?e:`[${JSON.stringify(e)}]`;t=t===``?r:r.startsWith(`[`)?`${t}${r}`:`${t}.${r}`}}return t},JP=(e,t)=>{let n=t.filter(e=>e.type!==Cr);if(n.length===0||Object.values(e.cells).some(e=>{let t=e.keyPath.filter(e=>e.type!==`translation`);return Ln(n,t)||Ln(t,n)}))return!0;let r=qP(n);return!!(r&&(e.id===r||e.id.startsWith(`${r}.`)||e.id.startsWith(`${r}[`)||r.startsWith(`${e.id}.`)||r.startsWith(`${e.id}[`)))},YP={[Cr]:`t`,[Fr]:`md`,[wr]:`enum`,[Dr]:`insert`,[Er]:`cond`,[Mr]:`react`,[Nr]:`preact`,[Pr]:`solid`},XP=e=>(e.length>1&&e[e.length-1]===`text`?e.slice(0,-1):e).map(e=>YP[e]??e).join(` · `),ZP=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``},QP=(e,t)=>e.isLocalized?t:[`*`],$P=(e,t)=>e.id.toLowerCase().includes(t)?!0:Object.values(e.cells).some(e=>ZP(e.value).toLowerCase().includes(t)),eF=(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===``||$P(n,c),a=!l||JP(n,s),u=r===`all`||QP(n,i).some(e=>n.cells[e]!==void 0&&NP(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))},tF=e=>{if(e.rootKeyPath&&e.kind===`group`){if(e.typeChain[0]===`object`)return`field`;if(e.typeChain[0]===`array`)return`item`}},nF=(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=tF(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},rF=(e,t,n,r)=>{let i=[];for(let n of e)if(n.kind===`leaf`)for(let e of QP(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}}},iF=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)}},aF=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)},oF=(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}},sF={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`},cF=`text-text`,lF=({status:e,className:t})=>{let{statusMissing:n,statusEdited:r,statusAI:i,statusDone:a,statusIdentical:o,statusLocked:s,statusReadonly:c}=V(sF),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:F(`span`,{className:G(`inline-flex size-4 shrink-0 items-center justify-center`,t),title:l[e],children:[(()=>{switch(e){case`missing`:case`edited`:return F(`span`,{className:`block size-2.5 rounded-full border-2 border-warning bg-text-opposite`});case`ai`:return F(wc,{className:G(`size-3.5`,cF)});case`done`:return F(bs,{className:`size-3.5 text-text`});case`identical`:return F(`span`,{className:`font-mono text-xs leading-none font-bold text-warning`,children:`=`});case`locked`:return F(Xs,{className:`size-3 text-neutral`});default:return null}})(),F(`span`,{className:`sr-only`,children:l[e]})]})};S();var uF=[`markdown`,`html`,`file`,`nested`],dF=e=>e.leafKind!==void 0&&uF.includes(e.leafKind),fF=[{content:`False`,value:!1},{content:`True`,value:!0}],pF=({value:e,isDisabled:t,onCommit:n,onStopEditing:r})=>{let{editValue:i}=V(sF),[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))},[]),F(PD,{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()}})},mF=O(({row:e,cellKey:t,onOpenEditor:n,position:r,showStatus:i=!0,className:a})=>{let{getStatus:o,setCellValue:s}=WP(),c=V(sF),[l,f]=d(!1),p=u(null),m=e.cells[t],h=o(e,t),g=h===`locked`,_=e.leafKind===`readonly`,v=dF(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 F(`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&&F(lF,{status:h,className:`mt-0.5`}),(()=>{if(!m)return null;if(_)return F(`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 F(wD,{choices:fF,value:y===!0,onChange:e=>b(e),disabled:g,color:`text`,size:`xs`});if(e.leafKind===`number`)return F(AD,{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 F(pF,{value:typeof y==`string`?y:``,isDisabled:g,onCommit:b,onStopEditing:x});let t=ZP(y);return F(`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&&F(nc,{className:`mt-0.5 size-3.5 shrink-0 text-neutral`,"aria-label":c.openEditor.value})]})});mF.displayName=`ContentGridCell`;var hF={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 gF=[{groupKey:`groupPrimitives`,nodeTypes:[Lr,Rr,zr]},{groupKey:`groupMultilingual`,nodeTypes:[Cr]},{groupKey:`groupConditional`,nodeTypes:[wr,Tr,Br,Vr,Er]},{groupKey:`groupRichText`,nodeTypes:[Fr,Ir,Dr]},{groupKey:`groupStructural`,nodeTypes:[kr,Ar,jr,Or]}],_F=({row:e,className:t})=>{let{changeRowType:n,getIsTypeChangeLossless:r}=WP(),i=V(sF),a=V(hF),[o,s]=d(!1),c=u(null),[l,f]=d(``),[p,m]=d(),h=XP(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 F(`span`,{className:C,title:i.readonlyTooltip.value,children:i.readonlyChip});let w=l.trim().toLowerCase();return F(oA,{identifier:`type-picker`,className:`inline-flex shrink-0`,children:[F(oA.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}),F(oA.Panel,{ref:c,identifier:`type-picker`,onOpenChange:b,roundedSize:`xl`,className:`min-w-74 p-2`,children:[o&&p&&F(`div`,{className:`flex flex-col gap-3 p-1`,children:[F(`p`,{className:`flex items-start gap-2 text-sm text-warning`,children:[F(Oc,{className:`mt-0.5 size-4 shrink-0`}),i.resetWarning]}),F(`div`,{className:`flex justify-end gap-2`,children:[F(K,{label:i.cancel.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>m(void 0),children:i.cancel}),F(K,{label:i.changeType.value,color:`error`,variant:`outline`,size:`sm`,onClick:()=>x(p),children:i.changeType})]})]}),o&&!p&&F(`div`,{className:`flex flex-col gap-4`,children:[F(AD,{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}),F(`div`,{className:`max-h-xl flex flex-col gap-2 overflow-y-auto`,children:gF.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:F(`div`,{className:`flex flex-col`,children:[F(`span`,{className:`px-2 py-1 text-xs text-neutral`,children:i[e]}),n.map(e=>F(`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:[F(`span`,{children:v(e)}),F(`span`,{className:`font-mono text-[10px] text-neutral`,dir:`ltr`,children:e})]},e))]},e)})})]})]})]})};S();var vF={horizontal:{forward:`ArrowRight`,backward:`ArrowLeft`},vertical:{forward:`ArrowDown`,backward:`ArrowUp`}},yF=({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}=vF[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)})}},bF=`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 xF=1.25,SF=.75,CF=e=>({paddingInlineStart:`${SF+e*xF}rem`}),wF=`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`,TF=({depth:e})=>Array.from({length:e},(e,t)=>F(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 border-s border-neutral/20`,style:{insetInlineStart:`${SF+t*xF+.4375}rem`}},t)),EF=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}=WP(),m=V(sF),h=e.kind===`group`,g=e.kind===`leaf`&&e.isLocalized?u(t,[e.id]):[],_=()=>h?F(`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]?F(mF,{row:e,cellKey:t,position:`${n}:${r}`,onOpenEditor:s},t):F(`div`,{className:`flex items-center px-2 text-xs text-neutral`,"aria-hidden":!0,children:`—`},t)):F(b,{children:[F(mF,{row:e,cellKey:`*`,position:`${n}:0`,onOpenEditor:s}),t.length>1&&F(`div`,{className:`flex items-center gap-2 px-2 py-1.5 text-xs text-neutral`,style:{gridColumn:`span ${t.length-1}`},children:[F(`span`,{className:`italic`,children:m.sameForAllLocales}),e.leafKind!==`readonly`&&F(K,{label:m.makeTranslatable.value,variant:`hoverable`,color:`text`,size:`sm`,Icon:Js,onClick:()=>p(e,`translation`),children:m.makeTranslatable})]})]});return F(`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:[F(`div`,{role:`rowheader`,className:G(wF,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:CF(e.depth),children:[F(TF,{depth:e.depth}),c&&F(K,{...c,label:m.reorderField.value,Icon:Ks,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?F(K,{label:m.toggleCollapse(i).value,Icon:Es,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)}):F(`span`,{className:`w-3.5 shrink-0`}),F(`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:aF(e.label)}),F(_F,{row:e,className:`mt-0.5`}),g.length>0&&F(K,{label:m.translateRow.value,title:m.translateRow.value,Icon:wc,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`)})]}),_()]})});EF.displayName=`ContentGridRow`;var DF=e=>e&&typeof e==`object`&&!Array.isArray(e)?Object.keys(e):[],OF=({addLine:e,gridTemplateColumns:t,rootKeys:n})=>{let{dictionary:r}=WP(),{addEditedContent:i}=cT(),a=V(sF),[o,s]=d(!1),[c,l]=d(``),[u,f]=d(),p=r.localId,m=e.parentRow?.rootKeyPath??[],h=e.parentRow?DF(e.parentRow.rootNode):n,g=()=>{let t=e.parentRow?.rootNode??[];i(p,Li(t[0])??``,[...m,{type:Ar,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:kr,key:t}]),_()},y=e.kind===`item`?a.addItem:a.addField;return F(`div`,{className:`grid min-w-full`,style:{gridTemplateColumns:t},children:F(`div`,{className:G(wF,`items-center`),style:CF(e.depth),children:[F(TF,{depth:e.depth}),F(`span`,{className:`w-3.5 shrink-0`}),o?F(`form`,{onSubmit:v,className:`flex min-w-0 flex-1 flex-col gap-1`,children:[F(`div`,{className:`flex items-center gap-1`,children:[F(AD,{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`&&_()}}),F(K,{type:`submit`,label:a.add.value,size:`sm`,color:`text`,children:a.add})]}),u&&F(`span`,{className:`text-xs text-error`,children:u})]}):F(K,{label:y.value,variant:`hoverable`,color:`neutral`,size:`sm`,Icon:fc,onClick:()=>e.kind===`item`?g():s(!0),children:y})]})})},kF={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`},AF=({children:e,className:t,identifier:n,...r})=>F(`div`,{className:G(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});AF.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>F(K,{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}),AF.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})=>F(`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:F(sD,{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 jF={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 MF(e){return Array.isArray?Array.isArray(e):HF(e)===`[object Array]`}function NF(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 PF(e){return e==null?``:NF(e)}function FF(e){return typeof e==`string`}function IF(e){return typeof e==`number`}function LF(e){return e===!0||e===!1||zF(e)&&HF(e)==`[object Boolean]`}function RF(e){return typeof e==`object`}function zF(e){return RF(e)&&e!==null}function BF(e){return e!=null}function VF(e){return!e.trim().length}function HF(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var UF=`Incorrect 'index' type`,WF=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,GF=e=>`Invalid value for key ${e}`,KF=e=>`Pattern length exceeds max of ${e}.`,qF=e=>`Missing ${e} property in key`,JF=e=>`Property 'weight' in key '${e}' must be a positive integer`,YF=`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.`,XF=Object.prototype.hasOwnProperty,ZF=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=QF(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 QF(e){let t=null,n=null,r=null,i=1,a=null;if(FF(e)||MF(e))r=e,t=$F(e),n=eI(e);else{if(!XF.call(e,`name`))throw Error(qF(`name`));let o=e.name;if(r=o,XF.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(JF(eI(o)));t=$F(o),n=eI(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function $F(e){return MF(e)?e:e.split(`.`)}function eI(e){return MF(e)?e.join(`.`):e}function tI(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(BF(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!BF(s))return;if(a===t.length-1&&(FF(s)||IF(s)||LF(s)||typeof s==`bigint`))n.push(o===void 0?PF(s):{v:PF(s),i:o});else if(MF(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,FF(t)?t.split(`.`):t,0),r?n:n[0]}var nI={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},iI={location:0,threshold:.6,distance:100},aI={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:tI,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},$=Object.freeze({...rI,...nI,...iI,...aI});function oI(e){return e>=9&&e<=13||e===32||e===160}function sI(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++)oI(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 cI=class{constructor({getFn:e=$.getFn,fieldNormWeight:t=$.fieldNormWeight}={}){this.norm=sI(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(FF(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(WF);if(FF(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(WF);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!BF(e)||VF(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(BF(i)){if(MF(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(BF(n)){if(FF(n)){if(!VF(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(BF(n.v)){let t=FF(n.v)?n.v:PF(n.v);if(!VF(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(FF(i)&&!VF(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 lI(e,t,{getFn:n=$.getFn,fieldNormWeight:r=$.fieldNormWeight}={}){let i=new cI({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(QF)),i.setSources(t),i.create(),i}function uI(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 dI(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(KF(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=uI(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function fI(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 pI(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 mI={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},hI=RegExp(`[`+Object.keys(mI).join(``)+`]`,`g`),gI=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(hI,e=>mI[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?gI(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:fI(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?gI(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}=dI(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=pI(u)),p}},vI=new Set([`fuzzy`,`include`]);function yI(e){return e.startsWith(`inverse`)}var bI=[{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)}}}}],xI=bI.length,SI=`\0`,CI=`|`;function wI(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 TI(e,t){let n=e.match(t);return n?n[1]:null}function EI(e,t={}){return e.replace(/\\\|/g,SI).split(CI).map(e=>{let n=wI(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<xI;){let e=bI[o],n=TI(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<xI;){let e=bI[o],n=TI(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var DI=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?gI(e):e,this.pattern=e,this.query=EI(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?gI(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,yI(r.type)&&(c=!0),n&&(vI.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=pI(o)),e}}return{isMatch:!1,score:1}}},OI=[];function kI(...e){OI.push(...e)}function AI(e,t){for(let n=0,r=OI.length;n<r;n+=1){let r=OI[n];if(r.condition(e,t))return new r(e,t)}return new _I(e,t)}var jI={AND:`$and`,OR:`$or`},MI={PATH:`$path`,PATTERN:`$val`},NI=e=>!!(e[jI.AND]||e[jI.OR]),PI=e=>!!e[MI.PATH],FI=e=>!MF(e)&&RF(e)&&!NI(e),II=e=>({[jI.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function LI(e,t,{auto:n=!0}={}){let r=e=>{if(FF(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=AI(e,t)),r}let i=Object.keys(e),a=PI(e);if(!a&&i.length>1&&!NI(e))return r(II(e));if(FI(e)){let r=a?e[MI.PATH]:i[0],o=a?e[MI.PATTERN]:e[r];if(!FF(o))throw Error(GF(r));let s={keyId:eI(r),pattern:o};return n&&(s.searcher=AI(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];MF(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return NI(e)||(e=II(e)),r(e)}function RI(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 zI(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){e.forEach(e=>{e.score=RI(e.matches,{ignoreFieldNorm:t})})}var BI=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 VI(e){let t=[];return e.matches.forEach(e=>{if(!BF(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 HI(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=VI(e)),r&&(a.score=e.score),a})}var UI=/[\p{L}\p{M}\p{N}_]+/gu,WI=new WeakSet;function GI(e){WI.has(e)||(WI.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 KI(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||GI(e),t=>t.match(e)||[]):e=>e.match(UI)||[]}function qI({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=KI(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=gI(n)),r(n)}}}var JI=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=qI({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=pI(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function YI(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 XI(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0)YI(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)YI(e,t.v,i,r);else YI(e,n.v,i,r)}}}function ZI(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)XI(r,i,t,n);return r}function QI(e,t,n,r){XI(e,t,n,r)}function $I(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 eL(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)$I(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 tL=class{constructor(e,t,n){this.options={...$,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new ZF(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=AI(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 cI))throw Error(UF);if(this._myIndex=t||lI(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=qI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=ZI(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!BF(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=qI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});QI(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&&eL(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(WF);this._invertedIndex&&eL(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(FF(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return IF(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&IF(n)&&n>0&&FF(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new BI(n,u);FF(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=FF(e)?FF(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),zI(d,{ignoreFieldNorm:s}),a&&d.sort(FF(e)?u:l),IF(n)&&n>-1&&(d=d.slice(0,n));return HI(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(!BF(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=RI(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=LI(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===jI.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(BF(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(!BF(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=RI(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!BF(t))return[];let r=[];if(MF(t))t.forEach(({v:t,i,n:a})=>{if(!BF(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}};tL.version=`7.5.0`,tL.createIndex=lI,tL.parseIndex=function(e,{getFn:t=$.getFn,fieldNormWeight:n=$.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new cI({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a},tL.config=$,tL.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(YF);return AI(e,{...$,...n}).searchIn(t)},tL.parseQuery=LI,kI(DI),kI(JI),tL.use=function(...e){e.forEach(e=>kI(e))};var nL=tL;S();var rL={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`}},iL=`locale-switcher`,aL=({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(jF),b=u(null),S=x(()=>t.map(t=>({locale:t,englishName:lr(t,`en`),currentLocaleName:lr(t,e),ownLocaleName:lr(t)})),[t,e]),[C,w]=d(S),T=x(()=>new nL(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?lr(e):e.toUpperCase()),F(`nav`,{className:G(f?void 0:rL[o].nav,m),"aria-label":y.value,children:F(AF,{identifier:iL,children:[F(AF.Trigger,{identifier:iL,...f&&{variant:f},color:p??`custom`,size:o===`sm`?`custom`:`md`,roundedSize:o===`sm`?`full`:`md`,className:G(!p&&`text-text`,rL[o].trigger),children:F(`div`,{className:`flex w-full items-center justify-between`,children:[F(`div`,{className:G(`text-nowrap`,rL[o].label),children:h}),F(oc,{className:G(`self-center`,rL[o].icon)})]})}),F(AF.Panel,{identifier:iL,isOverable:!0,isFocusable:!0,align:`end`,...a,children:F(eO,{className:`max-h-[80vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:s,borderColor:c,roundedSize:l,"aria-label":v.value,children:[F(`div`,{className:`p-3`,children:F(AD,{type:`search`,"aria-label":_.ariaLabel.value,placeholder:_.placeholder.value,onChange:e=>E(e.target.value),ref:b})}),F(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:C.map(({locale:r,currentLocaleName:a,ownLocaleName:o})=>F(`li`,{className:`px-1.5 py-1`,children:F(K,{onClick:()=>i(r),label:`${g} ${a}`,disabled:!(n??t).includes(r),isActive:e===r,variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,children:F(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[F(`div`,{className:`flex flex-col text-nowrap`,children:[F(`span`,{dir:cr(r),lang:r,suppressHydrationWarning:!0,children:o}),F(`span`,{className:`text-xs text-neutral`,suppressHydrationWarning:!0,children:a})]}),F(`span`,{className:`text-sm text-neutral`,children:r.toUpperCase()})]})})},r))})]})})]})})},oL=(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 sL=(e,t=`horizontal`)=>{let{setSelectedLocales:n}=PO(),{reorderLocale:r}=V(kF),i=A((e,t)=>n(n=>oL(n,e,t)),[n]);return{...yF({itemIds:e,onMove:i,orientation:t,title:r.value}),moveLocale:i}},cL=bF;S();var lL=`locale-switcher-content`,uL=({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(kF),g=u(null),{locale:_}=Ki(),{availableLocales:v,selectedLocales:y,setSelectedLocales:b}=PO(),{getDragHandleProps:S,getDropZoneProps:C}=sL(y,`vertical`),w=x(()=>v.map(e=>({locale:e,englishName:lr(e,`en`),currentLocaleName:lr(e,_),ownLocaleName:lr(e)})),[v,_]),[T,E]=d(``),[D,O]=jO(`locale-content-selector-see-all-locales`,!1),k=x(()=>new nL(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 F(`nav`,{className:G(s?void 0:rL[r].nav,n),"aria-label":p.value,children:F(AF,{identifier:lL,children:[F(AF.Trigger,{identifier:lL,label:p.value,roundedSize:`3xl`,variant:`outline`,color:`text`,size:`md`,className:G(!s&&!c&&`text-text`,!s&&rL[r].trigger),children:F(`div`,{className:`flex items-center justify-between gap-1.5`,children:[F(Ws,{className:G(`shrink-0`,r===`sm`?`size-3.5`:`size-4`)}),F(oc,{className:G(`shrink-0 self-center`,r===`sm`?`size-3`:`size-3.5`)})]})}),F(AF.Panel,{identifier:lL,isOverable:!0,isFocusable:!0,align:`end`,...e,children:F(eO,{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&&F(`div`,{className:`m-auto p-2`,children:F(wD,{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)&&F(`div`,{className:`p-3`,children:F(AD,{type:`search`,"aria-label":f.ariaLabel.value,placeholder:f.placeholder.value,onChange:e=>E(e.target.value),ref:g})}),F(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:A.map(({locale:e,currentLocaleName:n,ownLocaleName:r})=>F(`li`,{...j(e)?C(e):{},className:G(`px-1.5 py-1`,j(e)&&cL),children:F(K,{...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:F(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[j(e)&&F(Ks,{"aria-hidden":!0,className:`size-3.5 shrink-0 cursor-grab text-neutral`}),t&&F(`div`,{className:`w-4`,children:y.includes(e)&&F(bs,{className:`size-full`})}),F(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[F(`div`,{className:`flex flex-col text-nowrap`,children:[F(`span`,{dir:cr(e),lang:e,children:r}),F(`span`,{className:`text-xs text-neutral`,children:n})]}),F(`span`,{className:`text-sm text-neutral`,children:e.toUpperCase()})]})]})})},e))})]})})]})})},dL=({row:e,cellKey:t,isNarrow:n,onClose:r})=>{let{dictionary:i,aiCellIds:a,acceptAICell:o,revertAICell:s}=WP(),c=V(sF),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=>Gk(e.id,t)).filter(e=>a.has(e));return F(`section`,{"aria-label":e.id,className:`flex h-full min-h-0 w-full min-w-0 flex-col`,children:[F(`header`,{className:`flex items-center gap-2 border-b border-neutral/20 px-3 py-2`,children:[n&&F(K,{label:c.backToList.value,variant:`hoverable`,color:`text`,size:`icon-md`,Icon:ms,onClick:r}),F(`span`,{dir:`ltr`,className:`min-w-0 truncate font-mono text-sm font-semibold`,title:e.id,children:e.id}),F(_F,{row:e}),n&&e.isLocalized&&F(`div`,{className:`ms-auto shrink-0`,children:F(uL,{size:`sm`,variant:`outline`,color:`neutral`,roundedSize:`2xl`})}),!n&&F(K,{label:c.close.value,variant:`hoverable`,color:`text`,size:`icon-md`,Icon:Ic,className:`ms-auto`,onClick:r})]}),f.length>0&&F(`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:[F(wc,{className:`size-4 shrink-0`}),F(`span`,{className:`flex-1`,children:c.aiBanner}),F(K,{label:c.revert.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>f.forEach(s),children:c.revert}),F(K,{label:c.accept.value,color:`text`,size:`sm`,onClick:()=>f.forEach(o),children:c.accept})]}),F(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:l&&F(Mk,{dictionary:i,section:u,keyPath:d},e.id)})]})};S();var fL=({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]),F(`div`,{ref:a,...i,role:i.role||`region`,children:e})},pL=({className:e,...t})=>F(`div`,{className:`relative flex w-full items-center gap-1`,children:[F(Sc,{className:`absolute inset-s-2 size-4`}),F(AD,{...t,type:`search`,className:G(`ps-8`,e)})]});S();var mL={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},hL=e=>typeof e==`number`?e:mL[e]??mL.md,gL=()=>{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)},_L=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},vL=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},yL=Object.freeze({isMobileScreen:void 0,isMobileUserAgent:void 0,isMobile:void 0,isIOS:void 0,isMac:void 0}),bL,xL=()=>(bL??={isMobileUserAgent:gL(),isIOS:_L(),isMac:vL()},bL),SL=new Map,CL=e=>{let t=window.matchMedia(`(max-width: ${e}px)`),n=new Set,r=e=>({...xL(),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}},wL=e=>{let t=SL.get(e);if(t)return t;let n=CL(e);return SL.set(e,n),n},TL=()=>yL,EL=(e=`md`)=>{let t=hL(e),n=A(e=>wL(t).subscribe(e),[t]),r=A(()=>wL(t).getSnapshot(),[t]);return h(n,r,TL)};S();var DL=e=>e.split(` + `).map(e=>e.trim()),OL=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,kL=(e,t)=>{let n=t.map(OL),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(OL(e)));if(!i)return!1;let a=OL(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},AL=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,jL=(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},ML=({shortcut:e,onTriggered:t,display:n=!0,disabled:r=!1,className:i,size:a=`md`})=>{let{isMac:o}=EL(),s=jL(e,o??!1),c=x(()=>DL(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(AL(a))):s.add(a.toUpperCase()),u(s),!r&&t&&kL(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=OL(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 F(`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=AL(t);return F(`span`,{className:`inline-flex items-center`,children:[n>0&&F(`span`,{className:`text-neutral/50`,children:`+`}),F(`span`,{className:G(`min-w-4 px-0.5 text-center`,f(t)&&`scale-120 font-bold text-foreground`),suppressHydrationWarning:!0,children:i})]},r)})})};S();var NL=Ko(`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`}}),PL=Ko(`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`}}),FL=({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}=vD(s,{isHoverable:i,orientation:a});return M(()=>{d()},[t]),F(`div`,{className:G(NL({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&&F(`div`,{className:G(PL({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})};S();var IL=e=>e.map(e=>e.toUpperCase()).join(`, `),LL=({targets:e,targetLocales:t,skippedLocales:n})=>{let{translateCells:r,isTranslating:i,sourceLocale:a}=WP(),o=V(sF),[s,c]=d(!1),l=e.length===0,u=l?o.fill.value:`${o.translateMissing.value} → ${IL(t)}`;return F(fL,{onClickOutSide:()=>c(!1),listenForEscape:!0,disabled:!s,className:`inline-flex`,children:F(oA,{identifier:`content-grid-translate-missing`,children:[F(K,{label:u,variant:`outline`,color:`neutral`,size:`sm`,roundedSize:`md`,Icon:wc,isLoading:i,disabled:l||i,onClick:()=>c(e=>!e),children:F(`span`,{dir:`ltr`,children:u})}),F(oA.Detail,{identifier:`content-grid-translate-missing`,isHidden:!s,isOverable:!1,displayArrow:!1,xAlign:`end`,className:`w-72 p-3 delay-0`,children:F(`div`,{className:`flex flex-col gap-3 text-sm`,children:[F(`p`,{children:[o.confirmTranslateDescription,` `,F(`span`,{className:`font-mono`,dir:`ltr`,children:a.toUpperCase()})]}),F(`ul`,{className:`flex flex-col gap-1`,children:t.map(t=>F(`li`,{className:`flex items-center justify-between font-mono text-xs`,dir:`ltr`,children:[F(`span`,{children:t.toUpperCase()}),F(`span`,{children:e.filter(e=>e.cellKey===t).length})]},t))}),n.length>0&&F(`p`,{className:`text-xs text-neutral`,children:[o.skippedLocked,` `,F(`span`,{className:`font-mono`,dir:`ltr`,children:IL(n)})]}),F(`div`,{className:`flex justify-end gap-2`,children:[F(K,{label:o.cancel.value,variant:`outline`,color:`text`,size:`sm`,onClick:()=>c(!1),children:o.cancel}),F(K,{label:o.confirm.value,color:`text`,size:`sm`,onClick:()=>{c(!1),r(e)},children:o.confirm})]})]})})]})})},RL=({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}=WP(),p=V(sF),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 F(`div`,{className:`flex shrink-0 flex-col gap-2`,children:[F(`div`,{className:`flex flex-wrap items-center justify-between gap-x-6 gap-y-2`,children:[F(`div`,{className:`max-w-md min-w-48 flex-1`,children:F(pL,{value:e,onChange:e=>t(e.currentTarget.value),placeholder:p.searchPlaceholder.value,"aria-label":p.searchPlaceholder.value})}),F(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!s&&F(uL,{size:`sm`,variant:`outline`,color:`neutral`,roundedSize:`2xl`}),F(LL,{targets:m,targetLocales:h,skippedLocales:g}),d.size>0&&F(K,{label:p.acceptAll.value,variant:`hoverable`,color:`text`,size:`sm`,roundedSize:`md`,Icon:bs,onClick:f,children:p.acceptAll})]})]}),F(`div`,{className:`flex flex-wrap items-center gap-2 py-3`,children:[F(FL,{selectedChoice:n,hoverable:!0,color:`text`,className:`w-auto`,tabs:_.map(({filter:e,label:t,count:i,status:a})=>F(`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&&F(lF,{status:a}),F(`span`,{children:t}),i!==void 0&&F(`span`,{className:`font-mono opacity-70`,children:i})]},e))}),o&&i.missing>0&&F(K,{label:p.jumpToMissing.value,variant:`hoverable`,color:`neutral`,size:`sm`,roundedSize:`md`,Icon:Rs,className:`ms-auto`,onClick:o,children:p.jumpToMissing}),o&&i.missing>0&&F(ML,{shortcut:`J`,size:`sm`,onTriggered:o})]})]})};S();var zL=(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}},BL={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 VL=Ko(`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`}}),HL=({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},UL=e=>typeof e==`string`&&/^(\.\.?(\/|$)|[?#])/.test(e),WL=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(WL):f(e)?WL(e.props.children):!1,GL=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??HL(e),b=f??p?.startsWith(`#`)??!1,x=WL(i),S=y?`noopener noreferrer nofollow`:m,C=y?`_blank`:h??`_self`,w=l&&p&&!y&&!b&&!UL(p)?ar(p,l):p,T=w===``?void 0:w;return F(`a`,{...g,href:T,"aria-label":a,rel:S,target:C,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:G(VL({variant:t,color:n,roundedSize:r,underlined:c,size:v,className:o})),children:[_&&x?F(`span`,{children:i}):i,y&&x&&F(Bs,{className:`ms-2 inline-block size-4`}),b&&F(ic,{className:`ms-2 inline-block size-4`})]})};S();var KL=e=>e&&{neutral:`text-neutral`,text:`text-muted-foreground`,"text-inverse":`text-foreground-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,qL=Ko(`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`}}),JL=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let{linkLabel:l}=V(BL,o);return F(b,{children:[F(GL,{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:F(`span`,{itemProp:`name`,children:n})}),F(`meta`,{itemProp:`position`,content:a.toString()})]})},YL=({children:e,onClick:t,color:n,position:r,className:i,...a})=>{let{linkLabel:o}=V(BL);return F(b,{children:[F(K,{onClick:t,variant:`link`,label:`${o} ${e}`,color:n,itemProp:`item`,size:`custom`,...a,children:F(`span`,{itemProp:`name`,children:e})}),F(`meta`,{itemProp:`position`,content:r.toString()})]})},XL=({children:e,position:t,className:n,...r})=>F(`span`,{itemProp:`item`,className:G(`inline-flex items-center`,`font-medium text-muted-foreground`,`transition-colors duration-200`,n),children:[F(`span`,{itemProp:`name`,...r,children:e}),F(`meta`,{itemProp:`position`,content:t.toString()})]}),ZL=({links:e,className:t,color:n=`text`,locale:r,elementType:a=`page`,separator:o=F(Es,{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 F(`nav`,{"aria-label":s,className:`rtl-mirror-icons`,children:F(`ol`,{className:G(qL({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=KL(n);if(m)return F(b,{children:[F(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:F(`span`,{className:`text-neutral-500`,children:`…`})}),!s&&F(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:F(`span`,{className:G(g),children:o})})]},`truncated-${h}`);let _=F(XL,{position:t+1,"aria-current":f,className:G(`transition-colors duration-200`,d&&`text-foreground`),children:h},h);l?_=F(JL,{href:e.href,color:n,position:t+1,locale:r,"aria-current":f,className:G(d&&`cursor-default text-foreground`),children:h},h):u&&(_=F(YL,{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:F(b,{children:[v,F(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:F(`span`,{className:G(g),children:o})})]},h)})})})},QL=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>F(ZL,{links:[...a?[{text:Xn(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:Xn(t.key?.toString()??``)}))],locale:r,elementType:`location`,color:i}),$L=(e,t,n)=>{if(Array.isArray(e)){let r=e;return oL(r.map((e,t)=>t),Number(t),Number(n)).map(e=>r[e])}if(e&&typeof e==`object`){let r=e,i=oL(Object.keys(r),String(t),String(n));return Object.fromEntries(i.map(e=>[e,r[e]]))}return e};S();var eR=e=>{let{editedContent:t,addEditedContent:n}=cT(),r=e.localId;return{moveField:A((i,a,o)=>{let s=t?.[r]?.content??e.content,c=i.length===0?s:Fi(s,i);c&&typeof c==`object`&&n(r,$L(c,a,o),i)},[t,r,e.content,n])}};S();var tR=1,nR=(e,t)=>{let n=t.target.dataset.gridPosition;if(!n)return;let{rowIndex:r,columnIndex:i}=iF(n),a=Array.from(e.querySelectorAll(`[data-grid-position]`)).map(e=>{let{rowIndex:t,columnIndex:n}=iF(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())},rR=({className:e})=>{let t=WP(),{rows:n,rowsById:r,locales:i,sourceLocale:a,lockedLocales:o,statusContext:s,getStatus:c,getMissingTargets:l,translateCells:f,isTranslating:p}=t,m=V(sF),{locale:h}=Ki(),{selectedLocales:g}=PO(),{containerRef:_,isNarrow:v}=zL(),S=u(null),{focusedContent:C,setFocusedContentKeyPath:w}=fE(),[,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`),[ee,P]=d(()=>new Set),[I,te]=d(),[ne,re]=d();M(()=>{if(!D||D.length===0){te(void 0);return}for(let e of n)if(e.kind===`leaf`){for(let[t,n]of Object.entries(e.cells))if(Ln(D,n.keyPath)){te({rowId:e.id,cellKey:t});return}}let e=D.filter(e=>e.type!==Cr),t=D.find(e=>e.type===Cr)?.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!==Cr);if(Ln(e,a)||Ln(a,e)){t&&r.cells[t]?te({rowId:r.id,cellKey:t}):te({rowId:r.id,cellKey:n});return}}te(void 0)},[D,n]);let L=x(()=>{let e=g.map(String).filter(e=>i.includes(e));return e.length>0?e:[a]},[g,i,a]),R=ne&&i.includes(ne)?ne:L.find(e=>e!==a)??L[0]??a,z=v?[R]:L,ie=x(()=>new Set(n.filter(e=>e.kind===`group`&&e.depth>tR!==ee.has(e.id)).map(e=>e.id)),[n,ee]),B=x(()=>eF(n,r,{query:O,statusFilter:j,localeKeys:z,collapsedRowIds:ie,getStatus:c,focusedKeyPath:D}),[n,r,O,j,z,ie,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===kr),le=x(()=>nF(B,{collapsedRowIds:oe?new Set:ie,isRootObject:!oe&&ce}).filter(e=>!oe||e.type===`row`),[B,ie,oe,ce]),{moveField:ue}=eR(t.dictionary),de=x(()=>new Map(n.map(e=>[e.id,oF(e,r)])),[n,r]),{getDragHandleProps:fe,getDropZoneProps:pe}=yF({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(()=>PP(n,z,s),[n,z,s]),_e=A(e=>P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),ve=A((e,t)=>te({rowId:e,cellKey:t}),[]),ye=A(()=>te(void 0),[]),be=e=>{let t=le.findIndex(t=>t.type===`row`&&t.row.id===e.rowId),n=r.get(e.rowId)?.isLocalized?z.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}=iF(e),i=le[n];i?.type===`row`&&(t={rowId:i.row.id,cellKey:i.row.isLocalized?z[r]??`*`:`*`})}let n=rF(B,z,c,t);n&&be(n)},Se=e=>{S.current&&nR(S.current,e)},Ce=e=>{e.target===e.currentTarget&&e.currentTarget.querySelector(`[data-grid-position]`)?.focus()},we=I?r.get(I.rowId):void 0,Te=`minmax(14rem, 20rem) repeat(${z.length}, minmax(14rem, 1fr))`,Ee=e=>{let t=l([e]),n=o.has(e);return F(`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:[F(`span`,{className:`font-mono font-semibold`,dir:`ltr`,children:e.toUpperCase()}),F(`span`,{className:`truncate text-neutral`,children:lr(e,h)}),e===a&&F(cA,{color:`neutral`,size:`xs`,className:`px-1.5 text-[10px]`,children:m.sourceLocale}),n&&F(Xs,{className:`size-3 shrink-0 text-neutral`}),t.length>0&&F(K,{label:`${m.translateColumn.value} (${e.toUpperCase()})`,title:m.translateColumn.value,Icon:wc,iconClassName:`size-3.5`,variant:`none`,color:`custom`,size:`custom`,roundedSize:`sm`,disabled:p,onClick:()=>f(t),className:G(`ms-auto p-0.5`,`hover:bg-text/10`,`text-text`)})]},e)},De=(e,t)=>{let n=e.kind===`group`,r=ie.has(e.id)&&!oe,i=e.isLocalized?R:`*`;return F(`div`,{role:`row`,className:`relative flex flex-col gap-2 border-b border-neutral/10 py-3`,style:CF(e.depth),children:[F(TF,{depth:e.depth}),F(`div`,{className:`flex min-w-0 items-center gap-1.5 pe-2`,children:[n&&F(K,{label:m.toggleCollapse(r).value,Icon:Es,iconClassName:G(`size-3.5 transition-transform`,!r&&`rotate-90`),variant:`none`,color:`neutral`,size:`custom`,className:`hover:text-text`,onClick:()=>_e(e.id)}),F(`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:aF(e.label)}),F(_F,{row:e})]}),!n&&e.cells[i]&&F(mF,{row:e,cellKey:i,position:`${t}:0`,onOpenEditor:ve})]},e.id)},Oe=F(`p`,{className:`p-6 text-center text-sm text-neutral`,children:m.noResults});return F(`div`,{ref:_,className:G(`flex h-full min-h-0 w-full min-w-0 flex-col gap-6`,e),children:[!(v&&we)&&F(`div`,{className:`flex flex-col gap-4`,children:[F(QL,{dictionaryKey:t.dictionary.key,keyPath:D??[],onClickKeyPath:E}),F(RL,{query:O,onQueryChange:k,statusFilter:j,onStatusFilterChange:N,statusCounts:ge,localeKeys:z,onJumpToMissing:xe,isNarrow:v})]}),v?we&&I?F(dL,{row:we,cellKey:I.cellKey,isNarrow:!0,onClose:ye}):F(b,{children:[F(Q,{value:R,onValueChange:re,children:[F(Q.Trigger,{"aria-label":m.locale.value,children:F(Q.Value,{})}),F(Q.Content,{children:i.map(e=>F(Q.Item,{value:e,children:F(`span`,{className:`flex items-center gap-1.5`,children:[lr(e,h),o.has(e)&&F(Xs,{className:`size-3 text-neutral`})]})},e))})]}),F(`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):F(OF,{addLine:e.addLine,rootKeys:he},`add-${e.addLine.parentRow?.id??`root`}`))})]}):F(`div`,{className:`flex min-h-0 flex-1 gap-3`,children:[F(`div`,{ref:S,role:`grid`,tabIndex:0,"aria-label":t.dictionary.key,"aria-colcount":z.length+1,onKeyDown:Se,onFocus:Ce,className:`min-h-0 min-w-0 flex-1 overflow-auto`,children:F(`div`,{className:`w-max min-w-full`,children:[F(`div`,{role:`row`,className:`sticky top-0 z-20 grid min-w-full border-b border-neutral/10 bg-background`,style:{gridTemplateColumns:Te},children:[F(`div`,{role:`columnheader`,className:G(wF,`z-30 items-center ps-4 text-xs text-neutral`),children:m.fieldColumn}),z.map(Ee)]}),le.length===0?Oe:le.map((e,t)=>e.type===`row`?F(EF,{row:e.row,localeKeys:z,rowIndex:t,gridTemplateColumns:Te,isCollapsed:ie.has(e.row.id)&&!oe,isFocused:I?.rowId===e.row.id,onToggleCollapse:_e,onOpenEditor:ve,dragHandleProps:me(e.row)?fe(e.row.id):void 0,dropZoneProps:me(e.row)?pe(e.row.id):void 0},e.row.id):F(OF,{addLine:e.addLine,gridTemplateColumns:Te,rootKeys:he},`add-${e.addLine.parentRow?.id??`root`}`))]})}),we&&I&&F(`div`,{className:`flex min-h-0 w-[28rem] max-w-[45%] shrink-0 flex-col overflow-hidden rounded-2xl border border-neutral/20`,children:F(dL,{row:we,cellKey:I.cellKey,isNarrow:!1,onClose:ye})})]})]})},iR=/^ {0,3}(#{1,6})[ \t]+(.+?)[ \t#]*$/,aR=/^ {0,3}(```|~~~)/,oR=/[*_`~]|\[([^\]]*)\]\([^)]*\)/g,sR=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=aR.exec(i)?.[1];if(a){r?r===a&&(r=void 0):r=a;continue}if(r)continue;let o=iR.exec(i);if(!o)continue;let s=(o[2]??``).replace(oR,(e,t)=>t??``).trim();s&&n.push({level:o[1]?.length??1,text:s,lineIndex:e})}return n},cR=e=>e.replace(/```[\s\S]*?```/g,` `).replace(/[#>*_`~|[\]()-]/g,` `).split(/\s+/).filter(e=>/[\p{L}\p{N}]/u.test(e)).length,lR=/^---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,uR=e=>{let t=lR.exec(e)?.[0]??``;return{frontMatter:t,body:e.slice(t.length)}},dR={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 fR=_(()=>pn(()=>import(`./MarkdownEditor-DOscG2B0.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([3,2,4,1]))),pR=_(()=>pn(()=>import(`./MarkDownRender-CvJXcrHW.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2]))),mR=e=>typeof e==`string`?e:JSON.stringify(e),hR=()=>{let{rows:e,dictionary:t,sourceLocale:n,getStatus:r,setCellValue:i}=WP(),{selectedLocales:a}=PO(),o=V(dR),[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}=uR(String(m?.cells[v]?.value??``)),{body:S}=uR(String(m?.cells[n]?.value??``)),C=x(()=>sR(b),[b]),w=x(()=>cR(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 F(`div`,{className:`flex w-full flex-col gap-4`,children:[F(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[m.isLocalized?F(`div`,{className:`min-w-0 overflow-x-auto`,children:F(FL,{selectedChoice:v,hoverable:!0,color:`text`,tabs:h.map(e=>{let t=r(m,e)===`missing`;return F(`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:[F(`span`,{"aria-hidden":!0,className:G(`inline-block size-2 rounded-full`,t?`border border-error`:`bg-text`)}),e]},e)})})}):F(`span`,{}),F(`div`,{className:`flex items-center gap-2`,children:[D&&F(K,{label:o.compareWithSource.value,Icon:Ms,variant:l?`default`:`hoverable`,color:`text`,size:`icon-sm`,"aria-pressed":l,onClick:()=>f(e=>!e)}),F(wD,{choices:k,value:s,onChange:c,color:`text`,size:`sm`})]})]}),F(`div`,{className:`flex w-full gap-6`,children:[F(`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:[F(`span`,{className:`text-xs font-semibold text-muted-foreground uppercase`,children:o.outline}),C.length===0?F(`span`,{className:`text-xs text-muted-foreground`,children:o.noHeadings}):F(`ul`,{className:`flex flex-col gap-0.5`,children:C.map(e=>F(`li`,{children:F(`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}`))}),F(`span`,{className:`mt-2 text-xs text-muted-foreground`,children:o.wordCount({count:w})})]}),F(`div`,{className:G(`grid min-w-0 flex-1 gap-6`,O&&`@3xl:grid-cols-2`),children:[O&&F(eO,{border:!0,background:`none`,roundedSize:`2xl`,className:`flex flex-col gap-3 p-6 opacity-80`,children:[F(`span`,{className:`font-mono text-xs text-muted-foreground`,children:o.sourceLabel({locale:n})}),F(`div`,{dir:`auto`,className:`text-base leading-relaxed`,children:F(T,{fallback:F(Vo,{}),children:F(pR,{children:S})})})]}),F(`div`,{ref:p,dir:`auto`,className:`mx-auto flex w-full max-w-3xl flex-col gap-2 text-base leading-relaxed`,children:[F(T,{fallback:F(Vo,{}),children:[s===`edit`&&F(fR,{defaultValue:b,onChange:j},v),s===`raw`&&F(PD,{value:b,onChange:e=>j(e.currentTarget.value),className:`font-mono text-sm`,"aria-label":o.rawMode.value},v),s===`preview`&&F(pR,{children:b})]}),F(`span`,{className:`text-xs text-muted-foreground @4xl:hidden`,children:o.wordCount({count:w})})]})]})]}),E&&Object.keys(E).length>0&&F(cD,{header:F(`span`,{className:`text-sm text-muted-foreground`,children:o.frontMatter}),label:o.frontMatter.value,children:F(`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])=>F(`div`,{className:`contents`,children:[F(`dt`,{className:`text-muted-foreground`,children:e}),F(`dd`,{dir:`auto`,className:`truncate`,children:mR(t)})]},e))})})]})};S();var gR=()=>t(UP),_R={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{contentTab:`Content`,detailsTab:`Details`,documentView:`Document`,gridView:`Grid`,jsonView:`JSON`,metadataTab:`Metadata`,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`,metadataTab:`Metadata`,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`,metadataTab:`Métadonnées`,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`,metadataTab:`Metadatos`,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`,metadataTab:`Metadaten`,returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`},structureView:`Struktur`,treeView:`Baum`,viewSwitcherLabel:`Editoransicht`},ja:{contentTab:`コンテンツ`,detailsTab:`詳細`,documentView:`ドキュメント`,gridView:`グリッド`,jsonView:`JSON`,metadataTab:`メタデータ`,returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`},structureView:`構造`,treeView:`ツリー`,viewSwitcherLabel:`エディタービュー`},ko:{contentTab:`콘텐츠`,detailsTab:`세부 정보`,documentView:`문서`,gridView:`그리드`,jsonView:`JSON`,metadataTab:`메타데이터`,returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`},structureView:`구조`,treeView:`트리`,viewSwitcherLabel:`편집기 보기`},zh:{contentTab:`内容`,detailsTab:`详情`,documentView:`文档`,gridView:`网格`,jsonView:`JSON`,metadataTab:`元数据`,returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`},structureView:`结构`,treeView:`树`,viewSwitcherLabel:`编辑器视图`},it:{contentTab:`Contenuto`,detailsTab:`Dettagli`,documentView:`Documento`,gridView:`Griglia`,jsonView:`JSON`,metadataTab:`Metadati`,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`,metadataTab:`Metadados`,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`,metadataTab:`मेटाडेटा`,returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`},structureView:`संरचना`,treeView:`ट्री`,viewSwitcherLabel:`संपादक दृश्य`},ar:{contentTab:`المحتوى`,detailsTab:`التفاصيل`,documentView:`مستند`,gridView:`شبكة`,jsonView:`JSON`,metadataTab:`البيانات الوصفية`,returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`},structureView:`البنية`,treeView:`شجرة`,viewSwitcherLabel:`عرض المحرر`},ru:{contentTab:`Содержимое`,detailsTab:`Детали`,documentView:`Документ`,gridView:`Сетка`,jsonView:`JSON`,metadataTab:`Метаданные`,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 vR=(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))}}}},yR=({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}=vR(e,a,o,s);if(c)return F(`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?Ps:Is;return F(`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:[F(`span`,{className:`min-w-0 break-all`,children:t}),e&&F(_,{className:`ms-1 ms-auto shrink-0`,size:d,"aria-hidden":`true`})]})},bR={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 id","itemValuePlaceholder":"e.g. 1 or 65f1c0a2","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 id","itemValuePlaceholder":"e.g. 1 or 65f1c0a2","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":"Identifiant de l'élément","itemValuePlaceholder":"ex. 1 ou 65f1c0a2","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":"ID del elemento","itemValuePlaceholder":"ej. 1 o 65f1c0a2","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":"Element-ID","itemValuePlaceholder":"z.B. 1 oder 65f1c0a2","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":"要素 ID","itemValuePlaceholder":"例: 1 または 65f1c0a2","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":"항목 ID","itemValuePlaceholder":"예: 1 또는 65f1c0a2","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":"项目 ID","itemValuePlaceholder":"例如 1 或 65f1c0a2","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":"ID elemento","itemValuePlaceholder":"es. 1 o 65f1c0a2","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":"ID do item","itemValuePlaceholder":"ex. 1 ou 65f1c0a2","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 या 65f1c0a2","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 أو 65f1c0a2","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":"ID элемента","itemValuePlaceholder":"напр. 1 или 65f1c0a2","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`},xR=e=>F(qj,{Element:WD,...e}),SR=e=>F(qj,{Element:ID,...e}),CR=Ko(`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`}}),wR=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>F(`input`,{type:`checkbox`,className:G(CR({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),TR=e=>{let{label:t,name:n,id:r}=e;return t?F(`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:[F(wR,{id:r??n,...e}),t]}):F(wR,{id:r??n,...e})},ER=e=>e===void 0?``:typeof e==`string`?e:JSON.stringify(e),DR=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}}},OR=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)]},kR=`default`,AR=(e,t)=>e===void 0||t===void 0?Number(e!==void 0)-Number(t!==void 0):qr(e,t),jR=e=>[...new Set(e.map(e=>e.item).filter(e=>e!==void 0))].sort(qr),MR=e=>{let t=new Map;for(let n of e){if(n.variant===void 0)continue;let e=ER(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===kR})}return[...t.values()]},NR=e=>e&&typeof e.primaryValue==`object`?e.primaryValue:void 0,PR=e=>{let t=new Map;for(let n of e){let e=NR(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]}))},FR=(e,t,n,r)=>{let i=NR(t)??{},a,o=-1;for(let t of e){let e=NR(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},IR=(e,t,n,r)=>{let i=NR(t);if(!i)return!0;let a={...i,[n]:r};return e.some(e=>{let t=NR(e);return t!==void 0&&Object.keys(t).length===Object.keys(a).length&&Object.entries(a).every(([e,n])=>t[e]===n)})},LR=(e,t)=>e.id&&t.id?e.id===t.id:e.localId&&t.localId?e.localId===t.localId:e===t,RR=e=>e.find(e=>e.item===void 0&&e.variant===void 0),zR=(e,{item:t,variant:n})=>{if(t!==null||n!==null)return e.find(e=>(t===null||e.item===t)&&(n===null||ER(e.variant)===n))},BR=e=>({item:e.item??null,variant:e.variant===void 0?null:ER(e.variant)}),VR=e=>Hi(e)===`object`?Object.keys(e):[],HR=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 VR(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},UR=(e,t,n)=>{let r=Hk(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}},WR=e=>typeof e==`string`?`'${e}'`:`{ ${Object.entries(e).map(([e,t])=>`${e}: ${typeof t==`string`?`'${t}'`:t}`).join(`, `)} }`,GR=(e,t,n)=>{let r=[...n?[`variant: ${WR(n.primaryValue)}`]:[],...t===null?[]:[`item: ${typeof t==`string`?`'${t}'`:t}`]];return r.length===0?`useIntlayer('${e}')`:`useIntlayer('${e}', { ${r.join(`, `)} })`};S();var KR=v(({className:e,isInteractive:t,...n},r)=>F(`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})),qR=(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),JR=({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`),YR=()=>F(`span`,{className:`text-neutral`,children:`-`}),XR=({title:e,dictionaries:t,currentDictionary:n,onSelectDictionary:r,labels:i})=>{let a=[`key`,`locale`,`variant`,`item`,`tags`,`title`].filter(e=>qR(t,e)),o=(e,t)=>{if(t===`key`)return F(`span`,{className:`font-mono`,dir:`ltr`,children:e.key});if(t===`locale`)return e.locale?F(cA,{color:`neutral`,size:`xs`,dir:`ltr`,children:String(e.locale)}):F(YR,{});if(t===`variant`){let t=OR(e.variant);return t.length===0?F(YR,{}):F(`div`,{className:`flex flex-wrap gap-1`,dir:`ltr`,children:t.map(e=>F(cA,{color:`warning`,size:`xs`,children:e},e))})}return t===`item`?e.item===void 0?F(YR,{}):F(cA,{color:`neutral`,size:`xs`,children:e.item}):t===`tags`?e.tags?.length?F(`div`,{className:`flex flex-wrap gap-1`,children:e.tags.map(e=>F(cA,{color:`neutral`,size:`xs`,children:e},e))}):F(YR,{}):e.title||F(YR,{})};return F(`div`,{className:`flex flex-col gap-2`,children:[F(`p`,{className:`text-xs font-medium tracking-wide text-muted uppercase`,children:e}),F(`div`,{className:`max-h-96 w-full overflow-auto`,children:F(KR,{className:`border-spacing-y-1 text-xs`,children:[F(`thead`,{children:F(`tr`,{children:a.map(e=>F(`th`,{className:`px-3 py-2 font-medium whitespace-nowrap text-neutral`,children:i[e]},e))})}),F(`tbody`,{children:t.map(e=>{let t=LR(e,n),s=!!r&&!t;return F(`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)=>F(`td`,{className:JR({columnIndex:r,columnCount:a.length,isCurrent:t,isSelectable:s}),children:F(`span`,{className:`flex items-center gap-2`,children:[o(e,n),t&&r===0&&F(cA,{color:`text`,size:`xs`,children:i.current})]})},n))},e.id??e.localId??e.key)})})]})})]})},ZR=({title:e,tags:t,onSelectTag:n,labels:r})=>{let i=[`key`,`name`,`description`].filter(e=>t.some(t=>!!t[e])),a=!!n;return F(`div`,{className:`flex flex-col gap-2`,children:[F(`p`,{className:`text-xs font-medium tracking-wide text-muted uppercase`,children:e}),F(`div`,{className:`max-h-96 w-full overflow-auto`,children:F(KR,{className:`border-spacing-y-1 text-xs`,children:[F(`thead`,{children:F(`tr`,{children:i.map(e=>F(`th`,{className:`px-3 py-2 font-medium whitespace-nowrap text-neutral`,children:r[e]},e))})}),F(`tbody`,{children:t.map(e=>F(`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)=>F(`td`,{className:JR({columnIndex:n,columnCount:i.length,isSelectable:a}),children:t===`key`?F(`span`,{className:`font-mono`,dir:`ltr`,children:e.key}):t===`description`&&e.description?F(`span`,{className:`line-clamp-2 max-w-xs text-neutral`,children:e.description}):e[t]??F(YR,{})},t))},e.key))})]})})]})};S();var QR=e=>Object.entries(e).map(([e,t])=>({name:e,value:String(t),isNumber:typeof t==`number`})),$R=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]})),ez=({fields:e,onChange:t,labels:n})=>{let[r,i]=d(()=>QR(e)),a=e=>{i(e),t($R(e))},o=(e,t)=>a(r.map((n,r)=>r===e?{...n,...t}:n));return F(`div`,{className:`flex flex-col gap-2`,dir:`ltr`,children:[F(`span`,{className:`ms-1 text-sm font-medium`,children:n.title}),r.map((e,t)=>F(`div`,{className:`flex items-center gap-2`,children:[F(AD,{type:`text`,value:e.name,placeholder:n.fieldName,"aria-label":n.fieldName,className:`font-mono`,onChange:e=>o(t,{name:e.target.value})}),F(AD,{type:`text`,value:e.value,placeholder:n.fieldValue,"aria-label":n.fieldValue,className:`font-mono`,onChange:e=>o(t,{value:e.target.value})}),F(K,{variant:`hoverable`,color:`text`,size:`icon-sm`,Icon:Ec,label:n.removeField,className:`shrink-0`,disabled:r.length<=1,onClick:()=>a(r.filter((e,n)=>n!==t))})]},t)),F(K,{variant:`outline`,color:`text`,size:`sm`,Icon:fc,label:n.addField,className:`self-start`,onClick:()=>i([...r,{name:``,value:``,isNumber:!1}]),children:n.addField})]})},tz={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`},nz=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(tz);return bP({title:wP(gP({error:e=>e.input===void 0?t.value:n.value}).check(OP(e=>e.length===0||e.length>=4,{error:r.value}))),key:EP(gP({error:e=>e.input===void 0?i.value:a.value}).check(dP(4,{error:s.value}),fP(/^[a-zA-Z0-9-_]+$/,{error:o.value})),``),description:wP(gP({error:e=>e.input===void 0?c.value:l.value})),projectIds:EP(vP(gP({error:e=>e.input===void 0?u.value:d.value})),[e]),tags:EP(vP(gP({error:()=>f.value})),[]),location:wP(SP([`local`,`remote`,`hybrid`,`plugin`],{error:e=>e.input===void 0?p.value:m.value})),importMode:wP(SP([`static`,`dynamic`,`fetch`])),filePath:wP(gP({error:e=>e.input===void 0?h.value:g.value}))})};S();var rz=[`collection`,`variant`],iz=e=>{let t=[];return e.item!==void 0&&t.push(`collection`),e.variant!==void 0&&t.push(`variant`),t},az=[`remote`,`local`,`hybrid`,`plugin`],oz=e=>az.includes(e),sz=e=>e===void 0?`remote`:oz(e)?e:`plugin`,cz=({dictionary:e,mode:t,onSelectSibling:n,siblings:r,onOpenDictionary:i,onOpenTag:a})=>{let{session:o}=DE(),{project:s}=o??{},{data:c,isLoading:l}=JE(),{data:u}=YE(),f=c?.data??[],p=u?.data??[],m=yj(nz(String(s?.id)),{defaultValues:{...e,location:sz(e.location)}}),{isSubmitting:h}=vj(m),{editedContent:g,setEditedDictionary:_}=cT(),{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(bR),{mutate:ee,isPending:P}=NE(),I=g?.[e.localId],{data:te,isLoading:ne}=HE({keys:[e.key]},{enabled:!r&&!!e.key}),re=x(()=>(r??te?.data??[]).filter(t=>t.key===e.key&&!LR(t,e)),[r,te,e]),L=x(()=>[e,...re].sort((e,t)=>ER(e.variant).localeCompare(ER(t.variant))||AR(e.item,t.item)||String(e.locale??``).localeCompare(String(t.locale??``))),[e,re]),R=e.tags??[],z=x(()=>R.map(e=>{let t=p.find(t=>t.key===e);return{key:e,name:t?.name,description:t?.description}}),[R,p]),{data:ie,isLoading:B}=HE({tags:R,pageSize:100},{enabled:R.length>0}),{localeDictionaries:ae}=aT(),oe=x(()=>{if(R.length===0)return[];let t=Object.values(ae??{}).filter(e=>!e.id);return[...ie?.data??[],...t].filter(t=>t.key!==e.key&&t.tags?.some(e=>R.includes(e))).sort((e,t)=>e.key.localeCompare(t.key))},[ie,ae,e.key,R]),se={key:j.keyColumn,locale:j.localeColumn,variant:j.variants,item:j.itemIndex,tags:j.tagsColumn,title:j.titleColumn,current:j.currentTag},ce=x(()=>re.filter(e=>e.item!==void 0).sort((e,t)=>AR(e.item,t.item)),[re]),le=x(()=>re.filter(e=>e.variant!==void 0),[re]),ue=x(()=>e.item===void 0?ce:[e,...ce].sort((e,t)=>AR(e.item,t.item)),[e,ce]);M(()=>{m.reset({...e,tags:e.tags??[],location:sz(e.location)}),he(iz(e)),_e(String(e.item??1)),ye(ER(e.variant)),xe(!1),Te(!1)},[e,m?.reset]),M(()=>{I===void 0&&m.reset({...e,tags:e.tags??[],location:sz(e.location)})},[I]);let de=()=>{let t={...e,...I};ee({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:sz(r.location)})}})},fe=_j({form:m,name:`location`}),pe=fe===`local`||fe===`hybrid`,[me,he]=d(()=>iz(e)),[ge,_e]=d(String(e.item??1)),[ve,ye]=d(ER(e.variant)),[be,xe]=d(!1),Se=DR(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 F(xj,{className:`relative flex w-full flex-col gap-8`,form:m,children:[F(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[F(xR,{name:`key`,label:y.label,placeholder:y.label.value,description:y.description,disabled:h,isRequired:!0,onSave:t=>{m.setValue(`key`,t),_({...e,...I??{},key:t})}}),F(xR,{name:`title`,label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:h,onSave:t=>{m.setValue(`title`,t),_({...e,...I??{},title:t})}})]}),F(SR,{name:`description`,label:S.label,placeholder:S.placeholder.value,description:S.description,disabled:h,onSave:t=>{m.setValue(`description`,t),_({...e,...I??{},description:t})}}),F(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[F(jj,{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,...I??{},location:r,filePath:i})},s=t=>{if(!t&&!i)return;let r=t?i?`hybrid`:`remote`:`local`;n.onChange(r),_({...e,...I??{},location:r})};return F(Cj,{className:`flex flex-col gap-2 px-1`,children:[F(Hj,{className:`ms-1`,children:T.label}),F(`div`,{className:`ms-2 flex items-center gap-4 py-2`,children:[F(TR,{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)}),F(TR,{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)})]}),F(Lj,{children:T.testDescription}),F(Rj,{})]})}}),F(Gy,{mode:`wait`,children:pe&&F(Mb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},children:F(Jj,{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,...I??{},filePath:n})}})},`filePath-input`)}),e.componentFilePath&&F(`div`,{className:`flex flex-col gap-2 px-1`,children:[F(`label`,{htmlFor:`component-file-path`,className:`ms-1 text-sm font-medium`,children:O.label}),F(AD,{id:`component-file-path`,type:`text`,dir:`ltr`,value:e.componentFilePath,readOnly:!0}),F(`p`,{className:`ms-1 text-sm text-neutral`,children:O.description})]})]}),F(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:F(MM,{name:`importMode`,label:E.label.value,description:E.description.value,onValueChange:t=>{m.setValue(`importMode`,t),_({...e,...I??{},importMode:t})},children:[F(Q.Trigger,{children:F(Q.Value,{placeholder:E.label.value})}),F(Q.Content,{children:[F(Q.Item,{value:`static`,children:E.static.value}),F(Q.Item,{value:`dynamic`,children:E.dynamic.value}),F(Q.Item,{value:`live`,children:E.live.value})]})]})}),F(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[F(jM,{name:`projectIds`,label:C.label.value,description:C.description,onValueChange:t=>{let n=[t].flat();m.setValue(`projectIds`,n),_({...e,...I??{},projectIds:n})},children:[F(AM.Trigger,{getBadgeValue:e=>f?.find(t=>String(t.id)===e)?.name??e,children:F(AM.Input,{placeholder:C.placeholder.value})}),F(AM.Content,{children:F(Vo,{isLoading:l,children:F(AM.List,{children:f?.map(e=>F(AM.Item,{value:String(e.id),children:e.name},String(e.id)))})})})]}),F(jM,{name:`tags`,label:w.label.value,description:w.description,onValueChange:t=>{let n=[t].flat();m.setValue(`tags`,n),_({...e,...I??{},tags:n})},children:[F(AM.Trigger,{getBadgeValue:e=>p?.find(t=>String(t.key)===e)?.name??e,children:F(AM.Input,{placeholder:w.placeholder.value})}),F(AM.Content,{children:F(Vo,{isLoading:l,children:F(AM.List,{children:p?.map(e=>F(AM.Item,{value:String(e.key),children:e.name??e.key},String(e.key)))})})})]})]}),F(eO,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`card`,children:[F(`div`,{className:`flex flex-col gap-1`,children:[F(`p`,{className:`ms-1 text-sm font-semibold`,children:N.label}),F(`p`,{className:`ms-1 text-xs text-neutral`,children:N.description})]}),F(AM,{values:me,onValueChange:t=>{let n=[t].flat(),r=n.filter(e=>!me.includes(e)),i=me.filter(e=>!n.includes(e)),a={...e,...I??{}};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.map(e=>e.item).filter(e=>typeof e==`number`),t=e.length>0?Math.max(...e)+1:1;_e(String(t)),a={...a,item:t}}else if(e===`variant`){let e=ve||`default`;ye(e),a={...a,variant:DR(e).variant}}he(n),_(a),xe(!1),n.length===0&&Ee.length>0?Te(!0):Te(!1)},className:`max-w-xs`,children:[F(AM.Trigger,{getBadgeValue:e=>e===`collection`?String(N.collection):e===`variant`?String(N.variant):e,children:F(AM.Input,{placeholder:N.label.value})}),F(AM.Content,{children:F(AM.List,{children:rz.map(e=>F(AM.Item,{value:e,children:N[e].value},e))})})]}),F(Gy,{children:[me.includes(`collection`)&&F(Mb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:F(`div`,{className:`flex flex-col gap-2 px-1`,children:[F(`label`,{htmlFor:`qualifier-item-value`,className:`ms-1 text-sm font-medium`,children:N.itemValueLabel}),F(AD,{id:`qualifier-item-value`,value:ge,placeholder:N.itemValuePlaceholder.value,onChange:t=>{let n=t.target.value;_e(n);let r=n.trim();r!==``&&_({...e,...I??{},item:Kr(r)})}})]})},`item-input`),me.includes(`variant`)&&F(Mb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:F(`div`,{className:`flex flex-col gap-2 px-1`,children:[Ce?F(ez,{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,...I??{},variant:t})}},e.localId):F(b,{children:[F(`label`,{htmlFor:`qualifier-variant-value`,className:`ms-1 text-sm font-medium`,children:N.variantValueLabel}),F(AD,{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}=DR(n);xe(i),i||_({...e,...I??{},variant:r})}})]}),be&&F(`p`,{className:`text-destructive ms-1 text-xs`,children:N.variantJsonError})]})},`variant-input`),me.length===0&&we&&F(Mb.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:F(eO,{background:`none`,border:!0,borderColor:`neutral`,roundedSize:`xl`,padding:`md`,className:`gap-3`,children:[F(`p`,{className:`text-sm font-medium`,children:N.disablePickerTitle}),F(`p`,{className:`text-xs text-muted`,children:N.disablePickerDescription}),F(`div`,{className:`flex flex-wrap gap-2`,children:Ee.map(e=>F(`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&&F(`span`,{children:[A.variant,`:`,` `,ER(e.variant)]}),e.item!==void 0&&F(`span`,{children:[A.item,`: `,e.item]})]},e.localId))})]})},`sibling-picker`)]})]}),F(eO,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`neutral`,children:[F(`p`,{className:`text-sm font-semibold`,children:j.title}),F(Vo,{isLoading:!r&&ne||B,children:[re.length===0&&oe.length===0&&z.length===0&&F(`span`,{className:`m-auto text-sm text-neutral`,children:j.noSiblings}),re.length>0&&F(XR,{title:j.sameKeyTitle,dictionaries:L,currentDictionary:e,onSelectDictionary:n,labels:se}),oe.length>0&&F(XR,{title:j.sameTagsTitle,dictionaries:oe,currentDictionary:e,onSelectDictionary:i,labels:se}),z.length>0&&F(ZR,{title:j.tagsColumn,tags:z,onSelectTag:a,labels:{key:j.keyColumn,name:j.nameColumn,description:j.descriptionColumn}})]})]}),F(Xk,{identifier:`audit-dictionary-details`,className:`absolute top-0 right-0`,children:[F(Sj,{type:`button`,size:`icon-md`,label:k.label.value,Icon:Pc,variant:`outline`,color:`text`,onClick:de,disabled:h||P,isLoading:P}),F(Xk.Detail,{identifier:`audit-dictionary-details`,xAlign:`end`,children:F(eO,{padding:`sm`,roundedSize:`xl`,children:F(`span`,{className:`text-nowrap`,children:k.popover})})})]})]})},lz={key:`dictionary-metadata-form`,content:{nodeType:`translation`,translation:{en:{description:`Plain data describing this content, such as a post title, slug or date. Pages read it with the metadataOnly selector, without loading the content.`,fieldName:`Field`,fieldValue:`Value`,addField:`Add field`,removeField:`Remove field`},"en-GB":{description:`Plain data describing this content, such as a post title, slug or date. Pages read it with the metadataOnly selector, without loading the content.`,fieldName:`Field`,fieldValue:`Value`,addField:`Add field`,removeField:`Remove field`},fr:{description:`Données simples qui décrivent ce contenu, comme le titre, le slug ou la date d'un article. Les pages les lisent avec le sélecteur metadataOnly, sans charger le contenu.`,fieldName:`Champ`,fieldValue:`Valeur`,addField:`Ajouter un champ`,removeField:`Supprimer le champ`},es:{description:`Datos simples que describen este contenido, como el título, el slug o la fecha de un artículo. Las páginas los leen con el selector metadataOnly, sin cargar el contenido.`,fieldName:`Campo`,fieldValue:`Valor`,addField:`Añadir campo`,removeField:`Eliminar campo`},de:{description:`Einfache Daten, die diesen Inhalt beschreiben, etwa Titel, Slug oder Datum eines Beitrags. Seiten lesen sie mit dem Selektor metadataOnly, ohne den Inhalt zu laden.`,fieldName:`Feld`,fieldValue:`Wert`,addField:`Feld hinzufügen`,removeField:`Feld entfernen`},ja:{description:`このコンテンツを説明するシンプルなデータ(記事のタイトル、スラッグ、日付など)。ページはコンテンツを読み込まずに metadataOnly セレクターで読み取ります。`,fieldName:`フィールド`,fieldValue:`値`,addField:`フィールドを追加`,removeField:`フィールドを削除`},ko:{description:`이 콘텐츠를 설명하는 단순한 데이터입니다(게시물 제목, 슬러그, 날짜 등). 페이지는 콘텐츠를 불러오지 않고 metadataOnly 선택자로 읽습니다.`,fieldName:`필드`,fieldValue:`값`,addField:`필드 추가`,removeField:`필드 삭제`},zh:{description:`描述此内容的简单数据,例如文章的标题、slug 或日期。页面通过 metadataOnly 选择器读取它们,无需加载内容。`,fieldName:`字段`,fieldValue:`值`,addField:`添加字段`,removeField:`删除字段`},it:{description:`Dati semplici che descrivono questo contenuto, come titolo, slug o data di un articolo. Le pagine li leggono con il selettore metadataOnly, senza caricare il contenuto.`,fieldName:`Campo`,fieldValue:`Valore`,addField:`Aggiungi campo`,removeField:`Rimuovi campo`},pt:{description:`Dados simples que descrevem este conteúdo, como o título, o slug ou a data de um artigo. As páginas os leem com o seletor metadataOnly, sem carregar o conteúdo.`,fieldName:`Campo`,fieldValue:`Valor`,addField:`Adicionar campo`,removeField:`Remover campo`},hi:{description:`इस सामग्री का वर्णन करने वाला सरल डेटा, जैसे किसी पोस्ट का शीर्षक, slug या तारीख। पेज इसे सामग्री लोड किए बिना metadataOnly सेलेक्टर से पढ़ते हैं।`,fieldName:`फ़ील्ड`,fieldValue:`मान`,addField:`फ़ील्ड जोड़ें`,removeField:`फ़ील्ड हटाएं`},ar:{description:`بيانات بسيطة تصف هذا المحتوى، مثل عنوان المقال أو الـ slug أو التاريخ. تقرؤها الصفحات باستخدام المحدد metadataOnly دون تحميل المحتوى.`,fieldName:`الحقل`,fieldValue:`القيمة`,addField:`إضافة حقل`,removeField:`إزالة الحقل`},ru:{description:`Простые данные, описывающие этот контент, например заголовок, slug или дата статьи. Страницы читают их через селектор metadataOnly, не загружая контент.`,fieldName:`Поле`,fieldValue:`Значение`,addField:`Добавить поле`,removeField:`Удалить поле`}}},title:`Dictionary metadata form`,description:`Labels of the form editing the metadata of a dictionary in the dictionary editor.`,tags:[`component`,`dictionary`,`design system`],location:`local`,localId:`dictionary-metadata-form::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryMetadata/dictionaryMetadataForm.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryMetadata/dictionaryMetadataForm.content.mjs`},uz=e=>typeof e==`string`?e:JSON.stringify(e)??``,dz=(e,t)=>{if(t===void 0||typeof t==`string`)return e;try{return JSON.parse(e)}catch{return e}},fz=e=>Object.entries(e??{}).filter(([,e])=>e!==void 0).map(([e,t])=>({name:e,text:uz(t),value:t})),pz=e=>Object.fromEntries(e.filter(e=>e.name.trim()!==``).map(e=>[e.name.trim(),dz(e.text,e.value)]));S();var mz=({dictionary:e})=>{let{description:t,fieldName:n,fieldValue:r,addField:i,removeField:a}=V(lz),{editedContent:o,setEditedDictionary:s}=cT(),c=o?.[e.localId],l=c?.metadata??e.metadata??{},[u,f]=d(()=>fz(l));JSON.stringify(l)!==JSON.stringify(pz(u))&&f(fz(l));let p=t=>{f(t),s({...e,...c,metadata:pz(t)})},m=(e,t)=>p(u.map((n,r)=>r===e?{...n,...t}:n));return F(`div`,{className:`flex flex-col gap-4`,children:[F(`p`,{className:`text-sm text-neutral`,children:t}),F(`div`,{className:`flex flex-col gap-2`,dir:`ltr`,children:u.map((e,t)=>F(`div`,{className:`flex items-center gap-2`,children:[F(AD,{type:`text`,value:e.name,placeholder:n.value,"aria-label":n.value,className:`max-w-56 font-mono`,onChange:e=>m(t,{name:e.target.value})}),F(AD,{type:`text`,value:e.text,placeholder:r.value,"aria-label":r.value,onChange:e=>m(t,{text:e.target.value})}),F(K,{variant:`hoverable`,color:`text`,size:`icon-sm`,Icon:Ec,label:a.value,className:`shrink-0`,onClick:()=>p(u.filter((e,n)=>n!==t))})]},t))}),F(K,{variant:`outline`,color:`text`,size:`sm`,Icon:fc,label:i.value,className:`self-start`,onClick:()=>f([...u,{name:``,text:``,value:void 0}]),children:i})]})},hz={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 gz=({content:e,onClick:t,...n})=>{let[r,i]=d(!1),[a,o]=d(!1),{label:s}=V(hz),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 F(K,{Icon:r?Ps:Is,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 _z=_(()=>pn(()=>import(`./dist-CE3noM9J.js`).then(e=>({default:e.Editor})),__vite__mapDeps([5,2]))),vz=({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 F(`div`,{className:G(`relative size-full text-sm`,r&&`ms-0`),children:[i&&F(`div`,{className:`sticky top-5 z-10`,children:F(`div`,{className:G(`absolute inset-e-2 bottom-0 flex h-7 items-center`),children:F(gz,{content:e})})}),F(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:F(T,{fallback:F(Vo,{}),children:F(_z,{...l,defaultLanguage:`typescript`,language:t,loading:F(Vo,{}),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`})})})]})},yz=({dictionary:e,isDarkMode:t})=>{let{setEditedContent:n,editedContent:r}=cT(),i=e=>{try{return JSON.parse(e),!0}catch{return!1}},a=r?.[e.localId]?.content??e?.content;return F(vz,{language:`json`,onChange:t=>{i(t??`{}`)&&n(e.localId,JSON.parse(t??`{}`))},isDarkMode:t,children:JSON.stringify(a,null,2)})},bz=e=>{let t=Ri(e),n=Hi(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?bz(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},xz=[`title`,`name`,`label`,`id`,`key`],Sz=60,Cz=(e,t)=>{if(!e||typeof e!=`object`||e.nodeType!==`translation`)return e;let n=e[Cr];if(n)return(t?n[t]:void 0)??Object.values(n)[0]},wz=(e,t)=>{if(!e||typeof e!=`object`||Array.isArray(e)||typeof e.nodeType==`string`)return;let n=e;for(let e of xz){let r=Cz(n[e],t);if(typeof r==`number`)return String(r);if(typeof r==`string`&&r.trim().length>0){let e=r.trim();return e.length>Sz?`${e.slice(0,59)}…`:e}}};S();var Tz=({children:e,onToggle:t,...n})=>{let[r,i]=d(!1);return F(cD,{...n,onToggle:e=>{e&&!r&&i(!0),t?.(e)},children:r?e:null})},Ez=({reorderProps:e,children:t})=>F(`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`,bF),children:[F(Ks,{"aria-hidden":!0,className:`mt-2.5 size-3.5 shrink-0 text-neutral opacity-0 transition-opacity group-hover/reorder:opacity-100`}),F(`div`,{className:`min-w-0 flex-1`,children:t})]}),Dz=e=>Array.isArray(e)?e.map((e,t)=>String(t)):e&&typeof e==`object`&&typeof e.nodeType!=`string`?Object.keys(e):[],Oz=({section:e,keyPath:t,dictionary:n})=>{let{selectedLocales:r}=PO(),{locale:i}=Ki(),a=uE()??r[0]??i,o=Fi(e,t,a),{addEditedContent:s}=sT(),{setFocusedContentKeyPath:c,focusedContent:l}=fE(),{addNewElement:u,goToField:d}=V(QD),f=Hi(o),p=e=>(l?.keyPath?.length??0)>0&&Ln(e,l?.keyPath??[]),m=bz(o),{reorderField:h}=V(sF),{moveField:g}=eR(n),_=Array.isArray(o),{getReorderProps:v}=yF({itemIds:Dz(o),orientation:`vertical`,title:h.value,onMove:(e,n)=>g(t,_?Number(e):e,_?Number(n):n)});return o?m?F(K,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:Es,children:Xn(t[t.length-1]?.key)}):typeof o==`object`?f===`reactNode`?F(b,{children:`React Node`}):f===`translation`?F(`div`,{className:`flex flex-col justify-between gap-2`,children:r.map(r=>F(Oz,{keyPath:[...t,{type:Cr,key:r}],section:e,dictionary:n},r))}):f===`enumeration`||f===`plural`||f===`condition`||f===`gender`||f===`select`?F(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(r=>F(Oz,{keyPath:[...t,{type:f,key:r}],section:e,dictionary:n},r))}):f===`array`?F(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map((r,i)=>{let o=[...t,{type:Ar,key:i}],s=bz(r),l=wz(r,a)??`Item ${i}`;return s?F(Ez,{reorderProps:v(String(i)),children:F(K,{label:`${d.label.value} ${i}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(o),IconRight:Es,isActive:p(o),children:l})},JSON.stringify(o)):F(Ez,{reorderProps:v(String(i)),children:F(Tz,{label:`${d.label.value} ${i}`,header:l,isActive:p(o),onClick:()=>c(o),children:F(`div`,{className:`mt-2 flex w-full max-w-full`,children:F(`div`,{className:`flex-1 ps-10`,children:F(Oz,{keyPath:o,section:e,dictionary:n})})})})},JSON.stringify(o))}),F(K,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...t,{type:Ar,key:o.length}],r=o,i=Li(r[r.length-1])??``;s(n.localId,i,e,!1),c(e)},Icon:fc,children:u.text})]}):typeof o.nodeType==`string`?F(Oz,{keyPath:[...t,{type:o.nodeType}],section:e,dictionary:n}):F(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(o).map(r=>{let i=[...t,{type:kr,key:r}];return bz(Fi(e,i))?F(Ez,{reorderProps:v(r),children:F(K,{label:`${d.label.value} ${r}`,isActive:p(i),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(i),IconRight:Es,children:Xn(r)})},r):F(Ez,{reorderProps:v(r),children:F(Tz,{label:`${d.label.value} ${r}`,isActive:p(i),onClick:()=>c(i),header:Xn(r),children:F(`div`,{className:`mt-2 flex w-full max-w-full`,children:F(`div`,{className:`flex-1 ps-10`,children:F(Oz,{keyPath:i,section:e,dictionary:n})})})})},r)})}):F(b,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(t)]}):F(b,{})};S();var kz=({dictionary:e})=>{let{editedContent:t}=cT(),{focusedContent:n,setFocusedContentKeyPath:r}=fE(),[,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}=PO(),{locale:f}=Ki(),p=uE()??d[0]??f,m=E(l),h=m!==l,g=x(()=>Fi(u,l??[],p),[u,l,p]),_=x(()=>Fi(u,m??[],p),[u,m,p]),v=bz(u),b=bz(_);return M(()=>{g===void 0&&a(n?.keyPath?.slice(0,-1)??[])},[]),F(`div`,{children:[F(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[F(QL,{dictionaryKey:s,keyPath:l??[],onClickKeyPath:a}),F(`div`,{className:`flex items-center gap-2`,children:F(uL,{})})]}),F(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof u==`object`&&u&&!v&&Object.keys(u).length>0&&F(eO,{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:F(Oz,{keyPath:[],section:u,dictionary:e})}),(b||(m??[]).length>0)&&F(`div`,{className:h?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:F(Nk,{keyPath:m??[],section:_,dictionary:e})})]})]})},Az={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 jz=e=>{let[t,n]=d(e);return M(()=>{n(e??window.document.body)},[e]),t};S();var Mz=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 Nz=()=>!1,Pz=e=>{let{disableScroll:t=!1,element:n,key:r=`unnamed_blocker`}=e??{},i=jz(n);M(()=>{let e=n??window.document.body;return t?Mz.addBlockage(r,e):Mz.removeBlockage(r,e),()=>{Mz.removeBlockage(r,e)}},[t,n,r]);let a=A(()=>i?Mz.isElementScrollBlocked(i):!1,[i]);return{isScrollBlocked:h(Mz.subscribe,a,Nz)}},Fz=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,Iz=`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`,Lz=({className:e,...t})=>F(`h1`,{className:G(`text-3xl`,e),...t}),Rz=({className:e,...t})=>F(`h2`,{className:G(`mb-2 text-2xl`,Fz,e),...t}),zz=({className:e,...t})=>F(`h3`,{className:G(`mb-2 text-xl`,Fz,e),...t}),Bz=({className:e,...t})=>F(`h4`,{className:G(`text-lg`,Fz,e),...t}),Vz=({className:e,...t})=>F(`h5`,{className:G(`text-base`,Fz,e),...t}),Hz=({className:e,...t})=>F(`h6`,{className:G(`ms-3 text-base`,Fz,e),...t}),Uz=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Wz=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Gz=(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},Kz=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Uz(t):void 0;return F(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Gz(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Wz(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:G(r&&Iz,n),...i,children:t})},qz=({isClickable:e,...t})=>F(Lz,{...t}),Jz=({isClickable:e=!1,...t})=>F(Kz,{H:Rz,isClickable:e,...t}),Yz=({isClickable:e=!1,...t})=>F(Kz,{H:zz,isClickable:e,...t}),Xz=({isClickable:e=!1,...t})=>F(Kz,{H:Bz,isClickable:e,...t}),Zz=({isClickable:e=!1,...t})=>F(Kz,{H:Vz,isClickable:e,...t}),Qz=({isClickable:e=!1,...t})=>F(Kz,{H:Hz,isClickable:e,...t});S();var $z=Ko(`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`}}),eB={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`},tB=sx.create(eO),nB=({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=jz(n);if(Pz({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 F(b,{});let m=!!o,h=eB[d||`none`];return D(F(sx.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:F(tB,{onClick:e=>e.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:$z({size:s,className:c}),role:`dialog`,"aria-modal":!0,padding:`none`,...f,children:[F(`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&&F(Yz,{className:`ms-1 mb-2 flex items-center justify-center text-lg font-bold`,children:o}),i&&F(K,{variant:`hoverable`,color:a,label:`Close modal`,className:`ms-auto`,onClick:e=>{e.stopPropagation(),r?.()},Icon:Ic,size:`icon-md`})]}),F(`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:F(`div`,{className:G(`flex size-full flex-1 flex-col`,h),children:e})})]})}),p)},rB=(e,t)=>!!e&&JSON.stringify(e)!==JSON.stringify(t),iB=(e,t)=>e?{...e,...t}:t,aB=()=>{let{setLocaleDictionary:e}=oT(),{restoreEditedContent:t}=sT(),{mutateAsync:n,isPending:r}=WE(),{mutateAsync:i,isPending:a}=qE();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 oB=[],sB=`max-w-2xs flex-1 group-[.flex-col]/save-form:w-full group-[.flex-col]/save-form:max-w-none`,cB=({dictionary:e,mode:t,className:n,onDelete:r,onSave:i,...a})=>{let[o,s]=d(!1),{mutate:c,isPending:l}=GE(),{saveDictionary:u,isPushing:f,isWriting:p,isSaving:m}=aB(),{editedContent:h,restoreEditedContent:g}=cT(),{deleteButton:_,discardButton:v,saveButton:y,publishButton:S,saveToFileButton:C,writesTo:w,confirmation:T}=V(Az),E=gR(),D=iT(),O=h?.[e.localId],k=x(()=>{if(E||!O)return oB;let t=(D?.internationalization?.locales??[]).map(String),n={locales:t,sourceLocale:String(D?.internationalization?.defaultLocale??t[0]??`en`)};return IP(Hk(e.content,n),Hk(O.content??e.content,n))},[E,O,e.content,D]),A=E?.changeSet??k,j=A.length,{isAuthenticated:N}=OE(),{session:ee}=DE(),P=fx(),[I,te]=d(!1),ne=ee?(ee.permissions?.includes(`dictionary:admin`)||ee.permissions?.includes(`dictionary:write`))??!1:!!P?.accessToken,re=t.includes(`remote`)&&!N&&!!P?.login,L=ne,R=x(()=>rB(O,e),[O,e]),z=e?.id!==void 0,ie=()=>iB(e,O??e),B=async()=>{O&&await u(ie(),`local`)&&(s(!1),i?.())},ae=async()=>{await u(ie(),`remote`)&&i?.()},oe=()=>{te(!0),P?.login?.()},se=!!P?.isLoggingIn;M(()=>{I&&(N?(te(!1),ae()):se||te(!1))},[I,N,se]);let ce=()=>{e.id&&c({dictionaryId:e.id},{onSuccess:e=>{e&&r?.()}})},le=F(Sj,{label:y.label.value,disabled:!R||m||!ne,Icon:vc,color:`text`,className:sB,isLoading:f,onClick:ae,children:j>0?y.text({count:j})(j):y.textWithoutCount}),ue=j>0?F(rj,{changeSet:A,onRevert:E?.revertChange,className:sB,children:le}):le;return F(b,{children:[F(nB,{isOpen:o,title:T.title.value,size:`md`,roundedSize:`2xl`,onClose:()=>s(!1),padding:`md`,border:!0,borderColor:`neutral`,children:F(`form`,{className:`size-full`,onSubmit:e=>{e.preventDefault(),B()},children:[F(`p`,{className:`py-4 text-sm text-muted-foreground`,children:T.message}),F(`div`,{className:`mt-12 flex flex-row-reverse justify-start gap-2`,children:[F(Sj,{type:`submit`,label:T.confirmButton.label.value,disabled:!R||m,Icon:vc,color:`text`,className:sB,isLoading:p,onClick:B,children:T.confirmButton.text}),F(Sj,{type:`button`,label:T.cancelButton.label.value,disabled:m,color:`text`,className:sB,variant:`outline`,onClick:()=>s(!1),children:T.cancelButton.text})]})]})}),F(`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&&z&&R&&ue,t.includes(`local`)&&e.filePath&&F(`span`,{className:`me-auto truncate font-mono text-xs text-muted-foreground`,dir:`ltr`,children:w({filePath:e.filePath})}),re&&!z&&F(Sj,{label:S.label.value,disabled:m,Icon:vs,color:`text`,className:sB,isLoading:I,onClick:oe,children:S.text}),t.includes(`remote`)&&N&&!z&&F(Sj,{label:S.label.value,disabled:m||!ne,Icon:vs,color:`text`,className:sB,isLoading:f,onClick:ae,children:S.text}),t.includes(`local`)&&F(Sj,{label:C.label.value,disabled:!R||m,Icon:Hs,color:`text`,variant:N||re?`outline`:`default`,className:sB,isLoading:p,onClick:()=>s(!0),children:C.text}),R&&F(Sj,{label:v.label.value,disabled:!R,Icon:mc,variant:`outline`,color:`text`,className:sB,onClick:()=>g(e.localId),children:j>0?v.text({count:j})(j):v.textWithoutCount}),t.includes(`remote`)&&z&&r&&N&&F(Sj,{label:_.label.value,Icon:Ec,color:`error`,variant:`outline`,className:sB,isLoading:l,onClick:ce,disabled:!L,children:_.text})]})]})},lB={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`},uB=()=>F(`span`,{"aria-hidden":!0,className:`inline-block size-1.5 shrink-0 rounded-full bg-warning`}),dB=({children:e})=>F(`div`,{className:`flex min-w-0 flex-1 flex-nowrap items-center gap-1 overflow-x-auto pb-1`,children:e}),fB=({variants:e,selectedVariant:t,onSelectVariant:n,getHasUnsavedChanges:r,leadingChip:i})=>{let a=V(lB),o=e.find(e=>e.identity===t),s=NR(o),c=e.filter(e=>!e.isStructured),l=PR(e),u=e=>{let i=t===e.identity;return F(K,{variant:i?`default`:`outline`,size:`sm`,color:`text`,label:e.identity,"aria-pressed":i,onClick:()=>n(i?null:e.identity),className:`shrink-0`,children:F(`span`,{className:`flex items-center gap-1.5`,children:[String(e.primaryValue),e.isDefault&&F(`span`,{className:`font-normal opacity-70`,children:[`(`,a.defaultTag,`)`]}),r?.(e)&&F(uB,{})]})},e.identity)},d=(t,i)=>{let a=s?.[t]===i,c=FR(e,o,t,i),l=IR(e,o,t,i);return F(K,{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:F(`span`,{className:`flex items-center gap-1.5`,dir:`ltr`,children:[String(i),c&&r?.(c)&&F(uB,{})]})},String(i))};return F(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(c.length>0||i)&&F(dB,{children:[i,c.map(u)]}),l.map(e=>F(`div`,{className:`flex min-w-0 items-center gap-2`,children:[F(`span`,{className:`w-20 shrink-0 truncate font-mono text-xs text-neutral`,dir:`ltr`,title:e.name,children:e.name}),F(dB,{children:e.values.map(t=>d(e.name,t))})]},e.name)),o&&o.aliases.length>0&&F(`span`,{className:`text-xs text-neutral`,children:[a.alsoAnswersTo,` `,F(`span`,{className:`font-mono`,dir:`ltr`,children:o.aliases.map(e=>typeof e==`string`?e:JSON.stringify(e)).join(`, `)})]})]})};S();var pB=8,mB=e=>{let t=Object.values(e.completenessByLocale);return t.length===0?1:t.reduce((e,t)=>e+t,0)/t.length},hB=(e,t)=>e.localId!==void 0&&t?.[e.localId]!==void 0,gB=e=>`${Math.round(e*100)}%`,_B=()=>F(`span`,{"aria-hidden":!0,className:`inline-block size-1.5 shrink-0 rounded-full bg-warning`}),vB=({dictionaryKey:e,siblings:t,selectedItem:n,selectedVariant:r,onSelect:i,isCompact:a=!1,className:o})=>{let s=V(lB),c=iT(),{editedContent:l}=cT(),[u,f]=d(``),[p,m]=d(!1),h=x(()=>(c?.internationalization?.locales??[]).map(String),[c]),g=String(c?.internationalization?.defaultLocale??h[0]??`en`),_=x(()=>jR(t),[t]),v=x(()=>MR(t),[t]),y=x(()=>RR(t),[t]),b=x(()=>HR(t),[t]),S=x(()=>_.map(e=>{let n=t.filter(t=>t.item===e),i=UR((n.find(e=>r!==null&&e.variant!==void 0&&ER(e.variant)===r)??n[0])?.content,h,g);return{item:e,summary:i,completeness:mB(i),missingKeys:b[e]??[],hasUnsavedChanges:n.some(e=>hB(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=GR(e,n,C),T=S.length>pB,E=u.trim().toLowerCase(),D=S.filter(e=>(!p||e.completeness<1||e.missingKeys.length>0)&&(E===``||String(e.item).toLowerCase().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&&ER(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&&F(`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:[F(`span`,{className:`font-medium`,children:s.baseLabel}),F(`span`,{className:`truncate text-xs text-neutral`,children:s.baseDescription}),hB(y,l)&&F(_B,{})]}),N=(e,t)=>{let r=n===e.item,i=Object.entries(e.summary.completenessByLocale).map(([e,t])=>`${e}: ${gB(t)}`).join(` · `);return F(`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:[F(`span`,{className:`max-w-28 min-w-8 shrink-0 truncate font-mono text-xs text-neutral`,dir:`ltr`,title:String(e.item),children:typeof e.item==`number`?`#${e.item}`:e.item}),F(`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&&F(_B,{}),e.missingKeys.length>0&&F(cA,{color:`warning`,size:`xs`,className:`shrink-0`,children:[s.missingKeys,` `,e.missingKeys.join(`, `)]}),!a&&F(`span`,{className:`flex w-24 shrink-0 items-center gap-2`,title:`${s.completenessLabel.value} — ${i}`,children:[F(`span`,{className:`h-1 flex-1 overflow-hidden rounded-full bg-neutral/20`,children:F(`span`,{className:G(`block h-full rounded-full`,e.completeness>=1?`bg-success`:`bg-warning`),style:{width:gB(e.completeness)}})}),F(`span`,{className:`w-8 text-end text-xs text-neutral`,children:gB(e.completeness)})]})]},e.item)},ee=e=>{let t=A(e);return t!==void 0&&hB(t,l)},P=e=>F(fB,{variants:v,selectedVariant:r,onSelectVariant:k,getHasUnsavedChanges:ee,leadingChip:e&&F(K,{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 F(`div`,{className:G(`rounded-xl border border-text text-foreground transition-colors`,o),children:F(AF,{identifier:t,children:[F(AF.Trigger,{identifier:t,label:s.contextLabel.value,color:`text`,variant:`hoverable`,roundedSize:`xl`,children:F(`span`,{className:`flex w-full items-center justify-between gap-2`,children:[F(`span`,{className:`truncate font-mono text-xs`,dir:`ltr`,children:j}),F(oc,{className:`shrink-0`,size:16})]})}),F(AF.Panel,{identifier:t,isOverable:!0,isFocusable:!0,align:`start`,children:F(eO,{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&&F(`div`,{className:`flex flex-col gap-1`,children:[F(`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&&F(`div`,{className:`flex flex-col gap-1`,children:[F(`span`,{className:`px-2 text-xs font-medium text-neutral`,children:s.variantsLabel}),F(`div`,{className:`px-1`,children:P(!1)})]})]})})]})})}return F(`div`,{className:G(`flex flex-col gap-4`,o),children:[v.length>0&&F(`div`,{className:`flex flex-col gap-2`,children:[F(`span`,{className:`text-xs font-medium text-neutral`,children:s.variantsLabel}),P(S.length===0&&!!y),C&&!C.isDefault&&F(`span`,{className:`text-xs text-neutral`,children:s.inheritanceHint})]}),S.length>0&&F(`div`,{className:`flex flex-col gap-2`,children:[F(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[F(`span`,{className:`text-xs font-medium text-neutral`,children:s.itemsLabel}),v.length>0&&F(`span`,{className:`text-xs text-neutral`,children:s.combinations({items:String(S.length),variants:String(v.length),total:String(S.length*v.length)})})]}),T&&F(`div`,{className:`flex flex-wrap items-center gap-3`,children:[F(`div`,{className:`min-w-48 flex-1`,children:F(pL,{value:u,onChange:e=>f(e.target.value),placeholder:s.searchItems.value,"aria-label":s.searchItems.value})}),F(TR,{name:`sibling-switcher-incomplete-only`,label:s.incompleteOnly,checked:p,onChange:e=>m(e.target.checked),size:`sm`})]}),F(`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&&F(`span`,{className:`px-3 py-2 text-sm text-neutral`,children:s.noMatchingItem})]})]}),F(`div`,{className:`flex flex-wrap items-center gap-2`,children:[F(`span`,{className:`text-xs text-neutral`,children:s.codeSnippetLabel}),F(yR,{text:w,className:`text-xs`,size:12,children:F(`code`,{className:`font-mono text-xs`,dir:`ltr`,children:w})})]})]})},yB={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 bB=({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(hF),b=Hi(e),[x,S]=d(b);return F(Q,{value:x,onValueChange:e=>{S(e),t(e)},children:[F(Q.Trigger,{children:F(Q.Value,{placeholder:u})}),F(Q.Content,{children:[F(Q.Item,{value:Cr,children:n}),F(Q.Item,{value:Lr,children:r}),F(Q.Item,{value:Rr,children:i}),F(Q.Item,{value:zr,children:a}),F(Q.Item,{value:kr,children:o}),F(Q.Item,{value:Ar,children:s}),F(Q.Item,{value:wr,children:c}),F(Q.Item,{value:Tr,children:l}),F(Q.Item,{value:Br,children:p}),F(Q.Item,{value:Vr,children:m}),F(Q.Item,{value:Dr,children:_}),F(Q.Item,{value:Fr,children:g}),F(Q.Item,{value:jr,children:f}),F(Q.Item,{value:Er,children:h}),F(Q.Item,{value:Mr,disabled:!0,children:v}),F(Q.Item,{value:Or,children:y})]})]})},xB=({section:e,dictionaryLocalId:t,keyPath:n,onNodeTypeChange:r})=>{let i=iT()?.internationalization?.locales??[],a=Hi(e),o=Ri(e),s=e=>{r(Ii(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 F(`div`,{className:`flex w-full flex-col gap-1`,children:[F(bB,{section:e,onValueChange:e=>r(Ii(e,i))}),F(xB,{section:o,keyPath:l,dictionaryLocalId:t,onNodeTypeChange:s})]})}if(a===`array`){let c=[...n,{type:a,key:0}];return F(`div`,{className:`flex w-full flex-col gap-1`,children:[F(bB,{section:e,onValueChange:e=>r(Ii(e,i))}),F(xB,{section:o,keyPath:c,dictionaryLocalId:t,onNodeTypeChange:s})]})}return a===`object`?F(b,{children:[F(bB,{section:e,onValueChange:e=>r(Ii(e,i))}),F(`div`,{className:`ms-10 mt-6`,children:F(wB,{keyPath:n,section:e,dictionaryLocalId:t})})]}):F(bB,{section:e,onValueChange:e=>r(Ii(e,i))})},SB=({sectionKey:e,section:t,keyPath:n,dictionaryLocalId:r})=>{let{focusedContent:i,setFocusedContentKeyPath:a}=fE(),{renameEditedContent:o,addEditedContent:s}=sT(),{titleInput:c,deleteButton:l}=V(yB),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 F(eO,{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":Ln(n,i?.keyPath??[]),onClick:()=>a(n),children:F(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof e==`string`&&F(`div`,{className:`w-full`,children:[F(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[F(WD,{name:`key`,"aria-label":`Key`,placeholder:c.placeholder.value,defaultValue:e,onSave:e=>u(e),variant:`invisible`}),F(K,{label:l.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Ec,onClick:()=>{s(r,void 0,n);let e=n.slice(0,-1);a(e)}})]}),F(`span`,{className:`ms-3 text-sm text-muted-foreground`,children:[`( `,Xn(e),` )`]})]}),F(xB,{keyPath:n,dictionaryLocalId:r,section:t,onNodeTypeChange:e=>{s(r,e,n)}})]})})},CB=({section:e,keyPath:t,dictionaryLocalId:n})=>{let{addNodeButton:r}=V(yB),{reorderField:i}=V(sF),{setFocusedContentKeyPath:a}=fE(),{addEditedContent:o}=sT(),{getDragHandleProps:s,getDropZoneProps:c}=yF({itemIds:e&&typeof e==`object`?Object.keys(e):[],orientation:`vertical`,title:i.value,onMove:(r,i)=>o(n,$L(e,r,i),t)});return!e||typeof e!=`object`?F(`div`,{children:`Not an object`}):F(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[F(`ul`,{className:`me-auto flex flex-col gap-4`,children:Object.keys(e).map(r=>F(`li`,{...c(r),className:G(`group/reorder flex w-full items-start gap-1 rounded-lg`,bF),children:[F(K,{...s(r),label:i.value,Icon:Ks,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`}),F(SB,{sectionKey:r,section:e?.[r],keyPath:[...t,{type:kr,key:r}],dictionaryLocalId:n})]},`${JSON.stringify(t)}-object-${r}`))}),F(K,{label:r.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:fc,className:`flex-1`,onClick:()=>{let e=[...t,{type:kr,key:`newKey`}];o(n,``,e),a(e)},children:r.text})]})},wB=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?F(SB,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):F(CB,{section:e,keyPath:t,dictionaryLocalId:n}),TB=({dictionary:e})=>{let{content:t,localId:n}=e,{editedContent:r}=cT();return F(SB,{section:r?.[n]?.content===void 0?t:r?.[n]?.content,keyPath:[],dictionaryLocalId:n})};S();var EB=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 DB=`intlayer:dictionary-editor:tab`,OB=`intlayer:dictionary-editor:view`,kB=[`grid`,`tree`,`structure`,`json`],AB=({dictionary:e})=>{let{changeSet:t}=WP(),{editedContent:n}=cT(),r=n?.[e.localId]?.metadata,i=r!==void 0&&JSON.stringify(r)!==JSON.stringify(e.metadata);return EB(t.length>0||i),null},jB=({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 _=iT(),{returnToDictionaryList:v,contentTab:y,metadataTab:S,detailsTab:C,viewSwitcherLabel:w,documentView:T,gridView:E,treeView:D,structureView:O,jsonView:k}=V(_R),{setFocusedContent:A}=fE(),{setLocaleDictionary:j}=oT(),{containerRef:N,isNarrow:ee}=zL(),P=a.includes(`remote`),[I,te]=jO(DB,`content`),ne=p??(I===`metadata`?`metadata`:P&&I===`details`?`details`:`content`),re=e=>{m?.(e),te(e)},[L,R]=d(e);M(()=>{R(e)},[e]);let z=e.item!==void 0||e.variant!==void 0,{data:ie}=HE({keys:[e.key]},{enabled:!f&&!!e.key&&(P||z)}),B=x(()=>f??ie?.data??[],[f,ie]),ae=BR(L),oe=e=>{e&&!LR(e,L)&&(R(e),A({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),j(e))},se=t=>oe(t.item===null&&t.variant===null?RR(B)??e:zR(B,t)),ce=Kk(L.content),[le,ue,,de]=jO(OB,void 0),fe=kB.find(e=>e===le),[pe,me]=d(),he=h??pe??fe??(ce?`document`:`grid`);M(()=>{A(t=>t?.dictionaryKey===e.key&&t?.dictionaryLocalId===e.localId?t:{...t??{},dictionaryKey:e.key,dictionaryLocalId:e.localId}),j(e)},[e.key,e.localId]);let ge=e=>{g?.(e),e===`document`?(me(`document`),de()):(me(void 0),ue(e))},_e=[...ce?[{content:T.value,value:`document`}]:[],{content:E.value,value:`grid`},{content:D.value,value:`tree`},{content:O.value,value:`structure`},{content:k.value,value:`json`}],ve=`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`;return F(FO,{availableLocales:_?.internationalization?.locales??[],children:F(GP,{dictionary:L,lockedLocales:u,children:[F(AB,{dictionary:L}),F(`div`,{ref:N,className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[c&&F(K,{onClick:t,variant:`hoverable`,className:`z-10 ms-5 me-auto mb-6 shrink-0`,color:`text`,Icon:ms,label:v.label.value,children:v.text}),F(vB,{className:`mx-9 mb-3 shrink-0`,dictionaryKey:e.key,siblings:B,selectedItem:ae.item,selectedVariant:ae.variant,onSelect:se,isCompact:ee}),F(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[F(`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:[F(FL,{selectedChoice:ne,tabs:[F(`button`,{className:ve,"data-active":ne===`content`,onClick:()=>re(`content`),type:`button`,children:y},`content`),F(`button`,{className:ve,"data-active":ne===`metadata`,onClick:()=>re(`metadata`),type:`button`,children:S},`metadata`),...P?[F(`button`,{className:ve,"data-active":ne===`details`,onClick:()=>re(`details`),type:`button`,children:C},`details`)]:[]],hoverable:!0,color:`text`,className:`w-auto`}),ne===`content`&&F(`div`,{title:w.value,className:`overflow-x-auto`,children:F(FL,{selectedChoice:he,tabs:_e.map(({content:e,value:t})=>F(`button`,{className:ve,"data-active":he===t,onClick:()=>ge(t),type:`button`,children:e},t)),hoverable:!0,color:`text`,className:`w-auto`})}),F(`div`,{className:`ms-auto flex items-center justify-end`,children:l})]}),F(`div`,{className:G(`min-h-0 flex-1 p-6`,ne===`content`&&he===`grid`?`flex min-h-0 flex-col overflow-hidden`:`overflow-y-auto`),children:F(`div`,{className:G(`flex w-full min-w-0 flex-col items-stretch gap-6`,ne===`content`&&he===`grid`&&`h-full min-h-0 flex-1`),children:[ne===`metadata`&&F(mz,{dictionary:L},L.localId),P&&ne===`details`&&F(cz,{dictionary:L,mode:a,onSelectSibling:oe,siblings:B,onOpenDictionary:n,onOpenTag:r}),ne===`content`&&F(b,{children:[he===`document`&&F(hR,{}),he===`grid`&&F(rR,{dictionary:L}),he===`tree`&&F(kz,{dictionary:L}),he===`structure`&&F(TB,{dictionary:L}),he===`json`&&F(yz,{dictionary:L,isDarkMode:i})]})]})})]}),F(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:F(eO,{color:`card`,roundedSize:`2xl`,padding:`sm`,className:`w-full shrink-0 flex-row flex-wrap items-center justify-end gap-x-10 gap-y-2 bg-background/20 md:bottom-0`,children:[L.id&&F(yR,{text:L.id,className:`font-mono text-sm text-nowrap text-muted-foreground`,size:9,children:L.id}),F(cB,{dictionary:L,mode:a,className:`flex-1`,onDelete:()=>{A(null),o?.()},onSave:s})]})})]})]})})},MB={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`},NB=({progress:e,className:t})=>{let n=V(MB),{totalCount:r,settledCount:i,pushingKeys:a,failedKeys:o}=e,s=r===0?100:Math.round(i/r*100);return F(`div`,{className:G(`flex flex-col gap-2 text-sm`,t),children:[F(`span`,{className:`font-medium`,children:n.pushedCount({settled:i,total:r})}),F(`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:F(`div`,{className:`h-full rounded-full bg-text transition-[width]`,style:{width:`${s}%`}})}),a.length>0&&F(`div`,{className:`flex flex-col gap-1`,children:[F(`span`,{className:`text-neutral`,children:n.pushing}),F(`ul`,{className:`max-h-40 list-inside list-disc overflow-y-auto`,children:a.map(e=>F(`li`,{className:`truncate`,children:e},e))})]}),o.length>0&&F(`div`,{className:`flex flex-col gap-1 text-error`,children:[F(`span`,{children:n.failed}),F(`ul`,{className:`max-h-40 list-inside list-disc overflow-y-auto`,children:o.map(e=>F(`li`,{className:`truncate`,children:e},e))})]})]})},PB={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`},FB=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,isDisabled:i=!1,className:a,...o})=>{let s=t&&!i;return F(`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:F(`div`,{style:{minWidth:`${n}px`},className:G(r===`right`&&`ms-auto`),children:e})})},IB=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 LB=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()})}},RB={open:LB.open,close:LB.close,set:LB.set},zB=()=>!1,BB=()=>RB,VB=e=>{let t=A(()=>LB.isOpen(e),[e]);return h(LB.subscribe,t,zB)};S();var HB=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let f=V(PB),{isMobile:p}=EL(`md`),m=u(null),h=u(null),g=jz(l),{open:_,close:v}=BB(),y=VB(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;Pz({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=IB(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(F(`div`,{className:`fixed inset-e-0 top-0 z-50 flex h-full justify-end`,children:F(FB,{isHidden:!w,align:`right`,children:F(eO,{className:`relative flex h-screen w-screen flex-col border-s text-foreground md:w-100`,ref:m,roundedSize:`none`,borderColor:`neutral`,children:[F(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[F(`div`,{className:`flex justify-between gap-3`,children:[F(`div`,{children:o&&F(K,{variant:`hoverable`,color:`text`,label:o.text??f.goBack.value,onClick:o.onBack,Icon:ws,children:o?.text})}),F(`div`,{children:F(oA,{identifier:`close-drawer`,children:[F(K,{variant:`hoverable`,color:`text`,label:`Close`,className:`ms-auto`,onClick:()=>{v(t),c?.()},Icon:Ic,size:`icon-md`}),F(oA.Detail,{identifier:`close-drawer`,children:F(`div`,{className:`flex items-center gap-2 p-2`,children:[F(`span`,{className:`text-xs whitespace-nowrap text-muted-foreground`,children:f.closeDrawer}),F(ML,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{v(t),c?.()}})]})})]})})]}),e&&F(`h2`,{className:`flex items-center justify-center text-lg font-bold`,children:e}),r]}),F(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:F(`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&&F(`div`,{className:`shrink-0`,children:i})]})})}),g):F(b,{})};n();var UB=e=>{let t=u(e??void 0);return e!=null&&(t.current=e),t.current},WB=`dictionaryList`;n();var GB=e=>`dictionary_edition_${e}`,KB=e=>{let t=GB(e),{open:n,close:r}=BB(),i=VB(t),{getEditedContentValue:a}=sT(),{focusedContent:o,setFocusedContent:s}=fE();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 qB=({dictionaryKey:e,isDarkMode:t})=>{let{backButtonText:n,openDictionaryEditor:r,modalTitle:i,noDictionaryFocused:a,focusedDictionaryNotFound:o}=V(oD),s=GB(e),{focusedContent:c,close:l}=KB(e),{setFocusedContent:u}=fE(),{open:f}=BB(),p=()=>f(WB),{data:m}=KE(),h=m,g=()=>{l(),u(null),p()},[_,v]=d(!1),y=()=>{v(!1),g()},x=UB(c?.dictionaryLocalId);if(!x)return F(`span`,{className:`mx-auto my-10 text-sm text-neutral`,children:a});let S=h?.[e]?.find(e=>e.localId===x);return S?F(HB,{identifier:s,backButton:{onBack:g,text:n.value},onClose:()=>{l(),u(null)},header:F(b,{children:[F(`header`,{className:`mb-5 flex w-full px-3`,children:[F(`h3`,{className:`w-full text-center text-lg`,children:S.title?S.title:S.key}),F(oA,{identifier:`open-dictionary-editor`,children:[F(K,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:cc,label:r.label.value,onClick:()=>v(!0)}),F(oA.Detail,{identifier:`open-dictionary-editor`,children:F(`span`,{className:`p-2 text-xs whitespace-nowrap text-neutral`,children:r.popoverContent})})]})]}),F(`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:[F(cA,{color:`text`,roundedSize:`full`,size:`xs`,children:S.key}),S.filePath&&F(cA,{color:`neutral`,roundedSize:`full`,size:`xs`,children:S.filePath.split(`/`).pop()}),S.id&&F(cA,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]})]}),footer:F(cB,{dictionary:S,mode:[`local`,`remote`],className:`mb-4 flex-col px-3`,onDelete:g}),children:[F(nB,{isOpen:_,onClose:()=>v(!1),hasCloseButton:!0,title:i,size:`xl`,transparency:`lg`,className:`h-full`,children:F(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:F(jB,{dictionary:S,onClickDictionaryList:y,isDarkMode:t,mode:[`local`,`remote`],onDelete:()=>{v(!1),g()},onSave:()=>{v(!1)}})})}),F(ZD,{dictionary:S})]}):F(`span`,{className:`mx-auto my-10 text-sm text-neutral`,children:o})},JB=({isDarkMode:e})=>{let{focusedContent:t}=fE(),n=UB(t?.dictionaryKey);return n?F(qB,{dictionaryKey:n,isDarkMode:e}):F(b,{})},YB={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 XB=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}},ZB={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 QB=()=>{let e=nD(),t=!!e?.auth,n=!!e?.isLoggingIn,{localeDictionaries:r,setLocaleDictionary:i}=aT(),{editedContent:a,restoreEditedContent:o}=cT(),{mutate:s,isPending:c,progress:l}=WE(),{data:u}=UE({enabled:t}),[f,p]=d(null),m=x(()=>px(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}},$B=({identifier:e})=>{let t=V(ZB),{localDictionaries:n,missingDictionaries:r,push:i,isPushing:a,isAwaitingLogin:o,progress:s}=QB();if(n.length===0)return null;let c=(s?.failedKeys.length??0)>0,l=!o&&(a||c);return F(Xk,{identifier:e,children:[F(K,{label:t.label({count:n.length}).value,onClick:()=>i(n),isLoading:a,disabled:a,variant:`hoverable`,color:`text`,size:`icon-sm`,Icon:Ac}),F(Xk.Detail,{identifier:e,xAlign:`end`,isHidden:!a&&void 0,children:F(eO,{className:`flex min-w-64 flex-col gap-2 p-3 text-sm`,children:[o&&F(`p`,{children:t.awaitingLogin}),l&&s&&F(NB,{progress:s}),!o&&!l&&F(b,{children:[F(`p`,{children:t.label({count:n.length})}),r.length>0&&F(`p`,{className:`text-neutral`,children:t.missingCount({count:r.length})})]})]})})]})};n();var eV=()=>{let{drawerTitle:e,buttonLabel:t}=V(YB),{set:n}=BB(),{localeDictionaries:r}=aT(),{editedContent:i}=cT(),{setFocusedContent:a}=fE(),{setSearch:o,search:s}=XB(),c=x(()=>Object.values(r??{}),[r]),l=x(()=>new nL(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({[WB]:!1,[GB(e.key)]:!0})},f=x(()=>new Set(Object.keys(i??{})),[i]);return F(HB,{title:e.label.value,identifier:WB,children:[F(`div`,{className:`flex items-center gap-2 p-3 pb-4`,children:[F(pL,{placeholder:`Search dictionaries`,onChange:e=>o(e.currentTarget.value),type:`search`}),F($B,{identifier:`push-dictionaries-drawer`})]}),F(`ul`,{className:`flex flex-col gap-1`,children:u.map(e=>F(`li`,{className:`w-full`,children:F(K,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>d(e),variant:`hoverable`,color:`text`,IconRight:Es,size:`md`,isFullWidth:!0,Icon:f.has(e.localId)?uc:void 0,children:F(`div`,{className:`flex items-center gap-2 py-1`,children:F(`div`,{className:`flex max-w-full flex-col gap-1`,children:[F(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[F(cA,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&F(cA,{color:`neutral`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&F(cA,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]}),F(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},tV={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`},nV=({children:e,className:t,...n})=>F(`span`,{...n,className:G(`mx-1 rounded-md border border-neutral px-1.5 font-semibold whitespace-nowrap`,t),children:e}),rV=()=>{let{message:e,longPress:t,modifierClick:n}=V(tV),{isMac:r}=EL(),i=oE(_T.INTLAYER_HOVERED_CONTENT_CHANGED,null);return F(eO,{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:F(`p`,{className:`text-sm leading-6 text-text/50`,children:i?.dictionaryKey?e({longPress:F(nV,{children:t}),modifierClick:F(nV,{children:n({modifierKey:r?`⌘`:`Ctrl`})}),dictionaryKey:F(nV,{className:`mx-1 wrap-break-word`,children:i.dictionaryKey})}):``})})},iV=({children:e})=>F(`div`,{className:`relative size-full bg-card p-3`,children:[e,F(`div`,{className:`absolute inset-e-2 bottom-2`,children:F(rV,{})}),F(JB,{}),F(eV,{})]}),aV=3e3,oV=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)}}},sV=e=>{let{data:t,isPending:n,refetch:r}=Pt({queryKey:[`application-status`,e],queryFn:()=>oV(e),enabled:!!e,retry:!1,staleTime:0,refetchOnWindowFocus:!0,refetchInterval:aV});return{isChecking:n,isRunning:t?.isRunning===!0,errorMessage:t?.isRunning===!1?t.errorMessage:void 0,retry:r}};n();var cV,lV=()=>(cV??=fetch(`/api/config`).then(e=>e.json()).then(e=>e.data).catch(e=>{throw cV=void 0,e}),cV),uV=()=>{let[e,t]=d();return M(()=>{lV().then(t)},[]),e};n();var dV=async e=>{try{await fetch(`/api/log`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),keepalive:!0})}catch{}},fV=e=>{let t=e?.level,n=e?.message;M(()=>{t&&n&&dV({level:t,message:n})},[t,n])},pV={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`},mV=({applicationURL:e,errorMessage:t,onRetry:n})=>{let{title:r,description:i,configurationTip:a,retry:o}=V(pV);return F(`div`,{className:`flex size-full items-center justify-center p-4`,children:F(eO,{className:`flex max-w-xl flex-col gap-4 text-sm`,padding:`xl`,roundedSize:`3xl`,border:!0,borderColor:`neutral`,children:[F(Yz,{className:`text-lg`,children:r}),F(`p`,{className:`text-neutral`,children:i({applicationUrl:F(`strong`,{children:e})})}),t&&F(`code`,{className:`rounded-lg border border-error p-2 text-xs text-neutral`,children:t}),F(`p`,{className:`text-neutral`,children:a}),F(K,{label:o.value,onClick:n,color:`text`,className:`ms-auto`,children:o})]})})};n();var hV=({children:e,iframeRef:t})=>{let n=uV(),r=n?.editor.applicationURL,{isChecking:i,isRunning:a,errorMessage:o,retry:s}=sV(r);fV(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?F(Vo,{}):r&&!a?F(dr,{children:F(mV,{applicationURL:r,errorMessage:o,onRetry:()=>s()})}):F(iE,{postMessage:c,allowedOrigins:l,configuration:n,children:e})};n();var gV=[`vscode-webview:`],_V=()=>{if(typeof window>`u`||window.parent===window)return null;let e=window.location.ancestorOrigins?.[0];return e&&gV.some(t=>e.startsWith(t))?e:null},vV=()=>{let{focusedContent:e}=fE();return M(()=>{let t=_V();t&&window.parent.postMessage({type:_T.INTLAYER_FOCUSED_CONTENT_CHANGED,data:e},t)},[e]),null},yV={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`},bV={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 xV=({url:e})=>{let t=SV(e).split(`/`).filter(Boolean);return t.length===0?F(`span`,{children:`/`}):t.flatMap((e,t,n)=>[F(`span`,{children:e},`part-${t}`),t<n.length-1&&F(`span`,{className:`mx-2 text-neutral`,children:`/`},`sep-${t}`)])},SV=e=>{try{let{pathname:t,search:n,hash:r}=new URL(e);return`${t}${n}${r}`||`/`}catch{return e}},CV=({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,ee]=d(``),[P,I]=d(!1),te=u(!1),[ne,re]=d(!1),L=u(null);c(s,()=>D.current,[]);let R=V(bV);M(()=>{h(e),_(e),y([e]),S(0),w(null),E(!1),k(!1),j([]),ee(``),te.current=!1,re(!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 z=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(R.domainRestrictionError?.value??`Only URLs from ${l} are allowed.`):w(R.errorMessage.value)}},ie=()=>{if(b>0){let e=b-1,t=v[e]??``;S(e),_(t),h(t),w(null)}},B=()=>{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),z(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(!te.current){te.current=!0,I(!0),re(!1);try{let{extractUrlFromSitemap:e}=await pn(async()=>{let{extractUrlFromSitemap:e}=await import(`./extractUrlFromSitemap-Chj1JVpo.js`);return{extractUrlFromSitemap:e}},[]);j(await e(g))}catch{re(!0)}finally{I(!1)}}},de=()=>{let e=!O;k(e),e&&(ue(),setTimeout(()=>L.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 F(`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??R.ariaLabel.value,children:[F(`div`,{className:`relative z-10 flex shrink-0 items-center gap-3 rounded-t-xl border-b bg-card px-4 py-2`,children:[F(`div`,{className:`flex items-center gap-1`,children:[F(K,{type:`button`,onClick:ie,disabled:!me,variant:`hoverable`,size:`icon-md`,label:R.backButtonLabel.value,Icon:ms}),F(K,{type:`button`,onClick:B,disabled:!he,variant:`hoverable`,size:`icon-md`,label:R.forwardButtonLabel.value,Icon:gs})]}),F(`form`,{onSubmit:ae,noValidate:!0,className:G(kD(),`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:[F(`label`,{htmlFor:`browser-url`,className:`sr-only`,children:R.urlLabel}),F(AD,{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:R.urlPlaceholder.value,"aria-label":R.urlLabel.value,"aria-invalid":pe,"aria-describedby":pe?`browser-url-error`:void 0}),F(K,{type:`button`,onClick:oe,variant:`hoverable`,size:`icon-md`,className:`p-1!`,label:`content.reloadButtonTitle.value`,Icon:gc}),F(`button`,{type:`submit`,className:`sr-only absolute`,tabIndex:-1})]}),f,F(fL,{onClickOutSide:()=>k(!1),disabled:!O,role:`none`,children:F(AF,{identifier:`sitemap-explorer`,onMouseEnter:ue,onFocus:ue,children:[F(AF.Trigger,{identifier:`sitemap-explorer-trigger`,type:`button`,color:`text`,onClick:de,variant:`hoverable`,size:`icon-md`,label:R.sitemapButtonLabel.value,Icon:bc}),F(AF.Panel,{identifier:`sitemap-explorer`,isHidden:!O,align:`end`,isFocusable:!0,isOverable:!0,children:F(eO,{className:`w-80 max-w-[calc(100cqw-2rem)] rounded-md!`,roundedSize:`2xl`,border:!0,borderColor:`neutral`,children:[F(`div`,{className:`p-2`,children:F(AD,{type:`search`,ref:L,"aria-label":R.sitemapSearchAriaLabel.value,placeholder:R.sitemapSearchPlaceholder.value,onChange:e=>ee(e.target.value),value:N,size:`sm`})}),F(`ul`,{className:`max-h-64 divide-y divide-dotted divide-neutral/30 overflow-y-auto p-1 text-center`,"aria-label":R.sitemapButtonLabel.value,children:P?F(`li`,{className:`px-3 py-4 text-center text-xs text-muted-foreground`,children:R.sitemapLoading}):ne||!P&&fe.length===0?F(`li`,{className:`px-3 py-4 text-center text-xs text-muted-foreground`,children:ne?R.sitemapError:R.sitemapEmpty}):fe.map(e=>F(`li`,{className:`py-0.5`,children:F(K,{variant:`hoverable`,color:`text`,size:`sm`,textAlign:`left`,className:`w-full`,label:e,onClick:()=>{z(e),k(!1)},children:F(`span`,{className:`block truncate text-start text-base`,children:F(xV,{url:e})})})},e))})]})})]})}),pe&&F(`div`,{className:`absolute inset-s-4 top-full z-20 mt-1`,children:F(`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})})]}),F(`div`,{className:`relative z-0 flex min-h-0 w-full flex-1 flex-col overflow-hidden rounded-b-xl bg-background`,children:F(`iframe`,{ref:D,src:g,title:R.iframeTitle.value,className:`size-full flex-1`,sandbox:o??void 0,loading:`lazy`,"aria-live":`polite`,...p})})]})},wV={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`},TV=()=>[...new Set([window.location.origin,...Array.from(window.location.ancestorOrigins??[])])],EV=({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(wV);return F(`div`,{className:`absolute inset-0 z-10 flex overflow-auto bg-background/90 p-2 sm:p-4`,children:F(eO,{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:[F(Yz,{className:`text-base sm:text-lg`,children:i}),r?F(b,{children:[F(`p`,{className:`wrap-anywhere text-neutral`,children:c({applicationUrl:F(`strong`,{children:e})})}),F(`p`,{className:`wrap-anywhere text-neutral`,children:l})]}):F(b,{children:[F(`p`,{className:`wrap-anywhere text-neutral`,children:a({applicationUrl:F(`strong`,{children:e})})}),F(`ul`,{className:`list-outside list-disc space-y-2 ps-5 wrap-anywhere text-neutral`,children:[F(`li`,{children:o({editorOrigin:F(`strong`,{children:TV().join(`, `)})})}),F(`li`,{children:s}),F(`li`,{children:u})]})]}),F(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[F(K,{label:f.value,onClick:n,variant:`outline`,color:`text`,children:f}),F(K,{label:d.value,onClick:t,color:`text`,children:d})]})]})})},DV=(e,t,n,r)=>{let{internationalization:i,routing:a}=r,o=Object.keys(a?.domains??{}).length>0;return a?.mode===`no-prefix`&&!o?null:ar(new URL(t,e).href,n,{locales:i.locales,defaultLocale:i.defaultLocale,mode:a?.mode,rewrite:a?.rewrite,domains:a?.domains})},OV=({iframeRef:e,applicationURL:t,applicationPath:n})=>{let r=iT(),i=rT(),a=uE(),o=sE(),s=r?.internationalization.locales??[];return!r||s.length<2?null:F(aL,{locale:a,localeList:s,setLocale:a=>{i?.requestLocaleChange(a);let s=o??n,c=DV(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`})},kV={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 AV=(e,t=` `)=>e?(t===` `?e.trim().split(/\s+/):e.split(t)).filter(Boolean).map(e=>e.charAt(0).toUpperCase()):[],jV=({isClickable:e,onClick:t,...n})=>e&&t?F(`button`,{...n,onClick:t,type:`button`}):F(`div`,{...n,role:n.tabIndex!==void 0||n[`aria-label`]?`img`:void 0}),MV=({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?AV(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 F(jV,{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:F(`div`,{className:`relative flex aspect-square size-full flex-row items-center justify-center`,children:F(`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&&F(Vo,{className:`w-3/4`,"aria-label":`Loading user avatar`}),h&&F(`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&&F(`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)=>F(`span`,{children:e},`${e}-${t}`))}),_&&F(Mc,{size:G(o===`sm`&&14,o===`md`&&25,o===`lg`&&30,o===`xl`&&40),"aria-label":`Default user icon`})]})})})},NV=`editor-profile`,PV=()=>{let e=V(kV),t=nD();if(!t)return null;let{auth:n,isLoggingIn:r,login:i,logout:a,isLoggingOut:o}=t;if(!n)return F(K,{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:Qs,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 F(AF,{identifier:NV,children:[F(AF.Trigger,{identifier:NV,label:e.profileLabel.value,size:`icon-sm`,variant:`outline`,color:`text`,roundedSize:`full`,className:`border-none p-0!`,children:F(MV,{fullname:u,src:s?.image??void 0,size:`sm`})}),F(AF.Panel,{identifier:NV,isFocusable:!0,isOverable:!0,align:`end`,children:F(eO,{className:`min-w-56 p-4`,transparency:`xs`,roundedSize:`2xl`,border:!0,borderColor:`neutral`,children:F(`div`,{className:`flex flex-col gap-3`,children:[s?.name&&F(`span`,{className:`font-bold whitespace-nowrap`,children:s.name}),s?.email&&F(`span`,{className:`text-sm whitespace-nowrap`,children:s.email}),c?.name&&F(`span`,{className:`text-sm whitespace-nowrap`,children:[e.project,`: `,c.name]}),F(`span`,{className:`text-xs whitespace-nowrap text-neutral`,children:l===`session`?e.sessionAuth:e.accessKeyAuth}),l===`session`&&F(K,{label:e.logout.label.value,onClick:a,isLoading:o,variant:`outline`,color:`text`,size:`sm`,Icon:ec,children:e.logout.title})]})})})]})},FV=({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.`}},IV={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`},LV=()=>{let{title:e,description:t,documentationLink:n}=V(IV);return F(`div`,{className:`flex flex-col gap-6`,children:[F(Yz,{className:`mb-8`,children:e}),F(`strong`,{className:`block text-neutral`,children:t}),F(GL,{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 RV=({iframeRef:e,applicationPath:t,isBrowserVisible:n=!1})=>{let r=V(yV),{editor:i}=iT()??{},a=uV()?.isApplicationEditorEnabled??!0,{enabled:o}=lT(),s=uT(),{isConnectionFailed:c,handleFrameLoad:l,dismiss:u}=mE();lE(),fV(FV({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]);_E({applicationURL:i?.applicationURL,isDisconnected:c,reloadFrame:f});let[p,m]=d(!0),h=sE();if(M(()=>{typeof h==`string`&&window.history.replaceState({},``,`${h}${window.location.search}`)},[h]),!i?.applicationURL)return F(eO,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:F(LV,{})});let g=c&&F(EV,{applicationURL:i.applicationURL,onRetry:f,onDismiss:u,isEditorDisabled:!a}),_=!o&&F(`div`,{className:`fixed inset-e-4 bottom-4`,children:F(K,{label:r.enableEditor.value,onClick:s,color:`text`,children:r.enableEditor})}),v=F(`div`,{className:`flex shrink-0 items-center gap-2`,children:[F(OV,{iframeRef:e,applicationURL:i.applicationURL,applicationPath:t}),F($B,{identifier:`push-dictionaries-toolbar`}),F(PV,{})]});return n?F(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[F(CV,{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,_]}):F(`div`,{className:`flex size-full flex-col gap-2`,children:[F(`div`,{className:`flex justify-end`,children:v}),F(`div`,{className:`relative min-h-0 w-full flex-1 overflow-hidden rounded-lg`,children:[F(Vo,{isLoading:p}),F(`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 zV=`theme`,BV=e=>e===`light`||e===`dark`,VV=()=>{let e=new URLSearchParams(window.location.search).get(zV);return BV(e)?e:void 0},HV=()=>{let[e,t]=d(VV);return M(()=>{let e=_V();if(!e)return;let n=n=>{n.origin===e&&n.source===window.parent&&n.data?.type===_T.INTLAYER_HOST_THEME_CHANGED&&BV(n.data.theme)&&t(n.data.theme)};return window.addEventListener(`message`,n),()=>window.removeEventListener(`message`,n)},[]),e};n();var UV=`browser`,WV=()=>{let e=new URLSearchParams(window.location.search).get(UV);return e!==null&&e!==`false`},GV=()=>{let e=u(null),[t]=d(()=>window.location.pathname),[n]=d(WV);return F(hV,{iframeRef:e,children:[F(vV,{}),F(dr,{children:F(iV,{children:F(RV,{iframeRef:e,applicationPath:t,isBrowserVisible:n})})})]})},KV=()=>F(nn,{forcedTheme:HV(),hasBootstrapScript:!1,children:F(aD,{children:F(GV,{})})});r();var qV=document.getElementById(`root`);qV&&o(F(KV,{}),qV);export{Ec as A,Vo as B,eO as C,kE as D,FE as E,bs as F,Pt as G,V as H,q as I,ue as K,K as L,Es as M,ws as N,TE as O,Ss as P,Ko as R,jO as S,sD as T,pn as U,G as V,Ft as W,yM as _,Xz as a,oA as b,gz as c,FL as d,xM as f,mM as g,gM as h,Yz as i,wc as j,Ac as k,KR as l,pM as m,qz as n,Zz as o,bM as p,F as q,Jz as r,Qz as s,nB as t,GL as u,hM as v,vD as w,Q as x,Fj as y,Go as z};